codetta 0.8.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. codetta/CHANGELOG.md +153 -0
  2. codetta/__init__.py +8 -0
  3. codetta/__main__.py +5 -0
  4. codetta/cli/__init__.py +0 -0
  5. codetta/cli/__main__.py +59 -0
  6. codetta/cli/run.py +129 -0
  7. codetta/core/__init__.py +0 -0
  8. codetta/core/acoustid.py +225 -0
  9. codetta/core/activity.py +161 -0
  10. codetta/core/artwork.py +238 -0
  11. codetta/core/auth.py +362 -0
  12. codetta/core/avatar.py +92 -0
  13. codetta/core/changelog.py +51 -0
  14. codetta/core/connections.py +159 -0
  15. codetta/core/describe.py +69 -0
  16. codetta/core/engine.py +470 -0
  17. codetta/core/health.py +520 -0
  18. codetta/core/inbox.py +195 -0
  19. codetta/core/index.py +672 -0
  20. codetta/core/library.py +177 -0
  21. codetta/core/musicbrainz.py +662 -0
  22. codetta/core/notifications.py +77 -0
  23. codetta/core/onboarding.py +39 -0
  24. codetta/core/organize.py +490 -0
  25. codetta/core/plugins.py +183 -0
  26. codetta/core/presets.py +452 -0
  27. codetta/core/providers.py +203 -0
  28. codetta/core/rawtags.py +135 -0
  29. codetta/core/slskd.py +650 -0
  30. codetta/core/tagmap.py +538 -0
  31. codetta/core/undo.py +186 -0
  32. codetta/core/updates.py +132 -0
  33. codetta/plugins/__init__.py +63 -0
  34. codetta/plugins/builtin/__init__.py +3 -0
  35. codetta/plugins/builtin/tidy.py +70 -0
  36. codetta/web/__init__.py +0 -0
  37. codetta/web/app.py +2909 -0
  38. codetta/web/security.py +170 -0
  39. codetta/web/static/app.css +2684 -0
  40. codetta/web/static/app.js +5694 -0
  41. codetta/web/static/apple-touch-icon.png +0 -0
  42. codetta/web/static/fonts/LICENSE-Inter.txt +93 -0
  43. codetta/web/static/fonts/LICENSE-SchibstedGrotesk.txt +93 -0
  44. codetta/web/static/fonts/inter-cyrillic.woff2 +0 -0
  45. codetta/web/static/fonts/schibsted-grotesk.woff2 +0 -0
  46. codetta/web/static/icon.svg +1 -0
  47. codetta/web/static/icons/codetta-dark.png +0 -0
  48. codetta/web/static/icons/codetta-dark.svg +1 -0
  49. codetta/web/static/icons/codetta-dark.webp +0 -0
  50. codetta/web/static/icons/codetta-light.png +0 -0
  51. codetta/web/static/icons/codetta-light.svg +1 -0
  52. codetta/web/static/icons/codetta-light.webp +0 -0
  53. codetta/web/static/icons/codetta.png +0 -0
  54. codetta/web/static/icons/codetta.svg +1 -0
  55. codetta/web/static/icons/codetta.webp +0 -0
  56. codetta/web/static/index.html +473 -0
  57. codetta/web/static/theme.js +12 -0
  58. codetta-0.8.1.dist-info/METADATA +282 -0
  59. codetta-0.8.1.dist-info/RECORD +63 -0
  60. codetta-0.8.1.dist-info/WHEEL +5 -0
  61. codetta-0.8.1.dist-info/entry_points.txt +2 -0
  62. codetta-0.8.1.dist-info/licenses/LICENSE +661 -0
  63. codetta-0.8.1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,473 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
