mirror of
https://github.com/shuaiplus/nodewarden.git
synced 2026-06-21 05:10:41 +00:00
Add new styles for app shell, tokens, and vault components
- Introduced `shell.css` for the main application layout, including styles for the app shell, top bar, and user interactions. - Created `tokens.css` to define CSS variables for theming, including colors, shadows, and transition durations for light and dark modes. - Developed `vault.css` for the vault component, implementing grid layouts, sidebar styles, search inputs, and list item designs.
This commit is contained in:
@@ -0,0 +1,790 @@
|
||||
@media (max-width: 1180px) {
|
||||
.app-page {
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
.app-shell {
|
||||
height: calc(100vh - 16px);
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.app-main {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.app-side {
|
||||
border-right: none;
|
||||
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;
|
||||
}
|
||||
|
||||
.vault-grid {
|
||||
grid-template-columns: 1fr;
|
||||
height: auto;
|
||||
}
|
||||
.sidebar {
|
||||
max-height: 280px;
|
||||
}
|
||||
.totp-grid,
|
||||
.field-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.totp-copy-btn {
|
||||
justify-self: start;
|
||||
}
|
||||
|
||||
.import-export-panels,
|
||||
.backup-browser-row {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.settings-twofactor-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.standalone-title {
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
.standalone-footer {
|
||||
font-size: 12px;
|
||||
line-height: 1.4;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 900px) {
|
||||
.auth-page {
|
||||
padding: 14px;
|
||||
align-items: start;
|
||||
}
|
||||
|
||||
.standalone-shell {
|
||||
width: 100%;
|
||||
max-width: 460px;
|
||||
gap: 10px;
|
||||
padding-top: 12px;
|
||||
}
|
||||
|
||||
.standalone-brand-outside {
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.standalone-brand-logo {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
}
|
||||
|
||||
.auth-card {
|
||||
padding: 20px 16px;
|
||||
border-radius: 18px;
|
||||
}
|
||||
|
||||
.btn.full {
|
||||
height: 48px;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.auth-support-row {
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.app-page {
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.app-shell {
|
||||
--mobile-topbar-height: 58px;
|
||||
--mobile-tabbar-height: 70px;
|
||||
height: 100dvh;
|
||||
max-width: none;
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.topbar {
|
||||
height: var(--mobile-topbar-height);
|
||||
padding: 0 12px;
|
||||
position: relative;
|
||||
z-index: 20;
|
||||
}
|
||||
|
||||
.brand {
|
||||
min-width: 0;
|
||||
gap: 10px;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.brand-logo {
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
}
|
||||
|
||||
.mobile-page-title {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.topbar-actions .user-chip,
|
||||
.topbar-actions > .btn:not(.mobile-sidebar-toggle):not(.mobile-lock-btn),
|
||||
.topbar-actions > .theme-switch-wrap {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.mobile-sidebar-toggle,
|
||||
.mobile-lock-btn {
|
||||
display: inline-flex;
|
||||
width: 36px;
|
||||
min-width: 36px;
|
||||
height: 36px;
|
||||
padding: 0;
|
||||
justify-content: center;
|
||||
font-size: 0;
|
||||
gap: 0;
|
||||
}
|
||||
|
||||
.mobile-sidebar-toggle .btn-icon,
|
||||
.mobile-lock-btn .btn-icon {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.mobile-theme-btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.mobile-theme-btn .theme-switch {
|
||||
transform: scale(0.8);
|
||||
transform-origin: center;
|
||||
}
|
||||
|
||||
.app-main {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.app-side {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.content {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
.mobile-tabbar {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
min-height: var(--mobile-tabbar-height);
|
||||
padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
|
||||
border-top: 1px solid var(--line);
|
||||
background: rgba(248, 251, 255, 0.92);
|
||||
}
|
||||
|
||||
.mobile-tab {
|
||||
display: grid;
|
||||
justify-items: center;
|
||||
gap: 4px;
|
||||
color: #64748b;
|
||||
text-decoration: none;
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
padding: 6px 4px;
|
||||
border-radius: 12px;
|
||||
transition:
|
||||
transform 220ms var(--ease-out-soft),
|
||||
background-color var(--dur-fast) var(--ease-smooth),
|
||||
color var(--dur-fast) var(--ease-smooth);
|
||||
}
|
||||
|
||||
.mobile-tab:hover {
|
||||
transform: translate3d(var(--mag-x), calc(var(--mag-y) - 1px), 0);
|
||||
}
|
||||
|
||||
.mobile-tab.active {
|
||||
color: var(--primary-strong);
|
||||
background: linear-gradient(135deg, rgba(37, 99, 235, 0.16), rgba(59, 130, 246, 0.08));
|
||||
box-shadow: 0 8px 18px rgba(37, 99, 235, 0.08);
|
||||
}
|
||||
|
||||
.vault-grid {
|
||||
gap: 10px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.mobile-sidebar-sheet {
|
||||
display: block;
|
||||
position: fixed;
|
||||
left: 10px;
|
||||
right: 10px;
|
||||
top: calc(var(--mobile-topbar-height) + 10px);
|
||||
bottom: auto;
|
||||
max-height: calc(100dvh - 145px);
|
||||
z-index: 55;
|
||||
overflow: auto;
|
||||
border: 1px solid #d8dee8;
|
||||
border-radius: 18px;
|
||||
background: #fff;
|
||||
padding: 12px;
|
||||
box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
pointer-events: none;
|
||||
transform: translate3d(0, 10px, 0) scale(0.98);
|
||||
transition:
|
||||
opacity 220ms var(--ease-smooth),
|
||||
transform 240ms var(--ease-out-soft),
|
||||
visibility 220ms var(--ease-smooth);
|
||||
}
|
||||
|
||||
.mobile-sidebar-sheet.open {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
pointer-events: auto;
|
||||
transform: translate3d(0, 0, 0) scale(1);
|
||||
}
|
||||
|
||||
.mobile-sidebar-head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.mobile-sidebar-title {
|
||||
font-size: 16px;
|
||||
font-weight: 800;
|
||||
color: #0f172a;
|
||||
}
|
||||
|
||||
.mobile-sidebar-close {
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
border: 1px solid #d7dde6;
|
||||
border-radius: 999px;
|
||||
background: #fff;
|
||||
color: #0f172a;
|
||||
display: inline-grid;
|
||||
place-items: center;
|
||||
cursor: pointer;
|
||||
padding: 0;
|
||||
transition:
|
||||
transform var(--dur-fast) var(--ease-out-soft),
|
||||
background-color var(--dur-fast) var(--ease-smooth),
|
||||
border-color var(--dur-fast) var(--ease-smooth);
|
||||
}
|
||||
|
||||
.mobile-sidebar-close:hover {
|
||||
transform: scale(1.05);
|
||||
}
|
||||
|
||||
.mobile-sidebar-sheet .sidebar-block {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
background: transparent;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.mobile-sidebar-sheet .tree-btn {
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
.mobile-sidebar-sheet .folder-row {
|
||||
align-items: stretch;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.mobile-sidebar-sheet .folder-row .tree-btn {
|
||||
min-height: 42px;
|
||||
}
|
||||
|
||||
.mobile-sidebar-sheet .sidebar-title,
|
||||
.mobile-sidebar-sheet .sidebar-title-row {
|
||||
padding-bottom: 6px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.mobile-sidebar-sheet .tree-btn {
|
||||
padding-left: 8px;
|
||||
padding-right: 8px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.mobile-sidebar-sheet .tree-btn.active {
|
||||
background: #eef4ff;
|
||||
}
|
||||
|
||||
.mobile-sidebar-sheet .folder-delete-btn {
|
||||
width: 28px;
|
||||
height: 42px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.list-col {
|
||||
max-width: none;
|
||||
}
|
||||
|
||||
.list-head {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) auto auto auto;
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.list-count {
|
||||
grid-column: auto;
|
||||
width: auto;
|
||||
font-size: 12px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.list-head .search-input-wrap {
|
||||
width: 100%;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.list-head .search-input {
|
||||
width: 100%;
|
||||
min-width: 0;
|
||||
height: 42px;
|
||||
border-radius: 14px;
|
||||
}
|
||||
|
||||
.list-icon-btn {
|
||||
width: auto;
|
||||
min-width: 0;
|
||||
padding: 0 12px;
|
||||
font-size: 13px;
|
||||
gap: 6px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.toolbar.actions {
|
||||
justify-content: flex-end;
|
||||
flex-wrap: unset;
|
||||
gap: var(--actions-gap);
|
||||
overflow: visible;
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
|
||||
.actions {
|
||||
gap: var(--actions-gap);
|
||||
}
|
||||
|
||||
.toolbar.actions .btn.small {
|
||||
width: auto;
|
||||
min-width: 0;
|
||||
height: 34px;
|
||||
padding: 0 12px;
|
||||
font-size: 13px;
|
||||
gap: 6px;
|
||||
border-radius: 999px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.mobile-fab-wrap {
|
||||
position: fixed;
|
||||
right: 14px;
|
||||
bottom: calc(14px + var(--mobile-tabbar-height) + env(safe-area-inset-bottom));
|
||||
z-index: 45;
|
||||
}
|
||||
|
||||
.mobile-fab-trigger {
|
||||
width: 36px;
|
||||
height: 56px;
|
||||
padding: 0;
|
||||
border-radius: 999px;
|
||||
font-size: 0;
|
||||
gap: 0;
|
||||
box-shadow: 0 14px 30px rgba(37, 99, 235, 0.28);
|
||||
}
|
||||
|
||||
.mobile-fab-trigger .btn-icon {
|
||||
margin: 0;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.mobile-fab-wrap .create-menu {
|
||||
left: auto;
|
||||
right: 0;
|
||||
top: auto;
|
||||
bottom: calc(100% + 10px);
|
||||
}
|
||||
|
||||
.list-panel {
|
||||
border-radius: 16px;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.list-item {
|
||||
padding: 12px;
|
||||
border-radius: 14px;
|
||||
}
|
||||
|
||||
.row-check {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
.vault-grid.mobile-panel-detail .sidebar,
|
||||
.vault-grid.mobile-panel-detail .list-col,
|
||||
.vault-grid.mobile-panel-edit .sidebar,
|
||||
.vault-grid.mobile-panel-edit .list-col {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.mobile-detail-sheet {
|
||||
display: block;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: calc(var(--mobile-topbar-height) + env(safe-area-inset-top));
|
||||
bottom: calc(var(--mobile-tabbar-height) + env(safe-area-inset-bottom));
|
||||
z-index: 35;
|
||||
overflow: auto;
|
||||
background: transparent;
|
||||
padding: 0 0 18px;
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
pointer-events: none;
|
||||
transform: translate3d(0, 18px, 0);
|
||||
transition:
|
||||
opacity 220ms var(--ease-smooth),
|
||||
transform 260ms var(--ease-out-soft),
|
||||
visibility 220ms var(--ease-smooth);
|
||||
}
|
||||
|
||||
.mobile-detail-sheet.open {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
pointer-events: auto;
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
|
||||
.mobile-panel-head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 0 10px 10px;
|
||||
}
|
||||
|
||||
.mobile-panel-back {
|
||||
min-height: 40px;
|
||||
}
|
||||
|
||||
.mobile-detail-sheet > .detail-switch-stage,
|
||||
.mobile-detail-sheet > .card,
|
||||
.mobile-detail-sheet > .empty {
|
||||
margin-left: 10px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.detail-col .card,
|
||||
.import-export-panel,
|
||||
.settings-subcard {
|
||||
border-radius: 16px;
|
||||
}
|
||||
|
||||
.card {
|
||||
padding: 14px 14px;
|
||||
}
|
||||
|
||||
.section-head {
|
||||
align-items: flex-start;
|
||||
gap: 10px;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.detail-actions {
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.detail-actions .actions {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.detail-actions .actions .btn,
|
||||
.detail-delete-btn {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.kv-row {
|
||||
grid-template-columns: minmax(64px, 80px) minmax(0, 1fr) auto;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.kv-line {
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.kv-actions {
|
||||
width: auto;
|
||||
justify-content: flex-end;
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
|
||||
.kv-actions .btn.small {
|
||||
width: 34px;
|
||||
min-width: 34px;
|
||||
height: 34px;
|
||||
padding: 0;
|
||||
font-size: 0;
|
||||
gap: 0;
|
||||
border-radius: 999px;
|
||||
}
|
||||
|
||||
.kv-actions .btn.small .btn-icon {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.import-export-panels,
|
||||
.settings-twofactor-grid {
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.import-export-panel .actions .btn,
|
||||
.settings-subcard .actions .btn,
|
||||
.section-head .actions .btn {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.totp-grid {
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.totp-qr {
|
||||
min-height: 180px;
|
||||
}
|
||||
|
||||
.totp-qr svg,
|
||||
.totp-qr img {
|
||||
width: 160px;
|
||||
height: 160px;
|
||||
}
|
||||
|
||||
.invite-toolbar {
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
.mobile-settings-card {
|
||||
min-height: calc(100dvh - 170px);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.mobile-settings-subhead {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.mobile-settings-back {
|
||||
min-height: 38px;
|
||||
}
|
||||
|
||||
.mobile-settings-links {
|
||||
display: grid;
|
||||
gap: 8px;
|
||||
align-content: start;
|
||||
}
|
||||
|
||||
.mobile-settings-link {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
min-height: 46px;
|
||||
padding: 0 12px;
|
||||
border: 1px solid #dbe2ec;
|
||||
border-radius: 14px;
|
||||
background: #f8fafc;
|
||||
color: #0f172a;
|
||||
text-decoration: none;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.mobile-settings-link.active {
|
||||
background: #e8f0ff;
|
||||
border-color: #b9cff6;
|
||||
color: #175ddc;
|
||||
}
|
||||
|
||||
.mobile-settings-logout {
|
||||
width: 100%;
|
||||
margin-top: auto;
|
||||
}
|
||||
|
||||
.stack,
|
||||
.import-export-page,
|
||||
.totp-codes-page,
|
||||
.detail-col {
|
||||
min-height: auto;
|
||||
}
|
||||
|
||||
.invite-create-group {
|
||||
align-items: stretch;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.input.small {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.table,
|
||||
.table tbody,
|
||||
.table tr,
|
||||
.table td {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.table thead {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.table tr {
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 14px;
|
||||
background: #fff;
|
||||
padding: 10px 12px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.table td {
|
||||
border-bottom: 1px solid #edf1f6;
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
.table td:last-child {
|
||||
border-bottom: none;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.table td::before {
|
||||
display: block;
|
||||
content: attr(data-label);
|
||||
margin-bottom: 4px;
|
||||
color: #64748b;
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.dialog-mask {
|
||||
align-items: center;
|
||||
justify-items: center;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.dialog-card {
|
||||
width: 90%;
|
||||
max-width: 460px;
|
||||
max-height: calc(100dvh - 10px);
|
||||
overflow: auto;
|
||||
border-radius: 22px;
|
||||
padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
|
||||
}
|
||||
|
||||
.dialog-card.warning {
|
||||
max-width: 520px;
|
||||
}
|
||||
|
||||
.dialog-warning-strip {
|
||||
margin: -18px -16px 16px;
|
||||
}
|
||||
|
||||
.dialog-title {
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
.dialog-btn {
|
||||
height: 46px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.toast-stack {
|
||||
top: 10px;
|
||||
left: 10px;
|
||||
right: 10px;
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 900px) {
|
||||
.backup-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.backup-operations-sidebar,
|
||||
.backup-destination-sidebar {
|
||||
position: static;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.backup-interval-row {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.backup-browser-row,
|
||||
.field-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.backup-destination-top {
|
||||
align-items: flex-start;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.backup-add-chooser {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.backup-name-row {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.backup-option-field {
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.backup-help-bubble {
|
||||
left: 0;
|
||||
transform: translate(0, -4px);
|
||||
}
|
||||
|
||||
.backup-help-bubble::before {
|
||||
left: 16px;
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
|
||||
.backup-help-wrap:hover .backup-help-bubble,
|
||||
.backup-help-wrap:focus-within .backup-help-bubble,
|
||||
.backup-help-wrap.open .backup-help-bubble {
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user