Przeglądaj źródła

:fire: trying different chop

tags/0.9.0
J 4 lat temu
rodzic
commit
2e9e6b0a9f
1 zmienionych plików z 6 dodań i 15 usunięć
  1. 6
    15
      vue-theme/src/pages/list.vue

+ 6
- 15
vue-theme/src/pages/list.vue Wyświetl plik

48
         }
48
         }
49
     },
49
     },
50
     computed: {
50
     computed: {
51
-        grid: () => ['episode', 'artist'].includes(this.type),
52
-        isWide: () => ['event', 'exhibition'].includes(this.type),
53
-        sidebar: () => !['episode'].includes(this.type),
54
         type: () => this.$route.params.type,
51
         type: () => this.$route.params.type,
55
         sortBy: () => this.$route.params.sortBy,
52
         sortBy: () => this.$route.params.sortBy,
53
+        grid: () => this.type ? ['episode', 'artist'].includes(this.type) : null,
54
+        isWide: () => this.type ? ['event', 'exhibition'].includes(this.type) : null,
55
+        sidebar: () => this.type ? !['episode'].includes(this.type) : null,
56
         shouldLoadAllAtOnce: () => this.type == 'episode' || this.type == 'artist' && this.sortBy == sortTypes.material,
56
         shouldLoadAllAtOnce: () => this.type == 'episode' || this.type == 'artist' && this.sortBy == sortTypes.material,
57
-        pType: () => {
58
-            if(!this.type) return
59
-            return `${convertTitleCase(this.type)}s`
60
-        },
61
-        loaded: () => {
62
-            if (!this.pType) return
63
-            return this[`all${this.pType}Loaded`]
64
-        },
65
-        posts: () => {
66
-            if (!this.pType) return
67
-            return this[`all${this.pType}`]
68
-        }
57
+        pType: () => this.type ? `${convertTitleCase(this.type)}s` : null,
58
+        loaded: () => this.pType ? this[`all${this.pType}Loaded`] : false,
59
+        posts: () => this.pType ? this[`all${this.pType}`] : []
69
     },
60
     },
70
     methods: {
61
     methods: {
71
         async loadMorePosts(shouldClear) {
62
         async loadMorePosts(shouldClear) {

Ładowanie…
Anuluj
Zapisz