6
+ <meta name="color-scheme" content="light dark">
7
+ <meta name="theme-color" content="#f7f8f8" media="(prefers-color-scheme: light)">
8
+ <meta name="theme-color" content="#131418" media="(prefers-color-scheme: dark)">
9
+ <meta name="apple-mobile-web-app-capable" content="yes">
10
+ <meta name="apple-mobile-web-app-title" content="Codetta">
11
+ <title>Codetta</title>
12
+ <link rel="icon" href="/static/icon.svg?v=3" type="image/svg+xml"> <!-- bump ?v= when the icon changes: browsers cache favicons hard -->
13
+ <link rel="apple-touch-icon" href="/static/apple-touch-icon.png?v=3">
14
+ <link rel="preload" href="/static/fonts/schibsted-grotesk.woff2" as="font" type="font/woff2" crossorigin>
15
+ <link rel="stylesheet" href="/static/app.css?v=68">
16
+ <script src="/static/theme.js?v=1"></script>
17
+ </head>
18
+ <body>
19
+ <!-- Sign in / first-run setup. Shown over the app; the app keeps its state underneath. -->
20
+ <div class="auth" id="auth" hidden>
21
+ <form class="auth-card" id="auth-form" method="post" action="#">
22
+ <div class="auth-logo" aria-hidden="true"><span class="wordmark">codetta<span class="spot-dot"></span></span></div>
23
+ <h1 id="auth-title">Sign in</h1>
24
+ <p class="auth-sub" id="auth-sub"></p>
25
+ <div class="error-box" id="auth-error" role="alert" hidden></div>
26
+ <label class="field">
27
+ <span class="field-label">Username</span>
28
+ <input id="auth-user" name="username" type="text" dir="auto" autocomplete="username" autocapitalize="off" autocorrect="off" spellcheck="false" required>
29
+ </label>
30
+ <label class="field">
31
+ <span class="field-label">Password</span>
32
+ <input id="auth-pass" name="password" type="password" autocomplete="current-password" required>
33
+ </label>
34
+ <label class="field" id="auth-confirm-wrap" hidden>
35
+ <span class="field-label">Repeat password</span>
36
+ <input id="auth-confirm" name="confirm" type="password" autocomplete="new-password">
37
+ </label>
38
+ <button class="btn primary auth-submit" id="auth-submit" type="submit">Sign in</button>
39
+ <p class="auth-foot" id="auth-foot"></p>
40
+ </form>
41
+ <footer class="credit auth-credit">
42
+ <a class="credit-link" href="https://github.com/gavndev/codetta" target="_blank" rel="noopener noreferrer" title="Codetta on GitHub" aria-label="Codetta on GitHub"><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8z"/></svg></a>
43
+ <span>Made with <span class="credit-heart" role="img" aria-label="love">♥︎</span></span>
44
+ <span class="credit-version" data-version></span>
45
+ <button class="credit-news" type="button" data-news>What's new</button>
46
+ </footer>
47
+ </div>
48
+
49
+ <!-- First run (and once after upgrading): offline, or opt in to online features. -->
50
+ <div class="auth welcome" id="welcome" hidden>
51
+ <form class="auth-card welcome-card" id="welcome-form" method="post" action="#">
52
+ <div class="auth-logo" aria-hidden="true"><span class="wordmark">codetta<span class="spot-dot"></span></span></div>
53
+ <h1 id="welcome-title">Offline, unless you say so</h1>
54
+ <p class="auth-sub">Codetta runs entirely on your server. Your music and its tags never leave it. If you like, it can also look things up online for you.</p>
55
+ <fieldset class="choices" aria-labelledby="welcome-title">
56
+ <label class="choice">
57
+ <input type="radio" name="welcome-mode" value="offline">
58
+ <span class="choice-body">
59
+ <span class="choice-title">Stay offline</span>
60
+ <span class="choice-sub">Edit, batch-tag and use presets. Nothing goes online, ever.</span>
61
+ </span>
62
+ </label>
63
+ <label class="choice">
64
+ <input type="radio" name="welcome-mode" value="online">
65
+ <span class="choice-body">
66
+ <span class="choice-title">Turn on online features</span>
67
+ <span class="choice-sub">Match albums on MusicBrainz for official tags and cover art, recognise untagged tracks by sound, find lyrics, and hear about updates.</span>
68
+ </span>
69
+ </label>
70
+ </fieldset>
71
+ <div class="welcome-list" id="welcome-list" hidden></div>
72
+ <div class="error-box" id="welcome-error" role="alert" hidden></div>
73
+ <button class="btn primary auth-submit" id="welcome-go" type="submit" disabled>Continue</button>
74
+ <p class="auth-foot">It's your choice, and you can change it any time in Account → Connections.</p>
75
+ </form>
76
+ <!-- Later setup steps (folder names, downloads inbox), drawn by app.js -->
77
+ <form class="auth-card welcome-card" id="setup-step" method="post" action="#" hidden></form>
78
+ </div>
79
+
80
+ <div class="app" id="app" hidden>
81
+ <header class="topbar">
82
+ <a class="brand" href="#/" aria-label="Codetta — library home"><span class="wordmark" aria-hidden="true">codetta<span class="spot-dot"></span></span><span class="brand-icon" aria-hidden="true">c</span></a>
83
+ <nav class="crumbs" id="crumbs" aria-label="Folder path"></nav>
84
+ <div class="topbar-actions">
85
+ <div class="search-wrap" id="search-wrap">
86
+ <label class="search">
87
+ <svg viewBox="0 0 20 20" aria-hidden="true"><circle cx="8.5" cy="8.5" r="5.5"/><path d="m13 13 4 4"/></svg>
88
+ <button class="bang-chip" id="bang-chip" type="button" hidden aria-label="Soulseek search is on. Tap to turn it off" title="Searching Soulseek. Tap (or Backspace) to search your library again"></button>
89
+ <input id="filter" type="search" maxlength="300" dir="auto" placeholder="Search anything" autocomplete="off" spellcheck="false" aria-label="Search anything: type to filter this folder, Enter to search your library, or start with !mb or !slskd">
90
+ </label>
91
+ <button class="search-cancel" id="search-cancel" type="button" tabindex="-1">Cancel</button>
92
+ <div class="bang-suggest" id="bang-suggest" role="listbox" aria-label="Search somewhere else" hidden></div>
93
+ </div>
94
+ <button class="icon-btn" id="inbox-btn" type="button" aria-label="Inbox: new music to file" title="Inbox: new music to file">
95
+ <svg viewBox="0 0 20 20" aria-hidden="true"><path d="M3.5 11.5 5.6 5a1.5 1.5 0 0 1 1.4-1h6a1.5 1.5 0 0 1 1.4 1l2.1 6.5v3A1.5 1.5 0 0 1 15 16H5a1.5 1.5 0 0 1-1.5-1.5z"/><path d="M3.5 11.5h3.5l1 2h4l1-2h3.5"/></svg>
96
+ <span class="badge-count" id="inbox-count" hidden></span>
97
+ </button>
98
+ <button class="icon-btn" id="tagfilter-btn" type="button" aria-label="Filter by tag" title="Filter by tag">
99
+ <svg viewBox="0 0 20 20" aria-hidden="true"><path d="M3 4.5h14l-5.5 6.5v5l-3-1.5V11z"/></svg>
100
+ </button>
101
+ <button class="icon-btn" id="manage-btn" type="button" aria-label="Manage presets" title="Manage presets">
102
+ <svg viewBox="0 0 20 20" aria-hidden="true"><path d="M4 6h12M4 10h12M4 14h12"/><circle cx="7" cy="6" r="1.6"/><circle cx="13" cy="10" r="1.6"/><circle cx="9" cy="14" r="1.6"/></svg>
103
+ </button>
104
+ <button class="icon-btn" id="theme-btn" type="button" aria-label="Theme"></button>
105
+ <button class="icon-btn" id="notif-btn" type="button" aria-label="Notifications" title="Notifications" aria-expanded="false" aria-controls="notif-panel">
106
+ <svg viewBox="0 0 20 20" aria-hidden="true"><path d="M5.5 13.5V9a4.5 4.5 0 0 1 9 0v4.5l1.5 2h-12z"/><path d="M8.5 17.5a1.6 1.6 0 0 0 3 0"/></svg>
107
+ <span class="badge-count" id="notif-count" hidden></span>
108
+ </button>
109
+ <button class="icon-btn" id="account-btn" type="button" aria-label="Account" title="Account" hidden>
110
+ <svg viewBox="0 0 20 20" aria-hidden="true"><circle cx="10" cy="7" r="3.2"/><path d="M3.8 16.5a6.2 6.2 0 0 1 12.4 0"/></svg>
111
+ </button>
112
+ </div>
113
+ <div class="net-bar" id="net-bar" hidden role="progressbar" aria-label="Loading"></div>
114
+ </header>
115
+
116
+ <div class="layout">
117
+ <main class="browser" id="browser" tabindex="-1">
118
+ <div class="banner" id="banner" hidden></div>
119
+ <section class="folder-head" id="folder-head"></section>
120
+ <div class="health-slot" id="health-slot" hidden></div>
121
+ <div class="filter-chips" id="filter-chips" hidden></div>
122
+ <section id="folders" class="folders" aria-label="Folders"></section>
123
+ <section id="tracks" class="tracks" aria-label="Tracks"></section>
124
+ <footer class="credit">
125
+ <a class="credit-link" href="https://github.com/gavndev/codetta" target="_blank" rel="noopener noreferrer" title="Codetta on GitHub" aria-label="Codetta on GitHub"><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8z"/></svg></a>
126
+ <span>Made with <span class="credit-heart" role="img" aria-label="love">♥︎</span></span>
127
+ <span class="credit-version" data-version></span>
128
+ <button class="credit-news" type="button" data-news>What's new</button>
129
+ </footer>
130
+ </main>
131
+
132
+ <aside class="editor" id="editor" aria-label="Tag editor" hidden>
133
+ <div class="editor-head">
134
+ <button class="icon-btn editor-close" id="editor-close" type="button" aria-label="Close editor">
135
+ <svg viewBox="0 0 20 20" aria-hidden="true"><path d="m5 5 10 10M15 5 5 15"/></svg>
136
+ </button>
137
+ <div class="editor-title">
138
+ <h2 id="editor-title">Edit tags</h2>
139
+ <p id="editor-sub"></p>
140
+ </div>
141
+ </div>
142
+ <div class="editor-toolbar" id="editor-toolbar">
143
+ <div class="toolbar-left" id="toolbar-left"></div>
144
+ <div class="toolbar-right">
145
+ <div class="changes-pop" id="changes-pop" role="tooltip"></div>
146
+ <button class="btn" id="editor-save-folder" type="button" disabled title="Save the changed fields to every track in this folder">Save to folder</button>
147
+ <button class="btn primary" id="editor-save" type="button" disabled title="Save to this track (Ctrl/⌘ + S)">Save</button>
148
+ </div>
149
+ </div>
150
+ <form class="editor-body" id="editor-form" autocomplete="off"></form>
151
+ <section class="activity" id="activity" aria-label="Activity log">
152
+ <button class="activity-head" id="activity-toggle" type="button" aria-expanded="false" aria-controls="activity-list">
153
+ <span class="activity-dot" id="activity-dot" aria-hidden="true"></span>
154
+ <span class="activity-latest" id="activity-latest">Activity</span>
155
+ <span class="activity-time" id="activity-latest-time"></span>
156
+ <svg class="activity-chevron" viewBox="0 0 20 20" aria-hidden="true"><path d="m6 12 4-4 4 4"/></svg>
157
+ </button>
158
+ <ol class="activity-list" id="activity-list" aria-live="polite" hidden></ol>
159
+ </section>
160
+ </aside>
161
+ </div>
162
+
163
+ <div class="selection-bar" id="selection-bar" hidden>
164
+ <span id="selection-count"></span>
165
+ <div class="selection-actions">
166
+ <button class="btn" id="sel-clear" type="button">Clear</button>
167
+ <button class="btn" id="sel-preset" type="button">Preset…</button>
168
+ <button class="btn" id="sel-replace" type="button" title="Find & replace in these tracks' tags">Replace…</button>
169
+ <button class="btn" id="sel-actions" type="button" title="Actions: clean up titles, Title Case, plugins…">Actions…</button>
170
+ <button class="btn primary" id="sel-edit" type="button">Edit</button>
171
+ </div>
172
+ </div>
173
+ </div>
174
+
175
+ <!-- Apply a preset -->
176
+ <dialog class="sheet" id="apply-dialog" aria-labelledby="apply-title">
177
+ <div class="sheet-head">
178
+ <h2 id="apply-title">Apply preset</h2>
179
+ <button class="icon-btn" type="button" data-close aria-label="Close">
180
+ <svg viewBox="0 0 20 20" aria-hidden="true"><path d="m5 5 10 10M15 5 5 15"/></svg>
181
+ </button>
182
+ </div>
183
+ <div class="sheet-body">
184
+ <label class="field">
185
+ <span class="field-label">Preset</span>
186
+ <select id="apply-preset"></select>
187
+ </label>
188
+ <p class="hint" id="apply-desc"></p>
189
+
190
+ <fieldset class="field">
191
+ <legend class="field-label">Apply to</legend>
192
+ <div class="segmented" id="apply-target">
193
+ <label><input type="radio" name="target" value="selection"><span id="apply-target-sel">Selected tracks</span></label>
194
+ <label><input type="radio" name="target" value="folder"><span id="apply-target-all">This folder</span></label>
195
+ </div>
196
+ <label class="check" id="apply-recursive-wrap"><input type="checkbox" id="apply-recursive"> Include subfolders (each numbered separately)</label>
197
+ </fieldset>
198
+
199
+ <fieldset class="field">
200
+ <legend class="field-label">Mode</legend>
201
+ <div class="segmented" id="apply-mode">
202
+ <label><input type="radio" name="mode" value="fill" checked><span>Fill empty tags</span></label>
203
+ <label><input type="radio" name="mode" value="overwrite"><span>Overwrite</span></label>
204
+ </div>
205
+ </fieldset>
206
+
207
+ <div class="preview" id="apply-preview" aria-live="polite"></div>
208
+ </div>
209
+ <div class="sheet-foot">
210
+ <button class="btn" type="button" data-close>Cancel</button>
211
+ <button class="btn primary" type="button" id="apply-go" disabled>Apply</button>
212
+ </div>
213
+ </dialog>
214
+
215
+ <!-- Filter by tag -->
216
+ <dialog class="sheet small" id="filter-dialog" aria-labelledby="filter-title">
217
+ <div class="sheet-head">
218
+ <h2 id="filter-title">Filter by tag</h2>
219
+ <button class="icon-btn" type="button" data-close aria-label="Close">
220
+ <svg viewBox="0 0 20 20" aria-hidden="true"><path d="m5 5 10 10M15 5 5 15"/></svg>
221
+ </button>
222
+ </div>
223
+ <div class="sheet-body">
224
+ <p class="hint">Show only tracks in this folder with a tag value, or search your whole library for it.</p>
225
+ <label class="field">
226
+ <span class="field-label">Tag</span>
227
+ <select id="filter-key"></select>
228
+ </label>
229
+ <label class="field">
230
+ <span class="field-label">Value</span>
231
+ <select id="filter-value"></select>
232
+ </label>
233
+ </div>
234
+ <div class="sheet-foot">
235
+ <button class="btn" type="button" data-close>Cancel</button>
236
+ <button class="btn" type="button" id="filter-search">Search library</button>
237
+ <button class="btn primary" type="button" id="filter-add">Add filter</button>
238
+ </div>
239
+ </dialog>
240
+
241
+ <!-- In-page confirmation (replaces the browser's confirm() pop-up) -->
242
+ <dialog class="sheet small confirm" id="confirm-dialog" aria-labelledby="confirm-title" aria-describedby="confirm-body">
243
+ <div class="sheet-head"><h2 id="confirm-title"></h2></div>
244
+ <div class="sheet-body" id="confirm-body"></div>
245
+ <div class="sheet-foot">
246
+ <span class="spacer"></span>
247
+ <button class="btn" type="button" id="confirm-cancel">Cancel</button>
248
+ <button class="btn primary" type="button" id="confirm-ok">OK</button>
249
+ </div>
250
+ </dialog>
251
+
252
+ <!-- Account -->
253
+ <dialog class="cc" id="account-dialog" aria-labelledby="account-title">
254
+ <div class="cc-panel">
255
+ <h2 id="account-title" class="visually-hidden">Account</h2>
256
+ <section class="cc-tile profile" aria-label="Profile">
257
+ <button class="avatar-lg" type="button" id="profile-avatar" aria-label="Change profile picture" title="Change profile picture"></button>
258
+ <div class="profile-info">
259
+ <div class="profile-sub">Signed in as</div>
260
+ <div class="profile-name" id="account-name"></div>
261
+ <div class="profile-actions">
262
+ <button class="btn small" type="button" id="avatar-change">Change photo</button>
263
+ <button class="btn small danger" type="button" id="avatar-remove" hidden>Remove</button>
264
+ </div>
265
+ </div>
266
+ <input type="file" id="avatar-file" accept="image/*,.heic,.heif" hidden>
267
+ </section>
268
+
269
+ <div class="cc-grid" role="group" aria-label="Quick settings">
270
+ <button class="cc-toggle" type="button" id="cc-theme"><span class="cc-ico" id="cc-theme-icon"></span><span class="cc-label">Theme</span><span class="cc-state" id="cc-theme-state"></span></button>
271
+ <label class="cc-toggle"><input type="checkbox" role="switch" id="health-toggle" checked><span class="cc-ico" id="cc-health-icon"></span><span class="cc-label">Library health</span><span class="cc-state cc-onoff"></span></label>
272
+ <label class="cc-toggle"><input type="checkbox" role="switch" id="advanced-toggle"><span class="cc-ico" id="cc-advanced-icon"></span><span class="cc-label">Advanced</span><span class="cc-state cc-onoff"></span></label>
273
+ </div>
274
+
275
+ <section class="cc-tile about" aria-labelledby="about-title">
276
+ <div class="about-head">
277
+ <h3 id="about-title" class="field-label">Codetta</h3>
278
+ <span class="badge" id="about-version"></span>
279
+ <button class="btn small" type="button" id="check-updates">Check for updates</button>
280
+ <button class="btn small" type="button" data-news>What's new</button>
281
+ </div>
282
+ <p class="about-status" id="update-status" aria-live="polite"></p>
283
+ <div class="update-box" id="update-box" hidden></div>
284
+ </section>
285
+
286
+ <section class="cc-tile connections" aria-labelledby="conn-title">
287
+ <button class="conn-toggle" id="conn-toggle" type="button" aria-expanded="false" aria-controls="conn-body">
288
+ <span class="switch-text">
289
+ <span id="conn-title" class="switch-title">Connections</span>
290
+ <span class="switch-sub" id="conn-summary"></span>
291
+ </span>
292
+ <svg viewBox="0 0 20 20" aria-hidden="true"><path d="m8 5 5 5-5 5"/></svg>
293
+ </button>
294
+ <div id="conn-body" hidden>
295
+ <p class="hint conn-intro" id="conn-intro"></p>
296
+ <div id="conn-list"></div>
297
+ <div id="slskd-box"></div>
298
+ </div>
299
+ </section>
300
+
301
+ <section class="cc-tile plugins" id="plugins-tile">
302
+ <button class="conn-toggle" id="plugins-toggle" type="button" aria-expanded="false" aria-controls="plugins-body">
303
+ <span class="switch-text">
304
+ <span class="switch-title">Plugins</span>
305
+ <span class="switch-sub" id="plugins-summary">Add actions to Codetta</span>
306
+ </span>
307
+ <svg viewBox="0 0 20 20" aria-hidden="true"><path d="m8 5 5 5-5 5"/></svg>
308
+ </button>
309
+ <div id="plugins-body" hidden></div>
310
+ </section>
311
+
312
+ <section class="cc-tile password" id="pw-tile">
313
+ <button class="conn-toggle" id="pw-toggle" type="button" aria-expanded="false" aria-controls="password-form">
314
+ <span class="switch-text">
315
+ <span class="switch-title">Password</span>
316
+ <span class="switch-sub">Change it (signs out your other devices)</span>
317
+ </span>
318
+ <svg viewBox="0 0 20 20" aria-hidden="true"><path d="m8 5 5 5-5 5"/></svg>
319
+ </button>
320
+ <form id="password-form" class="password-form" hidden>
321
+ <input type="text" name="username" id="pw-username" autocomplete="username" hidden>
322
+ <div class="error-box" id="pw-error" role="alert" hidden></div>
323
+ <label class="field"><span class="field-label">Current password</span>
324
+ <input id="pw-current" type="password" autocomplete="current-password" required></label>
325
+ <label class="field"><span class="field-label">New password</span>
326
+ <input id="pw-new" type="password" autocomplete="new-password" minlength="8" required></label>
327
+ <label class="field"><span class="field-label">Repeat new password</span>
328
+ <input id="pw-confirm" type="password" autocomplete="new-password" minlength="8" required></label>
329
+ <button class="btn" type="submit" id="pw-save">Change password</button>
330
+ </form>
331
+ <p class="hint" id="pw-env-note" hidden>The password is set by the <code>CODETTA_PASSWORD</code> environment variable, so it can only be changed there.</p>
332
+ </section>
333
+
334
+ <div class="cc-foot">
335
+ <button class="btn danger" type="button" id="sign-out">Sign out</button>
336
+ <span class="spacer"></span>
337
+ <button class="btn primary" type="button" data-close>Done</button>
338
+ </div>
339
+ </div>
340
+ </dialog>
341
+
342
+ <!-- Match an album on MusicBrainz (filled in by app.js) -->
343
+ <dialog class="sheet wide" id="mb-dialog" aria-labelledby="mb-title">
344
+ <div class="sheet-head">
345
+ <h2 id="mb-title">Match on MusicBrainz</h2>
346
+ <button class="icon-btn" type="button" data-close aria-label="Close">
347
+ <svg viewBox="0 0 20 20" aria-hidden="true"><path d="m5 5 10 10M15 5 5 15"/></svg>
348
+ </button>
349
+ </div>
350
+ <div class="sheet-body" id="mb-body"></div>
351
+ <div class="sheet-foot" id="mb-foot"></div>
352
+ </dialog>
353
+
354
+ <!-- Organize: rename and move files from a pattern (filled in by app.js) -->
355
+ <dialog class="sheet wide" id="organize-dialog" aria-labelledby="organize-title">
356
+ <div class="sheet-head">
357
+ <h2 id="organize-title">Organize files</h2>
358
+ <button class="icon-btn" type="button" data-close aria-label="Close">
359
+ <svg viewBox="0 0 20 20" aria-hidden="true"><path d="m5 5 10 10M15 5 5 15"/></svg>
360
+ </button>
361
+ </div>
362
+ <div class="sheet-body" id="organize-body"></div>
363
+ <div class="sheet-foot" id="organize-foot"></div>
364
+ </dialog>
365
+
366
+ <!-- Find & replace in tags (drawn by app.js) -->
367
+ <dialog class="sheet wide" id="replace-dialog" aria-labelledby="replace-title">
368
+ <div class="sheet-head">
369
+ <h2 id="replace-title">Find &amp; replace</h2>
370
+ <button class="icon-btn" type="button" data-close aria-label="Close">
371
+ <svg viewBox="0 0 20 20" aria-hidden="true"><path d="m5 5 10 10M15 5 5 15"/></svg>
372
+ </button>
373
+ </div>
374
+ <div class="sheet-body" id="replace-body"></div>
375
+ <div class="sheet-foot" id="replace-foot"></div>
376
+ </dialog>
377
+
378
+ <!-- Actions: built-in tidy-ups and plugins (drawn by app.js) -->
379
+ <dialog class="sheet wide" id="actions-dialog" aria-labelledby="actions-title">
380
+ <div class="sheet-head">
381
+ <h2 id="actions-title">Actions</h2>
382
+ <button class="icon-btn" type="button" data-close aria-label="Close">
383
+ <svg viewBox="0 0 20 20" aria-hidden="true"><path d="m5 5 10 10M15 5 5 15"/></svg>
384
+ </button>
385
+ </div>
386
+ <div class="sheet-body" id="actions-body"></div>
387
+ <div class="sheet-foot" id="actions-foot"></div>
388
+ </dialog>
389
+
390
+ <!-- Library health (drawn by app.js) -->
391
+ <dialog class="sheet wide" id="health-dialog" aria-labelledby="health-title">
392
+ <div class="sheet-head">
393
+ <h2 id="health-title">Library health</h2>
394
+ <button class="icon-btn" type="button" data-close aria-label="Close">
395
+ <svg viewBox="0 0 20 20" aria-hidden="true"><path d="m5 5 10 10M15 5 5 15"/></svg>
396
+ </button>
397
+ </div>
398
+ <div class="sheet-body" id="health-body"></div>
399
+ <div class="sheet-foot" id="health-foot"></div>
400
+ </dialog>
401
+
402
+ <!-- Soulseek requests through slskd (drawn by app.js) -->
403
+ <dialog class="sheet wide" id="soulseek-dialog" aria-labelledby="soulseek-title">
404
+ <div class="sheet-head">
405
+ <h2 id="soulseek-title">Soulseek</h2>
406
+ <button class="icon-btn" type="button" data-close aria-label="Close">
407
+ <svg viewBox="0 0 20 20" aria-hidden="true"><path d="m5 5 10 10M15 5 5 15"/></svg>
408
+ </button>
409
+ </div>
410
+ <div class="sheet-body" id="soulseek-body"></div>
411
+ <div class="sheet-foot" id="soulseek-foot"></div>
412
+ </dialog>
413
+
414
+ <!-- Inbox: new music waiting to be filed (drawn by app.js) -->
415
+ <dialog class="sheet wide" id="inbox-dialog" aria-labelledby="inbox-title">
416
+ <div class="sheet-head">
417
+ <h2 id="inbox-title">Inbox</h2>
418
+ <button class="icon-btn" type="button" data-close aria-label="Close">
419
+ <svg viewBox="0 0 20 20" aria-hidden="true"><path d="m5 5 10 10M15 5 5 15"/></svg>
420
+ </button>
421
+ </div>
422
+ <div class="sheet-body" id="inbox-body"></div>
423
+ <div class="sheet-foot" id="inbox-foot"></div>
424
+ </dialog>
425
+
426
+ <!-- What's new (the changelog) -->
427
+ <dialog class="sheet" id="news-dialog" aria-labelledby="news-title">
428
+ <div class="sheet-head">
429
+ <h2 id="news-title">What's new</h2>
430
+ <button class="icon-btn" type="button" data-close aria-label="Close">
431
+ <svg viewBox="0 0 20 20" aria-hidden="true"><path d="m5 5 10 10M15 5 5 15"/></svg>
432
+ </button>
433
+ </div>
434
+ <div class="sheet-body" id="news-body"></div>
435
+ <div class="sheet-foot"><span class="spacer"></span><button class="btn primary" type="button" data-close>Got it</button></div>
436
+ </dialog>
437
+
438
+ <!-- Notifications: the bell's panel, and pop-ups that grow out of the bell -->
439
+ <div class="notif-panel" id="notif-panel" role="dialog" aria-label="Notifications" hidden></div>
440
+ <div class="notif-pops" id="notif-pops" aria-live="polite"></div>
441
+
442
+ <!-- Now playing: a pill that grows from the bottom centre while something plays (drawn by app.js) -->
443
+ <div class="now-playing" id="now-playing" hidden></div>
444
+ <!-- The full player: queue and lyrics (drawn by app.js) -->
445
+ <dialog class="sheet player-sheet" id="player-dialog" aria-label="Now playing">
446
+ <div class="sheet-head">
447
+ <h2 class="visually-hidden">Now playing</h2>
448
+ <span class="ps-grabber" aria-hidden="true"></span>
449
+ <button class="icon-btn" type="button" data-close aria-label="Close">
450
+ <svg viewBox="0 0 20 20" aria-hidden="true"><path d="m5 5 10 10M15 5 5 15"/></svg>
451
+ </button>
452
+ </div>
453
+ <div class="sheet-body" id="player-body"></div>
454
+ </dialog>
455
+
456
+ <!-- Manage presets -->
457
+ <dialog class="sheet" id="manage-dialog" aria-labelledby="manage-title">
458
+ <div class="sheet-head">
459
+ <h2 id="manage-title">Presets</h2>
460
+ <button class="icon-btn" type="button" data-close aria-label="Close">
461
+ <svg viewBox="0 0 20 20" aria-hidden="true"><path d="m5 5 10 10M15 5 5 15"/></svg>
462
+ </button>
463
+ </div>
464
+ <div class="sheet-body" id="manage-body"></div>
465
+ <div class="sheet-foot" id="manage-foot"></div>
466
+ </dialog>
467
+
468
+ <datalist id="tag-keys"></datalist>
469
+ <div class="toasts" id="toasts" aria-live="polite"></div>
470
+
471
+ <script src="/static/app.js?v=67" type="module"></script>
472
+ </body>
473
+ </html>
@@ -0,0 +1,12 @@
1
+ // Runs before first paint (loaded in <head>), so the saved theme never flashes.
2
+ // Apply the saved theme before first paint, so there's no flash.
3
+ try {
4
+ // Carry over settings saved under Codetta's old name ("coda-…").
5
+ for (const k of ["theme", "clipboard", "activity-open"]) {
6
+ const old = localStorage.getItem("coda-" + k);
7
+ if (old !== null && localStorage.getItem("codetta-" + k) === null) localStorage.setItem("codetta-" + k, old);
8
+ localStorage.removeItem("coda-" + k);
9
+ }
10
+ const t = localStorage.getItem("codetta-theme");
11
+ if (t === "light" || t === "dark") document.documentElement.dataset.theme = t;
12
+ } catch {}