11<template >
2- <main class =" h-screen w-screen overflow-hidden relative " >
2+ <main class =" overflow-hidden relative w-screen h-screen " >
33 <!-- Decoration -->
44 <div class =" gradient-ball absolute -z-10 left-0 bottom-0 translate-x-[-50%] translate-y-[50%] w-[90vw] aspect-square opacity-15 blob-anim" ></div >
55 <div class =" gradient-ball absolute -z-10 right-0 top-0 translate-x-[50%] translate-y-[-50%] w-[90vw] aspect-square opacity-15 blob-anim" ></div >
66
77 <!-- Titlebar -->
8- <x-titlebar @minimize =" handleMinimize()" @buttonclick =" handleTitleBarEvent" class =" bg-neutral-900/50 backdrop-blur-xl " >
8+ <x-titlebar @minimize =" handleMinimize()" @buttonclick =" handleTitleBarEvent" class =" backdrop-blur-xl bg-neutral-900/50" >
99 <x-label >WinBoat</x-label >
1010 </x-titlebar >
1111
12+ <!-- Updater -->
13+ <dialog ref =" updateDialog" >
14+ <Icon class="text-indigo-400 size-12" icon="mdi:cloud-upload "></Icon >
15+ <h3 class =" mt-2" v-if =" winboat?.isUpdatingGuestServer.value" >Updating Guest Server</h3 >
16+ <h3 class =" mt-2" v-else >Guest Server update successful!</h3 >
17+ <p v-if =" winboat?.isUpdatingGuestServer.value" class =" max-w-[40vw]" >
18+ The guest is currently running an outdated version of the WinBoat Guest Server. Please wait while we update it to the current version.
19+ </p >
20+ <p v-else class =" max-w-[40vw]" >
21+ The WinBoat Guest Server has been updated successfully! You can now close this dialog and continue using the application.
22+ </p >
23+ <footer >
24+ <x-progressbar v-if =" winboat?.isUpdatingGuestServer.value" class =" my-4" ></x-progressbar >
25+ <x-button v-else id =" close-button" @click =" updateDialog!.close()" toggled >
26+ <x-label >Close</x-label >
27+ </x-button >
28+ </footer >
29+ </dialog >
1230
1331 <!-- UI / SetupUI -->
1432 <div v-if =" useRoute().name !== 'SetupUI'" class =" flex flex-row h-[calc(100vh-2rem)]" >
15- <x-nav class =" w-72 flex flex-none flex-col gap-0.5 bg-gray-500/10 backdrop-contrast-90 backdrop-blur-xl " >
33+ <x-nav class =" flex flex-col flex-none gap-0.5 w-72 backdrop-blur-xl bg-gray-500/10 backdrop-contrast-90" >
1634 <div
1735 v-if =" winboat?.rdpConnected.value"
1836 class =" w-full bg-gradient-to-r from-indigo-500 via-indigo-400 to-blue-500 text-white
2341 RDP Session Active
2442 </span >
2543 </div >
26- <div class =" p-4 flex flex-row items-center gap -4" >
27- <img class =" rounded-full w-16"
44+ <div class =" flex flex-row gap-4 items-center p -4" >
45+ <img class =" w-16 rounded-full "
2846 src =" https://upload.wikimedia.org/wikipedia/commons/thumb/b/b5/Windows_10_Default_Profile_Picture.svg/2048px-Windows_10_Default_Profile_Picture.svg.png"
2947 alt =" Profile Picture" >
3048 <div >
3452 </div >
3553 <RouterLink v-for =" route of routes .filter (r => ! [' SetupUI' , ' Loading' ].includes (r .name ))" :to =" route .path " :key =" route .path " >
3654 <x-navitem value =" first" >
37- <Icon class="w-5 h-5 mr-4 " :icon =" (route .meta ! .icon as string ) " ></Icon >
55+ <Icon class="mr-4 w-5 h-5" :icon =" (route .meta ! .icon as string ) " ></Icon >
3856 <x-label >{{ route.name }}</x-label >
3957 </x-navitem >
4058 </RouterLink >
41- <div class =" flex flex-col items-center justify-end h-full p-4" >
59+ <div class =" flex flex-col justify-end items-center p-4 h-full " >
4260 <p class =" text-xs text-neutral-500" >WinBoat Pre-Release Alpha {{ appVer }}</p >
4361 </div >
4462 </x-nav >
4563 <div class =" px-5 flex-grow max-h-[calc(100vh-2rem)] overflow-y-auto py-4" >
46- <div class =" flex flex-row items-center gap-2 my-6" >
64+ <div class =" flex flex-row gap-2 items-center my-6" >
4765 <Icon class="w-6 h-6 opacity-60" icon="icon-park-solid:toolkit "></Icon >
48- <h1 class =" text-2xl font-semibold opacity-60 my-0 " >
66+ <h1 class =" my-0 text-2xl font-semibold opacity-60" >
4967 WinBoat
5068 </h1 >
5169 <Icon class="w-6 h-6" icon="bitcoin-icons:caret-right-filled "></Icon >
5270 <Icon class="w-6 h-6" :icon =" (useRoute ().meta .icon as string ) " ></Icon >
53- <h1 class =" text-2xl font-semibold my-0 " >
71+ <h1 class =" my-0 text-2xl font-semibold" >
5472 {{ useRoute().name }}
5573 </h1 >
5674 </div >
7290import { RouterLink , useRoute , useRouter } from ' vue-router' ;
7391import { routes } from ' ./router' ;
7492import { Icon } from ' @iconify/vue' ;
75- import { onMounted } from ' vue' ;
93+ import { onMounted , useTemplateRef , watch } from ' vue' ;
7694import { isInstalled } from ' ./lib/install' ;
7795import { Winboat } from ' ./lib/winboat' ;
7896const { BrowserWindow }: typeof import (' @electron/remote' ) = require (' @electron/remote' )
@@ -81,6 +99,7 @@ const path: typeof import('path') = require('path')
8199const remote: typeof import (' @electron/remote' ) = require (' @electron/remote' );
82100
83101const $router = useRouter ();
102+ const updateDialog = useTemplateRef (' updateDialog' );
84103const appVer = import .meta .env .VITE_APP_VERSION ;
85104let winboat: Winboat | null = null ;
86105
@@ -94,6 +113,13 @@ onMounted(async () => {
94113 winboat = new Winboat ();
95114 $router .push (' /home' );
96115 }
116+
117+ // Watch for guest server updates and show dialog
118+ watch (() => winboat ?.isUpdatingGuestServer .value , (newVal ) => {
119+ if (newVal ) {
120+ updateDialog .value ! .showModal ();
121+ }
122+ })
97123})
98124
99125function handleMinimize() {
@@ -122,6 +148,11 @@ function handleTitleBarEvent(e: CustomEvent) {
122148 </script >
123149
124150<style >
151+ dialog ::backdrop {
152+ pointer-events : none ;
153+ backdrop-filter : blur (8px );
154+ }
155+
125156.gradient-ball {
126157 border-radius : 99999px ;
127158 background : linear-gradient (197.37deg , #7450DB -0.38% , rgba (138 , 234 , 240 , 0 ) 101.89% ), linear-gradient (115.93deg , #3E88F6 4.86% , rgba (62 , 180 , 246 , 0.33 ) 38.05% , rgba (62 , 235 , 246 , 0 ) 74.14% ), radial-gradient (56.47% 76.87% at 6.92% 7.55% , rgba (62 , 136 , 246 , 0.7 ) 0% , rgba (62 , 158 , 246 , 0.182 ) 52.16% , rgba (62 , 246 , 246 , 0 ) 100% ), linear-gradient (306.53deg , #2EE4E3 19.83% , rgba (46 , 228 , 227 , 0 ) 97.33% );
0 commit comments