Просмотр исходного кода

:recycle: updated a parser flag eslint | conditional layout for card if paired flag is set true

tags/0.0.1^2
J 3 лет назад
Родитель
Сommit
cdca78b46a
3 измененных файлов: 11 добавлений и 7 удалений
  1. 1
    0
      frontend/.eslintrc
  2. 8
    5
      frontend/src/components/ProfileCard.vue
  3. 2
    2
      frontend/src/components/SummaryBar.vue

+ 1
- 0
frontend/.eslintrc Просмотреть файл

8
         "prettier"
8
         "prettier"
9
     ],
9
     ],
10
     "parser": "vue-eslint-parser",
10
     "parser": "vue-eslint-parser",
11
+    "parserOptions": { "ecmaVersion": 2020 },
11
     "rules": {}
12
     "rules": {}
12
 }
13
 }

+ 8
- 5
frontend/src/components/ProfileCard.vue Просмотреть файл

1
 <template lang="pug">
1
 <template lang="pug">
2
 w-card.profile-card-list--card.xs12.pa12
2
 w-card.profile-card-list--card.xs12.pa12
3
     header.xs12.w-flex.column.center
3
     header.xs12.w-flex.column.center
4
+        NamePlate(:pid="card.pid" :name="card.name" :role="card.role" :is-list="isList" :is-paired="isPaired")
4
         h1(v-if="isPaired && !isList") some other field
5
         h1(v-if="isPaired && !isList") some other field
5
-        NamePlate(:pid="card.pid" :name="card.name" :role="card.role" :is-list="isList")
6
+        
6
         template(v-if="!isList")
7
         template(v-if="!isList")
7
-            SummaryBar
8
-            TagList
8
+            SummaryBar(:is-paired="isPaired" :show-about="isPaired")
9
+            TagList(v-if="!isPaired || isList")
9
 
10
 
10
     article.xs12.w-flex.column.justify-space-between
11
     article.xs12.w-flex.column.justify-space-between
11
         AspectBar(
12
         AspectBar(
13
+            v-if="!isPaired || isList"
12
             v-for="aspect in aspects"
14
             v-for="aspect in aspects"
13
             :labels="aspect.labels"
15
             :labels="aspect.labels"
14
             :percentage="aspect.percentage"
16
             :percentage="aspect.percentage"
18
     footer(v-if="!isList")
20
     footer(v-if="!isList")
19
         .pa12
21
         .pa12
20
             p {{ bio }}
22
             p {{ bio }}
21
-        PairingButton
23
+        PairingButton(v-if="!isPaired")
22
 </template>
24
 </template>
23
 
25
 
24
 <script setup>
26
 <script setup>
29
 import TagList from './TagList.vue'
31
 import TagList from './TagList.vue'
30
 import PairingButton from './PairingButton.vue'
32
 import PairingButton from './PairingButton.vue'
31
 
33
 
32
-const isPaired = ref(true1
34
+// const isPaired = ref(false)
35
+const isPaired = ref(true)
33
 
36
 
34
 const props = defineProps({
37
 const props = defineProps({
35
     card: {
38
     card: {

+ 2
- 2
frontend/src/components/SummaryBar.vue Просмотреть файл

1
 <template lang="pug">
1
 <template lang="pug">
2
 section.w-flex.column.pb5
2
 section.w-flex.column.pb5
3
-    nav.xs12
3
+    nav.fill-width.w-flex.row
4
+        h1(v-if="showAbout") about
4
         ul.xs12.w-flex.row
5
         ul.xs12.w-flex.row
5
-            li(v-if="showAbout") about
6
             li(v-for="[label, percentage] in summary" :key="label").w-flex.row
6
             li(v-for="[label, percentage] in summary" :key="label").w-flex.row
7
                 w-icon(xl).mr1 mdi mdi-heart
7
                 w-icon(xl).mr1 mdi mdi-heart
8
                 .w-flex.column.justify-start
8
                 .w-flex.column.justify-start

Загрузка…
Отмена
Сохранить