Repository navigation
Expand file tree
/
Copy pathpopup.html
More file actions
152 lines (136 loc) · 4.37 KB
/
Copy pathpopup.html
File metadata and controls
152 lines (136 loc) · 4.37 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
<!doctype html>
<html>
<head>
<meta charset="UTF-8" />
<link rel="stylesheet" href="css/popup.css" />
</head>
<body>
<div class="app">
<header class="header">
<h1 id="title">Leet<span class="brand">Hub</span></h1>
<p id="caption">Sync accepted solutions to GitHub</p>
</header>
<main class="card">
<!-- Authentication mode -->
<div id="auth_mode" hidden>
<p class="section-title">Sign in</p>
<p id="auth_error" class="notice error" hidden></p>
<label class="label" for="pat_token"
>GitHub fine-grained token</label
>
<input
id="pat_token"
class="input"
type="password"
inputmode="text"
autocomplete="off"
placeholder="Paste GitHub fine-grained PAT"
/>
<p class="hint">
Create a fine-grained PAT restricted to a single repo with
Contents read/write.
</p>
<button id="save_pat" class="btn btn-primary">
Save token
</button>
</div>
<!-- Repo Hook mode -->
<div id="hook_mode" hidden>
<p class="section-title">Repository</p>
<p class="muted">Link or create a repo to start syncing.</p>
<a
id="hook_URL"
href=""
target="_blank"
class="btn btn-primary"
>
Set up Hook
</a>
</div>
<!-- Commit mode -->
<div id="commit_mode" hidden>
<p class="section-title">Status</p>
<div class="repo" id="repo_url"></div>
<p id="import_status" class="muted" hidden></p>
<div class="divider"><span>LeetCode import</span></div>
<label class="label" for="lc_import_mode">Mode</label>
<select id="lc_import_mode" class="input">
<option value="latest_per_lang">
Latest accepted per language
</option>
<option value="all_submissions">
All accepted submissions (keep all)
</option>
</select>
<label class="label" for="lc_import_scope">Apply to</label>
<select id="lc_import_scope" class="input">
<option value="backfill_only">Backfill only</option>
<option value="backfill_and_new">
Backfill + new accepts
</option>
</select>
<p class="hint">
Changing this won’t restart a finished import; use “Retry
import”.
</p>
<div class="row" style="display: flex; gap: 8px">
<button
id="refresh_status"
class="btn btn-secondary"
type="button"
>
Refresh
</button>
<button
id="retry_import"
class="btn btn-secondary"
type="button"
>
Retry import
</button>
</div>
<div class="stats">
<div class="stat">
<div class="stat-label">Solved</div>
<div class="stat-value">
<span id="p_solved">0</span>
</div>
</div>
<div class="stat-row">
<span class="pill pill-easy"
>Easy: <span id="p_solved_easy">0</span></span
>
<span class="pill pill-medium"
>Medium: <span id="p_solved_medium">0</span></span
>
<span class="pill pill-hard"
>Hard: <span id="p_solved_hard">0</span></span
>
</div>
</div>
<button id="logout" class="btn btn-secondary" type="button">
Sign out
</button>
</div>
</main>
<!-- Generate Socials -->
<footer id="socials" class="footer">
<a
href="https://github.com/localhost433/LeetHub"
target="_blank"
rel="noreferrer"
>GitHub</a
>
<a id="welcome_URL" href="" target="_blank" rel="noreferrer"
>Setup</a
>
</footer>
</div>
<script
type="text/javascript"
src="scripts/constants.js"
></script>
<script type="text/javascript" src="scripts/common.js"></script>
<script type="text/javascript" src="popup.js"></script>
</body>
</html>