Skip to content

Commit 59e6096

Browse files
committed
Merge branch 'introducing-user-dashboard' (early part) into develop
2 parents f601581 + 9b77daa commit 59e6096

20 files changed

+392
-41
lines changed

mobile/src/components/events/CurrentEventHeader.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
<ion-button class="viewsHeader-back" @click="backButtonClicked" shape="round">
66
<ion-icon src="/assets/icons/solid/checkbox-list.svg"></ion-icon>
77
</ion-button>
8-
<global-user-actions-button />
8+
<!-- TODO: Fix router navigation from preferences/schedule prior to re-enabling this one -->
9+
<!-- <global-user-actions-button :tabbed-navigation="true" />-->
910
</div>
1011

1112
<div class="viewsSubHeader">

mobile/src/components/feedbacks/BaseFeedbackStep.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ const eventId = new EventId(getRouteParamsValue(route, 'eventId'));
7979
8080
const ionRouter = useIonRouter();
8181
function backButtonClicked() {
82-
goBackOrNavigateTo(ionRouter, `/events/${eventId.value}`, 0)
82+
goBackOrNavigateTo(ionRouter, `/events/${eventId.value}`)
8383
}
8484
</script>
8585

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
<template>
2+
<div class="ion-padding-top ion-padding-start ion-padding-end">
3+
<div class="callout" :class="{ ['_'+type]: true }">
4+
<ion-icon class="callout-illu" aria-hidden="true" :icon="icon" />
5+
<div class="callout-content">
6+
<span class="callout-content-title">{{title}}</span>
7+
<ion-text class="callout-content-description">
8+
<slot></slot>
9+
</ion-text>
10+
</div>
11+
</div>
12+
</div>
13+
</template>
14+
15+
<script setup lang="ts">
16+
import {IonText} from "@ionic/vue";
17+
import {computed, PropType, Ref} from "vue";
18+
import {checkmarkCircle, closeCircle, informationCircle, warningSharp} from "ionicons/icons";
19+
import {match} from "ts-pattern";
20+
21+
const props = defineProps({
22+
type: {
23+
required: true,
24+
type: String as PropType<"info"|"success"|"warning"|"error">,
25+
},
26+
title: {
27+
required: true,
28+
type: String,
29+
},
30+
})
31+
32+
const icon = computed(() => match([props.type])
33+
.with(["info"], () => informationCircle)
34+
.with(["warning"], () => warningSharp)
35+
.with(["error"], () => closeCircle)
36+
.with(["success"], () => checkmarkCircle)
37+
.otherwise(() => undefined)
38+
) as Ref<string|undefined>;
39+
40+
</script>
41+
42+
<style lang="scss" scoped>
43+
.callout {
44+
position: relative;
45+
display: flex;
46+
flex-direction: row;
47+
column-gap: 16px;
48+
background-color: rgba(white, 0.5);
49+
border: 1px solid var(--app-beige-line);
50+
border-left-width: 4px;
51+
backdrop-filter: blur(5px);
52+
padding: 16px;
53+
border-radius: 12px;
54+
overflow: hidden;
55+
56+
&:before {
57+
position: absolute;
58+
width: 20%;
59+
height: 40%;
60+
left: 0;
61+
bottom: 0;
62+
transform: scale(1);
63+
opacity: 1;
64+
filter: blur(32px);
65+
z-index: 0;
66+
content: '';
67+
}
68+
69+
.callout-illu {
70+
flex: 0 0 auto;
71+
font-size: 44px;
72+
}
73+
74+
&-content {
75+
flex: 1;
76+
display: flex;
77+
flex-direction: column;
78+
row-gap: 4px;
79+
80+
&-title {
81+
font-size: 16px;
82+
font-weight: 900;
83+
}
84+
85+
&-description {
86+
font-size: 12px;
87+
}
88+
}
89+
90+
/* Callout Type */
91+
$callout-color: (
92+
info: var(--app-voxxrin-rgb),
93+
success: var(--app-green-rgb),
94+
warning: var(--app-yellow-rgb),
95+
error: var(--app-red-rgb)
96+
);
97+
98+
@each $cssClass, $callout-context in $callout-color {
99+
&._#{$cssClass} {
100+
border-left-color: rgba($callout-context, 1);
101+
102+
.callout-illu { color: rgba($callout-context, 1);}
103+
.callout-content-title { color: rgba($callout-context, 1);}
104+
105+
&:before {
106+
background: linear-gradient(331deg, rgba($callout-context, 0.6) 30%, rgba($callout-context, 0.6) 80%);
107+
}
108+
}
109+
}
110+
}
111+
</style>

