Skip to content

Commit 59f1b26

Browse files
authored
Merge pull request #208 from DeepDirect/feature/DP-203/Repo-tab
Feature/dp 203/repo tab
2 parents bbd9949 + 7732651 commit 59f1b26

File tree

16 files changed

+760
-248
lines changed

16 files changed

+760
-248
lines changed

src/components/organisms/CodeEditor/MonacoCollaborativeEditor.module.scss

Lines changed: 148 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
background: var(--editor-bg);
1010
}
1111

12-
// 에디터 컨테이너
1312
.editorContainer {
1413
position: relative;
1514
flex: 1;
@@ -31,7 +30,6 @@
3130
}
3231
}
3332

34-
// 로딩 상태
3533
.editorLoading {
3634
display: flex;
3735
flex-direction: column;
@@ -68,7 +66,6 @@
6866
}
6967
}
7068

71-
// 플레이스홀더
7269
.editorPlaceholder {
7370
display: flex;
7471
align-items: center;
@@ -142,7 +139,120 @@
142139
}
143140
}
144141

145-
// 반응형 디자인
142+
.readOnlyStatus {
143+
display: flex;
144+
align-items: center;
145+
gap: 8px;
146+
padding: 8px 16px;
147+
border-bottom: 1px solid var(--readonly-border);
148+
font-size: $font-size-xxsmall;
149+
font-weight: $font-weight-medium;
150+
color: var(--readonly-text);
151+
background: var(--readonly-bg);
152+
153+
@media (width <= 768px) {
154+
padding: 6px 12px;
155+
font-size: 11px;
156+
}
157+
}
158+
159+
.readOnlyIcon {
160+
flex-shrink: 0;
161+
font-size: 14px;
162+
}
163+
164+
.readOnlyMessage {
165+
flex: 1;
166+
line-height: 1.4;
167+
}
168+
169+
.saveStatus {
170+
position: absolute;
171+
top: 8px;
172+
right: 16px;
173+
z-index: 100;
174+
pointer-events: none;
175+
}
176+
177+
.savingIndicator {
178+
display: flex;
179+
align-items: center;
180+
gap: 6px;
181+
padding: 4px 8px;
182+
border: 1px solid var(--save-indicator-border);
183+
border-radius: 4px;
184+
font-size: 11px;
185+
font-weight: $font-weight-medium;
186+
color: var(--save-indicator-text);
187+
background: var(--save-indicator-bg);
188+
backdrop-filter: blur(4px);
189+
}
190+
191+
.savingSpinner {
192+
width: 12px;
193+
height: 12px;
194+
border: 2px solid var(--save-spinner-bg);
195+
border-top: 2px solid var(--save-spinner-color);
196+
border-radius: 50%;
197+
animation: spin 1s linear infinite;
198+
}
199+
200+
.saveMode {
201+
font-size: 10px;
202+
opacity: 0.8;
203+
}
204+
205+
.errorStatus {
206+
display: flex;
207+
align-items: center;
208+
gap: 8px;
209+
padding: 8px 16px;
210+
border-bottom: 1px solid var(--error-border);
211+
font-size: $font-size-xxsmall;
212+
font-weight: $font-weight-medium;
213+
color: var(--error-text);
214+
background: var(--error-bg);
215+
}
216+
217+
.errorIcon {
218+
flex-shrink: 0;
219+
width: 16px;
220+
height: 16px;
221+
border-radius: 50%;
222+
font-size: 12px;
223+
font-weight: bold;
224+
line-height: 16px;
225+
text-align: center;
226+
color: $white-2;
227+
background: $red;
228+
}
229+
230+
.errorMessage {
231+
flex: 1;
232+
line-height: 1.4;
233+
}
234+
235+
.retryButton {
236+
padding: 4px 8px;
237+
border: 1px solid var(--retry-border);
238+
border-radius: 4px;
239+
font-size: 11px;
240+
font-weight: $font-weight-medium;
241+
color: var(--retry-text);
242+
background: var(--retry-bg);
243+
transition: all 0.2s ease;
244+
cursor: pointer;
245+
246+
&:hover {
247+
background: var(--retry-hover);
248+
transform: translateY(-1px);
249+
}
250+
}
251+
252+
.connectionStatus {
253+
color: var(--editor-point-color);
254+
}
255+
146256
@media (width <= 768px) {
147257
.collaborativeEditor {
148258
height: 100%;
@@ -169,6 +279,38 @@
169279
}
170280
}
171281

172-
.connectionStatus {
173-
color: var(--editor-point-color);
282+
:root {
283+
--readonly-bg: #{$gray-10};
284+
--readonly-border: #{$gray-8};
285+
--readonly-text: #{$red};
286+
--save-indicator-bg: #{$white-2};
287+
--save-indicator-border: #{$gray-8};
288+
--save-indicator-text: #{$gray-3};
289+
--save-spinner-bg: #{$gray-8};
290+
--save-spinner-color: #{$blue-3};
291+
--error-bg: rgb(220 38 38 / 10%);
292+
--error-border: #{$red};
293+
--error-text: #{$red};
294+
--retry-bg: #{$white-2};
295+
--retry-border: #{$gray-7};
296+
--retry-text: #{$gray-3};
297+
--retry-hover: #{$gray-10};
298+
}
299+
300+
:global(.dark) {
301+
--readonly-bg: #{$gray-2};
302+
--readonly-border: #{$gray-4};
303+
--readonly-text: #{$red};
304+
--save-indicator-bg: #{$gray-2};
305+
--save-indicator-border: #{$gray-4};
306+
--save-indicator-text: #{$gray-7};
307+
--save-spinner-bg: #{$gray-4};
308+
--save-spinner-color: #{$blue-3};
309+
--error-bg: rgb(220 38 38 / 15%);
310+
--error-border: #{$red};
311+
--error-text: #{$red};
312+
--retry-bg: #{$gray-2};
313+
--retry-border: #{$gray-4};
314+
--retry-text: #{$gray-7};
315+
--retry-hover: #{$gray-3};
174316
}

0 commit comments

Comments
 (0)