Ver código fonte

:recycle: removing cruft | tweaking nav and layou to look more like mock-up | added top nav

tags/0.0.1^2
J 3 anos atrás
pai
commit
cf715bce3a

+ 1
- 1
frontend/index.html Ver arquivo

6
         <title>Vite App</title>
6
         <title>Vite App</title>
7
     </head>
7
     </head>
8
     <body>
8
     <body>
9
-        <div id="app" style="width:90%;margin:5%;"></div>
9
+        <div id="app"></div>
10
         <script>
10
         <script>
11
             // DUMB shim
11
             // DUMB shim
12
             var global = window
12
             var global = window

+ 4
- 1
frontend/src/App.vue Ver arquivo

1
 <template lang="pug">
1
 <template lang="pug">
2
 w-app
2
 w-app
3
+    TopNav(@on-open="openDrawer = !openDrawer")
4
+
3
     w-drawer(v-model="openDrawer")
5
     w-drawer(v-model="openDrawer")
4
         SideBar(@updatePid="setPid" :pid="profile.id.value")
6
         SideBar(@updatePid="setPid" :pid="profile.id.value")
5
         
7
         
14
 <script>
16
 <script>
15
 import 'wave-ui/dist/wave-ui.css'
17
 import 'wave-ui/dist/wave-ui.css'
16
 import SideBar from './components/SideBar.vue'
18
 import SideBar from './components/SideBar.vue'
19
+import TopNav from './components/TopNav.vue'
17
 
20
 
18
 import { currentProfile } from './services'
21
 import { currentProfile } from './services'
19
 import { surveyFactory } from './utils'
22
 import { surveyFactory } from './utils'
22
 const DEV_PID = 45
25
 const DEV_PID = 45
23
 
26
 
