Files
mnote/rust/crates/mnote-web/src/ssr/styles/components/vault.css
T

1086 lines
20 KiB
CSS
Raw Normal View History

/* Password vault workbench — dedicated /vault CRUD surface */
.mnote-vault-workbench {
display: flex;
flex-direction: column;
gap: 16px;
width: min(1120px, calc(100vw - 48px));
min-height: calc(100vh - 120px);
margin: 28px auto 40px;
color: var(--atelier-text, #1b1c1c);
}
.mnote-vault-header {
display: flex;
flex-wrap: wrap;
align-items: flex-start;
justify-content: space-between;
gap: 16px 24px;
}
.mnote-vault-header-main {
min-width: 0;
flex: 1 1 280px;
}
.mnote-vault-header h1 {
margin: 0 0 6px;
font-size: 28px;
font-weight: 650;
line-height: 36px;
}
.mnote-vault-header-main > p {
margin: 0;
color: #6d6a65;
font-size: 13px;
line-height: 20px;
}
.mnote-vault-status {
margin: 8px 0 0;
min-height: 18px;
font-size: 12px;
line-height: 18px;
color: #8b8782;
}
.mnote-vault-status[data-type="error"] {
color: #c93a32;
}
.mnote-vault-status[data-type="success"] {
color: #23834d;
}
.mnote-vault-status[data-type="info"] {
color: #6d6a65;
}
.mnote-vault-header-actions {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 8px;
flex: 0 1 auto;
}
.mnote-vault-header-actions > button,
.mnote-vault-detail-actions button,
.mnote-vault-secret-actions button,
.mnote-vault-secret-edit button,
.mnote-vault-tabs button {
height: 30px;
padding: 0 12px;
border: 1px solid rgba(27, 28, 28, 0.12);
border-radius: 4px;
background: #ffffff;
color: #37352f;
font: inherit;
font-size: 12px;
line-height: 28px;
cursor: pointer;
}
.mnote-vault-header-actions > button:hover,
.mnote-vault-detail-actions button:hover,
.mnote-vault-secret-actions button:hover,
.mnote-vault-secret-edit button:hover,
.mnote-vault-tabs button:hover {
background: #f7f7f6;
}
/* 顶栏(密文簿旁):插入已有密文 [Key];编辑态显示,滚动详情时仍可见 */
.mnote-vault-header-actions .mnote-vault-insert-cipher,
.mnote-vault-insert-cipher {
display: inline-flex;
align-items: center;
margin: 0;
}
.mnote-vault-insert-cipher[hidden] {
display: none !important;
}
.mnote-vault-insert-cipher select {
height: 30px;
min-width: 118px;
max-width: 180px;
padding: 0 8px;
border: 1px solid rgba(27, 28, 28, 0.12);
border-radius: 4px;
background: #ffffff;
color: #37352f;
font: inherit;
font-size: 12px;
line-height: 28px;
cursor: pointer;
}
.mnote-vault-insert-cipher select:hover {
background: #f7f7f6;
}
.mnote-vault-form-hint {
margin: 0 0 8px;
padding: 0 2px;
color: #8b8782;
font-size: 12px;
line-height: 18px;
}
.mnote-vault-form-hint code {
font-size: 11px;
padding: 0 3px;
border-radius: 3px;
background: rgba(27, 28, 28, 0.05);
}
.mnote-vault-sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
.mnote-vault-detail-actions button.is-danger {
color: #c93a32;
border-color: rgba(201, 58, 50, 0.28);
}
.mnote-vault-detail-actions button.is-danger:hover {
background: #fdf2f1;
}
.mnote-vault-header-actions input[type="search"] {
width: min(240px, 42vw);
height: 30px;
padding: 0 10px;
border: 1px solid rgba(27, 28, 28, 0.12);
border-radius: 4px;
background: #ffffff;
color: inherit;
font: inherit;
font-size: 13px;
}
.mnote-vault-tabs {
display: inline-flex;
gap: 0;
border: 1px solid rgba(27, 28, 28, 0.12);
border-radius: 4px;
overflow: hidden;
}
.mnote-vault-tabs button {
border: 0;
border-radius: 0;
background: #ffffff;
}
.mnote-vault-tabs button.is-active,
.mnote-vault-tabs button[aria-selected="true"] {
background: #f4f3f3;
font-weight: 600;
}
.mnote-vault-body {
display: grid;
grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
gap: 0;
min-height: 480px;
border: 1px solid rgba(27, 28, 28, 0.1);
border-radius: 6px;
background: #ffffff;
overflow: hidden;
}
.mnote-vault-list {
min-height: 0;
max-height: calc(100vh - 220px);
overflow-y: auto;
overscroll-behavior: contain;
border-right: 1px solid rgba(27, 28, 28, 0.08);
background: #fafaf9;
}
.mnote-vault-list-item {
display: flex;
flex-direction: row;
align-items: center;
gap: 6px;
width: 100%;
min-height: 28px;
margin: 0;
padding: 4px 8px 4px 10px;
border: 0;
border-bottom: 1px solid rgba(27, 28, 28, 0.04);
background: transparent;
color: inherit;
text-align: left;
font: inherit;
cursor: pointer;
}
.mnote-vault-list-item:hover {
background: #f1f0ef;
}
.mnote-vault-list-item.is-active {
background: #ebe9e7;
box-shadow: inset 2px 0 0 #1b1c1c;
}
.mnote-vault-list-main {
display: flex;
flex: 1 1 auto;
align-items: baseline;
gap: 6px;
min-width: 0;
}
.mnote-vault-list-title {
flex: 0 1 auto;
max-width: 62%;
overflow: hidden;
color: #1b1c1c;
font-size: 12px;
font-weight: 600;
line-height: 18px;
text-overflow: ellipsis;
white-space: nowrap;
}
.mnote-vault-list-meta {
flex: 1 1 auto;
min-width: 0;
overflow: hidden;
color: #9b9a97;
font-size: 11px;
font-weight: 400;
line-height: 16px;
text-overflow: ellipsis;
white-space: nowrap;
}
.mnote-vault-list-icons {
flex: 0 0 auto;
display: inline-flex;
align-items: center;
gap: 2px;
margin-left: auto;
line-height: 1;
}
.mnote-vault-list-icon {
display: inline-flex;
align-items: center;
justify-content: center;
width: 14px;
height: 14px;
font-size: 11px;
font-weight: 700;
line-height: 1;
opacity: 0.9;
}
.mnote-vault-list-icon.is-shared {
color: #2e7d32;
}
.mnote-vault-list-icon.is-ai {
color: #1565c0;
font-size: 9px;
}
.mnote-vault-list-tags {
display: none;
}
.mnote-vault-tag {
display: inline-block;
padding: 1px 6px;
border-radius: 999px;
background: rgba(27, 28, 28, 0.06);
color: #5a5a5a;
font-size: 11px;
line-height: 16px;
}
.mnote-vault-tag--shared {
background: rgba(46, 125, 50, 0.12);
color: #2e7d32;
}
.mnote-vault-tag--ai {
background: rgba(25, 118, 210, 0.12);
color: #1565c0;
}
.mnote-vault-role-badge {
display: inline-flex;
align-items: center;
margin-top: 4px;
padding: 2px 8px;
border-radius: 999px;
font-size: 12px;
font-weight: 600;
line-height: 18px;
background: rgba(25, 118, 210, 0.12);
color: #1565c0;
}
.mnote-vault-detail-title {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 8px;
min-width: 0;
}
.mnote-vault-detail-title-text {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.mnote-vault-status-chip {
flex: 0 0 auto;
display: inline-flex;
align-items: center;
padding: 1px 7px;
border-radius: 999px;
font-size: 11px;
font-weight: 650;
line-height: 16px;
letter-spacing: 0.01em;
}
.mnote-vault-status-chip.is-shared {
background: rgba(46, 125, 50, 0.12);
color: #2e7d32;
}
.mnote-vault-status-chip.is-ai {
background: rgba(25, 118, 210, 0.12);
color: #1565c0;
}
.mnote-vault-hint-mini {
margin: 4px 0 0;
color: #9b9a97;
font-size: 12px;
line-height: 18px;
}
.mnote-vault-linkish {
border: 0;
padding: 0;
background: none;
color: #1565c0;
font: inherit;
font-size: inherit;
text-decoration: underline;
cursor: pointer;
}
.mnote-vault-list-item.is-shared-ai {
box-shadow: inset 3px 0 0 #2e7d32;
}
.mnote-vault-list-item.is-ai-copy {
box-shadow: inset 3px 0 0 #1565c0;
}
.mnote-vault-workbench[data-vault-role="ai"] .mnote-vault-header h1 {
color: #1565c0;
}
.mnote-vault-detail {
min-width: 0;
min-height: 0;
max-height: calc(100vh - 220px);
overflow-y: auto;
overscroll-behavior: contain;
padding: 18px 22px 28px;
}
.mnote-vault-empty {
padding: 28px 12px;
color: #8b8782;
font-size: 13px;
line-height: 20px;
}
.mnote-vault-detail-header {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
gap: 12px;
margin-bottom: 16px;
}
.mnote-vault-detail-header h2 {
margin: 0;
min-width: 0;
font-size: 20px;
font-weight: 650;
line-height: 28px;
}
.mnote-vault-detail-actions {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.mnote-vault-fields {
display: flex;
flex-direction: column;
gap: 10px;
}
.mnote-vault-field-row {
display: grid;
grid-template-columns: 96px minmax(0, 1fr) auto;
align-items: start;
gap: 8px 12px;
padding: 8px 0;
border-top: 1px solid rgba(27, 28, 28, 0.06);
}
.mnote-vault-field-row > label {
padding-top: 4px;
color: #6d6a65;
font-size: 12px;
font-weight: 600;
line-height: 18px;
}
.mnote-vault-field-row > div,
.mnote-vault-field-row > pre {
min-width: 0;
margin: 0;
font-size: 13px;
line-height: 20px;
word-break: break-word;
}
.mnote-vault-field-row input[type="text"],
.mnote-vault-field-row input[type="password"],
.mnote-vault-field-row textarea {
width: 100%;
box-sizing: border-box;
min-height: 30px;
padding: 6px 10px;
border: 1px solid rgba(27, 28, 28, 0.12);
border-radius: 4px;
background: #ffffff;
color: inherit;
font: inherit;
font-size: 13px;
line-height: 18px;
}
.mnote-vault-field-row textarea {
min-height: 120px;
resize: vertical;
}
.mnote-vault-secret-value {
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
letter-spacing: 0.04em;
}
.mnote-vault-secret-actions,
.mnote-vault-secret-edit {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 6px;
}
.mnote-vault-secret-edit {
grid-column: 2 / -1;
}
.mnote-vault-secret-edit input {
flex: 1 1 180px;
}
.mnote-vault-muted {
color: #9b9a97;
}
.mnote-vault-notes {
grid-template-columns: 96px minmax(0, 1fr);
}
.mnote-vault-notes pre {
white-space: pre-wrap;
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
font-size: 12px;
line-height: 18px;
color: #37352f;
}
.mnote-vault-form .mnote-vault-field-row {
grid-template-columns: 120px minmax(0, 1fr);
}
.mnote-vault-folder-controls {
display: flex;
flex-direction: column;
gap: 8px;
min-width: 0;
}
.mnote-vault-folder-controls select {
width: 100%;
box-sizing: border-box;
min-height: 30px;
padding: 6px 10px;
border: 1px solid rgba(27, 28, 28, 0.12);
border-radius: 4px;
background: #ffffff;
color: inherit;
font: inherit;
font-size: 13px;
line-height: 18px;
}
.mnote-vault-folder-controls input[type="text"] {
width: 100%;
box-sizing: border-box;
}
@media (max-width: 820px) {
.mnote-vault-workbench {
width: calc(100vw - 24px);
margin: 18px auto 28px;
}
.mnote-vault-body {
grid-template-columns: 1fr;
min-height: 0;
}
.mnote-vault-list {
max-height: 220px;
border-right: 0;
border-bottom: 1px solid rgba(27, 28, 28, 0.08);
}
.mnote-vault-detail {
max-height: none;
}
.mnote-vault-field-row {
grid-template-columns: 1fr;
}
.mnote-vault-form .mnote-vault-field-row {
grid-template-columns: 1fr;
}
.mnote-vault-secret-edit {
grid-column: auto;
}
}
/* Folder tree list */
.mnote-vault-folder {
border-bottom: 1px solid rgba(27, 28, 28, 0.05);
}
.mnote-vault-site-group {
border-bottom: 0;
}
.mnote-vault-site-toggle .mnote-vault-folder-name {
font-weight: 500;
color: #5c5a56;
}
.mnote-vault-secret-input-plain {
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
letter-spacing: 0.01em;
}
.mnote-vault-folder-label {
padding: 4px 10px 2px;
color: #8b8782;
font-size: 10px;
font-weight: 600;
letter-spacing: 0.02em;
text-transform: uppercase;
}
.mnote-vault-folder-toggle {
display: flex;
align-items: center;
gap: 4px;
width: 100%;
margin: 0;
padding: 3px 8px 3px calc(8px + var(--vault-depth, 0) * 10px);
border: 0;
background: transparent;
color: #37352f;
font: inherit;
font-size: 11px;
font-weight: 600;
line-height: 16px;
text-align: left;
cursor: pointer;
}
.mnote-vault-folder-toggle:hover {
background: #f1f0ef;
}
.mnote-vault-folder-chevron {
display: inline-block;
width: 12px;
color: #8b8782;
font-size: 11px;
}
.mnote-vault-folder-name {
flex: 1 1 auto;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.mnote-vault-folder-count {
flex: 0 0 auto;
color: #8b8782;
font-size: 11px;
font-weight: 500;
}
.mnote-vault-list-item-wrap {
padding-left: calc(var(--vault-depth, 0) * 10px);
}
.mnote-vault-list-item-wrap .mnote-vault-list-item {
border-bottom-color: rgba(27, 28, 28, 0.04);
}
.mnote-vault-hint {
margin: 8px 0 0;
color: #8b8782;
font-size: 12px;
line-height: 18px;
}
.mnote-vault-hint code {
padding: 0 4px;
border-radius: 3px;
background: #f1f0ef;
font-size: 11px;
}
.mnote-vault-sibling-list {
display: flex;
flex-wrap: wrap;
gap: 6px;
}
.mnote-vault-sibling {
height: 26px;
padding: 0 10px;
border: 1px solid rgba(27, 28, 28, 0.12);
border-radius: 4px;
background: #ffffff;
color: #37352f;
font: inherit;
font-size: 12px;
cursor: pointer;
}
.mnote-vault-sibling:hover {
background: #f7f7f6;
}
/* Cipher book panel */
.mnote-vault-cipher-add {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin: 12px 0 16px;
}
.mnote-vault-cipher-add input {
flex: 1 1 120px;
min-width: 100px;
height: 30px;
padding: 0 10px;
border: 1px solid rgba(27, 28, 28, 0.12);
border-radius: 4px;
font: inherit;
font-size: 13px;
}
.mnote-vault-cipher-add button {
height: 30px;
padding: 0 12px;
border: 1px solid rgba(27, 28, 28, 0.12);
border-radius: 4px;
background: #ffffff;
font: inherit;
font-size: 12px;
cursor: pointer;
}
.mnote-vault-cipher-row {
display: grid;
grid-template-columns: 88px minmax(0, 1fr) auto;
gap: 8px 12px;
align-items: center;
padding: 8px 0;
border-bottom: 1px solid rgba(27, 28, 28, 0.06);
}
.mnote-vault-cipher-key {
font-size: 13px;
font-weight: 600;
}
.mnote-vault-cipher-value {
overflow: hidden;
color: #37352f;
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
font-size: 12px;
text-overflow: ellipsis;
white-space: nowrap;
}
.mnote-vault-cipher-actions {
display: flex;
gap: 6px;
}
.mnote-vault-cipher-actions button {
height: 26px;
padding: 0 8px;
border: 1px solid rgba(27, 28, 28, 0.12);
border-radius: 4px;
background: #ffffff;
font: inherit;
font-size: 11px;
cursor: pointer;
}
.mnote-vault-cipher-actions button.is-danger {
color: #c93a32;
border-color: rgba(201, 58, 50, 0.28);
}
@media (max-width: 820px) {
.mnote-vault-cipher-row {
grid-template-columns: 1fr;
}
}
/* Multi-account / multi-secret collapsible groups */
.mnote-vault-section {
display: flex;
flex-direction: column;
gap: 8px;
margin: 4px 0 12px;
padding: 10px 12px;
border: 1px solid rgba(27, 28, 28, 0.08);
border-radius: 8px;
background: rgba(247, 247, 246, 0.55);
}
.mnote-vault-section-head {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
font-size: 12px;
font-weight: 600;
color: #37352f;
}
.mnote-vault-section-head > button {
height: 26px;
padding: 0 10px;
border: 1px solid rgba(27, 28, 28, 0.12);
border-radius: 4px;
background: #fff;
font: inherit;
font-size: 12px;
cursor: pointer;
}
.mnote-vault-section-head > button:hover {
background: #f7f7f6;
}
/* Multi-URL (equivalent site endpoints / fallbacks) */
.mnote-vault-url-hint {
margin: 0 0 4px;
font-size: 12px;
color: rgba(55, 53, 47, 0.55);
}
.mnote-vault-url-row {
display: grid;
grid-template-columns: 56px minmax(0, 1fr) 28px;
align-items: center;
gap: 8px;
}
.mnote-vault-url-label {
font-size: 12px;
color: rgba(55, 53, 47, 0.65);
white-space: nowrap;
}
.mnote-vault-url-row input[type="url"] {
width: 100%;
min-width: 0;
height: 32px;
padding: 0 10px;
border: 1px solid rgba(27, 28, 28, 0.12);
border-radius: 4px;
font: inherit;
font-size: 13px;
background: #fff;
}
.mnote-vault-url-row input[type="url"]:focus {
outline: 2px solid rgba(35, 131, 226, 0.35);
border-color: rgba(35, 131, 226, 0.55);
}
.mnote-vault-url-row > button {
height: 28px;
width: 28px;
padding: 0;
border: 1px solid rgba(27, 28, 28, 0.1);
border-radius: 4px;
background: #fff;
font: inherit;
cursor: pointer;
color: #9b2c2c;
}
.mnote-vault-url-row > button:hover {
background: #fdf2f2;
}
.mnote-vault-url-spacer {
display: block;
width: 28px;
height: 28px;
}
.mnote-vault-urls-view .mnote-vault-field-value a {
color: #2383e2;
word-break: break-all;
}
.mnote-vault-slot-group {
border: 1px solid rgba(27, 28, 28, 0.1);
border-radius: 6px;
background: #fff;
overflow: hidden;
}
.mnote-vault-slot-summary {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
padding: 8px 10px;
cursor: pointer;
list-style: none;
user-select: none;
}
.mnote-vault-slot-summary::-webkit-details-marker {
display: none;
}
.mnote-vault-slot-title {
font-size: 12px;
font-weight: 600;
color: #37352f;
}
.mnote-vault-slot-actions {
display: inline-flex;
gap: 6px;
}
.mnote-vault-slot-actions button {
height: 24px;
padding: 0 8px;
border: 1px solid rgba(27, 28, 28, 0.12);
border-radius: 4px;
background: #fff;
font: inherit;
font-size: 11px;
cursor: pointer;
}
.mnote-vault-slot-actions button.is-danger {
color: #c93a32;
border-color: rgba(201, 58, 50, 0.28);
}
.mnote-vault-slot-body {
display: flex;
flex-direction: column;
gap: 6px;
padding: 0 10px 10px;
border-top: 1px solid rgba(27, 28, 28, 0.06);
}
.mnote-vault-slot-empty {
font-size: 12px;
padding: 4px 2px 2px;
}
/* Nested appendix secrets under each account (default collapsed) */
.mnote-vault-account-secrets {
margin-top: 8px;
padding: 8px 8px 6px;
border: 1px dashed rgba(27, 28, 28, 0.12);
border-radius: 6px;
background: #fafaf9;
display: flex;
flex-direction: column;
gap: 8px;
}
.mnote-vault-account-secrets.is-collapsed {
gap: 0;
padding-bottom: 6px;
}
.mnote-vault-account-secrets-body {
display: flex;
flex-direction: column;
gap: 8px;
}
.mnote-vault-account-secrets-body[hidden] {
display: none !important;
}
.mnote-vault-account-secrets-head {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
font-size: 11px;
font-weight: 600;
color: #6d6a65;
letter-spacing: 0.02em;
}
.mnote-vault-secrets-toggle {
display: inline-flex;
align-items: center;
gap: 6px;
margin: 0;
padding: 2px 4px;
border: none;
background: transparent;
font: inherit;
font-size: 11px;
font-weight: 600;
color: #6d6a65;
cursor: pointer;
text-align: left;
}
.mnote-vault-secrets-toggle:hover {
color: #37352f;
}
.mnote-vault-secrets-chevron {
display: inline-block;
width: 1em;
font-size: 9px;
line-height: 1;
color: #9b9a97;
}
.mnote-vault-secrets-count {
font-weight: 500;
color: #9b9a97;
}
.mnote-vault-account-secrets-head button:not(.mnote-vault-secrets-toggle) {
height: 24px;
padding: 0 8px;
border: 1px solid rgba(27, 28, 28, 0.12);
border-radius: 4px;
background: #fff;
font: inherit;
font-size: 11px;
cursor: pointer;
}
.mnote-vault-account-secrets-empty {
font-size: 12px;
padding: 2px 0;
}
.mnote-vault-nested-secret {
border: 1px solid rgba(27, 28, 28, 0.08);
border-radius: 5px;
background: #fff;
padding: 8px;
display: flex;
flex-direction: column;
gap: 6px;
}
.mnote-vault-nested-secret-head {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
}
.mnote-vault-nested-secret-title {
font-size: 12px;
font-weight: 600;
color: #37352f;
}
.mnote-vault-nested-secret-head button.is-danger {
height: 24px;
padding: 0 8px;
border: 1px solid rgba(201, 58, 50, 0.28);
border-radius: 4px;
background: #fff;
color: #c93a32;
font: inherit;
font-size: 11px;
cursor: pointer;
}
/* Cipher book plain input (visible while typing) */
.mnote-vault-cipher-add input.mnote-vault-secret-input-plain,
.mnote-vault-cipher-add input[type="text"] {
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}