livedesk 0.1.697 → 0.1.700

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/README.md +21 -3
  2. package/bin/livedesk.js +16 -8
  3. package/client/package.json +5 -5
  4. package/diagnostics/vuvodesk-linux-desktop.mjs +188 -0
  5. package/electron/entitlements.mac.plist +12 -12
  6. package/electron/recurring-update-owner.mjs +2 -2
  7. package/electron/update-manager.mjs +59 -16
  8. package/hub/src/plan-device-access.test.mjs +8 -8
  9. package/hub/src/server.js +1 -1
  10. package/package.json +7 -7
  11. package/web/dist/app.html +1 -1
  12. package/web/dist/app.webmanifest +1 -1
  13. package/web/dist/assets/{AgentSettingsTab-DRWDCG0o.js → AgentSettingsTab-CvKCM1zo.js} +1 -1
  14. package/web/dist/assets/{AgentsPage-BnF3p9G1.js → AgentsPage-C0yd93rX.js} +1 -1
  15. package/web/dist/assets/{CaptureGallery-8lr9Ct1i.js → CaptureGallery-CDp1NX62.js} +1 -1
  16. package/web/dist/assets/DesktopUpdatePanel-BaRZzRao.js +1 -0
  17. package/web/dist/assets/HubApp-BoHzIvar.js +182 -0
  18. package/web/dist/assets/HubApp-C-E5cpCr.css +1 -0
  19. package/web/dist/assets/{MonitorStackIcon-led0pnag.js → MonitorStackIcon-BLNbbRNY.js} +5 -5
  20. package/web/dist/assets/{SettingsPage-k202bRU1.js → SettingsPage-D-7mFs9n.js} +1 -1
  21. package/web/dist/assets/SettingsTabs-C_xNvq7v.js +1 -0
  22. package/web/dist/assets/{ShareFilesPage-DRW1qS1Z.js → ShareFilesPage-CKdD-FK5.js} +1 -1
  23. package/web/dist/assets/{SupportPage-DXkBQh_W.js → SupportPage-LJUVsA1x.js} +1 -1
  24. package/web/dist/assets/{VuvoDeskApp-BHcF72r3.js → VuvoDeskApp-nDShkdzM.js} +1 -1
  25. package/web/dist/assets/{app-DcrmhmnT.js → app-CUaudslO.js} +2 -2
  26. package/web/dist/assets/{client-D-D35ghV.js → client-DV0v4wud.js} +1 -1
  27. package/web/dist/assets/frame-lifecycle-CNz8ou2A.js +1 -0
  28. package/web/dist/assets/{icons-ChMazCZR.js → icons-BwhnWKHR.js} +1 -1
  29. package/web/dist/assets/main-DNiaJr76.js +2 -0
  30. package/web/dist/assets/{pwa-startup-BiuYh5eN.js → pwa-startup-C8kDd3Vd.js} +1 -1
  31. package/web/dist/assets/{react-CnkEM7Rb.js → react-Dm67yaJf.js} +1 -1
  32. package/web/dist/index.html +6 -6
  33. package/web/dist/sw.js +2 -2
  34. package/web/dist/vuvodesk-build-evidence.json +57 -57
  35. package/web/dist/assets/DesktopUpdatePanel-DopP2EeD.js +0 -1
  36. package/web/dist/assets/HubApp-CqNxUVJD.js +0 -182
  37. package/web/dist/assets/HubApp-DdHHVOM0.css +0 -1
  38. package/web/dist/assets/SettingsTabs-v57M-CCZ.js +0 -1
  39. package/web/dist/assets/frame-lifecycle-D91nchvm.js +0 -1
  40. package/web/dist/assets/main-BXBJt96-.js +0 -2
