Przeglądaj źródła

:recycle: making sidebar state easier to read

tags/1.0.0
J 4 lat temu
rodzic
commit
d09eaede5d

+ 27
- 8
vue-theme/src/components/sidebars/sidebar.vue Wyświetl plik

63
 import exhibitionsSidebar from './exhibitions'
63
 import exhibitionsSidebar from './exhibitions'
64
 import eventsSidebar from './events'
64
 import eventsSidebar from './events'
65
 
65
 
66
-import { sortTypes } from '@/utils/helpers'
66
+import { sortTypes, materials } from '@/utils/helpers'
67
 
67
 
68
 export default {
68
 export default {
69
     props: {
69
     props: {
88
                 'by artist': `${sortTypes.artist}`,       //:2
88
                 'by artist': `${sortTypes.artist}`,       //:2
89
                 'by episode': `${sortTypes.episode}`,     //:3
89
                 'by episode': `${sortTypes.episode}`,     //:3
90
             },
90
             },
91
-            charaSets: ['0 a b', 'c d e', 'f g h', 'i j k', 'l m n', 'o p q', 'r s t', 'u v w', 'x y z'],
92
-            materials: ['clay', 'fiber', 'glass', 'metal', 'paper', 'wood'],
93
-            shouldShowListSort: ['artist', 'exhibition', 'event', 'short', 'guide', 'object', 'publication', 'technique', 'post'],
94
-            shouldShowMaterialSort: ['artist', 'technique', 'short', 'object', 'guide'],
95
-            shouldShowAlphaSort: ['artist'],
96
-            shouldShowDateSort: ['exhibition', 'event'],
97
-            shouldShowTypeSort: ['short', 'guide', 'publication', 'technique', 'object', 'post']
91
+            charaSets: [
92
+                '0 a b', 'c d e', 'f g h',
93
+                'i j k', 'l m n', 'o p q',
94
+                'r s t', 'u v w', 'x y z'
95
+            ],
96
+            materials: materials,
97
+            shouldShowListSort: [
98
+                'artist', 'exhibition', 'event', 
99
+                'short', 'guide', 'object',
100
+                'publication', 'technique', 'post'
101
+            ],
102
+            shouldShowMaterialSort: [
103
+                'artist', 
104
+                'short', 'guide', 'object',
105
+                'technique',
106
+            ],
107
+            shouldShowAlphaSort: [
108
+                'artist'
109
+            ],
110
+            shouldShowDateSort: [
111
+                'exhibition', 'event'
112
+            ],
113
+            shouldShowTypeSort: [
114
+                'short', 'guide', 'object',
115
+                'publication', 'technique', 'post'
116
+            ]
98
         }
117
         }
99
     },
118
     },
100
     computed: {
119
     computed: {

+ 10
- 0
vue-theme/src/utils/helpers.js Wyświetl plik

3
     return type.charAt(0).toUpperCase() + type.slice(1)
3
     return type.charAt(0).toUpperCase() + type.slice(1)
4
 }
4
 }
5
 
5
 
6
+const materials = [
7
+    'clay',
8
+    'fiber',
9
+    'glass',
10
+    'metal',
11
+    'paper',
12
+    'wood'
13
+]
14
+
6
 const sortTypes = {
15
 const sortTypes = {
7
     alpha: 'by-alpha',
16
     alpha: 'by-alpha',
8
     recent: 'by-recent',
17
     recent: 'by-recent',
77
 
86
 
78
 export {
87
 export {
79
     convertTitleCase,
88
     convertTitleCase,
89
+    materials,
80
     sortTypes,
90
     sortTypes,
81
     postTypes,
91
     postTypes,
82
     ytThumbnail,
92
     ytThumbnail,

Ładowanie…
Anuluj
Zapisz