Skip to content

Commit b241095

Browse files
committed
feat: panel version badge + bump to 1.3.0
1 parent 4465e9c commit b241095

6 files changed

Lines changed: 46 additions & 1 deletion

File tree

index.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,13 @@ app.use((req, res, next) => {
9595

9696
app.use(cookieParser());
9797
app.use(i18nMiddleware);
98+
99+
const { version: appVersion } = require('./package.json');
100+
app.use((req, res, next) => {
101+
res.locals.appVersion = appVersion;
102+
next();
103+
});
104+
98105
app.use(countRequest);
99106
app.use(express.static(path.join(__dirname, 'public'), {
100107
maxAge: process.env.NODE_ENV === 'production' ? '1d' : 0,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "c3-celerity",
3-
"version": "1.0.0",
3+
"version": "1.3.0",
44
"description": "C³ CELERITY - Management panel for Hysteria 2 nodes by Click Connect",
55
"keywords": [
66
"nodejs",

public/css/style.css

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,37 @@ html {
157157
font-weight: 400;
158158
}
159159

160+
.version-badge {
161+
font-family: 'JetBrains Mono', monospace;
162+
font-size: 10px;
163+
font-weight: 500;
164+
letter-spacing: 0.5px;
165+
color: var(--text-secondary);
166+
text-decoration: none;
167+
padding: 2px 7px;
168+
border: 1px solid var(--border);
169+
border-radius: 999px;
170+
background: var(--bg-secondary);
171+
line-height: 1.4;
172+
white-space: nowrap;
173+
transition: color 0.15s ease, border-color 0.15s ease;
174+
}
175+
176+
.version-badge:hover {
177+
color: var(--accent);
178+
border-color: var(--accent);
179+
}
180+
181+
.logo .version-badge {
182+
margin-left: auto;
183+
align-self: flex-start;
184+
}
185+
186+
.login-header .version-badge {
187+
display: inline-block;
188+
margin-top: 14px;
189+
}
190+
160191
.nav-menu {
161192
list-style: none;
162193
padding: 16px 12px;

public/css/style.min.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

views/layout.ejs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@
4141
<span class="logo-text">C³ CELERITY</span>
4242
<a href="https://t.me/First_VPN_Click_bot" target="_blank" class="logo-sub">by Click Connect</a>
4343
</div>
44+
<% if (typeof appVersion !== 'undefined' && appVersion) { %>
45+
<a href="https://github.com/ClickDevTech/CELERITY-panel/releases" target="_blank" rel="noopener" class="version-badge">v<%= appVersion %></a>
46+
<% } %>
4447
</div>
4548
<ul class="nav-menu">
4649
<li><a href="/panel" class="<%= page === 'dashboard' ? 'active' : '' %>">

views/login.ejs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
<span class="logo-icon large">⚡</span>
1717
<h1>C³ CELERITY</h1>
1818
<a href="https://t.me/First_VPN_Click_bot" target="_blank" style="background: linear-gradient(135deg, var(--accent) 0%, #a855f7 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; text-decoration: none;">by Click Connect</a>
19+
<% if (typeof appVersion !== 'undefined' && appVersion) { %>
20+
<a href="https://github.com/ClickDevTech/CELERITY-panel/releases" target="_blank" rel="noopener" class="version-badge">v<%= appVersion %></a>
21+
<% } %>
1922
</div>
2023

2124
<!-- Language Switcher -->

0 commit comments

Comments
 (0)