mirror of
https://github.com/xheldon/git-folder-sync.git
synced 2026-07-22 06:59:00 +00:00
- 修复硬编码的 .obsidian 路径,使用 app.vault.configDir - 将内联 JavaScript 样式移动到 CSS 文件中 - 减少 console.log 输出,避免污染开发控制台 - 移除 any 类型转换,提高类型安全性 - 提升代码质量以符合 Obsidian 社区插件标准
376 lines
7.9 KiB
CSS
376 lines
7.9 KiB
CSS
/* Git Sync Plugin Styles */
|
|
.git-sync-modal {
|
|
min-width: 500px;
|
|
max-width: 800px;
|
|
width: auto;
|
|
max-height: 90vh;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.git-sync-modal .modal-content {
|
|
padding: 20px;
|
|
}
|
|
|
|
.git-sync-settings-container {
|
|
padding: 0;
|
|
min-width: 0;
|
|
}
|
|
|
|
.git-sync-settings .setting-item {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
justify-content: space-between;
|
|
padding: 18px 0;
|
|
border-top: 1px solid var(--background-modifier-border);
|
|
}
|
|
|
|
.git-sync-settings .setting-item:first-child {
|
|
border-top: none;
|
|
}
|
|
|
|
.git-sync-settings .setting-item-info {
|
|
flex-grow: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
margin-right: 16px;
|
|
}
|
|
|
|
.git-sync-settings .setting-item-name {
|
|
font-weight: var(--font-weight-medium);
|
|
color: var(--text-normal);
|
|
margin-bottom: 2px;
|
|
}
|
|
|
|
.git-sync-settings .setting-item-description {
|
|
font-size: var(--font-ui-smaller);
|
|
color: var(--text-muted);
|
|
line-height: 1.3;
|
|
}
|
|
|
|
.git-sync-settings .setting-item-control {
|
|
display: flex;
|
|
align-items: center;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
/* Sponsor section special layout */
|
|
.git-sync-sponsor-control {
|
|
flex-direction: column !important;
|
|
align-items: flex-end !important;
|
|
}
|
|
|
|
.git-sync-settings .setting-item-input {
|
|
width: 300px;
|
|
min-width: 300px;
|
|
max-width: 400px;
|
|
padding: 6px 8px;
|
|
border: 1px solid var(--background-modifier-border);
|
|
border-radius: 3px;
|
|
background: var(--background-primary);
|
|
color: var(--text-normal);
|
|
font-size: var(--font-ui-small);
|
|
}
|
|
|
|
/* Input field general styles */
|
|
.git-sync-settings input[type='text'],
|
|
.git-sync-settings input[type='password'] {
|
|
width: 300px;
|
|
min-width: 300px;
|
|
max-width: 400px;
|
|
}
|
|
|
|
/* China mainland donation channel styles */
|
|
.git-sync-china-sponsor {
|
|
margin-top: 8px;
|
|
font-size: var(--font-ui-smaller);
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.git-sync-settings .setting-item-input:focus {
|
|
border-color: var(--interactive-accent);
|
|
outline: none;
|
|
box-shadow: 0 0 0 2px var(--interactive-accent-hover);
|
|
}
|
|
|
|
.git-sync-settings .setting-item-separator {
|
|
border: none;
|
|
border-top: 1px solid var(--background-modifier-border);
|
|
margin: 12px 0;
|
|
}
|
|
|
|
.git-sync-settings button {
|
|
padding: 6px 12px;
|
|
border: 1px solid var(--interactive-normal);
|
|
border-radius: 3px;
|
|
background: var(--interactive-normal);
|
|
color: var(--text-on-accent);
|
|
cursor: pointer;
|
|
font-size: var(--font-ui-small);
|
|
font-weight: var(--font-weight-medium);
|
|
transition: all 0.1s ease;
|
|
}
|
|
|
|
.git-sync-settings button:hover {
|
|
background: var(--interactive-hover);
|
|
border-color: var(--interactive-hover);
|
|
}
|
|
|
|
.git-sync-settings button:active {
|
|
background: var(--interactive-active);
|
|
border-color: var(--interactive-active);
|
|
}
|
|
|
|
.git-sync-settings button:disabled {
|
|
opacity: 0.5;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.git-sync-settings button.mod-cta {
|
|
background: var(--interactive-accent);
|
|
border-color: var(--interactive-accent);
|
|
color: var(--text-on-accent);
|
|
}
|
|
|
|
.git-sync-settings button.mod-cta:hover {
|
|
background: var(--interactive-accent-hover);
|
|
border-color: var(--interactive-accent-hover);
|
|
}
|
|
|
|
.git-sync-settings button.mod-warning {
|
|
background: var(--color-orange);
|
|
border-color: var(--color-orange);
|
|
color: var(--text-on-accent);
|
|
}
|
|
|
|
.git-sync-settings button.mod-warning:hover {
|
|
background: var(--color-red);
|
|
border-color: var(--color-red);
|
|
}
|
|
|
|
.git-sync-settings button.mod-secondary {
|
|
background: var(--background-secondary);
|
|
border-color: var(--background-modifier-border);
|
|
color: var(--text-normal);
|
|
}
|
|
|
|
.git-sync-settings button.mod-secondary:hover {
|
|
background: var(--background-secondary-alt);
|
|
}
|
|
|
|
/* Sync button styles */
|
|
.git-sync-menu-button {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
padding: 4px 8px;
|
|
margin: 0 2px;
|
|
border-radius: 3px;
|
|
background: var(--interactive-normal);
|
|
color: var(--text-normal);
|
|
cursor: pointer;
|
|
font-size: var(--font-ui-smaller);
|
|
transition: all 0.1s ease;
|
|
}
|
|
|
|
.git-sync-menu-button:hover {
|
|
background: var(--interactive-hover);
|
|
}
|
|
|
|
.git-sync-menu-button svg {
|
|
width: 14px;
|
|
height: 14px;
|
|
margin-right: 4px;
|
|
}
|
|
|
|
/* Responsive design */
|
|
@media (max-width: 768px) {
|
|
.git-sync-modal {
|
|
min-width: 300px;
|
|
max-width: 90vw;
|
|
width: auto;
|
|
}
|
|
|
|
.git-sync-settings .setting-item {
|
|
flex-direction: column;
|
|
align-items: stretch;
|
|
}
|
|
|
|
.git-sync-settings .setting-item-info {
|
|
margin-right: 0;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.git-sync-settings .setting-item-input {
|
|
width: 100%;
|
|
}
|
|
}
|
|
|
|
/* Ensure modal content doesn't overflow */
|
|
.git-sync-modal .modal-container {
|
|
max-height: 90vh;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.git-sync-settings {
|
|
max-width: 100%;
|
|
overflow-x: hidden;
|
|
}
|
|
|
|
.git-sync-settings .setting-item-input {
|
|
min-width: 200px;
|
|
max-width: 100%;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
/* Path description styles */
|
|
.git-sync-path-info {
|
|
background: var(--background-secondary);
|
|
border: 1px solid var(--background-modifier-border);
|
|
border-radius: 4px;
|
|
padding: 8px 12px;
|
|
margin: 8px 0 16px 0;
|
|
font-size: var(--font-ui-smaller);
|
|
color: var(--text-accent);
|
|
font-weight: var(--font-weight-medium);
|
|
}
|
|
|
|
.git-sync-path-info:empty {
|
|
display: none;
|
|
}
|
|
|
|
/* Status bar styles */
|
|
.git-sync-status-bar {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 0 8px;
|
|
font-size: var(--font-ui-smaller);
|
|
}
|
|
|
|
.git-sync-status-text {
|
|
color: var(--text-muted);
|
|
font-size: var(--font-ui-smaller);
|
|
}
|
|
|
|
.git-sync-status-button {
|
|
padding: 2px 6px;
|
|
border: 1px solid var(--background-modifier-border);
|
|
border-radius: 3px;
|
|
background: var(--background-secondary);
|
|
color: var(--text-normal);
|
|
cursor: pointer;
|
|
font-size: var(--font-ui-smaller);
|
|
transition: all 0.1s ease;
|
|
}
|
|
|
|
.git-sync-status-button:hover {
|
|
background: var(--background-secondary-alt);
|
|
border-color: var(--interactive-accent);
|
|
}
|
|
|
|
.git-sync-status-button:active {
|
|
background: var(--interactive-accent);
|
|
color: var(--text-on-accent);
|
|
}
|
|
|
|
.git-sync-status-button:disabled {
|
|
opacity: 0.5;
|
|
cursor: not-allowed;
|
|
background: var(--background-secondary);
|
|
border-color: var(--background-modifier-border);
|
|
}
|
|
|
|
.git-sync-status-button:disabled:hover {
|
|
background: var(--background-secondary);
|
|
border-color: var(--background-modifier-border);
|
|
}
|
|
|
|
/* Save button container styles */
|
|
.git-sync-save-button-container {
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
margin-top: 20px;
|
|
padding-top: 20px;
|
|
border-top: 1px solid var(--background-modifier-border);
|
|
}
|
|
|
|
.git-sync-save-button-container button {
|
|
padding: 8px 16px;
|
|
border: 1px solid var(--interactive-accent);
|
|
border-radius: 4px;
|
|
background: var(--interactive-accent);
|
|
color: var(--text-on-accent);
|
|
cursor: pointer;
|
|
font-size: var(--font-ui-small);
|
|
font-weight: var(--font-weight-medium);
|
|
transition: all 0.1s ease;
|
|
}
|
|
|
|
.git-sync-save-button-container button:hover {
|
|
background: var(--interactive-accent-hover);
|
|
border-color: var(--interactive-accent-hover);
|
|
}
|
|
|
|
.git-sync-save-button-container button:active {
|
|
background: var(--interactive-accent);
|
|
border-color: var(--interactive-accent);
|
|
}
|
|
|
|
.danger-zone {
|
|
color: var(--color-red);
|
|
}
|
|
|
|
.sponsor {
|
|
color: var(--color-orange);
|
|
}
|
|
|
|
/* Subsection titles styling */
|
|
.git-sync-subsection-title {
|
|
color: var(--text-normal);
|
|
font-size: var(--font-ui-medium);
|
|
font-weight: var(--font-weight-medium);
|
|
margin-top: 24px;
|
|
margin-bottom: 12px;
|
|
padding-left: 8px;
|
|
border-left: 3px solid var(--text-accent);
|
|
}
|
|
|
|
/* Status bar display states */
|
|
.git-sync-status-bar.hidden {
|
|
display: none;
|
|
}
|
|
|
|
.git-sync-status-bar.visible {
|
|
display: flex;
|
|
}
|
|
|
|
/* Status text color states */
|
|
.git-sync-status-text.modified {
|
|
color: var(--color-orange);
|
|
}
|
|
|
|
.git-sync-status-text.synced {
|
|
color: var(--color-green);
|
|
}
|
|
|
|
.git-sync-status-text.not-published {
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.git-sync-status-text.normal {
|
|
color: var(--text-normal);
|
|
}
|
|
|
|
/* Sponsor button styling */
|
|
.git-sync-sponsor-button {
|
|
text-decoration: none;
|
|
padding: 6px 12px;
|
|
border-radius: 3px;
|
|
display: inline-block;
|
|
}
|
|
|
|
/* China sponsor link styling */
|
|
.git-sync-china-sponsor a {
|
|
color: var(--text-accent);
|
|
text-decoration: none;
|
|
}
|