mirror of
https://github.com/raven-pensieve/obsidian-ace-code-editor.git
synced 2026-07-22 05:48:56 +00:00
@src 和 @styles),并更新 tsconfig 中的 paths 配置以支持这些 别名。主要修改集中在多个组件、hook、service 和 i18n 文件的 import 语句,替换原先的 "@/src/..." 等路径为 "@src/..." 或 "@styles/..."。此外调整了 SettingsStore 的导入位置以保持一 致性。 这样做的原因是简化模块导入、提高代码可读性并避免相对路 径带来的维护成本,方便重构和移动文件时不需大量修改导入 路径。
186 lines
3.6 KiB
CSS
186 lines
3.6 KiB
CSS
.ace-snippets-file-modal {
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: 100%;
|
|
width: 100%;
|
|
padding: 24px;
|
|
background-color: var(--background-primary);
|
|
border-radius: 8px;
|
|
overflow: hidden;
|
|
|
|
.snippets-modal-header {
|
|
margin-bottom: 24px;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
|
|
h2 {
|
|
font-size: 1.5rem;
|
|
font-weight: 600;
|
|
color: var(--text-normal);
|
|
margin: 0;
|
|
}
|
|
|
|
.snippets-modal-header-icon {
|
|
color: var(--text-accent);
|
|
}
|
|
}
|
|
|
|
.snippets-modal-content {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 16px;
|
|
overflow: hidden;
|
|
|
|
/* 创建新文件 */
|
|
.snippets-new-file {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 12px;
|
|
padding: 16px;
|
|
border: 1px solid var(--background-modifier-border);
|
|
border-radius: 8px;
|
|
margin-bottom: 12px;
|
|
background-color: var(--background-secondary);
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
|
|
|
|
.snippets-new-file-actions {
|
|
display: flex;
|
|
gap: 12px;
|
|
justify-content: flex-end;
|
|
margin-top: 4px;
|
|
}
|
|
}
|
|
|
|
/* 非创建新文件 */
|
|
.snippets-actions {
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
align-items: center;
|
|
margin-bottom: 12px;
|
|
gap: 8px;
|
|
|
|
.snippets-search {
|
|
flex: 1;
|
|
max-width: 300px;
|
|
margin-right: auto;
|
|
}
|
|
|
|
.snippets-action-buttons {
|
|
display: flex;
|
|
gap: 8px;
|
|
align-items: center;
|
|
}
|
|
}
|
|
|
|
/* 文件列表 */
|
|
.snippets-file-list {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
border: 1px solid var(--background-modifier-border);
|
|
border-radius: 8px;
|
|
padding: 12px;
|
|
background-color: var(--background-secondary);
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
|
|
|
|
.snippets-file-item {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 12px 16px;
|
|
border-radius: 6px;
|
|
margin-bottom: 8px;
|
|
cursor: pointer;
|
|
background-color: var(--background-primary);
|
|
transition: all 0.2s ease;
|
|
border: 1px solid transparent;
|
|
position: relative;
|
|
|
|
&:hover {
|
|
background-color: var(--background-modifier-hover);
|
|
transform: translateY(-1px);
|
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
|
|
border-color: var(--background-modifier-border);
|
|
|
|
.snippets-edit-btn,
|
|
.snippets-delete-btn {
|
|
opacity: 0.8;
|
|
}
|
|
}
|
|
|
|
&.enabled {
|
|
border-left: 3px solid var(--text-accent);
|
|
padding-left: 14px;
|
|
}
|
|
|
|
.snippets-file-name {
|
|
flex: 1;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: break-spaces;
|
|
font-weight: 500;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.snippets-file-badge {
|
|
font-size: 0.7rem;
|
|
padding: 2px 6px;
|
|
border-radius: 10px;
|
|
background-color: var(--background-modifier-accent);
|
|
color: var(--text-muted);
|
|
margin-left: 8px;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.snippets-file-actions {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
margin-left: 12px;
|
|
|
|
.snippets-toggle {
|
|
margin-right: 4px;
|
|
}
|
|
|
|
button {
|
|
opacity: 0.6;
|
|
transition: opacity 0.2s ease;
|
|
padding: 6px;
|
|
|
|
&:hover {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
.snippets-delete-btn:hover {
|
|
color: var(--text-error);
|
|
}
|
|
}
|
|
}
|
|
|
|
.snippets-empty-state {
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
align-items: center;
|
|
height: 160px;
|
|
color: var(--text-muted);
|
|
gap: 16px;
|
|
padding: 24px;
|
|
text-align: center;
|
|
border-radius: 8px;
|
|
background-color: var(--background-primary);
|
|
border: 1px dashed var(--background-modifier-border);
|
|
|
|
.snippets-empty-icon {
|
|
opacity: 0.5;
|
|
font-size: 2rem;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|