feat: add TOTP codes page and related components for displaying verification codes

This commit is contained in:
shuaiplus
2026-03-08 02:31:36 +08:00
parent eec27f3a40
commit 206b0be566
6 changed files with 328 additions and 8 deletions
+93 -5
View File
@@ -324,11 +324,6 @@ input[type='file'].input::file-selector-button:hover {
margin: 10px 0;
}
.btn.small {
height: 34px;
font-size: 14px;
}
.btn-primary {
background: var(--primary);
border-color: var(--primary);
@@ -914,6 +909,88 @@ input[type='file'].input::file-selector-button:hover {
color: #0f172a;
}
.totp-codes-page {
display: flex;
flex-direction: column;
min-height: 100%;
}
.totp-codes-list {
display: grid;
gap: 10px;
grid-template-columns: repeat(var(--totp-columns, 1), minmax(320px, 1fr));
align-items: start;
width: 100%;
}
.totp-code-row {
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
align-items: center;
gap: 10px;
padding: 12px;
border: 1px solid #e2e8f0;
border-radius: 12px;
background: #f8fafc;
width: 100%;
min-width: 0;
max-width: none;
}
.totp-code-info {
display: flex;
align-items: center;
gap: 10px;
min-width: 0;
}
.totp-code-main {
display: flex;
align-items: center;
gap: 6px;
min-width: 0;
flex-shrink: 0;
}
.totp-code-main strong {
font-size: 22px;
line-height: 1;
letter-spacing: 0.04em;
white-space: nowrap;
}
.totp-code-meta {
min-width: 0;
}
.totp-code-name,
.totp-code-username {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.totp-code-name {
font-size: 15px;
font-weight: 700;
color: #0f172a;
}
.totp-code-username {
margin-top: 2px;
font-size: 13px;
color: #64748b;
}
.totp-copy-btn {
min-width: 28px;
width: 28px;
height: 28px;
padding: 0;
border-radius: 999px;
flex-shrink: 0;
}
.value-ellipsis {
display: block;
max-width: 100%;
@@ -1559,9 +1636,16 @@ input[type='file'].input::file-selector-button:hover {
border-bottom: 1px solid #d9e0ea;
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
align-items: start;
align-self: start;
height: fit-content;
gap: 8px;
}
.app-side > .side-link {
min-height: 0;
}
.side-spacer {
display: none;
}
@@ -1583,6 +1667,10 @@ input[type='file'].input::file-selector-button:hover {
grid-template-columns: 1fr;
}
.totp-copy-btn {
justify-self: start;
}
.import-export-feature-grid,
.import-export-panels {
grid-template-columns: 1fr;