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

Merge branch 'dev' into questionnaire-endpoint

tags/0.0.1^2
juancarbajal98 3 лет назад
Родитель
Сommit
322349689d

+ 3
- 3
backend/package-lock.json Просмотреть файл

@@ -1623,9 +1623,9 @@
1623 1623
             "dev": true
1624 1624
         },
1625 1625
         "caniuse-lite": {
1626
-            "version": "1.0.30001312",
1627
-            "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001312.tgz",
1628
-            "integrity": "sha512-Wiz1Psk2MEK0pX3rUzWaunLTZzqS2JYZFzNKqAiJGiuxIjRPLgV6+VDPOg6lQOUxmDwhTlh198JsTTi8Hzw6aQ==",
1626
+            "version": "1.0.30001418",
1627
+            "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001418.tgz",
1628
+            "integrity": "sha512-oIs7+JL3K9JRQ3jPZjlH6qyYDp+nBTCais7hjh0s+fuBwufc7uZ7hPYMXrDOJhV360KGMTcczMRObk0/iMqZRg==",
1629 1629
             "dev": true
1630 1630
         },
1631 1631
         "chalk": {

+ 6588
- 149
frontend/package-lock.json
Разница между файлами не показана из-за своего большого размера
Просмотреть файл


+ 3
- 1
frontend/package.json Просмотреть файл

@@ -1,6 +1,7 @@
1 1
 {
2 2
     "name": "vite-project",
3 3
     "version": "0.0.0",
4
+    "type": "module",
4 5
     "scripts": {
5 6
         "nodev": "cross-env VITE_DEV=false vite",
6 7
         "dev": "cross-env VITE_DEV=true vite",
@@ -8,7 +9,7 @@
8 9
         "serve": "vite preview",
9 10
         "lint": "eslint --ext .js,.vue --fix src",
10 11
         "format": "prettier .  --write",
11
-        "test": "echo 'no tests at this time...'"
12
+        "test": "ava"
12 13
     },
13 14
     "dependencies": {
14 15
         "joi": "^17.6.0",
@@ -19,6 +20,7 @@
19 20
         "wave-ui": "^2.40.2"
20 21
     },
21 22
     "devDependencies": {
23
+        "@mdi/font": "^7.0.96",
22 24
         "@prettier/plugin-pug": "^1.19.2",
23 25
         "@vitejs/plugin-vue": "^2.2.4",
24 26
         "@vue/compiler-sfc": "^3.2.31",

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

@@ -1,11 +1,30 @@
1 1
 <template lang="pug">
2
-nav#main-header
3
-    router-link(:to="`/matches`") matches
4
-    router-link(to='/') home
5
-    router-link(:to="`/survey`") survey
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
11
+    router-link.w-flex.column(:to='`/`')
12
+        w-button.pa5.bdrsr.bd1.sh1(bg-color='primary')
13
+            w-icon.mr1(xl) mdi mdi-home
14
+            p.text-upper home queue
15
+    router-link.w-flex.column(:to='`/survey`')
16
+        w-button.pa5.bdrsr.bd1.sh1(bg-color='primary')
17
+            w-icon.mr1(xl) mdi mdi-account-check
18
+            p.text-upper survey
19
+    router-link.w-flex.column(:to='`/settings`')
20
+        w-button.pa5.bdrsr.bd1.sh1(bg-color='primary' disabled)
21
+            w-icon.mr1(xl) mdi mdi-cog
22
+            p.text-upper settings
6 23
 </template>
7 24
 
8 25
 <script>
26
+import '@mdi/font/css/materialdesignicons.min.css'
27
+
9 28
 export default {
10 29
     name: 'MainNav',
11 30
 }

+ 1
- 1
frontend/src/entities/card/index.js Просмотреть файл

@@ -1 +1 @@
1
-export * from './card'
1
+export * from './card.js'

+ 2
- 2
frontend/src/entities/grouping/grouping.js Просмотреть файл

@@ -1,7 +1,7 @@
1 1
 /** @module entities/grouping */
2 2
 
3
-import { _baseRecord } from '..'
4
-import { groupingSchema } from './grouping.schema'
3
+import { _baseRecord } from '../index.js'
4
+import { groupingSchema } from './grouping.schema.js'
5 5
 
6 6
 /** Class representing a grouping */
7 7
 class Grouping extends _baseRecord {

+ 2
- 2
frontend/src/entities/grouping/index.js Просмотреть файл

@@ -1,2 +1,2 @@
1
-export * from './grouping'
2
-export * from './grouping.schema'
1
+export * from './grouping.js'
2
+export * from './grouping.schema.js'

+ 6
- 6
frontend/src/entities/index.js Просмотреть файл

@@ -1,8 +1,8 @@
1
-export * from './_modules'
1
+export * from './_modules.js'
2 2
 
3 3
 /** Your different entities */
4
-export * from './response'
5
-export * from './profile'
6
-export * from './survey'
7
-export * from './grouping'
8
-export * from './card'
4
+export * from './response/index.js'
5
+export * from './profile/index.js'
6
+export * from './survey/index.js'
7
+export * from './grouping/index.js'
8
+export * from './card/index.js'

+ 2
- 2
frontend/src/entities/profile/index.js Просмотреть файл

@@ -1,2 +1,2 @@
1
-export * from './profile'
2
-export * from './profile.schema'
1
+export * from './profile.js'
2
+export * from './profile.schema.js'

+ 3
- 3
frontend/src/entities/profile/profile.js Просмотреть файл

@@ -1,6 +1,6 @@
1 1
 /** @module entities/profile */
2
-import { _baseRecord } from '..'
3
-import { profileSchema } from './profile.schema'
2
+import { _baseRecord } from '../index.js'
3
+import { profileSchema } from './profile.schema.js'
4 4
 
5 5
 /** Class representing a profile */
6 6
 class Profile extends _baseRecord {
@@ -14,7 +14,7 @@ class Profile extends _baseRecord {
14 14
     constructor({ email, ...profileData }) {
15 15
         super()
16 16
 
17
-        this.type = this.constructor.name.toLowerCase() 
17
+        this.type = this.constructor.name.toLowerCase()
18 18
 
19 19
         /**  Fields */
20 20
         this.email = email // ! required

+ 1
- 1
frontend/src/entities/profile/profile.schema.js Просмотреть файл

@@ -1,6 +1,6 @@
1 1
 /** @module entities/profileSchema */
2 2
 import Joi from 'joi'
3
-import { allModules, responseSchema } from '..'
3
+import { allModules, responseSchema } from '../index.js'
4 4
 
5 5
 /**
6 6
  * profile schema object

+ 8
- 1
frontend/src/entities/profile/profile.spec.js Просмотреть файл

@@ -1 +1,8 @@
1
-// Write your profile test here
1
+import test from 'ava'
2
+import { Profile } from './profile.js'
3
+
4
+test('instantiate a Profile', async t => {
5
+    const profToTest = { email: 'fake@email.com', user_name: 'bob' }
6
+    const p = new Profile(profToTest)
7
+    t.is(p.user_name, profToTest.user_name)
8
+})

+ 1
- 1
frontend/src/entities/response/index.js Просмотреть файл

@@ -1 +1 @@
1
-export * from './response.schema'
1
+export * from './response.schema.js'

+ 2
- 2
frontend/src/entities/survey/index.js Просмотреть файл

@@ -1,2 +1,2 @@
1
-export * from './survey'
2
-export * from './survey.schema'
1
+export * from './survey.js'
2
+export * from './survey.schema.js'

+ 6
- 7
frontend/src/entities/survey/survey.js Просмотреть файл

@@ -1,6 +1,6 @@
1 1
 /** @module survey/survey */
2
-import { _baseRecord } from '..'
3
-import { surveySchema } from './survey.schema'
2
+import { _baseRecord } from '../index.js'
3
+import { surveySchema } from './survey.schema.js'
4 4
 
5 5
 class Survey extends _baseRecord {
6 6
     constructor(questionSteps, roles) {
@@ -9,15 +9,15 @@ class Survey extends _baseRecord {
9 9
         this.type = this.constructor.name.toLowerCase()
10 10
 
11 11
         /**  Fields */
12
-        this.steps = [
13
-            ...questionSteps
14
-        ] // ! required
12
+        this.steps = [...questionSteps] // ! required
15 13
         this.roleTree = roles
16 14
 
17 15
         return this
18 16
     }
19 17
     setRoleResponses(position) {
20
-        const roleStep = this.steps.filter(step => step.response_key_prompt == 'role')[0]
18
+        const roleStep = this.steps.filter(
19
+            step => step.response_key_prompt == 'role',
20
+        )[0]
21 21
         roleStep.responses = this.roleTree[position]
22 22
     }
23 23
     isValid() {
@@ -33,7 +33,6 @@ class Survey extends _baseRecord {
33 33
         /** validate(this) always returns something so force it to a bool */
34 34
         return !validate.error ? true : false
35 35
     }
36
-
37 36
 }
38 37
 
39 38
 export { Survey }

+ 12
- 10
frontend/src/entities/survey/survey.schema.js Просмотреть файл

@@ -1,5 +1,5 @@
1 1
 import Joi from 'joi'
2
-import { allModules } from '..'
2
+import { allModules } from '../index.js'
3 3
 
4 4
 /**
5 5
  * membership schema object
@@ -17,15 +17,17 @@ const surveySchema = {
17 17
         type: Joi.string(),
18 18
 
19 19
         /** Survey fields */
20
-        steps: Joi.array().items(
21
-            Joi.object({
22
-                id: Joi.number(),
23
-                type: Joi.string(),
24
-                question: Joi.string(),
25
-                // TODO: specify responses to be array or null later
26
-                responses: Joi.any(),
27
-            })
28
-        ).required(),
20
+        steps: Joi.array()
21
+            .items(
22
+                Joi.object({
23
+                    id: Joi.number(),
24
+                    type: Joi.string(),
25
+                    question: Joi.string(),
26
+                    // TODO: specify responses to be array or null later
27
+                    responses: Joi.any(),
28
+                }),
29
+            )
30
+            .required(),
29 31
     }),
30 32
     /** fields required before saving */
31 33
     required: ['steps'],

+ 6
- 7
frontend/src/services/chat.service.js Просмотреть файл

@@ -14,13 +14,13 @@ const providerMethods = {
14 14
     listen: () => console.error('no provider listen method set'),
15 15
 }
16 16
 /**
17
- * 
18
- * 
17
+ *
18
+ *
19 19
  * Breaking out as much pubnub specific flavor
20 20
  */
21 21
 const setupPubnub = async uuid => {
22
-    const publishKey = 'pub-c-73f35484-396f-47ff-b4b6-45bed079fd3b'
23
-    const subscribeKey = 'sub-c-6cb7f5d0-94e2-11ec-b249-a68c05a281ab'
22
+    const publishKey = import.meta.env.VITE_PUBNUB_PUBLISH_KEY
23
+    const subscribeKey = import.meta.env.VITE_PUBNUB_SUBSCRIBE_KEY
24 24
     if (!uuid) return console.error('no pubnub uuid set')
25 25
 
26 26
     const pubnubClient = await new PubNub({
@@ -97,9 +97,9 @@ class Chatter {
97 97
      */
98 98
     async publish(channel, message) {
99 99
         // console.log('publishing message to channel:', channel)
100
-        return providerMethods.publish({ 
100
+        return providerMethods.publish({
101 101
             channel,
102
-            message: new ChatMessage(message)
102
+            message: new ChatMessage(message),
103 103
         })
104 104
     }
105 105
     /**
@@ -128,7 +128,6 @@ class Chatter {
128 128
         this.subscriptions = [MAIN_CHANNEL]
129 129
         console.warn('chatter stop no implemented')
130 130
     }
131
-
132 131
 }
133 132
 
134 133
 export { Chatter }

+ 1
- 1
frontend/src/views/ChatView.vue Просмотреть файл

@@ -25,7 +25,7 @@ main.view--chat
25 25
     p(v-else-if="profile.isLoggedIn && !target") No match found between profile {{ $route.params.tid }} and {{profile.id}}... 
26 26
     p(v-else) Loading...
27 27
 
28
-    MainNav(@show-sidebar="$emit('show-sidebar')")
28
+    MainNav
29 29
 </template>
30 30
 
31 31
 <script>

+ 34
- 30
frontend/src/views/HomeView.vue Просмотреть файл

@@ -1,25 +1,29 @@
1 1
 <template lang="pug">
2
-main.view--home(style="display:flex; flex-direction:column; gap: 40px; margin-top: 1em;")
3
-    h2 Match Queue
4
-    article(v-if="cards.length && !loading")
5
-        ProfileCardList(:profiles="cards" :pid="pid" @reload="getCards")
2
+main.view--home(
3
+    style='display: flex; flex-direction: column; gap: 40px; margin-top: 1em'
4
+)
5
+    header
6
+        h2 Match Queue
6 7
 
7
-    p(v-else) Loading...
8
+    article(v-if='cards.length && !loading')
9
+        ProfileCardList(:pid='pid' :profiles='cards' @reload='getCards')
8 10
 
9
-    h2 Matches
10
-    article(v-if="matches.length && !loading")
11
-        ProfileCardList(:profiles="matches" :pid="pid" @reload="getCards")
12
-    
13
-    p(v-else-if="matches.length===0") No matches.
11
+    p(v-else-if='cards.length === 0') No profiles in match_queue.
14 12
     p(v-else) Loading...
13
+
14
+    MainNav
15 15
 </template>
16 16
 
17 17
 <script>
18
-    import 'wave-ui/dist/wave-ui.css'
18
+import 'wave-ui/dist/wave-ui.css'
19 19
 import ProfileCardList from '../components/ProfileCardList.vue'
20 20
 
21 21
 import { Card } from '../entities'
22
-import { fetchQueueByProfileId, fetchMembershipsByProfileId, currentProfile } from '../services'
22
+import {
23
+    fetchQueueByProfileId,
24
+    fetchMembershipsByProfileId,
25
+    currentProfile,
26
+} from '../services'
23 27
 import { mixins } from '../utils'
24 28
 
25 29
 /** Callback used to format incoming into card */
@@ -72,26 +76,26 @@ export default {
72 76
         // this can be placed in utils/notification.js
73 77
         notify(payload) {
74 78
             this.$waveui.notify({
75
-            message: payload.timetoken,
76
-            timeout: 6000,
77
-            bgColor: 'white',
78
-            color: 'success',
79
-            dismiss: false,
80
-            shadow: true,
81
-            round: true,
82
-            sm: true,
83
-            icon: 'wi-star'
84
-        })
79
+                message: payload.timetoken,
80
+                timeout: 6000,
81
+                bgColor: 'white',
82
+                color: 'success',
83
+                dismiss: false,
84
+                shadow: true,
85
+                round: true,
86
+                sm: true,
87
+                icon: 'wi-star',
88
+            })
85 89
         },
86 90
         //  a way to send a message to a user for development purposes and testing
87
-        async chat()  {
88
-           const chatter = currentProfile.chatter
89
-           const res = await chatter.publish(chatter.subscriptions[0],{
90
-            title: 'New Message',
91
-            description: 'This is a new message',
92
-           })
93
-           this.notify(res)
94
-        }
91
+        async chat() {
92
+            const chatter = currentProfile.chatter
93
+            const res = await chatter.publish(chatter.subscriptions[0], {
94
+                title: 'New Message',
95
+                description: 'This is a new message',
96
+            })
97
+            this.notify(res)
98
+        },
95 99
     },
96 100
 }
97 101
 </script>

+ 7
- 6
frontend/src/views/MatchesView.vue Просмотреть файл

@@ -1,14 +1,15 @@
1 1
 <template lang="pug">
2 2
 main.view--matches.f-col.start.w-full
3 3
     header
4
-        h2 Match Page
4
+        h2 Matches
5 5
 
6
-    article(v-if="!loading")
7
-        ProfileCardList(:profiles="cards" :pid="pid" :is-grid="true")
8
-    
6
+    article(v-if='matches.length && !loading')
7
+        ProfileCardList(:pid='pid' :profiles='matches' @reload='getCards')
8
+
9
+    p(v-else-if='matches.length === 0') No matches.
9 10
     p(v-else) Loading...
10
-    
11
-    MainNav(@show-sidebar="$emit('show-sidebar')")
11
+
12
+    MainNav
12 13
 </template>
13 14
 
14 15
 <script>

+ 17
- 12
frontend/src/views/ProfileView.vue Просмотреть файл

@@ -2,12 +2,12 @@
2 2
 main.view--profile.f-col.start.w-full
3 3
     header 
4 4
         h2 Profile Page
5
- 
6
-    article(v-if="!loading")
5
+
6
+    article(v-if='!loading')
7 7
         h3 name: {{ profile.user_name }}
8
-            span(v-if="profile.profile_prefs?.pronouns") &nbsp;({{ profile.profile_prefs?.pronouns.val }})
9
-        p(v-if="profile.user_email") {{ profile.user_email }}
10
-        
8
+            span(v-if='profile.profile_prefs?.pronouns') &nbsp;({{ profile.profile_prefs?.pronouns.val }})
9
+        p(v-if='profile.user_email') {{ profile.user_email }}
10
+
11 11
         p I am looking for a&nbsp;
12 12
             span {{ profile.profile_prefs?.presence?.val }}&nbsp;
13 13
             span {{ profile.profile_prefs?.role?.val }}&nbsp;
@@ -15,22 +15,27 @@ main.view--profile.f-col.start.w-full
15 15
             span no further than {{ profile.profile_prefs?.distance?.val }} miles away&nbsp;
16 16
             span from {{ profile.profile_prefs?.zipcode?.val }}
17 17
 
18
-        p I am {{ profile.profile_prefs?.urgency?.val.split("_").join(" ") }}.
19
-        
20
-        img(v-if="profile.reveal.map(t => t.description).includes('image')" :src="profile.profile_media[0]" alt="profile-avatar" style="max-height: 200px; width: auto;")
18
+        p I am {{ profile.profile_prefs?.urgency?.val.split('_').join(' ') }}.
19
+
20
+        img(
21
+            :src='profile.profile_media[0]'
22
+            alt='profile-avatar'
23
+            style='max-height: 200px; width: auto'
24
+            v-if='profile.reveal.map(t => t.description).includes("image")'
25
+        )
21 26
         h3(v-else) image not revealed
22
-        
23
-        p About: {{ profile.profile_description}}
27
+
28
+        p About: {{ profile.profile_description }}
24 29
 
25 30
         p reveal: {{ profile.reveal.map(t => t.description) }}
26 31
         p tags: {{ profile.tags.map(t => t.description) }}
27 32
         p images: {{ profile.profile_media }}
28 33
         p responses: {{ profile.responses.length }}
29
-        button(@click="$router.go(-1)") back
34
+        button(@click='$router.go(-1)') back
30 35
 
31 36
     p(v-else) Loading...
32 37
 
33
-    MainNav(@show-sidebar="$emit('show-sidebar')")
38
+    MainNav
34 39
 </template>
35 40
 
36 41
 <script>

+ 50
- 34
frontend/src/views/SurveyView.vue Просмотреть файл

@@ -4,57 +4,73 @@ main.view--survey.f-col.start.w-full
4 4
         p survey for profile: {{ current }}
5 5
     article.match.w-full
6 6
         ul.w-full
7
-            template(v-for="(q, i) in profileQuestions" :key="q.response_key_prompt")
8
-                li(v-if="step == i + 1")
9
-                    p {{q.response_key_category}}: 
7
+            template(
8
+                :key='q.response_key_prompt'
9
+                v-for='(q, i) in profileQuestions'
10
+            )
11
+                li(v-if='step == i + 1')
12
+                    p {{ q.response_key_category }}:
10 13
                         span in db:
11
-                        span(v-if="q.response_key_id") true - id:{{q.response_key_id}} | 
12
-                        span(v-else) false | 
13
-                        span {{q.response_key_prompt}}? 
14
-                        span {{q.response_key_description}} 
14
+                        span(v-if='q.response_key_id') true - id:{{ q.response_key_id }} |
15
+                        span(v-else) false |
16
+                        span {{ q.response_key_prompt }}?
17
+                        span {{ q.response_key_description }}
15 18
 
16 19
                         //- Select
17
-                        div(v-if="q.responses.length")
18
-                            button(
19
-                                v-for="(res, index) in q.responses"
20
-                                :key="index"
21
-                                @click="storeResponseLike(step, q.response_key_id, q.response_key_prompt, res); step++"
22
-                            ).p-0 {{res}}
23
-                        
20
+                        div(v-if='q.responses.length')
21
+                            button.p-0(
22
+                                :key='index'
23
+                                @click='storeResponseLike(step, q.response_key_id, q.response_key_prompt, res); step++'
24
+                                v-for='(res, index) in q.responses'
25
+                            ) {{ res }}
26
+
24 27
                         //- Fill in the blank
25
-                        div(v-else-if="q.response_key_category === 'profile'")
26
-                            input(@input="storeResponseLike(step, q.response_key_id, q.response_key_prompt, profile[q.response_key_prompt])" v-model="profile[q.response_key_prompt]" @keyup.enter="step++") 
27
-                            label >{{ profile[q.response_key_prompt]}}
28
-                        
28
+                        div(v-else-if='q.response_key_category === "profile"')
29
+                            input(
30
+                                @input='storeResponseLike(step, q.response_key_id, q.response_key_prompt, profile[q.response_key_prompt])'
31
+                                @keyup.enter='step++'
32
+                                v-model='profile[q.response_key_prompt]'
33
+                            ) 
34
+                            label >{{ profile[q.response_key_prompt] }}
35
+
29 36
                         //- Aspects
30
-                        div(v-else).f-col
31
-                            input(type="range" min="-3" max="3" list="ticks" @input="storeResponseLike(step, q.response_key_id, q.response_key_prompt, aspects[q.response_key_category])" v-model="aspects[q.response_key_category]").w-full
32
-                            label {{ aspectResponses[parseInt(aspects[q.response_key_category]) + 3] }} 
33
-                    
37
+                        .f-col(v-else)
38
+                            input.w-full(
39
+                                @input='storeResponseLike(step, q.response_key_id, q.response_key_prompt, aspects[q.response_key_category])'
40
+                                list='ticks'
41
+                                max='3'
42
+                                min='-3'
43
+                                type='range'
44
+                                v-model='aspects[q.response_key_category]'
45
+                            )
46
+                            label {{ aspectResponses[parseInt(aspects[q.response_key_category]) + 3] }}
47
+
34 48
                         nav.f-row
35
-                            button(:disabled="step == 0" @click="step--") back
36
-                            p {{step}} of {{profile.length}}
49
+                            button(:disabled='step == 0' @click='step--') back
50
+                            p {{ step }} of {{ profile.length }}
37 51
                             button(
38
-                                v-if="(q.response_key_category === 'profile')"
39
-                                @click="storeResponseLike(step, q.response_key_id, q.response_key_prompt, profile[q.response_key_prompt]); step++"
52
+                                @click='storeResponseLike(step, q.response_key_id, q.response_key_prompt, profile[q.response_key_prompt]); step++'
53
+                                v-if='q.response_key_category === "profile"'
40 54
                             ) next
41 55
                             button(
56
+                                @click='storeResponseLike(step, q.response_key_id, q.response_key_prompt, aspects[q.response_key_category]); step++'
42 57
                                 v-else
43
-                                @click="storeResponseLike(step, q.response_key_id, q.response_key_prompt, aspects[q.response_key_category]); step++"
44 58
                             ) next
45
-                    
59
+
46 60
             //- Confirmation
47
-            li(v-if="step == profileQuestions.length + 1")
61
+            li(v-if='step == profileQuestions.length + 1')
48 62
                 p Does this look correct?
49 63
                 h4 {{ profile }}
50
-                h4 {{aspects}}
64
+                h4 {{ aspects }}
51 65
                 nav.f-row
52
-                    button(@click="step--") back
53
-                    p(@click="step = 1").p-1 start over
54
-                    button(@click="onSave") save
66
+                    button(@click='step--') back
67
+                    p.p-1(@click='step = 1') start over
68
+                    button(@click='onSave') save
55 69
                     //- button(@click="$router.push({ name: 'HomeView' })") save
56 70
     footer
57
-        button(@click="bypass") +30 user profiles
71
+        button(@click='bypass') +30 user profiles
72
+
73
+    MainNav
58 74
 </template>
59 75
 
60 76
 <script>

+ 2
- 0
frontend/src/wave.js Просмотреть файл

@@ -19,6 +19,7 @@ import {
19 19
     WSlider,
20 20
     WSpinner,
21 21
     WSteps,
22
+    WToolbar,
22 23
 } from '../node_modules/wave-ui/src/wave-ui/components'
23 24
 
24 25
 export default {
@@ -39,4 +40,5 @@ export default {
39 40
     WSlider,
40 41
     WSpinner,
41 42
     WSteps,
43
+    WToolbar,
42 44
 }

+ 5
- 0
frontend/tests/test.js Просмотреть файл

@@ -0,0 +1,5 @@
1
+import test from 'ava'
2
+
3
+test('make sure ava works on the frontend', async t => {
4
+    t.pass()
5
+})

+ 7
- 1
frontend/vite.config.js Просмотреть файл

@@ -1,6 +1,12 @@
1 1
 import { defineConfig } from 'vite'
2 2
 import vue from '@vitejs/plugin-vue'
3 3
 
4
+import path from 'path'
5
+import { fileURLToPath } from 'url'
6
+
7
+const filename = fileURLToPath(import.meta.url)
8
+const dirname = path.dirname(filename)
9
+
4 10
 // https://vitejs.dev/config/
5 11
 export default defineConfig({
6 12
     css: {
@@ -14,7 +20,7 @@ export default defineConfig({
14 20
     plugins: [vue()],
15 21
     resolve: {
16 22
         alias: {
17
-            '@': require('path').resolve(__dirname, 'src'),
23
+            '@': path.resolve(dirname, 'src'),
18 24
         },
19 25
     },
20 26
 })

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