24
 export default {
27
 export default {
25
-    components: { SideBar },
28
+    components: { TopNav, SideBar },
26
     data: () => ({
29
     data: () => ({
27
         sliderVal: 1,
30
         sliderVal: 1,
28
         openDrawer: false,
31
         openDrawer: false,

+ 15
- 15
frontend/src/components/MainNav.vue Ver arquivo

1
 <template lang="pug">
1
 <template lang="pug">
2
-w-toolbar.mt6.py1.no-grow(bottom)
3
-    router-link.w-flex.column(:to='`/chats`')
4
-        w-button.pa5.bdrsr.bd1.sh1(bg-color='primary' disabled)
5
-            w-icon.mr1(xl) mdi mdi-forum
6
-            p.text-upper active chats
7
-    router-link.w-flex.column(:to='`/matches`')
8
-        w-button.pa5.bdrsr.bd1.sh1(bg-color='primary')
9
-            w-icon.mr1(xl) mdi mdi-tooltip-account
10
-            p.text-upper pending matches
2
+w-toolbar.mt6.py1(bottom fixed)
11
     router-link.w-flex.column(:to='`/`')
3
     router-link.w-flex.column(:to='`/`')
12
-        w-button.pa5.bdrsr.bd1.sh1(bg-color='primary')
4
+        w-button.pa8(bg-color='primary')
13
             w-icon.mr1(xl) mdi mdi-home
5
             w-icon.mr1(xl) mdi mdi-home
14
-            p.text-upper home queue
6
+            //- p.text-upper home queue
7
+    router-link.w-flex.column(:to='`/matches`')
8
+        w-button.pa8(bg-color='primary')
9
+            w-icon.mr1(xl) mdi mdi-tooltip-account
10
+            //- p.text-upper pending matches
11
+    router-link.w-flex.column(:to='`/chats`')
12
+        w-button.pa8(bg-color='primary' disabled)
13
+            w-icon.mr1(xl) mdi mdi-forum
14
+            //- p.text-upper active chats
15
     router-link.w-flex.column(:to='`/survey`')
15
     router-link.w-flex.column(:to='`/survey`')
16
-        w-button.pa5.bdrsr.bd1.sh1(bg-color='primary')
16
+        w-button.pa8(bg-color='primary')
17
             w-icon.mr1(xl) mdi mdi-account-check
17
             w-icon.mr1(xl) mdi mdi-account-check
18
-            p.text-upper survey
18
+            //- p.text-upper survey
19
     router-link.w-flex.column(:to='`/settings`')
19
     router-link.w-flex.column(:to='`/settings`')
20
-        w-button.pa5.bdrsr.bd1.sh1(bg-color='primary' disabled)
20
+        w-button.pa8(bg-color='primary' disabled)
21
             w-icon.mr1(xl) mdi mdi-cog
21
             w-icon.mr1(xl) mdi mdi-cog
22
-            p.text-upper settings
22
+            //- p.text-upper settings
23
 </template>
23
 </template>
24
 
24
 
25
 <script>
25
 <script>

+ 4
- 1
frontend/src/components/ProfileCard.vue Ver arquivo

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
+        h1(v-if="isPaired && !isList") some other field
4
         NamePlate(:pid="card.pid" :name="card.name" :role="card.role" :is-list="isList")
5
         NamePlate(:pid="card.pid" :name="card.name" :role="card.role" :is-list="isList")
5
         template(v-if="!isList")
6
         template(v-if="!isList")
6
             SummaryBar
7
             SummaryBar
21
 </template>
22
 </template>
22
 
23
 
23
 <script setup>
24
 <script setup>
24
-import { computed } from 'vue'
25
+import { ref } from 'vue'
25
 import NamePlate from './NamePlate.vue'
26
 import NamePlate from './NamePlate.vue'
26
 import AspectBar from './AspectBar.vue'
27
 import AspectBar from './AspectBar.vue'
27
 import SummaryBar from './SummaryBar.vue'
28
 import SummaryBar from './SummaryBar.vue'
28
 import TagList from './TagList.vue'
29
 import TagList from './TagList.vue'
29
 import PairingButton from './PairingButton.vue'
30
 import PairingButton from './PairingButton.vue'
30
 
31
 
32
+const isPaired = ref(true1
33
+
31
 const props = defineProps({
34
 const props = defineProps({
32
     card: {
35
     card: {
33
         type: Object,
36
         type: Object,

+ 23
- 0
frontend/src/components/TopNav.vue Ver arquivo

1
+<template lang="pug">
2
+w-toolbar.w-flex.align-center.justify-between(top fixed)
3
+    router-link.w-flex.column.no-grow(v-if="$route.params.pid" :to='`/`')
4
+        w-button.pa4(bg-color='transparent')
5
+            w-icon.mr1(md) mdi mdi-arrow-left
6
+    
7
+    w-button.pa4(v-if="!$route.params.pid" bg-color='transparent' @click="$emit('on-open')")
8
+        w-icon.mr1(md) mdi mdi-cog
9
+
10
+    router-link.w-flex.column(:to='`/`')
11
+        p.text-upper.text-center {{$route.path}} {{$route.params}}
12
+
13
+    router-link.w-flex.column.no-grow(v-if="!$route.params.pid" :to='`/search`')
14
+        w-button.pa4(bg-color='transparent' disabled)
15
+            w-icon.mr1(md) mdi mdi-magnify
16
+                //- p.text-upper settings
17
+</template>
18
+
19
+<script>
20
+export default {
21
+    name: 'TopNav',
22
+}
23
+</script>

+ 1
- 1
frontend/src/router/index.js Ver arquivo

33
         meta: { requiresAuth: true, requiresCompleteProfile: true },
33
         meta: { requiresAuth: true, requiresCompleteProfile: true },
34
     },
34
     },
35
     {
35
     {
36
-        path: '/chat/:tid',
36
+        path: '/chat/:pid',
37
         component: ChatView,
37
         component: ChatView,
38
         meta: {
38
         meta: {
39
             requiresAuth: true,
39
             requiresAuth: true,

+ 1
- 1
frontend/src/views/ChatView.vue Ver arquivo

22
         input(v-model="toSend" @keyup.enter="sendMessage")
22
         input(v-model="toSend" @keyup.enter="sendMessage")
23
         button(@click="sendMessage") send
23
         button(@click="sendMessage") send
24
 
24
 
25
-    p(v-else-if="profile.isLoggedIn && !target") No match found between profile {{ $route.params.tid }} and {{profile.id}}... 
25
+    p(v-else-if="profile.isLoggedIn && !target") No match found between profile {{ $route.params.pid }} and {{profile.id}}... 
26
     p(v-else) Loading...
26
     p(v-else) Loading...
27
 
27
 
28
     MainNav
28
     MainNav

+ 0
- 5
frontend/src/views/HomeView.vue Ver arquivo

29
                 type='password'
29
                 type='password'
30
             )
30
             )
31
 
31
 
32
-        SummaryBar
33
-        TagList(:icon='{ family: "mdi", shape: "heart" }')
34
-        AspectBar
35
-        PairingButton
36
-
37
     MainNav
32
     MainNav
38
 </template>
33
 </template>
39
 
34
 

Carregando…
Cancelar
Salvar