-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoptions.html
More file actions
344 lines (331 loc) · 9.36 KB
/
Copy pathoptions.html
File metadata and controls
344 lines (331 loc) · 9.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8" />
<title>GitHub 연동 설정</title>
<style>
:root {
--ink: #1b1f24;
--sub: #6b7280;
--line: #e5e7eb;
--accent: #2563eb;
--accent-bg: #eff4ff;
--ok: #15803d;
--ok-bg: #f0fdf4;
--err: #b91c1c;
--err-bg: #fef2f2;
}
* { box-sizing: border-box; }
body {
margin: 0;
background: #ffffff;
color: var(--ink);
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Malgun Gothic", sans-serif;
}
.wrap {
max-width: 760px;
margin: 0 auto;
padding: 40px 32px 60px;
}
.header-title {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 4px;
}
.header-title img {
width: 28px;
height: 28px;
border-radius: 8px;
flex: none;
}
header h1 {
font-size: 20px;
margin: 0;
}
header p {
margin: 0 0 32px;
color: var(--sub);
font-size: 13.5px;
}
.step {
border: 1px solid var(--line);
border-radius: 12px;
padding: 22px 26px;
margin-bottom: 16px;
}
.step-head {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 14px;
}
.step-num {
width: 22px;
height: 22px;
flex: none;
border-radius: 50%;
background: var(--accent);
color: #fff;
font-size: 12px;
font-weight: 700;
display: flex;
align-items: center;
justify-content: center;
}
.step-head h2 {
font-size: 14.5px;
margin: 0;
}
label {
display: block;
font-size: 13px;
font-weight: 600;
margin-top: 12px;
}
label:first-of-type { margin-top: 0; }
input[type="text"], input[type="password"] {
width: 100%;
padding: 9px 10px;
margin-top: 6px;
border: 1px solid var(--line);
border-radius: 8px;
font-size: 13.5px;
}
input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.row { display: flex; gap: 8px; align-items: center; }
.row input { flex: 1; }
.icon-btn {
flex: none;
border: 1px solid var(--line);
background: #fafafa;
border-radius: 8px;
padding: 8px 10px;
margin-top: 6px;
cursor: pointer;
font-size: 12.5px;
white-space: nowrap;
}
.howto {
margin: 0 0 16px;
padding: 12px 14px 12px 30px;
background: #f9fafb;
border-radius: 8px;
font-size: 12.5px;
line-height: 1.7;
color: var(--ink);
}
.howto a { color: var(--accent); }
.actions {
display: flex;
gap: 8px;
margin-top: 20px;
}
button.primary, button.secondary {
padding: 10px 16px;
border-radius: 8px;
font-size: 13.5px;
font-weight: 600;
cursor: pointer;
border: 1px solid transparent;
white-space: nowrap;
}
button.primary {
background: var(--accent);
color: #fff;
}
button.primary:hover { background: #1d4ed8; }
button.secondary {
background: #fff;
border-color: var(--line);
color: var(--ink);
}
button.secondary:hover { background: #f5f5f5; }
.faq {
margin-top: 24px;
padding: 18px 22px 4px;
background: #f9fafb;
border-radius: 12px;
font-size: 12.5px;
line-height: 1.7;
color: var(--sub);
}
.faq h3 {
margin: 0 0 12px;
font-size: 13px;
color: var(--ink);
}
.faq-item {
padding-bottom: 14px;
margin-bottom: 14px;
border-bottom: 1px solid var(--line);
}
.faq-item:last-child {
border-bottom: none;
margin-bottom: 0;
}
.faq-q {
margin: 0 0 6px;
font-weight: 700;
color: var(--ink);
}
.faq-q::before {
content: "Q. ";
color: var(--accent);
}
.faq-a { margin: 0; }
.faq-a ol {
margin: 0 0 8px;
padding-left: 18px;
}
.faq-a a { color: var(--accent); }
.faq code {
background: #eef0f2;
padding: 1px 5px;
border-radius: 4px;
}
.faq-img-toggle {
margin: 4px 0 8px;
}
.faq-img-toggle summary {
cursor: pointer;
color: var(--accent);
font-weight: 600;
font-size: 12.5px;
list-style: none;
}
.faq-img-toggle summary::-webkit-details-marker { display: none; }
.faq-img-toggle summary::before { content: "▸ "; }
.faq-img-toggle[open] summary::before { content: "▾ "; }
.faq-img-toggle img {
display: block;
margin-top: 8px;
max-width: 100%;
border: 1px solid var(--line);
border-radius: 8px;
}
.notice {
margin-top: 16px;
padding: 18px 22px;
background: #f9fafb;
border: 1px solid var(--line);
border-radius: 12px;
font-size: 12.5px;
line-height: 1.7;
color: var(--sub);
scroll-margin-top: 20px;
}
.notice h3 {
margin: 0 0 10px;
font-size: 13px;
color: var(--ink);
}
.notice p { margin: 0 0 10px; }
.notice ul {
margin: 0;
padding-left: 18px;
}
.notice li { margin-bottom: 6px; }
.notice li:last-child { margin-bottom: 0; }
.toast-container {
position: fixed;
bottom: 24px;
left: 50%;
transform: translateX(-50%);
display: flex;
flex-direction: column;
align-items: center;
gap: 10px;
z-index: 1000;
}
.toast {
min-width: 240px;
max-width: 420px;
padding: 12px 16px;
border-radius: 10px;
font-size: 13px;
line-height: 1.5;
white-space: pre-wrap;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
border: 1px solid var(--line);
background: #fff;
opacity: 0;
transform: translateY(8px);
transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.ok { background: var(--ok-bg); color: var(--ok); border-color: #bbf7d0; }
.toast.err { background: var(--err-bg); color: var(--err); border-color: #fecaca; }
.toast.pending { background: #f5f5f5; color: var(--sub); }
</style>
</head>
<body>
<div class="wrap">
<header>
<div class="header-title">
<img src="icons/icon48.png" alt="" />
<h1>GitHub 연동 설정</h1>
</div>
<p>2단계만 하면 됩니다. 헷갈리는 부분은 맨 아래 "자주 묻는 질문"에 정리해뒀어요.</p>
</header>
<div class="step">
<div class="step-head">
<span class="step-num">1</span>
<h2>GitHub 토큰 입력</h2>
</div>
<label for="token">Personal Access Token</label>
<div class="row">
<input id="token" type="password" placeholder="github_pat_ 로 시작하는 토큰을 붙여넣으세요" />
<button type="button" class="icon-btn" id="toggleToken">보기</button>
</div>
</div>
<div class="step">
<div class="step-head">
<span class="step-num">2</span>
<h2>저장소 연결</h2>
</div>
<label for="repoUrl">GitHub 저장소 주소</label>
<input id="repoUrl" type="text" placeholder="https://github.com/내계정/저장소이름" />
<label for="branch">브랜치</label>
<input id="branch" type="text" placeholder="main" />
</div>
<div class="actions">
<button type="button" class="secondary" id="test">연결 테스트</button>
<button type="button" class="primary" id="save">저장</button>
</div>
<div class="faq">
<h3>자주 묻는 질문</h3>
<div class="faq-item">
<p class="faq-q">토큰은 어떻게 발급하나요?</p>
<div class="faq-a">
<ol>
<li><a href="https://github.com/settings/tokens?type=beta" target="_blank" rel="noopener">GitHub 토큰 발급 페이지</a>로 이동</li>
<li>좌측 메뉴에서 "Personal access tokens" → "Fine-grained tokens" 선택 (이미 그 화면이면 건너뛰기)</li>
<li>우측 상단 "Generate new token" 버튼 클릭</li>
<li>Repository access → "Only select repositories" → 커밋 받을 저장소 선택</li>
<li>"Permissions" 섹션 → "Repositories" 탭에서 "Add permissions" 버튼 클릭</li>
<li>목록/검색창에서 <b>Contents</b> 선택 → 추가된 항목의 드롭다운에서 "Read and write" 선택</li>
<li>이때 <b>Metadata</b> 권한이 "Required"로 자동 추가되는데, GitHub이 요구하는 필수 항목이라 그대로 두면 됩니다</li>
<li>맨 아래로 스크롤 → 만료 기간을 짧게 설정 → "Generate token" 클릭 → 나온 토큰을 복사해서 위 칸에 붙여넣기</li>
</ol>
<details class="faq-img-toggle">
<summary>이미지로 보기 (Contents 권한 설정 화면)</summary>
<img src="images/how.jpg" alt="Permissions 섹션에서 Contents를 Read and write로 설정하는 화면" />
</details>
<p>토큰은 이 화면을 나가면 GitHub에서 다시 보여주지 않으니, 놓쳤다면 새로 발급하면 됩니다.</p>
</div>
</div>
<div class="faq-item">
<p class="faq-q">저장소 주소는 어떻게 입력하나요?</p>
<p class="faq-a">커밋을 저장할 GitHub 저장소의 주소를 그대로 붙여넣으면 됩니다. 저장소가 없다면 GitHub에서 미리 하나 만들어두세요 (비어있어도 괜찮습니다).</p>
</div>
<div class="faq-item">
<p class="faq-q">브랜치는 뭘 입력해야 하나요?</p>
<p class="faq-a">그 저장소의 기본 브랜치 이름입니다. 저장소 메인 화면에서 확인할 수 있고, 보통 <code>main</code>이며 오래된 저장소는 <code>master</code>인 경우도 있습니다.</p>
</div>
</div>
</div>
<div id="toastContainer" class="toast-container" aria-live="polite"></div>
<script src="options.js"></script>
</body>
</html>