Added auto deprecation feature

This commit is contained in:
Ultradesu
2025-07-20 17:37:46 +03:00
parent 9c5518b39e
commit af6c4d7e61
7 changed files with 58 additions and 3 deletions

View File

@@ -10,7 +10,10 @@
<body>
<div class="container">
<header>
<h1>SSH Key Manager</h1>
<div class="header-title">
<h1>SSH Key Manager</h1>
<span class="version" id="appVersion">Loading...</span>
</div>
<div class="flow-selector">
<label for="flowSelect">Flow:</label>
<select id="flowSelect">

View File

@@ -12,6 +12,7 @@ class SSHKeyManager {
this.showDeprecatedOnly = false;
this.initializeEventListeners();
this.loadVersion();
this.loadFlows();
}
@@ -149,6 +150,20 @@ class SSHKeyManager {
});
}
async loadVersion() {
try {
const response = await fetch('/api/version');
if (response.ok) {
const data = await response.json();
document.getElementById('appVersion').textContent = `v${data.version}`;
} else {
document.getElementById('appVersion').textContent = 'Unknown';
}
} catch (error) {
document.getElementById('appVersion').textContent = 'Error';
}
}
async loadFlows() {
try {
this.showLoading();

View File

@@ -50,6 +50,23 @@ header h1 {
font-size: 2.5rem;
font-weight: 600;
color: var(--text-primary);
margin: 0;
}
.header-title {
display: flex;
align-items: baseline;
gap: 1rem;
}
.version {
font-size: 0.875rem;
color: var(--text-secondary);
background: var(--background);
padding: 0.25rem 0.5rem;
border-radius: var(--border-radius);
font-weight: 500;
border: 1px solid var(--border);
}
.flow-selector {
@@ -594,6 +611,16 @@ header h1 {
align-items: stretch;
}
.header-title {
flex-direction: column;
align-items: flex-start;
gap: 0.5rem;
}
.header-title h1 {
font-size: 2rem;
}
.actions-panel {
flex-direction: column;
align-items: stretch;