| 1 | /* Generated by tools/gen_ui.py from src/ui.html. Do not edit by hand. */ |
| 2 | #ifndef SX_AGYLOGIN_UI_HTML_H |
| 3 | #define SX_AGYLOGIN_UI_HTML_H |
| 4 | |
| 5 | static const char *UI_HTML = |
| 6 | "<!DOCTYPE html>\n" |
| 7 | "<html lang=\"en\"><head><meta charset=\"utf-8\">\n" |
| 8 | "<meta name=\"viewport\" content=\"width=device-width,initial-scale=1\">\n" |
| 9 | "<title>opencode</title>\n" |
| 10 | "\001\n" |
| 11 | "<style>\n" |
| 12 | "*{box-sizing:border-box}\n" |
| 13 | "html,body{margin:0;min-height:100%}\n" |
| 14 | "body{background:var(--bg);color:var(--text);font-family:var(--font);font-size:14px;\n" |
| 15 | " line-height:1.5;-webkit-font-smoothing:antialiased}\n" |
| 16 | "#app{max-width:840px;margin:0 auto;padding:16px 16px 40px}\n" |
| 17 | ".hd{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:14px}\n" |
| 18 | ".hd .grow{flex:1 1 auto;min-width:0}\n" |
| 19 | ".hd h1{margin:0;font-size:18px;font-weight:650;letter-spacing:-.01em}\n" |
| 20 | ".hd .sub{font-size:11.5px;color:var(--text-2);margin-top:2px;white-space:nowrap;\n" |
| 21 | " overflow:hidden;text-overflow:ellipsis}\n" |
| 22 | ".pill{display:inline-flex;align-items:center;gap:6px;font-size:11.5px;font-weight:650;\n" |
| 23 | " padding:4px 10px;border-radius:999px;background:var(--surface-2);color:var(--text-2);\n" |
| 24 | " border:1px solid var(--line);white-space:nowrap}\n" |
| 25 | ".pill .dot{width:7px;height:7px;border-radius:50%;background:var(--gray);flex:0 0 auto}\n" |
| 26 | ".pill.ok{color:var(--green);border-color:rgba(48,209,88,.35)}\n" |
| 27 | ".pill.ok .dot{background:var(--green);box-shadow:0 0 0 3px rgba(48,209,88,.15)}\n" |
| 28 | ".pill.warn{color:var(--orange);border-color:rgba(255,159,10,.35)}\n" |
| 29 | ".pill.warn .dot{background:var(--orange)}\n" |
| 30 | ".pill.off .dot{background:var(--gray)}\n" |
| 31 | ".badge{display:inline-flex;align-items:center;gap:6px;font-size:11.5px;font-weight:600;\n" |
| 32 | " padding:4px 10px;border-radius:999px;background:var(--surface-2);color:var(--text);\n" |
| 33 | " border:1px solid var(--line);white-space:nowrap;max-width:220px;overflow:hidden;\n" |
| 34 | " text-overflow:ellipsis}\n" |
| 35 | ".badge .av{width:18px;height:18px;border-radius:50%;background:var(--blue);color:#fff;\n" |
| 36 | " display:flex;align-items:center;justify-content:center;font-size:10px;font-weight:700;\n" |
| 37 | " flex:0 0 auto}\n" |
| 38 | ".card{background:var(--bg-card);border:1px solid var(--line);border-radius:14px;\n" |
| 39 | " padding:16px;margin-bottom:12px}\n" |
| 40 | ".card h2{margin:0 0 4px;font-size:13px;font-weight:700;letter-spacing:.08em;\n" |
| 41 | " text-transform:uppercase;color:var(--text-2)}\n" |
| 42 | ".card .lead{margin:0 0 12px;font-size:12.5px;color:var(--text-2)}\n" |
| 43 | ".row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}\n" |
| 44 | ".btn{background:var(--blue);color:#fff;border:0;border-radius:980px;padding:7px 16px;\n" |
| 45 | " font-weight:600;font-size:13px;cursor:pointer;font-family:inherit;\n" |
| 46 | " transition:transform .12s var(--ease),opacity .12s}\n" |
| 47 | ".btn:active{transform:scale(.98)}\n" |
| 48 | ".btn:disabled{opacity:.5;cursor:default}\n" |
| 49 | ".btn.ghost{background:var(--surface-2);color:var(--text);border:1px solid var(--line)}\n" |
| 50 | ".btn.ghost:hover{background:var(--surface-hover);border-color:var(--line-2)}\n" |
| 51 | ".btn.danger{background:transparent;color:var(--red);border:1px solid rgba(255,69,58,.35)}\n" |
| 52 | "a.btn{display:inline-flex;align-items:center;gap:6px;text-decoration:none}\n" |
| 53 | ".kv{display:grid;grid-template-columns:132px minmax(0,1fr);gap:6px 12px;font-size:13px}\n" |
| 54 | ".kv .k{color:var(--text-2);font-size:12px}\n" |
| 55 | ".kv .v{font-family:var(--mono);font-size:12px;word-break:break-all}\n" |
| 56 | ".kv .v.plain{font-family:var(--font);font-size:13px}\n" |
| 57 | ".hint{font-size:12px;color:var(--text-2);margin:10px 0 0}\n" |
| 58 | ".step{display:none}\n" |
| 59 | ".step.on{display:block}\n" |
| 60 | ".codebox{margin:10px 0;padding:14px 16px;border-radius:12px;background:var(--code-bg);\n" |
| 61 | " border:1px solid var(--line);text-align:center}\n" |
| 62 | ".codebox .code{font-family:var(--mono);font-size:26px;font-weight:700;letter-spacing:.12em;\n" |
| 63 | " color:var(--text);margin-bottom:6px}\n" |
| 64 | ".codebox .code-empty{font-family:var(--mono);font-size:18px;color:var(--text-2);\n" |
| 65 | " letter-spacing:.08em}\n" |
| 66 | ".pollbar{margin:10px 0 0;height:3px;border-radius:2px;background:var(--surface-2);\n" |
| 67 | " overflow:hidden}\n" |
| 68 | ".pollbar i{display:block;height:100%;width:0;background:var(--blue);\n" |
| 69 | " animation:pollslide 2s linear infinite}\n" |
| 70 | "@keyframes pollslide{0%{width:0}50%{width:100%}100%{width:0}}\n" |
| 71 | ".polllbl{font-size:11.5px;color:var(--text-2);margin:8px 0 0;display:flex;align-items:center;gap:6px}\n" |
| 72 | ".polllbl .spin{width:10px;height:10px;border-radius:50%;border:2px solid var(--line-2);\n" |
| 73 | " border-top-color:var(--blue);animation:spin 1s linear infinite;display:inline-block}\n" |
| 74 | "@keyframes spin{to{transform:rotate(360deg)}}\n" |
| 75 | ".authurl{margin:10px 0;padding:10px 11px;border-radius:10px;background:var(--code-bg);\n" |
| 76 | " border:1px solid var(--line);font-family:var(--mono);font-size:11.5px;\n" |
| 77 | " word-break:break-all;max-height:120px;overflow:auto;color:var(--text)}\n" |
| 78 | ".note.warn{color:var(--orange);border-color:rgba(255,159,10,.35)}\n" |
| 79 | "#themeToggle{background:var(--surface-2);border:1px solid var(--line);color:var(--text);\n" |
| 80 | " border-radius:980px;padding:5px 12px;font-size:12px;font-weight:600;cursor:pointer;\n" |
| 81 | " font-family:inherit}\n" |
| 82 | ".note{display:none;margin-top:10px;padding:9px 11px;border-radius:10px;font-size:12.5px;\n" |
| 83 | " border:1px solid var(--line);background:var(--surface-2)}\n" |
| 84 | ".note.show{display:block}\n" |
| 85 | ".note.err{color:var(--red);border-color:rgba(255,69,58,.35)}\n" |
| 86 | ".note.ok{color:var(--green);border-color:rgba(48,209,88,.35)}\n" |
| 87 | ".empty{padding:10px 0;color:var(--text-2);font-size:12.5px}\n" |
| 88 | ".tok{font-size:11.5px;color:var(--text-2);margin-top:8px}\n" |
| 89 | ".tok .ok{color:var(--green)}\n" |
| 90 | ".tok .no{color:var(--red)}\n" |
| 91 | "footer{font-size:11px;color:var(--text-2);margin-top:24px;text-align:center}\n" |
| 92 | "footer a{color:var(--text-2)}\n" |
| 93 | "@media(max-width:480px){\n" |
| 94 | " #app{padding:12px 12px 32px}\n" |
| 95 | " .hd h1{font-size:16px}\n" |
| 96 | " .kv{grid-template-columns:110px minmax(0,1fr)}\n" |
| 97 | " .codebox .code{font-size:22px}\n" |
| 98 | "}\n" |
| 99 | "</style>\n" |
| 100 | "</head>\n" |
| 101 | "<body>\n" |
| 102 | "<div id=\"app\">\n" |
| 103 | " <div class=\"hd\">\n" |
| 104 | " <div class=\"grow\">\n" |
| 105 | " <h1>OpenCode Login</h1>\n" |
| 106 | " <div class=\"sub\">Device code login and account token manager for this node</div>\n" |
| 107 | " </div>\n" |
| 108 | " <span class=\"badge\" id=\"userBadge\" hidden>\n" |
| 109 | " <span class=\"av\" id=\"userAv\">?</span><span id=\"userLabel\"></span>\n" |
| 110 | " </span>\n" |
| 111 | " <span class=\"pill off\" id=\"pill\"><span class=\"dot\"></span><span id=\"pillText\">Checking</span></span>\n" |
| 112 | " <button class=\"btn ghost embed-hide\" id=\"themeToggle\" type=\"button\" title=\"Toggle appearance\">Theme</button>\n" |
| 113 | " </div>\n" |
| 114 | "\n" |
| 115 | " <!-- Session card -->\n" |
| 116 | " <div class=\"card\">\n" |
| 117 | " <h2>Session</h2>\n" |
| 118 | " <p class=\"lead\">The plugin reads the credential file written by the node's own login CLI. It never sees, stores, or returns a token value.</p>\n" |
| 119 | " <div class=\"kv\" id=\"sessionKv\">\n" |
| 120 | " <div class=\"k\">Status</div><div class=\"v plain\" id=\"vStatus\">Checking</div>\n" |
| 121 | " <div class=\"k\">Account</div><div class=\"v plain\" id=\"vAccount\">-</div>\n" |
| 122 | " <div class=\"k\">Token</div><div class=\"v plain\" id=\"vToken\">-</div>\n" |
| 123 | " <div class=\"k\">Refresh</div><div class=\"v plain\" id=\"vRefresh\">-</div>\n" |
| 124 | " <div class=\"k\">Profile</div><div class=\"v plain\" id=\"vProfile\">-</div>\n" |
| 125 | " <div class=\"k\">Credentials</div><div class=\"v\" id=\"vPath\">-</div>\n" |
| 126 | " </div>\n" |
| 127 | " <div class=\"tok\" id=\"tokLine\"></div>\n" |
| 128 | " <div class=\"row\" style=\"margin-top:12px\">\n" |
| 129 | " <button class=\"btn\" id=\"btnRefresh\" type=\"button\">Refresh Token Now</button>\n" |
| 130 | " <button class=\"btn ghost\" id=\"btnStartLogin\" type=\"button\">Start OpenCode Login</button>\n" |
| 131 | " <button class=\"btn ghost\" id=\"btnRelogin\" type=\"button\" hidden>Re-login (replace)</button>\n" |
| 132 | " </div>\n" |
| 133 | " <div class=\"note\" id=\"sessionNote\"></div>\n" |
| 134 | " </div>\n" |
| 135 | "\n" |
| 136 | " <!-- Device flow card -->\n" |
| 137 | " <div class=\"card\" id=\"flowCard\">\n" |
| 138 | " <h2>Device Flow</h2>\n" |
| 139 | " <p class=\"lead\">OpenCode signs in with a one-time user code. Copy it, open the link, approve, and this panel updates itself.</p>\n" |
| 140 | "\n" |
| 141 | " <div class=\"step on\" id=\"stepIdle\">\n" |
| 142 | " <div class=\"empty\">No login in progress. Press <b>Start OpenCode Login</b> above to begin.</div>\n" |
| 143 | " </div>\n" |
| 144 | "\n" |
| 145 | " <div class=\"step\" id=\"stepActive\">\n" |
| 146 | " <div class=\"codebox\">\n" |
| 147 | " <div class=\"code\" id=\"userCode\">--</div>\n" |
| 148 | " <div class=\"row\" style=\"justify-content:center\">\n" |
| 149 | " <button class=\"btn\" id=\"btnCopyOpen\" type=\"button\">Copy Code & Open OpenCode</button>\n" |
| 150 | " </div>\n" |
| 151 | " </div>\n" |
| 152 | " <div class=\"authurl\" id=\"verifyUrl\"></div>\n" |
| 153 | " <div class=\"pollbar\"><i></i></div>\n" |
| 154 | " <div class=\"polllbl\"><span class=\"spin\"></span><span id=\"pollLabel\">Waiting for approval</span></div>\n" |
| 155 | " <div class=\"row\" style=\"margin-top:12px\">\n" |
| 156 | " <button class=\"btn danger\" id=\"btnCancel\" type=\"button\">Cancel</button>\n" |
| 157 | " </div>\n" |
| 158 | " <div class=\"note\" id=\"flowNote\"></div>\n" |
| 159 | " </div>\n" |
| 160 | " </div>\n" |
| 161 | "\n" |
| 162 | " <footer>\n" |
| 163 | " <span id=\"footInfo\">plugin_opencode_login</span>\n" |
| 164 | " · <a href=\"https://plugingit.scorpiox.net/repo?name=scorpiox-bot-plugin-opencode-login\">source</a>\n" |
| 165 | " </footer>\n" |
| 166 | "</div>\n" |
| 167 | "<script>\n" |
| 168 | "(function(){\n" |
| 169 | " var q=new URLSearchParams(location.search);\n" |
| 170 | " var node=q.get('node')||'';\n" |
| 171 | " var sid=q.get('id')||'';\n" |
| 172 | " var HUB=q.get('plugin')||'';\n" |
| 173 | " var pwd=q.get('pwd')||(node&&localStorage.getItem('bot_pwd_'+node))||localStorage.getItem('bot_active_pwd')||'';\n" |
| 174 | " var POLL_MS=5000;\n" |
| 175 | " var pollTimer=null;\n" |
| 176 | " var flowActive=false;\n" |
| 177 | " var flowVerify='';\n" |
| 178 | " var flowCode='';\n" |
| 179 | "\n" |
| 180 | " function esc(s){return String(s==null?'':s).replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>').replace(/\"/g,'"');}\n" |
| 181 | " function $(id){return document.getElementById(id);}\n" |
| 182 | " function setPill(cls,text){var p=$('pill');p.className='pill '+cls;$('pillText').textContent=text;}\n" |
| 183 | " function note(id,cls,text){var n=$(id);if(!n)return;n.className='note '+(cls||'')+(text?' show':'');n.textContent=text||'';}\n" |
| 184 | "\n" |
| 185 | " function api(action,extra){\n" |
| 186 | " var u;\n" |
| 187 | " if(HUB) u='/plugins?plugin='+encodeURIComponent(HUB)+'&action='+encodeURIComponent(action);\n" |
| 188 | " else u='/plugin_opencode_login?action='+encodeURIComponent(action);\n" |
| 189 | " if(extra) u+='&'+extra;\n" |
| 190 | " if(node) u+='&node='+encodeURIComponent(node);\n" |
| 191 | " if(sid) u+='&id='+encodeURIComponent(sid);\n" |
| 192 | " if(pwd) u+='&pwd='+encodeURIComponent(pwd);\n" |
| 193 | " return fetch(u,{headers:pwd?{'X-Bot-Password':pwd}:{}}).then(function(r){return r.json();});\n" |
| 194 | " }\n" |
| 195 | "\n" |
| 196 | " function fmtExpiry(sec){\n" |
| 197 | " if(sec==null||sec<=0)return 'unknown';\n" |
| 198 | " if(sec<60)return sec+'s';\n" |
| 199 | " var m=Math.floor(sec/60);\n" |
| 200 | " if(m<60)return m+' min';\n" |
| 201 | " var h=Math.floor(m/60);\n" |
| 202 | " if(h<48)return h+' h '+(m%60)+' min';\n" |
| 203 | " var d=Math.floor(h/24);\n" |
| 204 | " return d+' days';\n" |
| 205 | " }\n" |
| 206 | "\n" |
| 207 | " function renderStatus(d){\n" |
| 208 | " if(!d||d.ok===false){setPill('off','Not Connected');note('sessionNote','err',d&&d.error?('Error: '+d.error):'No response');return;}\n" |
| 209 | " var li=!!d.logged_in, ex=!!d.expired, pend=!!d.pending;\n" |
| 210 | " if(li&&!ex){setPill('ok','Connected');}\n" |
| 211 | " else if(li&&ex){setPill('warn','Expired');}\n" |
| 212 | " else if(pend){setPill('warn','Signing in');}\n" |
| 213 | " else{setPill('off','Not Connected');}\n" |
| 214 | "\n" |
| 215 | " $('vStatus').textContent=li?(ex?'Signed in (token expired)':'Signed in'):(pend?'Device flow in progress':'Not signed in');\n" |
| 216 | " $('vAccount').textContent=d.account||d.username||'-';\n" |
| 217 | " $('vToken').textContent=li?(ex?'expired ('+fmtExpiry(d.expires_in_sec)+')':'valid, expires in '+fmtExpiry(d.expires_in_sec)):'none';\n" |
| 218 | " $('vRefresh').textContent=d.has_refresh?'stored (presence only)':'not stored';\n" |
| 219 | " $('vProfile').textContent=d.profile_exists?(d.profile||'superopencode')+' (exists)':'not created';\n" |
| 220 | " $('vPath').textContent=d.path||'-';\n" |
| 221 | "\n" |
| 222 | " var tok=$('tokLine');\n" |
| 223 | " if(!d.cli_present){tok.innerHTML='<span class=\"no\">scorpiox-opencode-login is not on this node.</span>';}\n" |
| 224 | " else{tok.innerHTML='<span class=\"ok\">Login CLI present</span> · token CLI '+(d.token_cli_present?'present':'missing');}\n" |
| 225 | "\n" |
| 226 | " var badge=$('userBadge');\n" |
| 227 | " if(li){badge.hidden=false;var lbl=d.account||d.username||'OpenCode';$('userLabel').textContent=lbl;\n" |
| 228 | " $('userAv').textContent=(lbl.charAt(0)||'O').toUpperCase();}\n" |
| 229 | " else{badge.hidden=true;}\n" |
| 230 | "\n" |
| 231 | " $('btnRelogin').hidden=!li;\n" |
| 232 | " $('btnStartLogin').disabled=pend;\n" |
| 233 | "\n" |
| 234 | " if(pend&&!flowActive){startPollingUI();}\n" |
| 235 | " if(!pend&&flowActive){stopPollingUI();$('stepIdle').classList.add('on');$('stepActive').classList.remove('on');}\n" |
| 236 | " if(!li&&!pend){note('sessionNote','ok','No session on this node yet. Start a device login below.');}\n" |
| 237 | " else if(li&&!ex){note('sessionNote','ok','');}\n" |
| 238 | " else if(li&&ex){note('sessionNote','err','Token expired. Re-login to refresh the session.');}\n" |
| 239 | " }\n" |
| 240 | "\n" |
| 241 | " function refresh(){api('status').then(renderStatus).catch(function(e){setPill('off','Not Connected');note('sessionNote','err','Request failed: '+e);});}\n" |
| 242 | "\n" |
| 243 | " function startPollingUI(){\n" |
| 244 | " flowActive=true;\n" |
| 245 | " $('stepIdle').classList.remove('on');\n" |
| 246 | " $('stepActive').classList.add('on');\n" |
| 247 | " if(!pollTimer){pollTimer=setInterval(pollOnce,POLL_MS);}\n" |
| 248 | " }\n" |
| 249 | " function stopPollingUI(){\n" |
| 250 | " flowActive=false;\n" |
| 251 | " if(pollTimer){clearInterval(pollTimer);pollTimer=null;}\n" |
| 252 | " }\n" |
| 253 | "\n" |
| 254 | " function pollOnce(){\n" |
| 255 | " if(!flowActive)return;\n" |
| 256 | " api('poll').then(function(d){\n" |
| 257 | " if(!d||d.ok===false){note('flowNote','err',d&&d.error?('Poll error: '+d.error):'Poll failed');return;}\n" |
| 258 | " if(d.state==='done'||d.logged_in){\n" |
| 259 | " stopPollingUI();\n" |
| 260 | " $('stepIdle').classList.add('on');\n" |
| 261 | " $('stepActive').classList.remove('on');\n" |
| 262 | " note('flowNote','ok','Signed in. The credential file has been written.');\n" |
| 263 | " $('pollLabel').textContent='Signed in';\n" |
| 264 | " refresh();\n" |
| 265 | " }else if(d.state==='failed'){\n" |
| 266 | " stopPollingUI();\n" |
| 267 | " $('stepIdle').classList.add('on');\n" |
| 268 | " $('stepActive').classList.remove('on');\n" |
| 269 | " note('flowNote','err','Login failed: '+(d.error||'unknown')+(d.detail?(' - '+d.detail):''));\n" |
| 270 | " }else{\n" |
| 271 | " $('pollLabel').textContent='Waiting for approval';\n" |
| 272 | " }\n" |
| 273 | " }).catch(function(e){note('flowNote','err','Poll request failed: '+e);});\n" |
| 274 | " }\n" |
| 275 | "\n" |
| 276 | " function doStart(force){\n" |
| 277 | " note('sessionNote','ok','');\n" |
| 278 | " api('start',force?'force=1':'').then(function(d){\n" |
| 279 | " if(!d||d.ok===false){note('sessionNote','err',d&&d.error?('Start failed: '+d.error):'Start failed');return;}\n" |
| 280 | " if(d.already_logged_in){\n" |
| 281 | " note('sessionNote','warn','This node already has OpenCode credentials. Use Re-login to replace them.');\n" |
| 282 | " refresh();\n" |
| 283 | " return;\n" |
| 284 | " }\n" |
| 285 | " flowVerify=d.verify_url||'';\n" |
| 286 | " flowCode=d.user_code||'';\n" |
| 287 | " $('userCode').textContent=flowCode||'--';\n" |
| 288 | " $('verifyUrl').textContent=flowVerify;\n" |
| 289 | " $('pollLabel').textContent='Waiting for approval';\n" |
| 290 | " note('flowNote','ok','');\n" |
| 291 | " startPollingUI();\n" |
| 292 | " refresh();\n" |
| 293 | " }).catch(function(e){note('sessionNote','err','Start request failed: '+e);});\n" |
| 294 | " }\n" |
| 295 | "\n" |
| 296 | " $('btnStartLogin').onclick=function(){doStart(false);};\n" |
| 297 | " $('btnRelogin').onclick=function(){doStart(true);};\n" |
| 298 | " $('btnCancel').onclick=function(){\n" |
| 299 | " stopPollingUI();\n" |
| 300 | " api('cancel').then(function(d){\n" |
| 301 | " $('stepIdle').classList.add('on');\n" |
| 302 | " $('stepActive').classList.remove('on');\n" |
| 303 | " note('flowNote','ok',d&&d.ok?'Device flow cancelled.':'Cancel failed: '+(d&&d.error||'unknown'));\n" |
| 304 | " refresh();\n" |
| 305 | " }).catch(function(e){note('flowNote','err','Cancel request failed: '+e);});\n" |
| 306 | " };\n" |
| 307 | " $('btnRefresh').onclick=function(){\n" |
| 308 | " note('sessionNote','ok','');\n" |
| 309 | " api('refresh').then(function(d){\n" |
| 310 | " if(!d||d.ok===false){note('sessionNote','err',d&&d.error?('Refresh failed: '+d.error):'Refresh failed');return;}\n" |
| 311 | " note('sessionNote','ok','Token re-read. '+(d.refreshed?'CLI confirmed a live token.':''));\n" |
| 312 | " renderStatus(d);\n" |
| 313 | " }).catch(function(e){note('sessionNote','err','Refresh request failed: '+e);});\n" |
| 314 | " };\n" |
| 315 | " $('btnCopyOpen').onclick=function(){\n" |
| 316 | " var done=function(){note('flowNote','ok','Code copied. Open the link and approve.');};\n" |
| 317 | " if(navigator.clipboard&&navigator.clipboard.writeText){navigator.clipboard.writeText(flowCode).then(done,function(){window.open(flowVerify,'_blank');done();});}\n" |
| 318 | " else{done();}\n" |
| 319 | " if(flowVerify)window.open(flowVerify,'_blank');\n" |
| 320 | " };\n" |
| 321 | "\n" |
| 322 | " var tb=$('themeToggle');\n" |
| 323 | " if(tb)tb.onclick=function(){\n" |
| 324 | " if(window.sxApplyTheme)window.sxApplyTheme(window.sxTheme()==='dark'?'light':'dark');\n" |
| 325 | " };\n" |
| 326 | " $('footInfo').textContent='plugin_opencode_login';\n" |
| 327 | " refresh();\n" |
| 328 | "})();\n" |
| 329 | "</script>\n" |
| 330 | "\002</body></html>\n" |
| 331 | ; |
| 332 | |
| 333 | #endif /* SX_AGYLOGIN_UI_HTML_H */ |