Ver código fonte

:fire: trying different chop

tags/0.9.0
J 4 anos atrás
pai
commit
2e9e6b0a9f
1 arquivos alterados com 6 adições e 15 exclusões
  1. 6
    15
      vue-theme/src/pages/list.vue

+ 6
- 15
vue-theme/src/pages/list.vue Ver arquivo

@@ -48,24 +48,15 @@ export default {
48 48
         }
49 49
     },
50 50
     computed: {
51
-        grid: () => ['episode', 'artist'].includes(this.type),
52
-        isWide: () => ['event', 'exhibition'].includes(this.type),
53
-        sidebar: () => !['episode'].includes(this.type),
54 51
         type: () => this.$route.params.type,
55 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 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 61
     methods: {
71 62
         async loadMorePosts(shouldClear) {

Carregando…
Cancelar
Salvar