mobile/src/components/user/GlobalUserActionsButton.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const viewableUserDashboard = import.meta.env.VITE_VIEWABLE_USER_DASHBOARD === "
1414
const ionRouter = useIonRouter();
1515
function openUserDashboard() {
1616
if(viewableUserDashboard) {
17-
goBackOrNavigateTo(ionRouter, `/user/dashboard`, 0);
17+
goBackOrNavigateTo(ionRouter, `/user/dashboard`);
1818
}
1919
}
2020
</script>

mobile/src/i18n/en/index.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,17 @@ const en = {
8484
New_content_available_click_on_reload_button_to_update: "New content available. Click on reload button to update in background then auto-reload page once content is downloaded.",
8585
Reload: "Reload",
8686
No_talks_matching_search_terms: "No talks found for selected day",
87+
Please_keep_this_token_private: "Please keep this token private",
88+
User_uid: "User uid",
89+
Profile: "Profile",
90+
Logout: "Logout",
91+
Anonymous_private_user_id: "Anonymous (private) user token",
92+
Public_user_id: "Public user token",
93+
How_and_where_can_I_contact_the_team: "How and where can I contact the team ?",
94+
This_token_will_be_used_to_reference_you_in_APIs: "This token will be used to (anonymously) reference you in feedbacks",
95+
App_settings: "App settings",
96+
Configure_my_preferences_app: "Configure my preferences app",
97+
Frequently_asked_questions: "Frequently asked questions",
8798
} satisfies BaseTranslation
8899

89100
export default en

mobile/src/i18n/i18n-types.ts

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,50 @@ type RootTranslation = {
349349
* N​o​ ​t​a​l​k​s​ ​f​o​u​n​d​ ​f​o​r​ ​s​e​l​e​c​t​e​d​ ​d​a​y
350350
*/
351351
No_talks_matching_search_terms: string
352+
/**
353+
* P​l​e​a​s​e​ ​k​e​e​p​ ​t​h​i​s​ ​t​o​k​e​n​ ​p​r​i​v​a​t​e
354+
*/
355+
Please_keep_this_token_private: string
356+
/**
357+
* U​s​e​r​ ​u​i​d
358+
*/
359+
User_uid: string
360+
/**
361+
* P​r​o​f​i​l​e
362+
*/
363+
Profile: string
364+
/**
365+
* L​o​g​o​u​t
366+
*/
367+
Logout: string
368+
/**
369+
* A​n​o​n​y​m​o​u​s​ ​(​p​r​i​v​a​t​e​)​ ​u​s​e​r​ ​t​o​k​e​n
370+
*/
371+
Anonymous_private_user_id: string
372+
/**
373+
* P​u​b​l​i​c​ ​u​s​e​r​ ​t​o​k​e​n
374+
*/
375+
Public_user_id: string
376+
/**
377+
* H​o​w​ ​a​n​d​ ​w​h​e​r​e​ ​c​a​n​ ​I​ ​c​o​n​t​a​c​t​ ​t​h​e​ ​t​e​a​m​ ​?
378+
*/
379+
How_and_where_can_I_contact_the_team: string
380+
/**
381+
* T​h​i​s​ ​t​o​k​e​n​ ​w​i​l​l​ ​b​e​ ​u​s​e​d​ ​t​o​ ​(​a​n​o​n​y​m​o​u​s​l​y​)​ ​r​e​f​e​r​e​n​c​e​ ​y​o​u​ ​i​n​ ​f​e​e​d​b​a​c​k​s
382+
*/
383+
This_token_will_be_used_to_reference_you_in_APIs: string
384+
/**
385+
* A​p​p​ ​s​e​t​t​i​n​g​s
386+
*/
387+
App_settings: string
388+
/**
389+
* C​o​n​f​i​g​u​r​e​ ​m​y​ ​p​r​e​f​e​r​e​n​c​e​s​ ​a​p​p
390+
*/
391+
Configure_my_preferences_app: string
392+
/**
393+
* F​r​e​q​u​e​n​t​l​y​ ​a​s​k​e​d​ ​q​u​e​s​t​i​o​n​s
394+
*/
395+
Frequently_asked_questions: string
352396
}
353397

