Skip to content

Commit 6bf7fb1

Browse files
SpliiTgithub-actions[bot]
authored andcommitted
Apply prepare changes
1 parent 0102b6c commit 6bf7fb1

File tree

16 files changed

+289
-217
lines changed

16 files changed

+289
-217
lines changed

components/Errors/Banner.vue

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
<template>
2-
<v-banner v-if="server_error" elevation="2" style="background-color: grey; z-index:100;" position="fixed">
2+
<v-banner
3+
v-if="server_error"
4+
elevation="2"
5+
style="background-color: grey; z-index: 100"
6+
position="fixed"
7+
>
38
<v-row>
49
<v-col cols="auto" class="white--text text-center">
510
<v-tooltip location="end">
@@ -13,18 +18,23 @@
1318
</template>
1419
</v-tooltip>
1520
</v-col>
16-
<v-col cols="auto" class="text-white font-weight-bold">Server timed out due to inactivity,
17-
please reload this page
18-
or click here:
21+
<v-col cols="auto" class="text-white font-weight-bold"
22+
>Server timed out due to inactivity, please reload this page or click
23+
here:
1924
</v-col>
2025
<v-col cols="auto" align-items="center">
21-
<v-btn @click="reload()" color="grey" density='compact'>
22-
Reload
23-
</v-btn>
26+
<v-btn @click="reload()" color="grey" density="compact"> Reload </v-btn>
2427
</v-col>
2528
<v-spacer />
2629
<v-col cols="auto">
27-
<v-btn icon flat size="20" @click="errors_store.delete_server_error()" color="grey" class=".align-center">
30+
<v-btn
31+
icon
32+
flat
33+
size="20"
34+
@click="errors_store.delete_server_error()"
35+
color="grey"
36+
class=".align-center"
37+
>
2838
<v-icon icon="mdi-close" size="20" color="white" />
2939
</v-btn>
3040
</v-col>
@@ -33,16 +43,16 @@
3343
</template>
3444

3545
<script setup>
36-
const errors_store = use_errors_store()
37-
const { server_error } = storeToRefs(errors_store)
46+
const errors_store = use_errors_store()
47+
const { server_error } = storeToRefs(errors_store)
3848
39-
function reload () {
40-
window.location.reload()
41-
}
49+
function reload() {
50+
window.location.reload()
51+
}
4252
</script>
4353

4454
<style scoped>
45-
.v-btn {
46-
text-transform: unset !important;
47-
}
48-
</style>
55+
.v-btn {
56+
text-transform: unset !important;
57+
}
58+
</style>

components/Errors/Snackers.vue

Lines changed: 29 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
11
<template>
2-
<v-snackbar :style="{ 'margin-bottom': calc_margin(index) }" v-for="(error, index) in errors" :key="index"
3-
v-model="show" color="error" location="bottom right" transition="slide-x-reverse-transition" max-width="30%"
4-
height="20px">
2+
<v-snackbar
3+
:style="{ 'margin-bottom': calc_margin(index) }"
4+
v-for="(error, index) in errors"
5+
:key="index"
6+
v-model="show"
7+
color="error"
8+
location="bottom right"
9+
transition="slide-x-reverse-transition"
10+
max-width="30%"
11+
height="20px"
12+
>
513
<v-row dense class="flex-nowrap">
614
<v-col cols="auto">
715
<v-tooltip location="left">
816
<span>
917
error: {{ error.code }} {{ error.name }}<br />
1018
ressource: {{ error.route }}
11-
<br>
19+
<br />
1220
</span>
1321
<template #activator="{ props }">
1422
<v-icon v-bind="props" color="white" class="justify-right">
@@ -21,7 +29,7 @@
2129
<v-tooltip location="top">
2230
<span>
2331
{{ error.description }}
24-
<br>
32+
<br />
2533
</span>
2634
<template #activator="{ props }">
2735
<div v-bind="props">
@@ -32,7 +40,13 @@
3240
</v-col>
3341
<v-spacer />
3442
<v-col cols="auto">
35-
<v-btn icon flat size="20" @click="errors_store.delete_error(index)" color="error">
43+
<v-btn
44+
icon
45+
flat
46+
size="20"
47+
@click="errors_store.delete_error(index)"
48+
color="error"
49+
>
3650
<v-icon icon="mdi-close" size="20" color="white" />
3751
</v-btn>
3852
</v-col>
@@ -41,18 +55,18 @@
4155
</template>
4256

