gustjose_obsidian-syncthing.../styles.css
2026-06-04 09:02:37 -03:00

825 lines
15 KiB
CSS

/* --- STATUS BAR ICON --- */
.st-status-bar-item {
overflow: hidden;
}
.status-bar-item-icon {
display: inline-flex;
align-items: center;
height: 100%;
}
/* --- STATUS COLORS (USADO NO ÍCONE E TEXTO) --- */
.st-color-success {
color: var(--text-success);
}
.st-color-warning {
color: var(--text-warning);
}
.st-color-error {
color: var(--text-error);
}
.st-color-muted {
color: var(--text-muted);
}
/* --- ÍCONE SVG --- */
.st-icon-svg {
width: 100%;
height: 100%;
display: block;
}
/* Para a barra de status (Desktop) - Força tamanho pequeno */
.status-bar-item-icon .st-icon-svg {
width: 20px;
height: 20px;
}
/* --- INPUTS & TEXTAREAS --- */
.st-input-full-width {
width: 100%;
}
.st-input-error.st-input-error {
border-color: var(--text-error);
}
.st-textarea-code {
width: 100%;
height: 150px;
font-family: var(--font-monospace);
}
/* --- MODAIS --- */
.st-modal-wide {
width: 80vw;
max-width: 1000px;
}
.st-modal-footer {
display: flex;
justify-content: flex-end;
gap: 10px;
margin-top: 20px;
}
/* --- DETAILS / SUMMARY (.stignore) --- */
.st-details-box {
border: 1px solid var(--background-modifier-border);
border-radius: 5px;
padding: 10px;
margin-bottom: 10px;
margin-top: 15px;
}
.setting-item {
margin-bottom: 1rem;
}
.setting-item-description {
margin-bottom: 20px;
}
.st-summary-title {
cursor: pointer;
font-weight: bold;
margin-bottom: 10px;
margin-top: 0;
outline: none;
}
/* --- VIEW LATERAL --- */
.syncthing-view-container {
padding: 20px;
display: flex;
flex-direction: column;
gap: 20px;
}
/* Alerta de Conflito */
.st-conflict-alert {
background-color: var(--background-modifier-error);
color: var(--text-on-accent);
padding: 12px;
border-radius: 6px;
margin-bottom: 20px;
text-align: center;
font-weight: bold;
cursor: pointer;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
transition: opacity 0.2s ease;
}
.st-conflict-alert:hover {
opacity: 0.9;
}
.st-conflict-subtext {
font-size: 0.8em;
font-weight: normal;
margin-top: 4px;
opacity: 0.9;
}
/* Status Box */
.st-status-box {
background-color: #363636;
border: 1px solid var(--background-modifier-border);
border-radius: 10px;
padding: 20px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 10px;
}
.st-big-icon svg {
width: 48px;
height: 48px;
}
.st-status-text {
font-size: 1.2em;
font-weight: bold;
}
/* Barra de Progresso da Sincronização */
.st-progress-bar-container {
width: 100%;
height: 4px;
background-color: var(--background-modifier-border);
border-radius: 2px;
margin-top: -15px;
margin-bottom: 5px;
overflow: hidden;
transition: background-color 0.3s ease;
}
.st-progress-bar-container.st-active {
background-color: var(--background-modifier-border);
}
.st-progress-bar-fill {
height: 100%;
background-color: var(--interactive-accent);
width: 0%;
/* Transição bem mais longa (3s) e com easing que freia no final.
Isso disfarça o pulo do Syncthing direto pro 99%, dando a ilusão de um progresso mais contínuo. */
transition: width 3s cubic-bezier(0.1, 0.7, 0.2, 1);
}
/* Info Table */
.st-info-container {
display: flex;
flex-direction: column;
gap: 10px;
}
.st-info-row {
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 8px;
border-bottom: 1px solid var(--background-modifier-border);
}
.st-info-left {
display: flex;
align-items: center;
gap: 8px;
color: var(--text-muted);
}
.st-info-icon svg {
width: 16px;
height: 16px;
}
.st-info-value {
font-weight: bold;
color: var(--text-normal);
max-width: 150px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
/* Botões */
.st-btn-container {
display: flex;
gap: 10px;
margin-top: 15px;
width: 100%;
}
.st-btn-container button {
height: 40px;
font-weight: 700;
margin-top: 0;
}
.st-sync-button {
width: 100%;
}
.st-pause-button {
flex: 0 0 50px;
}
/* --- MODAL DE CONFLITOS --- */
.conflict-item-box {
border: 1px solid var(--background-modifier-border);
padding: 15px;
margin-bottom: 10px;
border-radius: 8px;
background-color: var(--background-primary);
}
.st-conflict-title {
margin-bottom: 5px;
}
.conflict-meta {
font-size: 0.85em;
color: var(--text-muted);
margin-top: 4px;
}
.conflict-meta-path {
font-size: 0.8em;
color: var(--text-faint);
margin-bottom: 10px;
font-family: var(--font-monospace);
}
.conflict-actions {
display: flex;
justify-content: flex-end;
gap: 10px;
border-top: 1px solid var(--background-modifier-border);
padding-top: 10px;
}
.st-flex-grow {
flex-grow: 1;
}
/* Diff View & Merge View */
.st-diff-instructions {
font-size: 0.85em;
color: var(--text-muted);
margin-top: 15px;
margin-bottom: 15px;
}
.st-diff-headers {
display: flex;
gap: 10px;
margin-bottom: 5px;
}
.st-diff-header-box {
flex: 1;
display: flex;
justify-content: center;
align-items: center;
padding: 5px 0;
}
.st-btn-accent.st-btn-accent {
color: var(--text-on-accent);
}
.theme-light button.st-btn-accent {
color: #333333;
}
.st-diff-controls {
display: flex;
align-items: center;
margin-top: 15px;
margin-bottom: 10px;
border-top: 1px solid var(--background-modifier-border);
padding-top: 15px;
}
.st-diff-view-wrapper .cm-changeGutter {
background-color: var(--background-modifier-border);
}
.st-diff-legend {
font-size: 0.85em;
color: var(--text-muted);
font-weight: bold;
}
.st-diff-loading {
margin: 15px 0;
color: var(--text-muted);
font-style: italic;
}
.st-diff-view-wrapper {
border: 1px solid var(--background-modifier-border);
border-radius: 6px;
background-color: var(--background-primary-alt);
overflow: hidden;
}
/* CodeMirror Merge Styles overrides to match Obsidian Theme */
.cm-mergeView {
max-height: 400px;
overflow-y: auto;
}
.st-diff-view-wrapper .cm-mergeView .cm-editor {
background-color: var(--background-primary);
color: var(--text-normal);
font-family: var(--font-monospace);
font-size: 0.9em;
}
.cm-merge-a .cm-content {
border-right: 1px solid var(--background-modifier-border);
}
/* Highlight lines */
.st-diff-view-wrapper .cm-merge-deleted {
background-color: rgba(var(--color-red-rgb), 0.15);
text-decoration: line-through;
}
.st-diff-view-wrapper .cm-merge-inserted {
background-color: rgba(var(--color-green-rgb), 0.15);
}
/* Background chunks */
.st-diff-view-wrapper .cm-mergeView .cm-deletedChunk {
background-color: rgba(var(--color-red-rgb), 0.08);
}
.st-diff-view-wrapper .cm-mergeView .cm-insertedChunk {
background-color: rgba(var(--color-green-rgb), 0.08);
}
/* Revert buttons spacer */
.st-diff-view-wrapper .cm-merge-spacer {
background-color: var(--background-secondary);
}
.st-diff-view-wrapper .cm-merge-revert {
background-color: var(--background-modifier-form-field);
border: 1px solid var(--background-modifier-border);
color: var(--text-muted);
border-radius: 4px;
}
.cm-merge-revert button {
height: 2.8vh;
display: flex;
align-items: center;
justify-content: center;
}
/* Mobile Responsiveness (Celulares) */
@media (max-width: 600px) {
.st-diff-instructions {
font-size: 0.8em;
}
.st-diff-header-box {
padding: 4px 2px;
}
.st-diff-header-box button {
font-size: 0.8em;
padding: 4px 8px;
height: auto;
white-space: normal;
text-align: center;
}
.st-diff-controls {
flex-direction: column;
align-items: stretch;
gap: 10px;
}
.st-diff-legend {
text-align: center;
margin-bottom: 5px;
}
.st-diff-controls button {
width: 100%;
}
/* Ajuste forçado para displays muito pequenos do CodeMirror MergeView */
.cm-mergeView .cm-editor {
font-size: 0.8em;
}
}
.st-history-container {
max-height: 50vh;
overflow-y: auto;
border: 1px solid var(--background-modifier-border);
border-radius: 4px;
padding: 5px;
}
.st-history-title.st-history-title {
margin: 0.5rem 0rem;
}
/* Container do item do histórico */
.st-history-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 6px 0;
border-bottom: 1px solid var(--background-modifier-border);
font-size: 0.9em;
}
/* Lado esquerdo (ícones + texto) */
.st-history-left {
display: flex;
align-items: center;
overflow: hidden;
gap: 10px;
width: 100%;
}
.st-history-container .st-history-item:last-child {
border-bottom: none;
}
/* --- Estilos das Setas --- */
.st-history-arrow {
margin: 0px 6px;
display: flex;
align-items: center;
opacity: 0.8;
}
.st-history-arrow svg {
height: 24px;
width: 24px;
}
/* Seta de Entrada (Recebido) - Verde/Sucesso */
.st-direction-in {
color: var(--text-success);
}
/* Seta de Saída (Enviado) - Roxo/Accent ou Laranja */
.st-direction-out {
/* Usei text-accent para indicar ação do usuário, ou use --text-warning para laranja */
color: var(--text-accent);
}
/* ------------------------------- */
.st-history-icon {
margin-right: 8px;
display: flex;
align-items: center;
}
.st-history-details {
display: flex;
flex-direction: column;
overflow: hidden;
}
.st-history-filename {
font-weight: 500;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
color: var(--text-normal);
max-width: 180px;
}
.st-history-time {
font-size: 0.8em;
color: var(--text-muted);
}
/* Alinhamento interno do botão */
.st-sync-button {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 8px; /* Espaço entre ícone e texto */
}
/* Ajuste do ícone para não ficar desalinhado verticalmente */
.st-btn-icon-span {
display: flex;
align-items: center;
}
/* Opcional: Animação de rotação quando clica */
@keyframes st-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
/* --- Ícone de status na aba do arquivo --- */
.st-tab-sync-icon {
display: inline-flex;
align-items: center;
justify-content: center;
margin-right: 6px;
color: var(--text-muted);
vertical-align: middle;
transition:
color 0.3s ease,
opacity 0.3s ease; /* Transição suave de cor */
}
/* Estado: Sincronizando (Pendente) -> Laranja */
.st-sync-pending.st-sync-pending {
/* color: var(--text-warning); */
opacity: 1;
width: 16px;
height: 16px;
}
/* Estado: Sucesso (Sincronizado) -> Verde */
.st-sync-success.st-sync-success {
color: var(--text-success);
opacity: 1;
}
/* --- Explorer Quick Action Button --- */
.st-explorer-btn {
position: absolute;
right: 10px;
top: 50%;
transform: translateY(-50%);
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
transition: opacity 0.2s ease-in-out;
color: var(--text-muted);
padding-left: 10px;
padding-right: 2px;
z-index: 5;
cursor: pointer;
}
/* Mostra o botão ao passar o mouse no item do arquivo */
.nav-file-title:hover .st-explorer-btn {
opacity: 1;
}
/* Estilo do botão ao passar o mouse nele */
.st-explorer-btn:hover {
color: var(--text-normal);
}
.st-explorer-btn svg {
width: 14px;
height: 14px;
}
/* Estado: Carregando (Girando) */
.st-explorer-btn.st-loading.st-loading {
opacity: 1;
color: var(--text-accent);
pointer-events: none;
}
.st-explorer-btn.st-loading svg {
animation: st-spin 1s linear infinite;
}
/* Estado: Sucesso (Verde) */
.st-explorer-btn.st-success.st-success {
color: var(--text-success);
opacity: 1;
}
/* --- Badges de Dispositivos --- */
.st-badges-container {
display: flex;
flex-wrap: wrap;
gap: 4px;
justify-content: flex-end; /* Alinha badges à direita */
max-width: 60%; /* Evita ocupar toda a linha se o label for longo */
}
.st-device-badge {
font-size: 0.75em;
background-color: var(--background-modifier-border);
color: var(--text-normal);
padding: 2px 6px;
border-radius: 4px;
border: 1px solid var(--background-modifier-border-hover);
white-space: nowrap;
}
/* --- Debug Report Modal --- */
.st-debug-report-textarea {
width: 100%;
font-family: var(--font-monospace);
font-size: 12px;
resize: vertical;
}
.st-debug-report-buttons {
display: flex;
gap: 8px;
margin-top: 12px;
}
/* --- Debug Console Modal --- */
.st-debug-console-modal {
width: 85vw;
max-width: 900px;
}
.st-debug-console-filters {
margin-bottom: 12px;
}
.st-debug-console-filters .setting-item {
border-bottom: none;
padding: 4px 0;
}
.st-debug-console-modules-list {
display: flex;
flex-wrap: wrap;
gap: 6px 12px;
margin-top: 6px;
}
.st-debug-console-module-item {
font-size: 0.85em;
cursor: pointer;
display: flex;
align-items: center;
gap: 4px;
}
.st-debug-console-list {
height: clamp(200px, 45vh, 400px);
overflow-y: auto;
border: 1px solid var(--background-modifier-border);
border-radius: 6px;
padding: 8px;
font-family: var(--font-monospace);
font-size: 11px;
background-color: var(--background-primary-alt);
}
.st-debug-console-empty {
color: var(--text-muted);
text-align: center;
padding: 40px 0;
}
.st-debug-console-entry {
padding: 3px 0;
border-bottom: 1px solid var(--background-modifier-border-hover);
display: flex;
flex-wrap: wrap;
gap: 4px 6px;
align-items: baseline;
}
.st-debug-console-entry:last-child {
border-bottom: none;
}
.st-debug-console-time {
color: var(--text-faint);
flex-shrink: 0;
}
.st-debug-console-level {
font-weight: bold;
flex-shrink: 0;
min-width: 42px;
}
.st-log-level-error {
color: var(--text-error);
}
.st-log-level-warn {
color: var(--text-warning);
}
.st-log-level-debug {
color: var(--text-muted);
}
.st-debug-console-module {
color: var(--text-accent);
flex-shrink: 0;
}
.st-debug-console-msg {
color: var(--text-normal);
word-break: break-word;
flex: 1 1 auto;
min-width: 0;
}
.st-debug-console-details {
width: 100%;
color: var(--text-faint);
padding-left: 16px;
font-size: 0.9em;
}
.st-debug-console-footer {
display: flex;
justify-content: flex-end;
margin-top: 12px;
}
/* Mobile / telas pequenas */
@media (max-width: 600px) {
.st-debug-console-modal {
width: 95vw;
}
.st-debug-console-list {
font-size: 10px;
padding: 6px;
}
.st-debug-console-entry {
gap: 2px 4px;
}
.st-debug-console-time {
display: none;
}
.st-debug-console-modules-list {
gap: 4px 8px;
}
}
/* Mobile / telas pequenas */
@media (max-width: 600px) {
.st-debug-console-modal {
width: 95vw;
}
.st-debug-console-list {
font-size: 10px;
padding: 6px;
}
.st-debug-console-entry {
gap: 2px 4px;
}
.st-debug-console-time {
display: none;
}
.st-debug-console-modules-list {
gap: 4px 8px;
}
}
/* --- API Key Status (Keychain) --- */
.st-api-key-status {
font-size: 0.85em;
color: var(--text-muted);
margin-right: 8px;
white-space: nowrap;
}
.st-api-key-status.st-api-key-configured {
color: var(--text-success);
}
.st-btn-remote-paused {
opacity: 0.6;
filter: grayscale(0.8);
cursor: not-allowed;
}
/* --- AVAILABILITY MODAL --- */
.st-availability-filename {
color: var(--text-accent);
font-weight: bold;
margin-bottom: 20px;
word-break: break-all;
}
.st-availability-list {
margin: 20px 0;
border: 1px solid var(--background-modifier-border);
border-radius: 8px;
padding: 10px;
background-color: var(--background-primary-alt);
}
.st-availability-icon {
color: var(--text-accent);
display: flex;
align-items: center;
margin-right: 10px;
}