Przeglądaj źródła

:recycle: incorporated Wave Card and Drawer components to home screen

tags/0.0.1^2
juancarbajal98 3 lat temu
rodzic
commit
e8d9dd5fb3

+ 1
- 1
frontend/src/App.vue Wyświetl plik

@@ -1,5 +1,5 @@
1 1
 <template lang="pug">
2
-w-app(style="display:flex; flex-direction:row-reverse; gap: 40px; justify-content: flex-end;")
2
+w-app(style="margin:12px;")
3 3
     //- w-drawer(v-model="openDrawer")
4 4
     //- w-flex.my12(:gap="3" align-center wrap)
5 5
     //-     w-button.ma1(@click="$waveui.notify('Information.')" bg-color="info") Notify info

+ 8
- 3
frontend/src/components/ProfileCardList.vue Wyświetl plik

@@ -1,5 +1,5 @@
1 1
 <template lang="pug">
2
-section.profile-card-list
2
+section.profile-card-list(:style="{'display': 'flex'}")
3 3
     .swipe(
4 4
         v-if="!isGrid"
5 5
         :config="config"
@@ -8,8 +8,13 @@ section.profile-card-list
8 8
         v-for="(profile, i) in loadedProfiles"
9 9
         :style="{ 'z-index': 1000-i }"
10 10
     )
11
-        .card.randomize(
12
-            :style="{ 'background-image': `url(${profile.avatar})`, 'top': `${randomize(10)}px`, 'right': `${randomize(20)}px`, 'transform': `rotate(${randomize(7)}deg)` }"
11
+
12
+        //- .card.randomize(
13
+        //-     :style="{ 'background-image': `url(${profile.avatar})`, 'top': `${randomize(10)}px`, 'right': `${randomize(20)}px`, 'transform': `rotate(${randomize(7)}deg)` }"
14
+        //- )
15
+        w-card.card.randomize(
16
+            :image="`${profile.avatar}`"
17
+            :style="{'top': `${randomize(10)}px`, 'right': `${randomize(20)}px`, 'transform': `rotate(${randomize(7)}deg)`}"
13 18
         )
14 19
             .card--content
15 20
                 p(style="color: magenta;") profile: {{ profile.pid }}

+ 2
- 2
frontend/src/main.js Wyświetl plik

@@ -28,8 +28,8 @@ router.beforeEach((to, from, next) => {
28 28
 
29 29
 const run = entry => {
30 30
     const siimee = createApp(App)
31
-    // siimee.use(WaveUI, { components })
32
-    // new WaveUI(siimee)
31
+    siimee.use(WaveUI, { components })
32
+    new WaveUI(siimee)
33 33
 
34 34
     siimee.use(router)
35 35
     siimee.component('MainNav', MainNav)

+ 13
- 7
frontend/src/views/HomeView.vue Wyświetl plik

@@ -1,16 +1,19 @@
1 1
 <template lang="pug">
2
-main(class="view--home"  style="display:flex; flex-direction:row; gap: 40px")
3
-    div
2
+main.view--home(style="display:flex; flex-direction:column; gap: 40px")
3
+    div.view--nav(style="display: flex; justify-content: space-between;")
4 4
         header
5 5
             h2 home - profile: {{ pid }}
6
+        w-drawer(v-model="openDrawer")
7
+        w-button(@click="openDrawer = true" outline="")
8
+            | Active Chats
6 9
   
7
-        article(v-if="cards.length && !loading")
8
-            ProfileCardList(:profiles="cards" :pid="pid" @reload="getCards")
9
-  
10
-        p(v-else) Loading...
10
+    h2 Match Queue
11
+    article(v-if="cards.length && !loading")
12
+        ProfileCardList(:profiles="cards" :pid="pid" @reload="getCards")
11 13
 
12
-    MainNav(@show-sidebar="$emit('show-sidebar')")
14
+    p(v-else) Loading...
13 15
 
16
+    h2 Matches
14 17
     article(v-if="matches.length && !loading")
15 18
         ProfileCardList(:profiles="matches" :pid="pid" @reload="getCards")
16 19
     
@@ -59,6 +62,9 @@ export default {
59 62
     name: 'HomeView',
60 63
     components: { ProfileCardList },
61 64
     mixins: [mixins.pidMixin, mixins.cardMixin],
65
+    data: () => ({
66
+        openDrawer: false,
67
+    }),
62 68
     methods: {
63 69
         /** Gets called from cardMixin */
64 70
         async getCards() {

Ładowanie…
Anuluj
Zapisz