Files
sumi.work/admin/svn.html
T
2026-06-18 14:35:58 +08:00

303 lines
15 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-3" />
</head>
<body>
<header class="soft-topbar">
<div class="soft-topbar-inner">
<a class="soft-brand" href="svn.html" aria-label="返回 SVN 管理">
<img src="../assets/icons/svn.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 svn-github-shell">
<section class="admin-panel svn-hero" aria-labelledby="svn-token-title">
<div class="svn-hero-copy">
<p class="hero-kicker">SVN Repositories</p>
<div>
<h1 id="svn-token-title">SVN 控制台</h1>
<p class="admin-note">接入服务器现有 SVN 服务和旧仓库,在一个清晰的仓库视图里完成更新、提交、分支、标签、合并和维护操作。</p>
</div>
</div>
<div class="svn-hero-controls">
<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>
<div class="svn-toolbar-actions">
<button class="text-button" type="button" id="svn-health">检测 SVN</button>
<button class="text-button" type="button" id="reload-repos">刷新仓库</button>
<button class="secondary-action" type="button" id="sync-server-repos">接入旧仓库</button>
</div>
<p class="status-message" id="token-status"></p>
</div>
</section>
<div class="svn-github-layout">
<aside class="admin-panel svn-sidebar" aria-labelledby="repo-title">
<div class="section-title-row compact svn-sidebar-title">
<div>
<h2 id="repo-title">仓库</h2>
<p id="repo-summary">正在加载...</p>
</div>
</div>
<div class="svn-search">
<input id="repo-search" type="search" autocomplete="off" placeholder="搜索仓库、URL 或路径" />
</div>
<div class="svn-repo-list" id="repo-list"></div>
<section class="svn-server-box" aria-labelledby="server-repo-title">
<div class="section-title-row compact">
<div>
<h3 id="server-repo-title">服务器 SVN 服务</h3>
<p id="server-summary">等待扫描...</p>
</div>
</div>
<div class="svn-server-list" id="server-repo-list"></div>
</section>
<details class="svn-config-details" id="repo-config-details">
<summary><span id="repo-form-title">新增仓库配置</span></summary>
<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="svn://服务器IP/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 /> 不缓存凭据</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>
</details>
</aside>
<section class="admin-panel svn-repository-view" aria-labelledby="selected-repo-name">
<div class="svn-repo-header">
<div>
<p class="hero-kicker">Repository</p>
<h1 id="selected-repo-name">选择仓库</h1>
<p id="selected-repo">请选择一个 SVN 仓库。</p>
</div>
<div class="svn-header-actions">
<button class="danger-button" type="button" id="delete-repo">删除配置</button>
</div>
</div>
<div class="svn-repo-meta-grid">
<div>
<span>SVN URL</span>
<strong id="selected-repo-url">--</strong>
</div>
<div>
<span>工作副本</span>
<strong id="selected-repo-path">--</strong>
</div>
<div>
<span>服务端版本</span>
<strong id="selected-repo-revision">--</strong>
</div>
<div>
<span>来源</span>
<strong id="selected-repo-source">--</strong>
</div>
</div>
<div class="svn-quick-actions" aria-label="常用 SVN 操作">
<button class="primary-action" type="button" data-action="checkout">Checkout</button>
<button class="text-button" type="button" data-action="update">Update</button>
<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>
<button class="text-button" type="button" data-action="list">Files</button>
</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="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="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-limit">日志数量</label>
<input id="action-limit" name="limit" inputmode="numeric" placeholder="30" />
</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>
</div>
</main>
<script src="../assets/js/svn-admin.js?v=20260618-3"></script>
</body>
</html>