1212 <!-- Updater -->
1313 <dialog ref =" updateDialog" >
1414 <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 >
15+
16+ <template v-if =" manualUpdateRequired " >
17+ <h3 class =" mt-2" >Manual Guest Server Update Required</h3 >
18+ <div class =" max-w-[60vw]" >
19+ <strong >WinBoat has encountered an issue while trying to update the Guest Server automatically. Please follow the steps below to manually update it:</strong >
20+ <ol class =" mt-2 list-decimal list-inside" >
21+ <li >
22+ Use VNC over at
23+ <a @click =" openAnchorLink" href =" http://127.0.0.1:8006/" target =" _blank" rel =" noopener noreferrer" >http://127.0.0.1:8006/</a >
24+ to access Windows
25+ </li >
26+ <li >Press Win + R or search for <code >Run</code >, type in <code >services.msc</code ></li >
27+ <li >Stop the <code >WinBoatGuestServer</code > service by right clicking and pressing "Stop"</li >
28+ <li >
29+ Download the new Guest Server from
30+ <a @click =" openAnchorLink" href =" https://github.com/TibixDev/winboat/releases" target =" _blank" rel =" noopener noreferrer" >https://github.com/TibixDev/winboat/releases</a >,
31+ you should pick version <strong >{{ appVer }}</strong >
32+ </li >
33+ <li >Navigate to <code >C:\Program Files\WinBoat</code > and delete the contents</li >
34+ <li >Extract the freshly downloaded zip into the same folder</li >
35+ <li >Start the <code >WinBoatGuestServer</code > service by right clicking and pressing "Start"</li >
36+ <li >If you were using VNC, log out of Windows and close it</li >
37+ <li >Restart WinBoat</li >
38+ </ol >
39+ <p >
40+ We're sorry for the inconvenience. 😟
41+ </p >
42+ </div >
43+ </template >
44+
45+ <template v-else >
46+ <h3 class =" mt-2" v-if =" winboat?.isUpdatingGuestServer.value" >Updating Guest Server</h3 >
47+ <h3 class =" mt-2" v-else >Guest Server update successful!</h3 >
48+ <p v-if =" winboat?.isUpdatingGuestServer.value" class =" max-w-[40vw]" >
49+ The guest is currently running an outdated version of the WinBoat Guest Server. Please wait while we update it to the current version.
50+ </p >
51+ <p v-else class =" max-w-[40vw]" >
52+ The WinBoat Guest Server has been updated successfully! You can now close this dialog and continue using the application.
53+ </p >
54+ </template >
55+ <footer v-if =" !manualUpdateRequired && winboat?.isUpdatingGuestServer.value" >
2456 <x-progressbar v-if =" winboat?.isUpdatingGuestServer.value" class =" my-4" ></x-progressbar >
2557 <x-button v-else id =" close-button" @click =" updateDialog!.close()" toggled >
2658 <x-label >Close</x-label >
5082 <x-label class =" text-[0.8rem]" >Local Account</x-label >
5183 </div >
5284 </div >
53- <RouterLink v-for =" route of routes.filter(r => !['SetupUI', 'Loading'].includes(r.name))" :to =" route.path" :key =" route.path" >
85+ <RouterLink v-for =" route of routes.filter(r => !['SetupUI', 'Loading'].includes(String( r.name) ))" :to =" route.path" :key =" route.path" >
5486 <x-navitem value =" first" >
5587 <Icon class =" mr-4 w-5 h-5" :icon =" (route.meta!.icon as string)" ></Icon >
5688 <x-label >{{ route.name }}</x-label >
90122import { RouterLink , useRoute , useRouter } from ' vue-router' ;
91123import { routes } from ' ./router' ;
92124import { Icon } from ' @iconify/vue' ;
93- import { onMounted , useTemplateRef , watch } from ' vue' ;
125+ import { onMounted , ref , useTemplateRef , watch } from ' vue' ;
94126import { isInstalled } from ' ./lib/install' ;
95127import { Winboat } from ' ./lib/winboat' ;
128+ import { openAnchorLink } from ' ./utils/openLink' ;
96129const { BrowserWindow }: typeof import (' @electron/remote' ) = require (' @electron/remote' )
97130const os: typeof import (' os' ) = require (' os' )
98131const path: typeof import (' path' ) = require (' path' )
99132const remote: typeof import (' @electron/remote' ) = require (' @electron/remote' );
100133
101134const $router = useRouter ();
102- const updateDialog = useTemplateRef (' updateDialog' );
103135const appVer = import .meta .env .VITE_APP_VERSION ;
104136let winboat: Winboat | null = null ;
105137
138+ let updateTimeout: NodeJS .Timeout | null = null ;
139+ const manualUpdateRequired = ref (false );
140+ const MANUAL_UPDATE_TIMEOUT = 60000 ; // 60 seconds
141+ const updateDialog = useTemplateRef (' updateDialog' );
142+
106143onMounted (async () => {
107144 console .log (" WinBoat app path:" , path .join (remote .app .getAppPath (), " .." , " .." ));
108145 const winboatInstalled = await isInstalled ();
@@ -115,10 +152,22 @@ onMounted(async () => {
115152 }
116153
117154 // Watch for guest server updates and show dialog
118- watch (() => winboat ?.isUpdatingGuestServer .value , (newVal ) => {
119- if (newVal ) {
155+ watch (() => winboat ?.isUpdatingGuestServer .value , (isUpdating ) => {
156+ if (isUpdating === true ) {
120157 updateDialog .value ! .showModal ();
121- }
158+
159+ // Prepare the timeout to show manual update required after 45 seconds
160+ updateTimeout = setTimeout (() => {
161+ manualUpdateRequired .value = true ;
162+ }, MANUAL_UPDATE_TIMEOUT );
163+ } else {
164+ // Clear the timeout if the update finished before the timeout
165+ if (updateTimeout ) {
166+ clearTimeout (updateTimeout );
167+ updateTimeout = null ;
168+ }
169+ manualUpdateRequired .value = false ;
170+ }
122171 })
123172})
124173
0 commit comments