66 import * as Table from ' $lib/components/ui/table' ;
77 import * as Tabs from ' $lib/components/ui/tabs' ;
88 import * as Button from ' $lib/components/ui/button' ;
9- import { ArrowLeft , Play , Square , RefreshCw , Heart , AlertCircle , CheckCircle2 , XCircle , Activity , FileText , ExternalLink , TerminalSquare , Save } from ' @lucide/svelte' ;
9+ import {
10+ ArrowLeft ,
11+ Play ,
12+ Square ,
13+ RefreshCw ,
14+ Heart ,
15+ AlertCircle ,
16+ CheckCircle2 ,
17+ XCircle ,
18+ Activity ,
19+ FileText ,
20+ ExternalLink ,
21+ TerminalSquare ,
22+ Save
23+ } from ' @lucide/svelte' ;
1024 import { goto } from ' $app/navigation' ;
1125
1226 let service = $state <Service | null >(null );
1933 let logError = $state (' ' );
2034 let logType = $state <' out' | ' err' >(' out' );
2135 let logCount = $state (100 );
22-
36+
2337 let envContent = $state (' ' );
2438 let savingEnv = $state (false );
25-
39+
2640 let activeTab = $state (page .url .searchParams .get (' tab' ) || ' health' );
2741
2842 const id = Number (page .params .id );
231245 <p class =" mt-1 font-mono text-sm" >
232246 {#if service .public_url }
233247 <!-- eslint-disable-next-line svelte/no-navigation-without-resolve -->
234- <a href ={service .public_url } target =" _blank" rel =" noopener noreferrer" class =" inline-flex items-center gap-1.5 hover:underline text-blue-400" >
235- {service .public_url } <ExternalLink class =" h-3 w-3" />
248+ <a
249+ href ={service .public_url }
250+ target =" _blank"
251+ rel =" noopener noreferrer"
252+ class =" inline-flex items-center gap-1.5 text-blue-400 hover:underline"
253+ >
254+ {service .public_url }
255+ <ExternalLink class =" h-3 w-3" />
236256 </a >
237257 {:else }
238258 —
244264
245265 {#if service .service_type === ' static' }
246266 <div class =" rounded-lg border border-blue-500/30 bg-blue-500/5 p-4" >
247- <div class =" flex items-center gap-2 mb-2 text-blue-400 font-medium " >
267+ <div class =" mb-2 flex items-center gap-2 font-medium text-blue-400" >
248268 <TerminalSquare class =" h-5 w-5" />
249269 IIS Configuration Required
250270 </div >
251- <p class =" text-sm text-foreground/80 mb-4" >
252- The Watcher automatically manages extracting releases and updating target junctions for static sites, but it does <strong >not</strong > create the IIS website itself. Run these commands once in an Administrator PowerShell to link IIS to this deployment:
271+ <p class =" mb-4 text-sm text-foreground/80" >
272+ The Watcher automatically manages extracting releases and updating target junctions for
273+ static sites, but it does <strong >not</strong > create the IIS website itself. Run these commands
274+ once in an Administrator PowerShell to link IIS to this deployment:
253275 </p >
254- <div class =" bg-black/50 p-3 rounded-md overflow-x-auto border border-border" >
255- <pre class =" font-mono text-xs text-blue-300 leading-relaxed max-w-full" ><span class =" text-muted-foreground" ># 1. Create the application pool</span >
276+ <div class =" overflow-x-auto rounded-md border border-border bg-black/50 p-3" >
277+ <pre class =" max-w-full font-mono text-xs leading-relaxed text-blue-300" ><span
278+ class =" text-muted-foreground" ># 1. Create the application pool</span
279+ >
256280appcmd.exe add apppool /name:"{service .iis_app_pool }"
257281
258- <span class =" text-muted-foreground" ># 2. Create the site (change the port/host binding as needed)</span >
282+ <span class =" text-muted-foreground"
283+ ># 2. Create the site (change the port/host binding as needed)</span
284+ >
259285appcmd.exe add site /name:"{service .iis_site_name }" /bindings:http/*:8080: /physicalPath:"{watcher ?.install_dir }\current"
260286
261287<span class =" text-muted-foreground" ># 3. Assign the site to the application pool</span >
@@ -265,7 +291,12 @@ appcmd.exe set app "{service.iis_site_name}/" /applicationPool:"{service.iis_app
265291 {/if }
266292
267293 <!-- eslint-disable-next-line svelte/no-navigation-without-resolve -->
268- <Tabs .Root bind:value ={activeTab } onValueChange ={(v ) => { if (v ) goto (` ?tab=${v } ` , { replaceState: true , keepFocus: true , noScroll: true }); }}>
294+ <Tabs .Root
295+ bind:value ={activeTab }
296+ onValueChange ={(v ) => {
297+ if (v ) goto (` ?tab=${v } ` , { replaceState: true , keepFocus: true , noScroll: true });
298+ }}
299+ >
269300 <Tabs .List >
270301 <Tabs .Trigger value ="health" >Health History ({healthHistory .length })</Tabs .Trigger >
271302 <Tabs .Trigger value =" logs" >Logs</Tabs .Trigger >
@@ -376,29 +407,33 @@ appcmd.exe set app "{service.iis_site_name}/" /applicationPool:"{service.iis_app
376407 </Card .Content >
377408 </Card .Root >
378409 </Tabs .Content >
379- |
410+
380411 <!-- Environment -->
381412 <Tabs .Content value =" env" class =" mt-4" >
382413 <Card .Root class =" border-border bg-card" >
383414 <Card .Header class =" pb-3" >
384415 <div class =" flex items-center justify-between" >
385416 <div class =" space-y-1" >
386417 <Card .Title class =" text-lg" >Environment Variables</Card .Title >
387- <Card .Description >Edit the <code >{service .env_file || ' .env' }</code > file for this service.</Card .Description >
418+ <Card .Description
419+ >Edit the <code >{service .env_file || ' .env' }</code > file for this service.</Card .Description
420+ >
388421 </div >
389422 <div class =" flex items-center gap-2" >
390423 <Button .Root variant ="outline" size ="sm" onclick ={saveEnv } disabled ={savingEnv }>
391- {#if savingEnv }<RefreshCw class ="mr-2 h-4 w-4 animate-spin" />{:else }<Save class ="mr-2 h-4 w-4" />{/if }
424+ {#if savingEnv }<RefreshCw class ="mr-2 h-4 w-4 animate-spin" />{:else }<Save
425+ class =" mr-2 h-4 w-4"
426+ />{/if }
392427 Save
393428 </Button .Root >
394- <Button .Root
395- variant =" default"
396- size =" sm"
397- onclick ={() => {
429+ <Button .Root
430+ variant =" default"
431+ size =" sm"
432+ onclick ={() => {
398433 saveEnv ().then (() => runAction (() => api .restartService (id )));
399- }}
434+ }}
400435 disabled ={savingEnv }
401- class =" bg-amber-600 hover:bg-amber-700 text-white "
436+ class =" bg-amber-600 text-white hover:bg-amber-700"
402437 >
403438 <RefreshCw class =" mr-2 h-4 w-4" /> Save & Restart
404439 </Button .Root >
@@ -408,16 +443,17 @@ appcmd.exe set app "{service.iis_site_name}/" /applicationPool:"{service.iis_app
408443 <Card .Content >
409444 <textarea
410445 bind:value ={envContent }
411- class =" min-h-[400px] w-full rounded-md border border-border bg-black/50 p-4 font-mono text-sm text-blue-300 focus:outline-none focus: ring-1 focus:ring-blue-500/50"
446+ class =" min-h-[400px] w-full rounded-md border border-border bg-black/50 p-4 font-mono text-sm text-blue-300 focus:ring-1 focus:ring-blue-500/50 focus:outline-none "
412447 placeholder =" KEY=VALUE"
413448 ></textarea >
414449 <p class =" mt-2 text-xs text-muted-foreground italic" >
415- Note: Environment variables are written to <code >{service .env_file }</code > in the service's installation directory.
450+ Note: Environment variables are written to <code >{service .env_file }</code > in the service's
451+ installation directory.
416452 </p >
417453 </Card .Content >
418454 </Card .Root >
419455 </Tabs .Content >
420- |
456+
421457 <!-- Deploys -->
422458 <Tabs .Content value =" deploys" class =" mt-4" >
423459 {#if deploys .length > 0 }
0 commit comments