4357
<script setup>
44-
const errors_store = use_errors_store()
45-
const { errors } = storeToRefs(errors_store)
58+
const errors_store = use_errors_store()
59+
const { errors } = storeToRefs(errors_store)
4660
47-
const show = true
61+
const show = true
4862
49-
function calc_margin (index) {
50-
return (index * 60) + 8 + 'px'
51-
}
63+
function calc_margin(index) {
64+
return index * 60 + 8 + "px"
65+
}
5266
</script>
5367

5468
<style scoped>
55-
.v-snackbar :deep(.v-snackbar__content) {
56-
width: 100%;
57-
}
69+
.v-snackbar :deep(.v-snackbar__content) {
70+
width: 100%;
71+
}
5872
</style>

components/Header.vue

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,29 @@
66
<v-col>
77
<v-row class="justify-center">
88
<v-col v-for="(card, i) in cards_list" :key="i" cols="11" md="5">
9-
<v-card class="card" hover elevation="5" :href="card.href" rounded target="_blank">
10-
<v-card-title primary-title class="justify-center text-h6" align="center">
9+
<v-card
10+
class="card"
11+
hover
12+
elevation="5"
13+
:href="card.href"
14+
rounded
15+
target="_blank"
16+
>
17+
<v-card-title
18+
primary-title
19+
class="justify-center text-h6"
20+
align="center"
21+
>
1122
{{ card.title }}
1223
</v-card-title>
1324
<v-row class="justify-center pa-2">
1425
<v-col cols="auto">
15-
<v-icon :icon="card.icon" color="primary" size="70" class="justify-center" />
26+
<v-icon
27+
:icon="card.icon"
28+
color="primary"
29+
size="70"
30+
class="justify-center"
31+
/>
1632
</v-col>
1733
</v-row>
1834
</v-card>
@@ -23,8 +39,8 @@
2339
</template>
2440

2541
<script setup>
26-
const props = defineProps({
27-
tool_name: { type: String, required: true },
28-
cards_list: { type: Object, required: true }
29-
})
30-
</script>
42+
const props = defineProps({
43+
tool_name: { type: String, required: true },
44+
cards_list: { type: Object, required: true },
45+
})
46+
</script>

components/Launcher.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,10 @@
1515
"type": "string"
1616
}
1717
},
18-
"required": ["is_captcha_validated", "is_cloud_running", "is_connexion_launched", "site_key"]
18+
"required": [
19+
"is_captcha_validated",
20+
"is_cloud_running",
21+
"is_connexion_launched",
22+
"site_key"
23+
]
1924
}

components/Launcher.vue

Lines changed: 48 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
11
<template>
22
<v-container justify="space-around">
33
<v-row align-content="center" align="center">
4-
<v-col v-if="!is_captcha_validated" cols="12" align-self="center" align="center">
5-
<h4 class="pb-3">
6-
Please complete the recaptcha to launch the app
7-
</h4>
8-
<vue-recaptcha ref="recaptcha" :sitekey="site_key" :loadRecaptchaScript="true"
9-
@expired="is_captcha_validated = false" @verify="submit_recaptcha" align-self="center" />
4+
<v-col
5+
v-if="!is_captcha_validated"
6+
cols="12"
7+
align-self="center"
8+
align="center"
9+
>
10+
<h4 class="pb-3">Please complete the recaptcha to launch the app</h4>
11+
<vue-recaptcha
12+
ref="recaptcha"
13+
:sitekey="site_key"
14+
:loadRecaptchaScript="true"
15+
@expired="is_captcha_validated = false"
16+
@verify="submit_recaptcha"
17+
align-self="center"
18+
/>
1019
</v-col>
1120
<v-col v-if="!is_cloud_running && is_connexion_launched">
1221
<Loading />
@@ -16,41 +25,44 @@
1625
</template>
1726

