Skip to content

Commit fcd6831

Browse files
committed
feat: add version switch styles and update sections in settings
1 parent 690d756 commit fcd6831

File tree

1 file changed

+74
-1
lines changed

1 file changed

+74
-1
lines changed

src/css/settings.scss

Lines changed: 74 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@use 'common/editor';
22

3-
$sections: general, editor, debug;
3+
$sections: general, editor, debug, version-switch;
44

55
p.submit {
66
display: flex;
@@ -128,3 +128,76 @@ body.js {
128128
.cloud-settings tbody tr:nth-child(n+5) {
129129
display: none;
130130
}
131+
132+
// Version Switch Styles
133+
.code-snippets-version-switch {
134+
.current-version {
135+
font-family: monospace;
136+
font-size: 1.1em;
137+
font-weight: bold;
138+
color: #0073aa;
139+
background: #f0f6fc;
140+
padding: 2px 8px;
141+
border-radius: 3px;
142+
border: 1px solid #c3c4c7;
143+
}
144+
145+
#target_version {
146+
min-width: 200px;
147+
margin-inline-start: 8px;
148+
}
149+
150+
#switch-version-btn {
151+
margin-inline-start: 8px;
152+
153+
&[disabled] {
154+
opacity: 0.6;
155+
cursor: not-allowed;
156+
}
157+
}
158+
159+
#version-switch-result {
160+
margin-block-start: 12px;
161+
162+
&.notice {
163+
padding: 8px 12px;
164+
border-radius: 4px;
165+
}
166+
}
167+
168+
p.description {
169+
font-style: italic;
170+
color: #d63638;
171+
background: #fcf0f1;
172+
padding: 8px 12px;
173+
border-radius: 4px;
174+
border-left: 4px solid #d63638;
175+
margin-block-start: 16px;
176+
}
177+
178+
.notice {
179+
&.notice-success {
180+
border-left-color: #00a32a;
181+
}
182+
183+
&.notice-error {
184+
border-left-color: #d63638;
185+
}
186+
187+
&.notice-warning {
188+
border-left-color: #dba617;
189+
}
190+
191+
&.notice-info {
192+
border-left-color: #72aee6;
193+
}
194+
}
195+
}
196+
197+
.version-switch-settings {
198+
.form-table {
199+
th {
200+
width: 180px;
201+
}
202+
}
203+
}

0 commit comments

Comments
 (0)