mirror of
https://github.com/house-of-vanity/khm.git
synced 2025-08-21 14:27:14 +00:00
Added auto deprecation feature
This commit is contained in:
@@ -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">
|
||||
|
@@ -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();
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user