Sfoglia il codice sorgente

:recycle: moving around import for individual wave-ui components | added more samples

tags/0.0.1
J 3 anni fa
parent
commit
4081266f7b
4 ha cambiato i file con 39 aggiunte e 7 eliminazioni
  1. 23
    5
      frontend/src/App.vue
  2. 1
    1
      frontend/src/main.js
  3. 1
    1
      frontend/src/router/index.js
  4. 14
    0
      frontend/src/wave.js

+ 23
- 5
frontend/src/App.vue Vedi File

@@ -1,15 +1,31 @@
1 1
 <template lang="pug">
2 2
 w-app
3
-    w-badge
4
-        template(#badge) 3
5
-            w-button(color="primary")
6
-                w-icon(class="mr1") mdi mdi-email Emails
3
+    w-drawer(v-model="openDrawer")
4
+    w-flex.my12(:gap="3" align-center wrap)
5
+        w-button.ma1(@click="$waveui.notify('Information.')" bg-color="info") Notify info
6
+        w-button.ma1(@click="$waveui.notify('Success!', 'success')" bg-color="success") Notify success
7
+        w-button.ma1(@click="$waveui.notify('Warning!', 'warning')" bg-color="warning") Notify warning
8
+        w-button.ma1(@click="$waveui.notify('Error :(', 'error', 0)" bg-color="error") Permanent error
9
+    w-flex.my12(align-center wrap)
10
+        w-spinner(bounce)
11
+        w-input Label
12
+        w-checkbox Single option
13
+    w-flex.my12
14
+        w-button(@click="openDrawer = true" outline="")
15
+            | Open drawer
16
+    w-flex.my12(grow column)
17
+        w-slider(:model-value="40" thumb-label step-label :step="20" color="primary-light3").mt12
18
+        .mt4 v-model:
19
+            code.ml1 {{ sliderVal }}
7 20
     w-flex.my12(:gap="3" align-center wrap)
8 21
         | Show menu on:
9 22
         w-menu
10 23
             template(#activator="{ on }")
11 24
                 w-button(v-on="on") Show menu
12 25
             | Menu content
26
+        w-badge.mr10(bg-color="error")
27
+            template(#badge) 3
28
+            w-icon(color="grey-light1" size="2.5em") mdi mdi-email
13 29
     SideBar(
14 30
         v-if="showSidebar"
15 31
         :pid="getPid"
@@ -37,9 +53,11 @@ export default {
37 53
     components: { SideBar },
38 54
     data: () => ({
39 55
         showSidebar: false,
56
+        sliderVal: 1,
57
+        openDrawer: false,
40 58
     }),
41 59
     computed: {
42
-        getPid: () => currentProfile.id.value,
60
+        getPid: () => (currentProfile.id.value ? currentProfile.id.value : 999),
43 61
     },
44 62
     async created() {
45 63
         /** Get questions so we can compare against profile responses */

+ 1
- 1
frontend/src/main.js Vedi File

@@ -1,5 +1,5 @@
1 1
 import { createApp } from 'vue'
2
-import router from './router'
2
+import { router } from './router'
3 3
 import { checkLoginStatus } from './router/guards'
4 4
 
5 5
 import WaveUI from '../node_modules/wave-ui/src/wave-ui/core'

+ 1
- 1
frontend/src/router/index.js Vedi File

@@ -49,4 +49,4 @@ const router = createRouter({
49 49
     routes,
50 50
 })
51 51
 
52
-export default router
52
+export { router }

+ 14
- 0
frontend/src/wave.js Vedi File

@@ -7,11 +7,18 @@ import {
7 7
     WBadge,
8 8
     WButton,
9 9
     WCard,
10
+    WCheckbox,
11
+    WDrawer,
10 12
     WFlex,
11 13
     WIcon,
12 14
     WImage,
15
+    WInput,
13 16
     WMenu,
17
+    WProgress,
14 18
     WOverlay,
19
+    WSlider,
20
+    WSpinner,
21
+    WSteps,
15 22
 } from '../node_modules/wave-ui/src/wave-ui/components'
16 23
 
17 24
 export default {
@@ -20,9 +27,16 @@ export default {
20 27
     WBadge,
21 28
     WButton,
22 29
     WCard,
30
+    WCheckbox,
31
+    WDrawer,
23 32
     WFlex,
24 33
     WIcon,
25 34
     WImage,
35
+    WInput,
26 36
     WMenu,
37
+    WProgress,
27 38
     WOverlay,
39
+    WSlider,
40
+    WSpinner,
41
+    WSteps,
28 42
 }

Loading…
Annulla
Salva