ソースを参照

add kit intro content from static page and update pages ids

axolotle 2 年 前
コミット
a4c966c4ad
2 ファイル変更14 行追加6 行削除
  1. 10 4
      src/pages/kit/KitList.vue
  2. 4 2
      src/store/modules/pages.js

+ 10 - 4
src/pages/kit/KitList.vue

@@ -2,9 +2,8 @@
   <b-overlay :show="filteredNodes === undefined" class="h-100" z-index="0">
     <div class="kit-list">
       <header class="kit-list-header">
-        <div class="kit-list-header-intro">
-          FIXME Intro
-        </div>
+        <div class="kit-list-header-intro" v-html="intro" />
+
         <search-input v-model="search" class="input-search" />
       </header>
 
@@ -41,7 +40,8 @@ export default {
 
   data () {
     return {
-      search: ''
+      search: '',
+      intro: ''
     }
   },
 
@@ -53,6 +53,12 @@ export default {
       const search = this.search.toLowerCase()
       return this.sheets.filter(node => searchInNode(search, node))
     }
+  },
+
+  async created () {
+    this.$store.dispatch('QUERY_PAGE', 'kit').then(page => {
+      this.intro = page.content
+    })
   }
 }
 </script>

+ 4 - 2
src/store/modules/pages.js

@@ -6,9 +6,11 @@ export default {
   state: {
     welcome: undefined,
     intro: undefined,
+    kit: undefined,
     ids: {
-      welcome: 208,
-      intro: 207
+      welcome: 263,
+      intro: 264,
+      kit: 209
     },
     visited: localStorage.getItem('visited') === 'true'
   },