-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsidebar.html
More file actions
217 lines (199 loc) · 9.85 KB
/
Copy pathsidebar.html
File metadata and controls
217 lines (199 loc) · 9.85 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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="sidebar.css" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0" />
</head>
<body>
<!-- COLLAPSED VIEW -->
<div id="collapsedView" class="collapsed-view">
<div id="blipTab" class="blip-tab tab-state-default">
<span class="tab-name">blip</span>
<span class="tab-control tab-show-default" data-action="startEdit">edit</span>
<span class="tab-control tab-show-editing">
<span class="editing-label" data-action="cancel">cancel</span>
<span class="label-save" data-action="save">
save
<span class="tab-dots-slow"></span>
</span>
</span>
<span class="tab-control tab-show-saving">
saving
<span class="tab-dots"></span>
</span>
<span class="tab-control tab-show-saved">saved!</span>
<span class="tab-control tab-show-error" data-action="startEdit">error - retry?</span>
<span class="tab-expand" data-action="expandSidebar" title="See your edits">
<span class="material-symbols-outlined">double_arrow</span>
</span>
</div>
</div>
<!-- EXPANDED VIEW -->
<div id="expandedView" class="expanded-view hidden">
<div class="header">
<div class="logo">
blip
<span class="url-part">cms.com</span>
</div>
<button class="close-btn" id="closeBtn" title="Close sidebar">
<svg
width="16"
height="16"
viewBox="0 0 16 16"
fill="none"
stroke="currentColor"
stroke-width="1.5"
stroke-linecap="round"
>
<line x1="4" y1="4" x2="12" y2="12" />
<line x1="12" y1="4" x2="4" y2="12" />
</svg>
</button>
</div>
<div class="content">
<!-- Default state: just the Edit button -->
<div id="defaultState">
<button class="btn btn-primary" id="editBtn">Edit</button>
</div>
<!-- Editing state: status + save/cancel + save-to option -->
<div id="editingState" class="hidden">
<div class="editing-controls">
<div class="status-badge editing">
<span class="status-dot"></span>
Editing
</div>
<!-- Local file indicator (shown on file:// pages) -->
<div id="localFileInfo" class="local-file-info hidden">
<span class="material-symbols-outlined local-file-icon">folder_open</span>
<span>
Saving to
<strong id="localFileName"></strong>
</span>
</div>
<button class="btn btn-save" id="saveBtn">Save</button>
<button class="btn btn-cancel" id="cancelBtn">Cancel</button>
</div>
<!-- Save-to-repo checkbox (shown when site is connected) -->
<div id="saveToRepo" class="save-to-repo hidden">
<label class="save-to-label">
<input type="checkbox" id="saveToCheckbox" checked />
<span>
Save to
<strong id="saveToSiteName"></strong>
</span>
</label>
</div>
<!-- CTA message (shown when site is NOT connected) -->
<div id="saveToPrompt" class="save-to-prompt hidden">
<p>
Want to save your edits directly to
<strong id="promptSiteName"></strong>
?
</p>
</div>
</div>
<!-- Saving state -->
<div id="savingState" class="hidden">
<div class="status-badge saving">
<span class="status-dot"></span>
Saving...
</div>
</div>
<!-- Local file: grant access prompt -->
<div id="localGrantState" class="hidden">
<div class="local-grant-prompt">
<p class="local-grant-title">Local file detected</p>
<p class="local-grant-file" id="localGrantFile"></p>
<p class="local-grant-hint">Grant folder access to edit and save this file directly.</p>
<button class="btn btn-primary" id="grantAccessBtn">Grant folder access</button>
</div>
</div>
<!-- Notifications -->
<div id="notifications"></div>
<!-- File list: sites and their files -->
<div id="fileList" class="file-list"></div>
<!-- Your edits: per-site diff containers -->
<div id="editsWrapper" class="edits-wrapper">
<p id="editsPlaceholder" class="edits-placeholder">Your edits will appear here as you save changes.</p>
</div>
<div id="contact-support">
Need help?
<a class="support" href="/cdn-cgi/l/email-protection#0d7e787d7d627f794d6f61647d6e607e236e6260">Contact support</a>
</div>
</div>
<!-- Config panel (Manage sites) -->
<div class="config-panel collapsed settings-panel" id="configPanel">
<div class="config-header">
<span class="config-label">Manage sites</span>
<button class="config-toggle" id="configToggle" title="Collapse/expand">
<svg
width="14"
height="14"
viewBox="0 0 14 14"
fill="none"
stroke="currentColor"
stroke-width="1.2"
stroke-linecap="round"
stroke-linejoin="round"
>
<polyline points="2,5 7,9 12,5" />
</svg>
</button>
</div>
<div class="config-body" id="configBody">
<p class="config-empty">No sites configured yet.</p>
<div id="savedSitesList"></div>
<button class="config-add-btn" id="addSiteBtn">+ Add a site</button>
<div id="addSiteForm" class="hidden">
<form class="config-form" id="siteForm">
<input id="fieldSiteUrl" type="text" placeholder="Site URL (e.g. remaphq.com)" required />
<input id="fieldRepo" type="text" placeholder="GitHub repo (owner/repo)" required />
<input id="fieldBranch" type="text" placeholder="Branch (default: main)" />
<input id="fieldToken" type="password" placeholder="Personal access token" required />
<p class="config-form-hint">
Need a token?
<a href="https://github.com/settings/tokens/new?scopes=repo&description=Blip" target="_blank">
Generate one on GitHub
</a>
with
<code>repo</code>
scope.
</p>
<div class="config-form-actions">
<button type="submit" class="config-btn-save">Save site</button>
<button type="button" class="config-btn-cancel" id="cancelAddSite">Cancel</button>
</div>
</form>
</div>
</div>
</div>
<div id="settingsPanel" class="settings-panel"></div>
<!-- Dev panel -->
<div class="dev-panel" id="devPanel">
<div class="dev-header">
<span class="dev-label">Dev</span>
<button class="dev-toggle" id="devToggle" title="Collapse/expand">
<svg
width="12"
height="12"
viewBox="0 0 12 12"
fill="none"
stroke="currentColor"
stroke-width="1.8"
stroke-linecap="round"
stroke-linejoin="round" >
<polyline points="2,4 6,8 10,4" />
</svg>
</button>
</div>
<div class="dev-body">
<div class="dev-log" id="devLog"></div>
</div>
</div>
</div>
<script src="config.js"></script>
<script src="sidebar.js"></script>
</body>
</html>