354398
export type TranslationFunctions = {
@@ -684,6 +728,50 @@ export type TranslationFunctions = {
684728
* No talks found for selected day
685729
*/
686730
No_talks_matching_search_terms: () => LocalizedString
731+
/**
732+
* Please keep this token private
733+
*/
734+
Please_keep_this_token_private: () => LocalizedString
735+
/**
736+
* User uid
737+
*/
738+
User_uid: () => LocalizedString
739+
/**
740+
* Profile
741+
*/
742+
Profile: () => LocalizedString
743+
/**
744+
* Logout
745+
*/
746+
Logout: () => LocalizedString
747+
/**
748+
* Anonymous (private) user token
749+
*/
750+
Anonymous_private_user_id: () => LocalizedString
751+
/**
752+
* Public user token
753+
*/
754+
Public_user_id: () => LocalizedString
755+
/**
756+
* How and where can I contact the team ?
757+
*/
758+
How_and_where_can_I_contact_the_team: () => LocalizedString
759+
/**
760+
* This token will be used to (anonymously) reference you in feedbacks
761+
*/
762+
This_token_will_be_used_to_reference_you_in_APIs: () => LocalizedString
763+
/**
764+
* App settings
765+
*/
766+
App_settings: () => LocalizedString
767+
/**
768+
* Configure my preferences app
769+
*/
770+
Configure_my_preferences_app: () => LocalizedString
771+
/**
772+
* Frequently asked questions
773+
*/
774+
Frequently_asked_questions: () => LocalizedString
687775
}
688776

689777
export type Formatters = {}

mobile/src/router/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ const routes: Array<RouteRecordRaw> = [
3636
{ path: 'details', component: () => preloadedPage('TalkDetailsPage') },
3737
{ path: 'feedbacks', component: () => preloadedPage('TalkFeedbacksPage') },
3838
]},
39+
{ path: '/faq', component: () => preloadedPage('FAQPage') },
3940
{ path: '/user/dashboard', component: () => preloadedPage('UserDashboardPage') },
4041
{ path: '/user/talks', component: () => preloadedPage('ViewableTalksHavingFeedbacksPage') },
4142
{ path: '/user/events/:eventId/talks/:talkId/asFeedbackViewer/:secretFeedbacksViewerToken', component: () => preloadedPage('TalkFeedbacksPage') },
@@ -79,7 +80,7 @@ export default router
7980
* (after some vue-router's back() magic: if you want further explanation on the why, look at useTabbedPageNav hook)
8081
* - If this is not possible, then a navigation on fallback url will replace actual history state
8182
*/
82-
export async function goBackOrNavigateTo(ionRouter: UseIonRouterResult, fallbackUrl: string, routerGoBacks: number, routeDirection: RouteDirection = 'back', onEventCaught: (() => Promise<void>)|undefined = undefined) {
83+
export async function goBackOrNavigateTo(ionRouter: UseIonRouterResult, fallbackUrl: string, routerGoBacks: number = 0, routeDirection: RouteDirection = 'back', onEventCaught: (() => Promise<void>)|undefined = undefined) {
8384
if(onEventCaught) {
8485
await onEventCaught();
8586
}

mobile/src/router/preloaded-pages.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import ViewableTalksHavingFeedbacksPage from '@/views/user/ViewableTalksHavingFe
1414
import MyGlobalSettingsPage from '@/views/user/MyGlobalSettingsPage.vue';
1515
import MyPersonalDataPage from '@/views/user/MyPersonalDataPage.vue';
1616
import UserTokenRegistrationPage from '@/views/UserTokenRegistrationPage.vue';
17+
import FAQPage from '@/views/FAQPage.vue';
1718

1819
const modules = {
1920
_BaseEventPages,
@@ -32,6 +33,7 @@ const modules = {
3233
MyGlobalSettingsPage,
3334
MyPersonalDataPage,
3435
UserTokenRegistrationPage,
36+
FAQPage,
3537
} as const;
3638

3739
export type PreloadedModules = typeof modules;

mobile/src/styles/utils/_variables.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@
3232
--app-primary-shade: #404040;
3333
--app-primary-tint: #656463;
3434

35+
--app-green: #73a027;
36+
--app-green-rgb: 115, 160, 39;
37+
--app-yellow: #D78816FF;
38+
--app-yellow-rgb: 215, 136, 22;
39+
--app-red: #cc0f0f;
40+
--app-red-rgb: 204, 15, 15;
41+
42+
3543
--app-background: #F7F6F0;
3644

3745
/* STYLES */

0 commit comments

Comments
 (0)