Files
sumi.work/admin/svn.html
T
2026-06-18 10:11:25 +08:00

259 lines
12 KiB
HTML

<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="robots" content="noindex" />
<meta name="theme-color" content="#edf5ff" />
<title>sumi.work - SVN 管理</title>
<link rel="stylesheet" href="../assets/css/software.css?v=20260618-1" />
</head>
<body>
<header class="soft-topbar">
<div class="soft-topbar-inner">
<a class="soft-brand" href="../software.html" aria-label="返回软件中心">
<img src="../assets/icons/software.svg" alt="" aria-hidden="true" />
<span>SVN 管理</span>
</a>
<nav class="soft-nav" aria-label="SVN 管理导航">
<a href="../index.html">首页</a>
<a href="../software.html">软件下载</a>
<a href="software.html">软件后台</a>
<a class="is-active" href="svn.html">SVN 管理</a>
</nav>
</div>
</header>
<main class="admin-shell svn-shell">
<section class="admin-panel" aria-labelledby="svn-token-title">
<div class="section-title-row">
<div>
<h1 id="svn-token-title">SVN 控制台</h1>
<p class="admin-note">集中管理 SVN 仓库、工作副本、提交、更新、分支标签、合并、锁和属性。</p>
</div>
<button class="text-button" type="button" id="svn-health">检测 SVN</button>
</div>
<div class="token-row">
<input id="admin-token" type="password" autocomplete="current-password" placeholder="输入 ADMIN_TOKEN" />
<button class="primary-action" type="button" id="save-token">保存令牌</button>
</div>
<p class="status-message" id="token-status"></p>
</section>
<div class="svn-console">
<aside class="admin-panel svn-sidebar" aria-labelledby="repo-title">
<div class="section-title-row compact">
<div>
<h2 id="repo-title">仓库</h2>
<p id="repo-summary">正在加载...</p>
</div>
<button class="text-button" type="button" id="reload-repos">刷新</button>
</div>
<div class="svn-repo-list" id="repo-list"></div>
<div class="form-actions">
<button class="danger-button" type="button" id="delete-repo">删除选中配置</button>
</div>
</aside>
<section class="admin-panel svn-form-panel" aria-labelledby="repo-form-title">
<h2 id="repo-form-title">新增仓库</h2>
<form id="repo-form">
<input type="hidden" name="id" />
<div class="field-grid">
<div class="field">
<label for="repo-name">仓库名称</label>
<input id="repo-name" name="name" required maxlength="120" placeholder="game-server" />
</div>
<div class="field">
<label for="checkout-path">本地目录</label>
<input id="checkout-path" name="checkoutPath" maxlength="200" placeholder="game-server" />
</div>
<div class="field full">
<label for="repo-url">仓库 URL</label>
<input id="repo-url" name="url" required maxlength="1000" placeholder="https://svn.example.com/project" />
</div>
<div class="field">
<label for="repo-username">用户名</label>
<input id="repo-username" name="username" autocomplete="username" maxlength="200" />
</div>
<div class="field">
<label for="repo-password">密码</label>
<input id="repo-password" name="password" type="password" autocomplete="current-password" placeholder="留空则保持原密码" />
</div>
<div class="field">
<label for="trunk-path">Trunk 目录</label>
<input id="trunk-path" name="trunkPath" value="trunk" maxlength="200" />
</div>
<div class="field">
<label for="branches-path">Branches 目录</label>
<input id="branches-path" name="branchesPath" value="branches" maxlength="200" />
</div>
<div class="field">
<label for="tags-path">Tags 目录</label>
<input id="tags-path" name="tagsPath" value="tags" maxlength="200" />
</div>
<div class="field full">
<label for="repo-description">备注</label>
<textarea id="repo-description" name="description" maxlength="500"></textarea>
</div>
</div>
<div class="checkbox-row">
<label class="checkbox-field"><input name="trustServerCert" type="checkbox" checked /> 自动信任服务端证书</label>
<label class="checkbox-field"><input name="noAuthCache" type="checkbox" checked /> 不缓存 SVN 凭据</label>
</div>
<div class="form-actions">
<button class="primary-action" type="submit" id="repo-submit">保存仓库</button>
<button class="secondary-action" type="button" id="repo-reset">清空</button>
</div>
<p class="status-message" id="repo-form-status"></p>
</form>
</section>
</div>
<section class="admin-panel svn-workbench" aria-labelledby="workbench-title">
<div class="section-title-row">
<div>
<h2 id="workbench-title">工作副本</h2>
<p id="selected-repo">请选择一个 SVN 仓库。</p>
</div>
<div class="svn-action-row">
<button class="text-button" type="button" data-action="info">Info</button>
<button class="text-button" type="button" data-action="status">Status</button>
<button class="text-button" type="button" data-action="log">Log</button>
<button class="text-button" type="button" data-action="diff">Diff</button>
</div>
</div>
<div class="svn-tabs" role="tablist" aria-label="SVN 操作分类">
<button class="svn-tab is-active" type="button" data-tab="daily">日常操作</button>
<button class="svn-tab" type="button" data-tab="history">历史差异</button>
<button class="svn-tab" type="button" data-tab="branch">分支标签</button>
<button class="svn-tab" type="button" data-tab="advanced">高级维护</button>
</div>
<div class="svn-tab-panel is-active" data-panel="daily">
<div class="svn-command-grid">
<button type="button" data-action="checkout">Checkout</button>
<button type="button" data-action="update">Update</button>
<button type="button" data-action="cleanup">Cleanup</button>
<button type="button" data-action="revert">Revert</button>
<button type="button" data-action="resolve">Resolve</button>
<button type="button" data-action="commit">Commit</button>
<button type="button" data-action="add">Add</button>
<button type="button" data-action="delete">Delete</button>
<button type="button" data-action="lock">Lock</button>
<button type="button" data-action="unlock">Unlock</button>
</div>
</div>
<div class="svn-tab-panel" data-panel="history">
<div class="svn-command-grid">
<button type="button" data-action="list">List</button>
<button type="button" data-action="blame">Blame</button>
<button type="button" data-action="propget">Propget</button>
<button type="button" data-action="propset">Propset</button>
<button type="button" data-action="ignore">Ignore</button>
<button type="button" data-action="export">Export</button>
</div>
</div>
<div class="svn-tab-panel" data-panel="branch">
<div class="svn-command-grid">
<button type="button" data-action="branch">Create Branch</button>
<button type="button" data-action="tag">Create Tag</button>
<button type="button" data-action="switch">Switch</button>
<button type="button" data-action="merge">Merge</button>
<button type="button" data-action="copy">Copy</button>
<button type="button" data-action="move">Move</button>
</div>
</div>
<div class="svn-tab-panel" data-panel="advanced">
<div class="svn-command-grid">
<button type="button" data-action="mkdir">Mkdir</button>
<button type="button" data-action="relocate">Relocate</button>
</div>
</div>
<form class="svn-action-form" id="action-form">
<div class="field-grid">
<div class="field">
<label for="action-target">目标路径</label>
<input id="action-target" name="target" placeholder="相对工作副本路径,默认 ." />
</div>
<div class="field">
<label for="action-revision">版本范围</label>
<input id="action-revision" name="revision" placeholder="123 或 100:HEAD" />
</div>
<div class="field">
<label for="action-source">来源</label>
<input id="action-source" name="source" placeholder="URL 或相对路径" />
</div>
<div class="field">
<label for="action-destination">目标/导出目录</label>
<input id="action-destination" name="destination" placeholder="URL、相对路径或导出目录名" />
</div>
<div class="field">
<label for="action-url">切换/迁移 URL</label>
<input id="action-url" name="url" placeholder="switch 或 relocate 目标 URL" />
</div>
<div class="field">
<label for="action-name">分支/标签名</label>
<input id="action-name" name="name" placeholder="release-1.0.0" />
</div>
<div class="field">
<label for="action-property">属性名</label>
<input id="action-property" name="property" placeholder="svn:ignore" />
</div>
<div class="field">
<label for="action-pattern">忽略规则/属性值</label>
<input id="action-pattern" name="pattern" placeholder="*.log 或 dist" />
</div>
<div class="field">
<label for="action-depth">Depth</label>
<select id="action-depth" name="depth">
<option value="">默认</option>
<option value="empty">empty</option>
<option value="files">files</option>
<option value="immediates">immediates</option>
<option value="infinity">infinity</option>
</select>
</div>
<div class="field">
<label for="action-accept">冲突接受策略</label>
<select id="action-accept" name="accept">
<option value="working">working</option>
<option value="mine-conflict">mine-conflict</option>
<option value="theirs-conflict">theirs-conflict</option>
<option value="base">base</option>
</select>
</div>
<div class="field full">
<label for="action-message">提交说明</label>
<textarea id="action-message" name="message" placeholder="commit、branch、tag、lock 等操作需要提交说明"></textarea>
</div>
</div>
<div class="checkbox-row">
<label class="checkbox-field"><input name="recursive" type="checkbox" checked /> 递归</label>
<label class="checkbox-field"><input name="dryRun" type="checkbox" /> Merge dry-run</label>
<label class="checkbox-field"><input name="force" type="checkbox" checked /> 强制/覆盖</label>
<label class="checkbox-field"><input name="verbose" type="checkbox" /> Log verbose</label>
<label class="checkbox-field"><input name="showUpdates" type="checkbox" /> Status show-updates</label>
</div>
</form>
<div class="svn-output-toolbar">
<div>
<strong id="last-action">等待操作</strong>
<span id="last-command"></span>
</div>
<button class="text-button" type="button" id="clear-output">清空输出</button>
</div>
<pre class="svn-output" id="svn-output" aria-live="polite"></pre>
</section>
</main>
<script src="../assets/js/svn-admin.js?v=20260618-1"></script>
</body>
</html>