mirror of
https://github.com/wiseguru/ReWrite-Voice-Notes.git
synced 2026-07-22 07:49:19 +00:00
618 lines
14 KiB
CSS
618 lines
14 KiB
CSS
/* ReWrite plugin styles */
|
|
|
|
.rewrite-modal .rewrite-template-row {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 4px;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.rewrite-modal .rewrite-destination-row {
|
|
margin-bottom: 12px;
|
|
padding: 8px;
|
|
border: 1px dashed var(--background-modifier-border);
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.rewrite-modal .rewrite-destination-summary {
|
|
cursor: pointer;
|
|
user-select: none;
|
|
font-size: var(--font-ui-small);
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.rewrite-modal .rewrite-destination-summary-value {
|
|
color: var(--text-normal);
|
|
}
|
|
|
|
.rewrite-modal .rewrite-destination-body {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 4px;
|
|
margin-top: 8px;
|
|
}
|
|
|
|
.rewrite-modal .rewrite-destination-body .rewrite-destination-sublabel {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 2px;
|
|
font-size: var(--font-ui-small);
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.rewrite-modal .rewrite-destination-body input[type="text"] {
|
|
width: 100%;
|
|
}
|
|
|
|
.rewrite-modal .rewrite-context-row {
|
|
margin-bottom: 12px;
|
|
padding: 8px;
|
|
border: 1px dashed var(--background-modifier-border);
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.rewrite-modal .rewrite-context-summary {
|
|
cursor: pointer;
|
|
user-select: none;
|
|
font-size: var(--font-ui-small);
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.rewrite-modal .rewrite-context-summary-value {
|
|
color: var(--text-normal);
|
|
}
|
|
|
|
.rewrite-modal .rewrite-context-body {
|
|
margin-top: 8px;
|
|
}
|
|
|
|
.rewrite-modal .rewrite-context-input {
|
|
width: 100%;
|
|
font-family: var(--font-text);
|
|
resize: vertical;
|
|
}
|
|
|
|
.rewrite-modal .rewrite-destination-reset {
|
|
align-self: flex-start;
|
|
font-size: var(--font-ui-small);
|
|
background: transparent;
|
|
border: none;
|
|
color: var(--text-accent);
|
|
cursor: pointer;
|
|
padding: 0;
|
|
}
|
|
|
|
.rewrite-modal .rewrite-tabs {
|
|
display: flex;
|
|
gap: 8px;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.rewrite-modal .rewrite-tab.is-active {
|
|
background-color: var(--interactive-accent);
|
|
color: var(--text-on-accent);
|
|
}
|
|
|
|
.rewrite-modal .rewrite-tab-body {
|
|
margin-top: 8px;
|
|
}
|
|
|
|
.rewrite-modal .rewrite-recording-indicator {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
margin-top: 8px;
|
|
}
|
|
|
|
.rewrite-modal .rewrite-pulse-dot {
|
|
width: 10px;
|
|
height: 10px;
|
|
border-radius: 50%;
|
|
background-color: var(--color-red);
|
|
animation: rewrite-pulse 1s ease-in-out infinite;
|
|
}
|
|
|
|
@keyframes rewrite-pulse {
|
|
0%, 100% { opacity: 1; }
|
|
50% { opacity: 0.3; }
|
|
}
|
|
|
|
.rewrite-modal .rewrite-silence-warning {
|
|
margin-top: 8px;
|
|
padding: 6px 10px;
|
|
border-radius: 4px;
|
|
background-color: var(--background-modifier-error);
|
|
color: var(--text-on-accent);
|
|
font-size: var(--font-ui-small);
|
|
}
|
|
|
|
.rewrite-modal .rewrite-live-transcript {
|
|
min-height: 60px;
|
|
padding: 8px;
|
|
margin-top: 8px;
|
|
border: 1px solid var(--background-modifier-border);
|
|
border-radius: 4px;
|
|
white-space: pre-wrap;
|
|
}
|
|
|
|
.rewrite-modal .rewrite-paste {
|
|
width: 100%;
|
|
min-height: 160px;
|
|
font-family: var(--font-text);
|
|
}
|
|
|
|
.rewrite-settings-textarea {
|
|
width: 100%;
|
|
min-height: 80px;
|
|
font-family: var(--font-text);
|
|
resize: vertical;
|
|
}
|
|
|
|
.rewrite-modal .rewrite-progress {
|
|
margin-top: 12px;
|
|
font-style: italic;
|
|
}
|
|
|
|
.rewrite-modal .rewrite-retry {
|
|
margin-top: 12px;
|
|
padding: 8px;
|
|
border: 1px solid var(--background-modifier-border);
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.rewrite-setup-card {
|
|
padding: 12px;
|
|
border: 1px solid var(--background-modifier-border);
|
|
border-radius: 6px;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.rewrite-setup-actions {
|
|
display: flex;
|
|
gap: 8px;
|
|
margin-top: 12px;
|
|
}
|
|
|
|
/* Settings tab */
|
|
|
|
.rewrite-settings .rewrite-heading-icon {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
vertical-align: middle;
|
|
margin-right: 8px;
|
|
color: var(--text-accent);
|
|
}
|
|
|
|
.rewrite-settings .rewrite-heading-icon svg {
|
|
width: var(--icon-s, 16px);
|
|
height: var(--icon-s, 16px);
|
|
}
|
|
|
|
.rewrite-settings .rewrite-section-desc {
|
|
color: var(--text-muted);
|
|
font-size: var(--font-ui-small);
|
|
margin-top: -4px;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.rewrite-settings .rewrite-warning-text {
|
|
color: var(--text-warning, var(--color-yellow));
|
|
}
|
|
|
|
.rewrite-settings .rewrite-profile-section {
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.rewrite-settings .rewrite-profile-section.is-active-profile {
|
|
border-left: 3px solid var(--interactive-accent);
|
|
padding-left: 12px;
|
|
margin-left: -15px;
|
|
}
|
|
|
|
/* Give "Maximum note length" first-class emphasis vs the plainer fields around it. */
|
|
.rewrite-settings .rewrite-note-length {
|
|
margin-top: 8px;
|
|
padding: 6px 12px;
|
|
border-left: 3px solid var(--interactive-accent);
|
|
background-color: var(--background-secondary);
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.rewrite-settings .rewrite-note-length .setting-item-name {
|
|
font-weight: var(--font-semibold, 600);
|
|
}
|
|
|
|
.rewrite-settings .rewrite-profile-active-badge {
|
|
display: inline-block;
|
|
background-color: var(--interactive-accent);
|
|
color: var(--text-on-accent);
|
|
border-radius: 4px;
|
|
font-size: var(--font-ui-smaller);
|
|
padding: 1px 6px;
|
|
margin-left: 8px;
|
|
vertical-align: middle;
|
|
font-weight: normal;
|
|
}
|
|
|
|
.rewrite-settings .rewrite-status-badge {
|
|
display: inline-block;
|
|
border: 1px solid transparent;
|
|
border-radius: 4px;
|
|
font-size: var(--font-ui-smaller);
|
|
padding: 0 6px;
|
|
margin-left: 8px;
|
|
vertical-align: middle;
|
|
font-weight: normal;
|
|
}
|
|
|
|
.rewrite-settings .rewrite-status-badge.is-enabled {
|
|
color: var(--text-success);
|
|
border-color: var(--text-success);
|
|
}
|
|
|
|
.rewrite-settings .rewrite-status-badge.is-disabled {
|
|
color: var(--text-muted);
|
|
border-color: var(--background-modifier-border);
|
|
}
|
|
|
|
.rewrite-settings .rewrite-profile-collapsed > summary {
|
|
cursor: pointer;
|
|
user-select: none;
|
|
color: var(--text-muted);
|
|
font-size: var(--font-ui-small);
|
|
padding: 4px 0;
|
|
}
|
|
|
|
/* Quick record floating mini-UI */
|
|
|
|
.rewrite-quick-floater {
|
|
position: fixed;
|
|
bottom: 24px;
|
|
right: 24px;
|
|
z-index: 9999;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: stretch;
|
|
gap: 6px;
|
|
padding: 8px 12px;
|
|
background-color: var(--background-secondary);
|
|
color: var(--text-normal);
|
|
border: 1px solid var(--background-modifier-border);
|
|
border-radius: 8px;
|
|
box-shadow: var(--shadow-s);
|
|
font-size: var(--font-ui-small);
|
|
}
|
|
|
|
.rewrite-quick-floater .rewrite-quick-row {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.rewrite-quick-floater .rewrite-quick-silence-warning {
|
|
padding: 4px 8px;
|
|
border-radius: 4px;
|
|
background-color: var(--background-modifier-error);
|
|
color: var(--text-on-accent);
|
|
font-size: var(--font-ui-smaller);
|
|
max-width: 28ch;
|
|
}
|
|
|
|
.rewrite-quick-floater .rewrite-quick-dot {
|
|
width: 10px;
|
|
height: 10px;
|
|
border-radius: 50%;
|
|
background-color: var(--color-red);
|
|
animation: rewrite-pulse 1s ease-in-out infinite;
|
|
}
|
|
|
|
.rewrite-quick-floater.is-busy .rewrite-quick-dot {
|
|
background-color: var(--color-orange);
|
|
animation: none;
|
|
}
|
|
|
|
.rewrite-quick-floater .rewrite-quick-timer {
|
|
font-variant-numeric: tabular-nums;
|
|
min-width: 4ch;
|
|
}
|
|
|
|
.rewrite-quick-floater .rewrite-quick-stop,
|
|
.rewrite-quick-floater .rewrite-quick-cancel,
|
|
.rewrite-quick-floater .rewrite-quick-template {
|
|
padding: 2px 8px;
|
|
}
|
|
|
|
.rewrite-quick-floater .rewrite-quick-stop-hint {
|
|
font-size: var(--font-ui-smaller);
|
|
color: var(--text-muted);
|
|
margin-left: 4px;
|
|
}
|
|
|
|
.rewrite-quick-floater .rewrite-quick-template {
|
|
max-width: 14ch;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.rewrite-quick-floater .rewrite-quick-popover {
|
|
position: absolute;
|
|
bottom: calc(100% + 6px);
|
|
right: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
min-width: 180px;
|
|
max-height: 240px;
|
|
overflow-y: auto;
|
|
padding: 4px;
|
|
background-color: var(--background-primary);
|
|
border: 1px solid var(--background-modifier-border);
|
|
border-radius: 6px;
|
|
box-shadow: var(--shadow-s);
|
|
z-index: 10000;
|
|
}
|
|
|
|
.rewrite-quick-floater .rewrite-quick-popover-item {
|
|
text-align: left;
|
|
padding: 4px 8px;
|
|
background: transparent;
|
|
border: none;
|
|
cursor: pointer;
|
|
color: var(--text-normal);
|
|
font-size: var(--font-ui-small);
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.rewrite-quick-floater .rewrite-quick-popover-item:hover {
|
|
background-color: var(--background-modifier-hover);
|
|
}
|
|
|
|
.rewrite-quick-floater .rewrite-quick-popover-item.is-active {
|
|
color: var(--text-on-accent);
|
|
background-color: var(--interactive-accent);
|
|
}
|
|
|
|
/* Status bar */
|
|
|
|
.rewrite-status-bar {
|
|
display: inline-flex;
|
|
gap: 6px;
|
|
align-items: center;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.rewrite-status-bar .rewrite-status-dot {
|
|
width: 8px;
|
|
height: 8px;
|
|
border-radius: 50%;
|
|
background-color: var(--text-muted);
|
|
}
|
|
|
|
.rewrite-status-bar .rewrite-status-dot.is-stopped {
|
|
background-color: var(--text-muted);
|
|
}
|
|
|
|
.rewrite-status-bar .rewrite-status-dot.is-starting {
|
|
background-color: var(--color-yellow);
|
|
}
|
|
|
|
.rewrite-status-bar .rewrite-status-dot.is-running {
|
|
background-color: var(--color-green);
|
|
}
|
|
|
|
.rewrite-status-bar .rewrite-status-dot.is-external {
|
|
background-color: var(--color-orange);
|
|
}
|
|
|
|
.rewrite-status-bar .rewrite-status-dot.is-crashed {
|
|
background-color: var(--color-red);
|
|
}
|
|
|
|
.rewrite-hidden {
|
|
display: none !important;
|
|
}
|
|
|
|
/* Encryption banner (settings tab) */
|
|
|
|
.rewrite-encryption-banner {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 10px 12px;
|
|
margin-bottom: 16px;
|
|
border-radius: 6px;
|
|
border: 1px solid var(--background-modifier-border);
|
|
background-color: var(--background-secondary);
|
|
font-size: var(--font-ui-small);
|
|
}
|
|
|
|
.rewrite-encryption-banner.is-ok {
|
|
border-color: var(--color-green);
|
|
}
|
|
|
|
.rewrite-encryption-banner.is-warning {
|
|
border-color: var(--color-yellow);
|
|
background-color: rgba(255, 196, 0, 0.08);
|
|
}
|
|
|
|
.rewrite-encryption-banner.is-locked {
|
|
border-color: var(--color-red);
|
|
background-color: rgba(255, 80, 80, 0.08);
|
|
}
|
|
|
|
.rewrite-encryption-banner button {
|
|
margin-left: auto;
|
|
}
|
|
|
|
/* Passphrase modal */
|
|
|
|
.rewrite-passphrase-modal .rewrite-passphrase-desc {
|
|
color: var(--text-muted);
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.rewrite-passphrase-modal .rewrite-passphrase-input {
|
|
width: 100%;
|
|
font-family: var(--font-monospace);
|
|
}
|
|
|
|
.rewrite-passphrase-modal .rewrite-passphrase-warning {
|
|
color: var(--text-warning, var(--color-yellow));
|
|
font-size: var(--font-ui-small);
|
|
margin-top: 8px;
|
|
}
|
|
|
|
.rewrite-passphrase-modal .rewrite-passphrase-tips {
|
|
background-color: var(--background-secondary);
|
|
border: 1px solid var(--background-modifier-border);
|
|
border-radius: 6px;
|
|
padding: 10px 14px;
|
|
margin-bottom: 12px;
|
|
font-size: var(--font-ui-small);
|
|
}
|
|
|
|
.rewrite-passphrase-modal .rewrite-passphrase-tips summary {
|
|
font-weight: var(--font-bold, 700);
|
|
cursor: pointer;
|
|
}
|
|
|
|
.rewrite-passphrase-modal .rewrite-passphrase-tips[open] summary {
|
|
margin-bottom: 6px;
|
|
}
|
|
|
|
.rewrite-passphrase-modal .rewrite-passphrase-tips ul {
|
|
margin: 0;
|
|
padding-left: 18px;
|
|
}
|
|
|
|
.rewrite-passphrase-modal .rewrite-passphrase-tips li {
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.rewrite-passphrase-modal .rewrite-passphrase-tips code {
|
|
font-size: 0.9em;
|
|
padding: 1px 4px;
|
|
background-color: var(--background-primary);
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.rewrite-passphrase-modal .rewrite-passphrase-error {
|
|
color: var(--text-error, var(--color-red));
|
|
font-size: var(--font-ui-small);
|
|
margin-top: 8px;
|
|
}
|
|
|
|
.rewrite-passphrase-modal .rewrite-passphrase-actions {
|
|
display: flex;
|
|
gap: 8px;
|
|
justify-content: flex-end;
|
|
margin-top: 16px;
|
|
}
|
|
|
|
/* Passphrase strength meter (create/change flows) */
|
|
|
|
.rewrite-passphrase-modal .rewrite-passphrase-strength {
|
|
margin: 4px 0 12px;
|
|
}
|
|
|
|
.rewrite-passphrase-modal .rewrite-passphrase-strength-bar {
|
|
display: flex;
|
|
gap: 4px;
|
|
}
|
|
|
|
.rewrite-passphrase-modal .rewrite-passphrase-strength-seg {
|
|
flex: 1;
|
|
height: 5px;
|
|
border-radius: 3px;
|
|
background-color: var(--background-modifier-border);
|
|
}
|
|
|
|
.rewrite-passphrase-modal .rewrite-passphrase-strength-seg.is-filled.is-weak {
|
|
background-color: var(--color-red);
|
|
}
|
|
|
|
.rewrite-passphrase-modal .rewrite-passphrase-strength-seg.is-filled.is-fair {
|
|
background-color: var(--color-yellow);
|
|
}
|
|
|
|
.rewrite-passphrase-modal .rewrite-passphrase-strength-seg.is-filled.is-good {
|
|
background-color: var(--color-green);
|
|
}
|
|
|
|
.rewrite-passphrase-modal .rewrite-passphrase-strength-seg.is-filled.is-strong {
|
|
background-color: var(--color-green);
|
|
}
|
|
|
|
.rewrite-passphrase-modal .rewrite-passphrase-strength-text {
|
|
color: var(--text-muted);
|
|
font-size: var(--font-ui-smaller);
|
|
margin-top: 4px;
|
|
min-height: 1.2em;
|
|
}
|
|
|
|
.rewrite-passphrase-modal .rewrite-passphrase-strength-text.is-acceptable {
|
|
color: var(--text-success, var(--color-green));
|
|
}
|
|
|
|
.rewrite-passphrase-modal .rewrite-passphrase-generate {
|
|
white-space: nowrap;
|
|
}
|
|
|
|
/* Locked card in the main modal */
|
|
|
|
.rewrite-locked-card {
|
|
border-color: var(--color-red);
|
|
}
|
|
|
|
/* Rename prompt modal (new-file collision) */
|
|
|
|
.rewrite-rename-modal .rewrite-rename-input {
|
|
width: 100%;
|
|
font-family: var(--font-monospace);
|
|
}
|
|
|
|
/*
|
|
* Mobile soft-keyboard avoidance.
|
|
*
|
|
* Obsidian mobile (Capacitor) overlays the soft keyboard on top of the WebView
|
|
* without resizing the layout or visual viewport, so a centered popup is
|
|
* covered by the keyboard with no JS signal to react to. We pin our own popups
|
|
* to the top of the screen instead: the keyboard opens from the bottom, so a
|
|
* top-anchored modal (and its near-top input fields) stays visible above it.
|
|
* Scoped to our modal classes so core Obsidian modals are untouched.
|
|
* `align-self: flex-start` moves just our modal to the top of the flex
|
|
* container that centers modals; the auto bottom margin is a fallback for
|
|
* non-default flex configurations.
|
|
*/
|
|
.is-mobile .rewrite-modal,
|
|
.is-mobile .rewrite-rename-modal {
|
|
align-self: flex-start;
|
|
margin-top: 8px;
|
|
margin-bottom: auto;
|
|
max-height: calc(100% - 16px);
|
|
}
|
|
|
|
/*
|
|
* Reclaim the empty band Obsidian leaves above the title on mobile and tighten
|
|
* the title's own top margin, so the whole popup shifts up and more of it
|
|
* clears the keyboard.
|
|
*/
|
|
.is-mobile .rewrite-modal .modal-content,
|
|
.is-mobile .rewrite-rename-modal .modal-content {
|
|
padding-top: 8px;
|
|
}
|
|
|
|
.is-mobile .rewrite-modal h2 {
|
|
margin-top: 0;
|
|
}
|
|
|
|
/*
|
|
* The Paste textarea renders at 4 rows on mobile (set in modal.ts); drop the
|
|
* desktop 160px min-height floor so that takes effect and the submit button
|
|
* below it stays above the keyboard.
|
|
*/
|
|
.is-mobile .rewrite-modal .rewrite-paste {
|
|
min-height: 80px;
|
|
}
|
|
|