fix:锁定文件只读
This commit is contained in:
@@ -2072,6 +2072,7 @@ button {
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
background: #f8f9fa;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.readonly-editor-banner {
|
||||
@@ -2085,6 +2086,13 @@ button {
|
||||
color: #856404;
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.readonly-editor-content {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.readonly-editor-banner svg {
|
||||
@@ -2096,7 +2104,7 @@ button {
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex: 1;
|
||||
min-height: 200px;
|
||||
gap: 16px;
|
||||
color: #666;
|
||||
font-size: 14px;
|
||||
@@ -2107,11 +2115,12 @@ button {
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex: 1;
|
||||
min-height: 200px;
|
||||
gap: 12px;
|
||||
color: #dc3545;
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.readonly-editor-error strong {
|
||||
@@ -2122,3 +2131,140 @@ button {
|
||||
margin: 0;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
/* ============ Notebook 只读视图样式 ============ */
|
||||
.notebook-read-only {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
background: #fff;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.notebook-cell {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
min-height: 44px; /* 保证空单元格的最小高度 */
|
||||
padding: 8px 0;
|
||||
flex-shrink: 0; /* 防止单元格被压缩 */
|
||||
}
|
||||
|
||||
.notebook-cell--markdown {
|
||||
padding: 14px 24px;
|
||||
}
|
||||
|
||||
.notebook-cell--code {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.notebook-cell__prompt {
|
||||
flex: 0 0 auto;
|
||||
min-width: 90px;
|
||||
padding-right: 16px;
|
||||
padding-left: 16px;
|
||||
color: #8b949e;
|
||||
font-family: "Consolas", "SFMono-Regular", monospace;
|
||||
font-size: 11px;
|
||||
text-align: right;
|
||||
user-select: none;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.notebook-cell__content {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.notebook-cell__input {
|
||||
background: #f6f8fa;
|
||||
border-radius: 1px;
|
||||
padding: 6px;
|
||||
margin-right: 14px;
|
||||
border: #ccc 1px solid;
|
||||
min-height: 24px; /* 保证输入区域的最小高度 */
|
||||
}
|
||||
|
||||
.notebook-cell__input--empty {
|
||||
min-height: 24px;
|
||||
padding: 0 14px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.notebook-cell__input pre,
|
||||
.notebook-cell__input code {
|
||||
margin: 0;
|
||||
color: #24292f;
|
||||
font-family: "Consolas", "SFMono-Regular", monospace;
|
||||
font-size: 13px;
|
||||
line-height: 1.5;
|
||||
white-space: pre-wrap;
|
||||
word-break: break-word;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.notebook-cell__outputs {
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.notebook-output {
|
||||
padding-left: 6px;
|
||||
color: #24292f;
|
||||
font-size: 13px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.notebook-output pre {
|
||||
margin: 0;
|
||||
font-family: "Consolas", "SFMono-Regular", monospace;
|
||||
font-size: 13px;
|
||||
white-space: pre-wrap;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.notebook-output--stdout pre {
|
||||
color: #24292f;
|
||||
}
|
||||
|
||||
.notebook-cell__content h1,
|
||||
.notebook-cell__content h2,
|
||||
.notebook-cell__content h3,
|
||||
.notebook-cell__content p,
|
||||
.notebook-cell__content li {
|
||||
margin: 6px 0;
|
||||
color: #24292f;
|
||||
font-size: 14px;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.notebook-cell__content h1 {
|
||||
font-size: 24px;
|
||||
color: #1f6feb;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.notebook-cell__content h2 {
|
||||
font-size: 20px;
|
||||
color: #1f6feb;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.notebook-cell__content h3 {
|
||||
font-size: 16px;
|
||||
color: #24292f;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.notebook-cell__content ul,
|
||||
.notebook-cell__content ol {
|
||||
padding-left: 24px;
|
||||
}
|
||||
|
||||
.notebook-cell__content li {
|
||||
margin-left: 0;
|
||||
list-style-position: outside;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user