fix: use readonly preview for code resource tabs

This commit is contained in:
lix-2026
2026-06-04 23:00:53 +08:00
parent eccf399142
commit a1dcfc9f76
3 changed files with 142 additions and 2 deletions
+50
View File
@@ -2938,6 +2938,56 @@ body {
padding: 34px 48px;
}
.mnote-resource-tab-code-shell {
display: flex;
flex-direction: column;
width: 100%;
min-height: calc(100vh - 80px);
background: #FFF;
color: #37352F;
}
.mnote-resource-tab-code-header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
height: 42px;
padding: 0 18px;
border-bottom: 1px solid rgba(55, 53, 47, 0.1);
background: #FAFAF8;
box-sizing: border-box;
}
.mnote-resource-tab-code-title {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 13px;
font-weight: 600;
}
.mnote-resource-tab-code-meta {
flex: 0 0 auto;
font-size: 12px;
color: #73726E;
}
.mnote-resource-tab-code-preview {
flex: 1 1 auto;
min-height: 0;
margin: 0;
padding: 18px 22px 48px;
overflow: auto;
background: #1F2328;
color: #F0F3F6;
font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
white-space: pre;
tab-size: 2;
box-sizing: border-box;
}
.mnote-resource-tab-error {
display: flex;
place-items: center;