1827
<script setup>
19-
import { VueRecaptcha } from "vue-recaptcha"
28+
import { VueRecaptcha } from "vue-recaptcha"
2029
21-
const websocket_store = use_websocket_store()
22-
const cloud_store = use_cloud_store()
23-
const { is_cloud_running, is_captcha_validated, is_connexion_launched } = storeToRefs(cloud_store)
30+
const websocket_store = use_websocket_store()
31+
const cloud_store = use_cloud_store()
32+
const { is_cloud_running, is_captcha_validated, is_connexion_launched } =
33+
storeToRefs(cloud_store)
2434
25-
const site_key = useRuntimeConfig().public.RECAPTCHA_SITE_KEY
35+
const site_key = useRuntimeConfig().public.RECAPTCHA_SITE_KEY
2636
27-
watch(is_captcha_validated, async (value) => {
28-
if (value === true && process.client) {
29-
console.log('is_captcha_validated 2', is_captcha_validated.value)
30-
await cloud_store.create_connexion()
31-
console.log('is_captcha_validated 3', is_captcha_validated.value)
32-
await websocket_store.ws_connect()
33-
console.log('is_captcha_validated 4', is_captcha_validated.value)
34-
}
35-
})
37+
watch(is_captcha_validated, async (value) => {
38+
if (value === true && process.client) {
39+
console.log("is_captcha_validated 2", is_captcha_validated.value)
40+
await cloud_store.create_connexion()
41+
console.log("is_captcha_validated 3", is_captcha_validated.value)
42+
await websocket_store.ws_connect()
43+
console.log("is_captcha_validated 4", is_captcha_validated.value)
44+
}
45+
})
3646
37-
onMounted(() => {
38-
if (process.client) {
39-
const config = useRuntimeConfig()
40-
if (config.public.NODE_ENV !== 'production') {
41-
cloud_store.$patch({ is_captcha_validated: true })
42-
console.log('is_captcha_validated', is_captcha_validated.value)
47+
onMounted(() => {
48+
if (process.client) {
49+
const config = useRuntimeConfig()
50+
if (config.public.NODE_ENV !== "production") {
51+
cloud_store.$patch({ is_captcha_validated: true })
52+
console.log("is_captcha_validated", is_captcha_validated.value)
53+
}
4354
}
44-
}
45-
})
55+
})
4656
47-
async function submit_recaptcha (token) {
48-
try {
49-
const response = await $fetch.raw(`/.netlify/functions/recaptcha?token=${token}`)
50-
cloud_store.$patch({ is_captcha_validated: response.status == 200 })
51-
recaptcha.reset()
52-
} catch (error) {
53-
console.error(error)
57+
async function submit_recaptcha(token) {
58+
try {
59+
const response = await $fetch.raw(
60+
`/.netlify/functions/recaptcha?token=${token}`,
61+
)
62+
cloud_store.$patch({ is_captcha_validated: response.status == 200 })
63+
recaptcha.reset()
64+
} catch (error) {
65+
console.error(error)
66+
}
5467
}
55-
}
5668
</script>

components/Loading.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@
99
Why do you have to wait?
1010
</v-card-subtitle>
1111
<v-card-text class="text-center">
12-
We start our server only on demand... and this takes a few minutes before
13-
you can use our free app.
14-
<br>
12+
We start our server only on demand... and this takes a few minutes
13+
before you can use our free app.
14+
<br />
1515
This is aligned with our energy sobriety policy. So be patient
1616
<v-icon color="primary" size="20">
1717
mdi-emoticon-excited-outline
1818
</v-icon>
19-
<br>
19+
<br />
2020
</v-card-text>
2121
</v-card>
2222
</v-col>
2323
</v-row>
24-
</template>
24+
</template>

components/PackagesVersions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
"type": "object",
55
"properties": {},
66
"additionalProperties": false
7-
}
7+
}

0 commit comments

Comments
 (0)