UI review, stage 4: accessibility, product name, favicon, ESLint
Login: label for/id, autocomplete, inputmode for the 2FA code; clickable table rows, headers and client links work from the keyboard. One product name (OpenVPN Controller), own favicon (logo.svg) instead of vite.svg, footer text fixed. Minimal ESLint config (npm run lint, clean). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
897c82ab88
commit
32d6b0e525
12 files changed
+1133
-20
No files matched your search
+1
-1
@@ -13,7 +13,7 @@
|
||||
<aside v-if="isAuthenticated" class="sidebar" :class="{ 'compact': isCompact }">
|
||||
<div class="sidebar-header">
|
||||
<img src="./assets/logo.svg" alt="OpenVPN" class="sidebar-brand-icon">
|
||||
<span class="brand-text">VPN Controller</span>
|
||||
<span class="brand-text">OpenVPN Controller</span>
|
||||
|
||||
<button class="btn btn-link text-muted d-md-none ms-auto" @click="isSidebarOpen = false">
|
||||
<i class="fas fa-times"></i>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<h4 class="m-0 text-heading">Secure Your Account</h4>
|
||||
</div>
|
||||
<div class="card-interior-description">
|
||||
<p class="text-muted m-0">Protect your OpenVPN Monitor dashboard with second-layer security using Google Authenticator or any TOTP app.</p>
|
||||
<p class="text-muted m-0">Protect your OpenVPN Controller dashboard with second-layer security using Google Authenticator or any TOTP app.</p>
|
||||
</div>
|
||||
<button class="btn btn-action btn-action-primary py-2 fw-bold btn-account-action" @click="initSetup" :disabled="loading">
|
||||
<span v-if="loading" class="spinner-border spinner-border-sm me-2"></span>
|
||||
@@ -87,6 +87,9 @@
|
||||
v-model="otp"
|
||||
placeholder="000000"
|
||||
maxlength="6"
|
||||
inputmode="numeric"
|
||||
autocomplete="one-time-code"
|
||||
aria-label="6-digit authentication code"
|
||||
>
|
||||
<button class="btn btn-action btn-action-primary px-4 fw-bold" @click="verifyAndEnable" :disabled="loading">
|
||||
<span v-if="loading" class="spinner-border spinner-border-sm me-2"></span>
|
||||
@@ -131,6 +134,7 @@
|
||||
class="form-control"
|
||||
v-model="passwordForm.current_password"
|
||||
placeholder="Enter current password"
|
||||
autocomplete="current-password"
|
||||
required
|
||||
>
|
||||
</div>
|
||||
@@ -141,6 +145,7 @@
|
||||
class="form-control"
|
||||
v-model="passwordForm.new_password"
|
||||
placeholder="Min. 8 characters"
|
||||
autocomplete="new-password"
|
||||
required
|
||||
>
|
||||
</div>
|
||||
@@ -151,6 +156,7 @@
|
||||
class="form-control"
|
||||
v-model="passwordForm.confirm_password"
|
||||
placeholder="Confirm new password"
|
||||
autocomplete="new-password"
|
||||
required
|
||||
>
|
||||
</div>
|
||||
@@ -188,6 +194,7 @@
|
||||
class="form-control"
|
||||
v-model="usernameForm.current_password"
|
||||
placeholder="Enter current password"
|
||||
autocomplete="current-password"
|
||||
required
|
||||
>
|
||||
</div>
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
<tr v-if="activeCerts.length > 0" class="section-divider">
|
||||
<td colspan="6">Active Certificates ({{ activeCerts.length }})</td>
|
||||
</tr>
|
||||
<tr v-for="cert in activeCerts" :key="cert.id + '_active'" style="cursor: pointer;" @click="showDetails(cert)">
|
||||
<tr v-for="cert in activeCerts" :key="cert.id + '_active'" style="cursor: pointer;" tabindex="0" @click="showDetails(cert)" @keydown.enter.self="showDetails(cert)">
|
||||
<td v-note-tooltip="cert.note">
|
||||
<div class="fw-semibold" style="color: var(--text-heading);">
|
||||
{{ cert.username }}
|
||||
@@ -118,7 +118,7 @@
|
||||
<tr class="section-divider">
|
||||
<td colspan="6">Expired / Revoked ({{ expiredCerts.length }})</td>
|
||||
</tr>
|
||||
<tr v-for="cert in expiredCerts" :key="cert.id + '_expired'" style="cursor: pointer;" @click="showDetails(cert)">
|
||||
<tr v-for="cert in expiredCerts" :key="cert.id + '_expired'" style="cursor: pointer;" tabindex="0" @click="showDetails(cert)" @keydown.enter.self="showDetails(cert)">
|
||||
<td v-note-tooltip="cert.note">
|
||||
<div class="fw-semibold" style="color: var(--text-heading);">
|
||||
{{ cert.username }}
|
||||
|
||||
@@ -52,10 +52,10 @@
|
||||
<th>Client Name</th>
|
||||
<th>Real Address</th>
|
||||
<th>Status</th>
|
||||
<th @click="currentSort = 'received'" class="cursor-pointer" :class="{'active-sort': currentSort === 'received'}">
|
||||
<th @click="currentSort = 'received'" @keydown.enter="currentSort = 'received'" tabindex="0" class="cursor-pointer" :class="{'active-sort': currentSort === 'received'}">
|
||||
Received <i v-if="currentSort === 'received'" class="fas fa-sort-down ms-1"></i>
|
||||
</th>
|
||||
<th @click="currentSort = 'sent'" class="cursor-pointer" :class="{'active-sort': currentSort === 'sent'}">
|
||||
<th @click="currentSort = 'sent'" @keydown.enter="currentSort = 'sent'" tabindex="0" class="cursor-pointer" :class="{'active-sort': currentSort === 'sent'}">
|
||||
Sent <i v-if="currentSort === 'sent'" class="fas fa-sort-down ms-1"></i>
|
||||
</th>
|
||||
<th>Down Speed</th>
|
||||
@@ -80,7 +80,7 @@
|
||||
</tr>
|
||||
<tr v-for="c in group.items" :key="c.common_name">
|
||||
<td>
|
||||
<a @click="openHistory(c.common_name)" class="client-link">
|
||||
<a href="#" @click.prevent="openHistory(c.common_name)" class="client-link">
|
||||
{{ c.common_name }} <i class="fas fa-chart-area ms-1 small opacity-50"></i>
|
||||
</a>
|
||||
</td>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<div class="brand-logo">
|
||||
<i class="fas fa-shield-alt"></i>
|
||||
</div>
|
||||
<h1>OpenVPN Monitor</h1>
|
||||
<h1>OpenVPN Controller</h1>
|
||||
<p class="text-muted">Secure Access Control</p>
|
||||
</div>
|
||||
|
||||
@@ -13,28 +13,32 @@
|
||||
<!-- Standard Login -->
|
||||
<form v-if="!requires2FA" @submit.prevent="handleLogin">
|
||||
<div class="mb-4">
|
||||
<label class="form-label">Username</label>
|
||||
<label class="form-label" for="loginUsername">Username</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-text"><i class="fas fa-user"></i></span>
|
||||
<input
|
||||
id="loginUsername"
|
||||
type="text"
|
||||
class="form-control"
|
||||
v-model="form.username"
|
||||
placeholder="Enter username"
|
||||
autocomplete="username"
|
||||
required
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-4">
|
||||
<label class="form-label">Password</label>
|
||||
<label class="form-label" for="loginPassword">Password</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-text"><i class="fas fa-lock"></i></span>
|
||||
<input
|
||||
id="loginPassword"
|
||||
type="password"
|
||||
class="form-control"
|
||||
v-model="form.password"
|
||||
placeholder="Enter password"
|
||||
autocomplete="current-password"
|
||||
required
|
||||
>
|
||||
</div>
|
||||
@@ -65,6 +69,9 @@
|
||||
v-model="otp"
|
||||
placeholder="000 000"
|
||||
maxlength="6"
|
||||
inputmode="numeric"
|
||||
autocomplete="one-time-code"
|
||||
aria-label="6-digit authentication code"
|
||||
required
|
||||
autofocus
|
||||
>
|
||||
@@ -86,7 +93,7 @@
|
||||
</div>
|
||||
|
||||
<div class="login-footer text-center mt-4">
|
||||
<p class="small text-muted">© 2026 Admin Dashboard</p>
|
||||
<p class="small text-muted">© 2026 OpenVPN Controller</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -237,7 +237,7 @@ const loadConfig = async () => {
|
||||
|
||||
// Populate form
|
||||
Object.keys(data).forEach(key => {
|
||||
if (form.hasOwnProperty(key)) {
|
||||
if (Object.hasOwn(form, key)) {
|
||||
form[key] = data[key];
|
||||
}
|
||||
});
|
||||
|
||||
@@ -323,7 +323,7 @@ const loadConfig = async () => {
|
||||
const data = payload.server ? payload.server : payload;
|
||||
|
||||
Object.keys(data).forEach(key => {
|
||||
if (form.hasOwnProperty(key)) {
|
||||
if (Object.hasOwn(form, key)) {
|
||||
if (key === 'tunnel_type') {
|
||||
isSplitTunnel.value = data[key] === 'SPLIT';
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user