Skip to content

Commit dec7e19

Browse files
committed
chore: Update appManagerVersion in nuxt.config.ts and default.vue
1 parent 0bc9dfa commit dec7e19

File tree

5 files changed

+47
-8
lines changed

5 files changed

+47
-8
lines changed

nuxt.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export default defineNuxtConfig({
4040
},
4141
appConfig: {
4242
baseUrl: SESAME_APP_API_URL,
43+
appManagerVersion: process.env.npm_package_version,
4344
},
4445
modules: [
4546
'@nuxt-alt/auth',

src/components/identityForm/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ async function sync() {
169169
const { data: result, pending, error, refresh } = await useHttp<any>(`/management/identities/${props.identity._id}/state`, {
170170
method: 'PATCH',
171171
body: {
172-
state: IdentityState.TO_VALIDATE,
172+
state: IdentityState.TO_SYNC,
173173
},
174174
});
175175

src/layouts/default.vue

Lines changed: 43 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template lang="pug">
2-
q-layout
2+
q-layout(view="hHh LpR lff" style="margin-top: -1px;")
33
sesame-appbar(@closeDrawer="drawer = !drawer" @syncing="syncing")
44
q-drawer.flex(v-model="drawer" side="left" :mini="true" bordered persistent)
55
template(#mini)
@@ -20,19 +20,46 @@ q-layout
2020
q-separator
2121
q-page-container
2222
nuxt-page
23-
q-dialog(seamless v-model="eventSeamless" position="bottom")
23+
//- q-dialog(seamless v-model="eventSeamless" position="bottom")
2424
q-card(style="width: 350px")
2525
q-linear-progress(:value="eventSeamlessProgress" color="amber-9")
2626
q-card-section.row.items-center.no-wrap
2727
q-circular-progress.q-mr-md(indeterminate size="42px" color="amber-9")
28-
//- pre(v-html="JSON.stringify(eventSeamlessCurrentJobs, null, 2)")
2928
div
3029
.text-weight-bold.q-px-md.text-center
3130
| Synchronisation en cours&nbsp;&nbsp;
3231
q-badge(color="amber-10") {{ eventSeamlessCurrent }}/{{ eventSeamlessTotal }}
33-
//- .text-grey Fitz & The Tantrums
3432
q-space
3533
q-btn(flat round icon="mdi-close" v-close-popup)
34+
q-footer(:class="$q.dark.isActive ? 'bg-dark' : 'bg-white'" bordered)
35+
q-bar(:class="$q.dark.isActive ? 'bg-dark' : 'bg-white text-black'")
36+
span
37+
small AppManager&nbsp;
38+
small(v-text="'v' + orchestratorVersion.currentVersion")
39+
small.bold &nbsp;/&nbsp;
40+
span.q-mr-sm
41+
small Orchestrator&nbsp;
42+
small(v-text="'v' + appManagerVersion.currentVersion")
43+
q-btn.q-px-xs(
44+
v-show="!appManagerVersion.updateAvailable"
45+
flat stretch icon="mdi-alert-box" color="amber-9"
46+
href="https://github.com/Libertech-FR/sesame-app-manager/releases" target="_blank"
47+
) App Manager
48+
q-tooltip.text-body2.bg-amber-9
49+
| MAJ disponible (
50+
span(v-text="appManagerVersion.lastVersion")
51+
| )
52+
q-btn.q-px-xs(
53+
v-show="!orchestratorVersion.updateAvailable"
54+
flat stretch icon="mdi-alert-box" color="amber-9"
55+
href="https://github.com/Libertech-FR/sesame-orchestrator/releases" target="_blank"
56+
) Orchestrator
57+
q-tooltip.text-body2.bg-amber-9
58+
| MAJ disponible (
59+
span(v-text="orchestratorVersion.lastVersion")
60+
| )
61+
q-space
62+
q-btn.q-px-sm(flat stretch icon="mdi-help" href="https://libertech-fr.github.io/sesame-doc/" target="_blank")
3663
</template>
3764

3865
<script lang="ts" setup>
@@ -47,6 +74,17 @@ const identityStateStore = useIdentityStateStore()
4774

4875
const auth = useAuth()
4976
const config = useAppConfig()
77+
78+
const { data: orchestratorVersionRes } = await useHttp<any>('/get-update/sesame-orchestrator')
79+
const { data: appManagerVersionRes } = await useHttp<any>('/get-update/sesame-app-manager', {
80+
query: {
81+
current: config.appManagerVersion || '0.0.0',
82+
},
83+
})
84+
85+
const orchestratorVersion = orchestratorVersionRes.value?.data
86+
const appManagerVersion = appManagerVersionRes.value?.data
87+
5088
const esUrl = new URL(config.baseUrl + "/core/backends/sse")
5189
esUrl.searchParams.append("key", '' + auth.user?.sseToken)
5290
var es = new ReconnectingEventSource(esUrl)
@@ -133,7 +171,7 @@ function logout() {
133171

134172
<style>
135173
.q-page-container {
136-
height: 100vh !important;
174+
/* height: 100vh !important; */
137175
width: 100% !important;
138176
}
139177
</style>

src/pages/agents/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template lang="pug">
2-
div
2+
q-page.container
33
.q-px-md
44
sesame-searchfilters(:fields="fieldsList")
55
template(#rightSelect)

src/pages/identities/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template lang="pug">
2-
div
2+
q-page.container
33
.q-px-md
44
sesame-searchfilters(:fields="fieldsList")
55

0 commit comments

Comments
 (0)