chore: add大量静态资源文件
新增了图标、背景图、验证码素材以及音频素材等大量静态资源文件
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"_comment": "PSC 工具(密码安全中心等)的前端鉴权配置",
|
||||
"enableCookieAuth_comment": "true:启用基于 JWT cookie 的鉴权;false:关闭(通常仅限开发环境)",
|
||||
"enableCookieAuth": false,
|
||||
"cookieName_comment": "PSC 使用的 JWT cookie 名称",
|
||||
"cookieName": "TRAE-PSC_jwt",
|
||||
"max_age_days_comment": "JWT cookie 的最大有效天数(1~365)",
|
||||
"max_age_days": 30
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 217 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 205 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 342 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 184 KiB |
@@ -0,0 +1,41 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Yang's 网盘</title>
|
||||
<link rel="icon" href="psc.svg" type="image/svg+xml" />
|
||||
<style>
|
||||
body{font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;margin:0;padding:0;color:#111}
|
||||
.container{max-width:800px;margin:24px auto;padding:0 16px}
|
||||
h1{font-size:24px;margin:0 0 12px}
|
||||
#statusTop{color:#666;margin-bottom:16px}
|
||||
input{padding:8px;border:1px solid #ccc;border-radius:4px}
|
||||
button{padding:8px 12px;border:1px solid #999;border-radius:4px;background:#f7f7f7}
|
||||
.debugbox{white-space:pre-wrap;border:1px dashed #ccc;border-radius:4px;padding:8px;min-height:120px;margin-top:8px;color:#333}
|
||||
</style>
|
||||
<script>
|
||||
let lines=[]
|
||||
function log(){ const t=new Date().toISOString(); const msg=[t].concat([].slice.call(arguments)).join(' '); lines.push(msg); if(lines.length>200) lines.shift(); const el=document.getElementById('debugBottom'); if(el) el.textContent=lines.join('\n') }
|
||||
function setStatus(t){ const s=document.getElementById('status'); if(s) s.textContent=t; const top=document.getElementById('statusTop'); if(top) top.textContent='后端: ' + location.origin + ' | ' + t; try{ log('status', t) }catch{} }
|
||||
async function calcMasterFp(s){ const material = await window.crypto.subtle.importKey('raw', new TextEncoder().encode(s), 'PBKDF2', false, ['deriveBits']); const bits = await window.crypto.subtle.deriveBits({ name:'PBKDF2', hash:'SHA-256', salt: new TextEncoder().encode('local-fp'), iterations:120000 }, material, 256); const b = new Uint8Array(bits); return btoa(String.fromCharCode(...b)) }
|
||||
function init(){ log('app.loaded'); log('backend.origin', location.origin); log('initUi.start'); const btn=document.getElementById('btnLogin'); const inp=document.getElementById('master'); btn.onclick=async function(){ const v=(inp.value||'').trim(); if(!v){ setStatus('请输入18位身份证号'); return } try{ log('login.skip_format_check'); log('login.req', 'id.len', v.length); const r = await fetch('/api/psc/auth/login/plain', { method:'POST', headers:{ 'Content-Type':'application/json' }, body: JSON.stringify({ master_password: v }) }); let j=null; try{ j=await r.json() }catch{}; log('login.status', r.status); log('login.json', JSON.stringify(j)); if(r.ok && j && j.token){ try{ localStorage.setItem('tk_plain', j.token) }catch{}; try{ const fp = await calcMasterFp(v); localStorage.setItem('mfp', fp) }catch{}; setStatus('登录成功,正在跳转...'); setTimeout(()=>{ location.href='index.html' }, 300) } else { if(j && j.error==='not_setup'){ setStatus('未初始化,请先设置登录密码'); return } if(j && j.error==='unauthorized'){ setStatus('身份证号不准确'); return } setStatus('登录失败') } } catch(e){ setStatus('网络错误,登录失败') } }; const cp=document.getElementById('btnCopyDebugBottom'); cp.onclick=async function(){ try{ await navigator.clipboard.writeText((document.getElementById('debugBottom')?.textContent)||''); setStatus('调试信息已复制') } catch{ setStatus('请手动复制调试信息') } } }
|
||||
window.addEventListener('DOMContentLoaded', init)
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>Yang's 网盘</h1>
|
||||
<div id="statusTop"></div>
|
||||
<div id="login">
|
||||
<h2>登录</h2>
|
||||
<input id="master" placeholder="18位身份证号" type="password" autocomplete="off" autocapitalize="off" spellcheck="false" />
|
||||
<button id="btnLogin">登录</button>
|
||||
<div style="margin:6px 0"><button id="btnCopyDebugBottom">复制调试信息</button></div>
|
||||
<div id="status" style="margin-top:8px"></div>
|
||||
<div id="debugBottom" class="debugbox"></div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="auth.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
|
||||
<text y=".9em" font-size="90">💾</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 113 B |
@@ -0,0 +1,29 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>分享下载</title>
|
||||
<link rel="icon" href="/tools/psc/psc.svg" type="image/svg+xml" />
|
||||
<link rel="stylesheet" href="/tools/psc/style.css" />
|
||||
</head>
|
||||
<body class="share-page">
|
||||
<div class="container">
|
||||
<h2>分享下载</h2>
|
||||
<div class="row">
|
||||
<input id="sharePwd" type="password" placeholder="分享密码" autocomplete="off" autocapitalize="off" spellcheck="false" name="no-save-share-open" />
|
||||
<button id="btnOpen">打开</button>
|
||||
</div>
|
||||
<div id="status"></div>
|
||||
|
||||
<div id="info" class="hidden">
|
||||
<div>文件:<span id="fname"></span></div>
|
||||
<div>大小:<span id="fsize"></span></div>
|
||||
<div class="row row-actions">
|
||||
<button id="btnDownload">下载</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="/tools/psc/share.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user