mirror of
https://github.com/jasonxu114514/opencode2api.git
synced 2026-12-05 08:02:53 +00:00
fix(webui): prevent duplicate v prefix in version and link to GitHub repo
This commit is contained in:
1 parent
a9470df4fc
commit
83d623d541
3 files changed
+20
-2
No files matched your search
@@ -158,6 +158,15 @@ pre {
|
||||
color: var(--text-3);
|
||||
}
|
||||
|
||||
.sidebar-foot a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.sidebar-foot a:hover {
|
||||
color: var(--text-1);
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
+9
-1
@@ -63,7 +63,15 @@
|
||||
<button class="nav-item" data-page="account" data-i18n="nav.account">账号安全</button>
|
||||
</div>
|
||||
</nav>
|
||||
<div class="sidebar-foot"><span id="version">版本 —</span></div>
|
||||
<div class="sidebar-foot">
|
||||
<a
|
||||
id="version"
|
||||
href="https://github.com/jasonxu114514/opencode2api"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>版本 —</a
|
||||
>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
<div class="content">
|
||||
|
||||
+2
-1
@@ -87,7 +87,8 @@ async function boot() {
|
||||
setUnauthorizedHandler(showLogin);
|
||||
|
||||
store.on("monitor", (data) => {
|
||||
$("#version").textContent = `v${data.version}`;
|
||||
const version = String(data.version || "");
|
||||
$("#version").textContent = version.startsWith("v") || version === "dev" ? version : `v${version}`;
|
||||
});
|
||||
|
||||
for (const page of PAGES) page.init?.();
|
||||
|
||||
Reference in new issue
Block a user