@@ -1,4 +1,4 @@
1
- import{j as t}from"./pwa-startup-BiuYh5eN.js";import{r as d,ae as ht,af as Ce,a3 as yt,y as ee,X as xe,ag as vt,ah as wt,ai as Ze,aj as kt,ak as bt,al as Se,b as H,am as Ct,O as xt,an as _e,m as St,ao as jt,S as Je,ap as At,N as Rt,c as Nt,aq as Pt,ar as It,A as Tt,as as ue,M as Xe}from"./icons-ChMazCZR.js";import{r as Et,h as F}from"./MonitorStackIcon-led0pnag.js";import"./pwa-bootstrap-ljOQTt2e.js";const Ot=d.forwardRef(function({value:s,onChange:n,onSubmit:r,onOpenSuggestedTasks:i,suggestedOpen:m=!1,suggestedTaskCount:c,disabled:v=!1,placeholder:S="Ask VuvoDesk to work across your machines...",compact:g=!1},x){return t.jsxs("form",{className:"agents-composer",onSubmit:w=>{w.preventDefault(),r()},children:[t.jsx("button",{className:`agents-suggested-trigger ${m?"active":""}`,type:"button","aria-label":c===void 0?"Open Suggested tasks":`Open Suggested tasks (${c} available)`,"aria-expanded":m,onClick:i,disabled:v,children:t.jsx(ht,{size:17})}),t.jsx("textarea",{ref:x,value:s,onChange:w=>n(w.target.value.slice(0,4e3)),placeholder:S,"aria-label":"Ask VuvoDesk",rows:g?1:2,disabled:v}),t.jsxs("button",{className:"agents-run-button",type:"submit",disabled:v||!s.trim(),children:[v?t.jsx(Ce,{className:"spin",size:16}):t.jsx(yt,{size:16}),v?"Running":"Run"]})]})}),$t=["read","processControl","serviceControl","applicationControl","fileRead","fileWrite","fileDelete","shell","script","softwareInstall","network","systemPower","systemConfiguration","userAccount"];function de(e){return e.deviceName?.trim()||e.hostname?.trim()||e.deviceId}function pe(e){return e.connected!==!0?!1:e.synthetic===!0?!0:!e.channels||e.channels.control===!0}function Dt(e){return e==="running"||e==="completed"||e==="failed"||e==="cancelled"?e:"queued"}function _t(e){switch(e){case"process.list":return"Process list";case"system.health":return"System health";case"gpu.status":return"GPU status";case"disk.status":return"Disk status";case"service.status":return"Service status";case"diagnostics.collect":return"Diagnostics";case"process.control":return"Process control";case"service.control":return"Service control";case"application.launch":return"Launch application";case"application.close":return"Close application";case"file.read":return"Read file";case"file.write":return"Write file";case"file.delete":return"Delete file";case"file.list":return"List directory";case"command.run":return"Run command";case"script.run":return"Run script";case"software.install":return"Install software";case"network.status":return"Network status";case"system.power":return"Power action";case"system.configure":return"System configuration";case"logs.collect":return"Collect logs"}}const Mt=64*1024,Me="[Earlier log output hidden by PWA display limit.]",Qe=new TextEncoder,zt=new TextDecoder("utf-8",{fatal:!0}),ze=16*1024,Lt=200,Le="(?:access[_-]?(?:token|key)|refresh[_-]?token|id[_-]?token|pair[_-]?(?:token|key)|authorization|api[_-]?key|private[_-]?key|connection[_-]?string|credential|password|passwd|secret|cookie|set-cookie)",Ft="(?:access[_-]?(?:token|key)|refresh[_-]?token|id[_-]?token|pair[_-]?(?:token|key)|token|authorization|api[_-]?key|private[_-]?key|connection[_-]?string|credential|password|passwd|secret|cookie|set-cookie)",Bt="(?:access[_-]?(?:token|key)|refresh[_-]?token|id[_-]?token|pair[_-]?(?:token|key)|token|authorization|api[_-]?key|credential|password|secret|cookie)",qt=/\b(?:sk-(?:proj-|ant-)?[A-Za-z0-9_-]{8,}|gh[pousr]_[A-Za-z0-9]{8,}|github_pat_[A-Za-z0-9_]{8,}|(?:AKIA|ASIA)[A-Z0-9]{16}|AIza[A-Za-z0-9_-]{35}|npm_[A-Za-z0-9]{8,}|xox[a-z]-[A-Za-z0-9-]{8,}|(?:sk|rk)_(?:live|test)_[A-Za-z0-9]{8,})\b/g;function Ut(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:null}function Fe(e){return Qe.encode(e).byteLength}function Be(e,s){const n=Qe.encode(e);if(n.byteLength<=s)return{value:e,truncated:!1};let r=n.byteLength-s;for(;r<n.byteLength&&(n[r]&192)===128;)r+=1;let i=zt.decode(n.subarray(r));const m=i.indexOf(`
1
+ import{j as t}from"./pwa-startup-C8kDd3Vd.js";import{r as d,ae as ht,af as Ce,a3 as yt,y as ee,X as xe,ag as vt,ah as wt,ai as Ze,aj as kt,ak as bt,al as Se,b as H,am as Ct,O as xt,an as _e,m as St,ao as jt,S as Je,ap as At,N as Rt,c as Nt,aq as Pt,ar as It,A as Tt,as as ue,M as Xe}from"./icons-BwhnWKHR.js";import{r as Et,h as F}from"./MonitorStackIcon-BLNbbRNY.js";import"./pwa-bootstrap-ljOQTt2e.js";const Ot=d.forwardRef(function({value:s,onChange:n,onSubmit:r,onOpenSuggestedTasks:i,suggestedOpen:m=!1,suggestedTaskCount:c,disabled:v=!1,placeholder:S="Ask VuvoDesk to work across your machines...",compact:g=!1},x){return t.jsxs("form",{className:"agents-composer",onSubmit:w=>{w.preventDefault(),r()},children:[t.jsx("button",{className:`agents-suggested-trigger ${m?"active":""}`,type:"button","aria-label":c===void 0?"Open Suggested tasks":`Open Suggested tasks (${c} available)`,"aria-expanded":m,onClick:i,disabled:v,children:t.jsx(ht,{size:17})}),t.jsx("textarea",{ref:x,value:s,onChange:w=>n(w.target.value.slice(0,4e3)),placeholder:S,"aria-label":"Ask VuvoDesk",rows:g?1:2,disabled:v}),t.jsxs("button",{className:"agents-run-button",type:"submit",disabled:v||!s.trim(),children:[v?t.jsx(Ce,{className:"spin",size:16}):t.jsx(yt,{size:16}),v?"Running":"Run"]})]})}),$t=["read","processControl","serviceControl","applicationControl","fileRead","fileWrite","fileDelete","shell","script","softwareInstall","network","systemPower","systemConfiguration","userAccount"];function de(e){return e.deviceName?.trim()||e.hostname?.trim()||e.deviceId}function pe(e){return e.connected!==!0?!1:e.synthetic===!0?!0:!e.channels||e.channels.control===!0}function Dt(e){return e==="running"||e==="completed"||e==="failed"||e==="cancelled"?e:"queued"}function _t(e){switch(e){case"process.list":return"Process list";case"system.health":return"System health";case"gpu.status":return"GPU status";case"disk.status":return"Disk status";case"service.status":return"Service status";case"diagnostics.collect":return"Diagnostics";case"process.control":return"Process control";case"service.control":return"Service control";case"application.launch":return"Launch application";case"application.close":return"Close application";case"file.read":return"Read file";case"file.write":return"Write file";case"file.delete":return"Delete file";case"file.list":return"List directory";case"command.run":return"Run command";case"script.run":return"Run script";case"software.install":return"Install software";case"network.status":return"Network status";case"system.power":return"Power action";case"system.configure":return"System configuration";case"logs.collect":return"Collect logs"}}const Mt=64*1024,Me="[Earlier log output hidden by PWA display limit.]",Qe=new TextEncoder,zt=new TextDecoder("utf-8",{fatal:!0}),ze=16*1024,Lt=200,Le="(?:access[_-]?(?:token|key)|refresh[_-]?token|id[_-]?token|pair[_-]?(?:token|key)|authorization|api[_-]?key|private[_-]?key|connection[_-]?string|credential|password|passwd|secret|cookie|set-cookie)",Ft="(?:access[_-]?(?:token|key)|refresh[_-]?token|id[_-]?token|pair[_-]?(?:token|key)|token|authorization|api[_-]?key|private[_-]?key|connection[_-]?string|credential|password|passwd|secret|cookie|set-cookie)",Bt="(?:access[_-]?(?:token|key)|refresh[_-]?token|id[_-]?token|pair[_-]?(?:token|key)|token|authorization|api[_-]?key|credential|password|secret|cookie)",qt=/\b(?:sk-(?:proj-|ant-)?[A-Za-z0-9_-]{8,}|gh[pousr]_[A-Za-z0-9]{8,}|github_pat_[A-Za-z0-9_]{8,}|(?:AKIA|ASIA)[A-Z0-9]{16}|AIza[A-Za-z0-9_-]{35}|npm_[A-Za-z0-9]{8,}|xox[a-z]-[A-Za-z0-9-]{8,}|(?:sk|rk)_(?:live|test)_[A-Za-z0-9]{8,})\b/g;function Ut(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:null}function Fe(e){return Qe.encode(e).byteLength}function Be(e,s){const n=Qe.encode(e);if(n.byteLength<=s)return{value:e,truncated:!1};let r=n.byteLength-s;for(;r<n.byteLength&&(n[r]&192)===128;)r+=1;let i=zt.decode(n.subarray(r));const m=i.indexOf(`
2
2
  `);return m>=0&&m<i.length-1&&(i=i.slice(m+1)),{value:i,truncated:!0}}function et(e){return e.replace(/-----BEGIN [^-\r\n]*PRIVATE KEY-----[\s\S]*?-----END [^-\r\n]*PRIVATE KEY-----/gi,"[REDACTED PRIVATE KEY]").replace(/\b(?:proxy-)?authorization\s*[:=]\s*[^\r\n]*|\b(?:set-)?cookie\s*[:=]\s*[^\r\n]*/gi,"credential-header=[REDACTED]").replace(/\bBearer\s+(?:"[^"]*"|'[^']*'|[^\s,;]+)/gi,"Bearer [REDACTED]").replace(new RegExp(`("${Le}"\\s*:\\s*")[^"\\r\\n]*(")`,"gi"),"$1[REDACTED]$2").replace(new RegExp(`('${Le}'\\s*:\\s*')[^'\\r\\n]*(')`,"gi"),"$1[REDACTED]$2").replace(new RegExp(`((?:[A-Za-z0-9.-]+[_-])?${Ft}\\s*[:=]\\s*)(?!\\[REDACTED\\])[^\\s,;&]+`,"gi"),"$1[REDACTED]").replace(new RegExp(`([?&]${Bt}=)[^&\\s]+`,"gi"),"$1[REDACTED]").replace(/\b(?:eyJ|[A-Za-z0-9_-]{8,}\.)[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\b/g,"[REDACTED TOKEN]").replace(qt,"[REDACTED KEY]")}function Gt(e){return typeof e!="string"?"source unknown":et(e).replace(/[\u0000-\u001f\u007f]/g," ").trim().slice(0,64)||"source unknown"}function qe(e){return typeof e=="number"&&Number.isSafeInteger(e)&&e>=0?Math.floor(e):null}function Vt(e){if(typeof e!="string"||e.length===0)return{output:"",displayTruncated:!1};const s=Be(e.replace(/\r\n?/g,`
3
3
  `),Mt);let n=et(s.value).replace(/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/g," ").trim(),r=s.truncated;const i=n?n.split(`
4
4
  `):[];if(i.length>Lt-1&&(n=i.slice(-199).join(`
@@ -1 +1 @@
1
- import{j as e}from"./pwa-startup-BiuYh5eN.js";import{r as i,R as x,E as j,D as u,f as g,h as f}from"./icons-ChMazCZR.js";import{l as b,c as d,d as y}from"./HubApp-CqNxUVJD.js";import"./pwa-bootstrap-ljOQTt2e.js";import"./public-site-routing-pddZbLCj.js";import"./MonitorStackIcon-led0pnag.js";import"./supabase-C7qjtLN3.js";import"./frame-lifecycle-D91nchvm.js";function z({hubUrl:s,onToast:n}){const[o,m]=i.useState([]),[h,c]=i.useState(!0),r=i.useCallback(async()=>{c(!0);try{m((await b(s)).captures||[])}catch(t){n(t instanceof Error?t.message:String(t))}finally{c(!1)}},[s,n]);i.useEffect(()=>{r()},[r]);const p=async t=>{const a=d(t.id,s);if(navigator.share)try{await navigator.share({title:t.fileName,url:a});return}catch{}window.open(a,"_blank","noopener,noreferrer")};return e.jsxs("section",{className:"capture-gallery",children:[e.jsxs("header",{children:[e.jsxs("div",{children:[e.jsx("span",{className:"settings-eyebrow",children:"Capture Gallery"}),e.jsx("h2",{children:"Saved captures"})]}),e.jsxs("button",{className:"text-button",onClick:()=>{r()},type:"button",children:[e.jsx(x,{size:15})," Refresh"]})]}),h?e.jsx("p",{className:"settings-help",children:"Loading captures..."}):o.length===0?e.jsx("p",{className:"settings-help",children:"No captures saved yet."}):e.jsx("div",{className:"capture-gallery-grid",children:o.map(t=>{const a=d(t.id,s);return e.jsxs("article",{className:"capture-gallery-card",children:[t.mimeType.startsWith("image/")?e.jsx("img",{src:a,alt:t.target.label}):e.jsx("video",{src:a,controls:!0,preload:"metadata"}),e.jsxs("div",{className:"capture-gallery-card-body",children:[e.jsx("strong",{children:t.fileName}),e.jsxs("small",{children:[t.target.label," · ",new Date(t.createdAt).toLocaleString()," · ",Math.ceil(t.sizeBytes/1024)," KB"]}),e.jsxs("div",{children:[e.jsx("button",{className:"icon-button",title:"Open","aria-label":"Open",onClick:()=>window.open(a,"_blank","noopener,noreferrer"),type:"button",children:e.jsx(j,{size:15})}),e.jsx("a",{className:"icon-button",title:"Download","aria-label":"Download",href:`${a}?download=1`,download:t.fileName,children:e.jsx(u,{size:15})}),e.jsx("button",{className:"icon-button",title:"Share","aria-label":"Share",onClick:()=>{p(t)},type:"button",children:e.jsx(g,{size:15})}),e.jsx("button",{className:"icon-button danger",title:"Delete","aria-label":"Delete",onClick:()=>{window.confirm(`Delete ${t.fileName}?`)&&y(t.id,s).then(()=>r()).catch(l=>n(l instanceof Error?l.message:String(l)))},type:"button",children:e.jsx(f,{size:15})})]})]})]},t.id)})})]})}export{z as CaptureGallery};
1
+ import{j as e}from"./pwa-startup-C8kDd3Vd.js";import{r as i,R as x,E as j,D as u,f as g,h as f}from"./icons-BwhnWKHR.js";import{l as b,c as d,d as y}from"./HubApp-BoHzIvar.js";import"./pwa-bootstrap-ljOQTt2e.js";import"./public-site-routing-pddZbLCj.js";import"./MonitorStackIcon-BLNbbRNY.js";import"./supabase-C7qjtLN3.js";import"./frame-lifecycle-CNz8ou2A.js";function z({hubUrl:s,onToast:n}){const[o,m]=i.useState([]),[h,c]=i.useState(!0),r=i.useCallback(async()=>{c(!0);try{m((await b(s)).captures||[])}catch(t){n(t instanceof Error?t.message:String(t))}finally{c(!1)}},[s,n]);i.useEffect(()=>{r()},[r]);const p=async t=>{const a=d(t.id,s);if(navigator.share)try{await navigator.share({title:t.fileName,url:a});return}catch{}window.open(a,"_blank","noopener,noreferrer")};return e.jsxs("section",{className:"capture-gallery",children:[e.jsxs("header",{children:[e.jsxs("div",{children:[e.jsx("span",{className:"settings-eyebrow",children:"Capture Gallery"}),e.jsx("h2",{children:"Saved captures"})]}),e.jsxs("button",{className:"text-button",onClick:()=>{r()},type:"button",children:[e.jsx(x,{size:15})," Refresh"]})]}),h?e.jsx("p",{className:"settings-help",children:"Loading captures..."}):o.length===0?e.jsx("p",{className:"settings-help",children:"No captures saved yet."}):e.jsx("div",{className:"capture-gallery-grid",children:o.map(t=>{const a=d(t.id,s);return e.jsxs("article",{className:"capture-gallery-card",children:[t.mimeType.startsWith("image/")?e.jsx("img",{src:a,alt:t.target.label}):e.jsx("video",{src:a,controls:!0,preload:"metadata"}),e.jsxs("div",{className:"capture-gallery-card-body",children:[e.jsx("strong",{children:t.fileName}),e.jsxs("small",{children:[t.target.label," · ",new Date(t.createdAt).toLocaleString()," · ",Math.ceil(t.sizeBytes/1024)," KB"]}),e.jsxs("div",{children:[e.jsx("button",{className:"icon-button",title:"Open","aria-label":"Open",onClick:()=>window.open(a,"_blank","noopener,noreferrer"),type:"button",children:e.jsx(j,{size:15})}),e.jsx("a",{className:"icon-button",title:"Download","aria-label":"Download",href:`${a}?download=1`,download:t.fileName,children:e.jsx(u,{size:15})}),e.jsx("button",{className:"icon-button",title:"Share","aria-label":"Share",onClick:()=>{p(t)},type:"button",children:e.jsx(g,{size:15})}),e.jsx("button",{className:"icon-button danger",title:"Delete","aria-label":"Delete",onClick:()=>{window.confirm(`Delete ${t.fileName}?`)&&y(t.id,s).then(()=>r()).catch(l=>n(l instanceof Error?l.message:String(l)))},type:"button",children:e.jsx(f,{size:15})})]})]})]},t.id)})})]})}export{z as CaptureGallery};
@@ -0,0 +1 @@
1
+ import{j as e}from"./pwa-startup-C8kDd3Vd.js";import{r as o,P as g,D as b,R as D}from"./icons-BwhnWKHR.js";import"./pwa-bootstrap-ljOQTt2e.js";function V(t){if(!t)return"Reading the installed version...";const a=String(t.errorCode||t.error||"");switch(t.state){case"checking":return"Checking for a newer VuvoDesk version...";case"available":return`Version ${t.availableVersion||""} is available.`;case"downloading":return`Downloading version ${t.availableVersion||""} (${Math.round(t.progress||0)}%).`;case"downloaded":return`Version ${t.availableVersion||""} is ready. Restart to install it.`;case"installing":return"Closing VuvoDesk safely and starting the update...";case"current":return"This computer has the latest VuvoDesk version.";case"error":return/authorization-required/i.test(a)?"Linux could not authorize or start the installer. Check for updates here, then choose Restart and update and approve the administrator request.":/runtime-recovery-failed/i.test(a)?"The local VuvoDesk service could not restart. Quit VuvoDesk completely and reopen it.":/owner-cleanup-stuck|owner-reset-failed/i.test(a)?"The Windows update service could not reset. Quit VuvoDesk completely, reopen it, and check again.":/installer-launch-failed/i.test(a)?"The installer could not start. VuvoDesk restored its local service so you can retry.":/version-mismatch/i.test(a)?"The downloaded update did not match the expected version. VuvoDesk will retry safely.":/stalled|timed-out/i.test(a)?"The update connection stopped responding. VuvoDesk will retry automatically.":"The update server could not be reached. VuvoDesk will retry automatically.";case"development":return"Desktop updates are available in an installed VuvoDesk build.";case"unavailable":return"Updates are not available for this desktop build.";default:return"VuvoDesk checks once when the desktop app starts."}}function C(){const t=window.liveDesk?.updates,a=window.liveDesk?.app,[s,i]=o.useState(null),[f,u]=o.useState(!1),[n,p]=o.useState(null),[m,h]=o.useState(!1);if(o.useEffect(()=>{if(!t)return;let r=!0;t.getStatus?.().then(c=>{r&&i(c)});const d=t.onStatus?.(c=>{r&&i(c)});return()=>{r=!1,d?.()}},[t]),o.useEffect(()=>{if(!a?.getAutoStart)return;let r=!0;return a.getAutoStart().then(d=>{r&&p(d)}),()=>{r=!1}},[a]),!t&&!a?.getAutoStart)return null;const v=s?.state==="downloaded"||s?.downloaded===!0,k=!!s?.reopenRequired||/runtime-recovery-failed|owner-cleanup-stuck|owner-reset-failed/i.test(String(s?.errorCode||"")),l=f||s?.state==="checking"||s?.state==="downloading"||s?.state==="installing",x=s?.channel==="dev"?"Development":s?.channel==="stable"?"Stable":s?.channel||"Unknown",j=async()=>{if(t){u(!0);try{const r=v?await t.install?.():await t.check?.();r&&i(r)}finally{u(!1)}}},w=async r=>{if(a?.setAutoStart){h(!0);try{p(await a.setAutoStart(r))}finally{h(!1)}}},y=n?.enabled!==n?.registered;return e.jsxs(e.Fragment,{children:[n?.supported===!0&&e.jsxs("section",{className:"settings-section-card desktop-auto-start-card",children:[e.jsxs("div",{className:"settings-section-heading",children:[e.jsxs("div",{children:[e.jsx("span",{children:"Computer startup"}),e.jsx("h3",{children:"Start VuvoDesk after this computer restarts"})]}),e.jsx(g,{size:20})]}),e.jsx("p",{className:"settings-help",children:"VuvoDesk starts automatically when you sign in after Windows, macOS, or Linux restarts, then reconnects this computer quietly."}),e.jsxs("div",{className:"desktop-auto-start-setting",children:[e.jsxs("div",{className:"desktop-auto-start-copy",children:[e.jsx(g,{size:18}),e.jsxs("span",{children:[e.jsx("strong",{children:"Automatic startup"}),e.jsx("small",{children:"You can also change this from the VuvoDesk tray menu."})]})]}),e.jsxs("label",{className:"settings-toggle desktop-auto-start-toggle",children:[e.jsx("input",{"aria-label":"Start VuvoDesk after this computer restarts",type:"checkbox",checked:n.enabled,onChange:r=>{w(r.target.checked)},disabled:m}),e.jsx("span",{children:n.enabled?"On":"Off"})]}),(n.error||y)&&e.jsx("p",{className:"desktop-auto-start-error",role:"alert",children:"Automatic startup could not be registered. VuvoDesk saved your choice and will retry next time it opens."})]})]}),t&&e.jsxs("section",{className:"settings-section-card desktop-update-card",children:[e.jsxs("div",{className:"settings-section-heading",children:[e.jsxs("div",{children:[e.jsx("span",{children:"Desktop app"}),e.jsx("h3",{children:"VuvoDesk updates"})]}),e.jsx(b,{size:20})]}),e.jsx("p",{className:"settings-help","aria-live":"polite",children:V(s)}),e.jsxs("div",{className:"desktop-update-meta",children:[e.jsx("span",{children:"Installed"}),e.jsx("strong",{children:s?.currentVersion||"Unknown"}),e.jsx("span",{children:"Channel"}),e.jsx("strong",{children:x}),s?.availableVersion&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"Available"}),e.jsx("strong",{children:s.availableVersion})]})]}),e.jsxs("button",{className:"settings-reset desktop-update-action",onClick:()=>{j()},disabled:l||k,type:"button",children:[e.jsx(D,{size:15,className:l?"desktop-update-spin":""}),k?"Reopen VuvoDesk":v?"Restart and update":l?"Updating...":"Check for updates"]})]})]})}export{C as DesktopUpdatePanel};