style fixes, remove release file types

AuthorKonata <konata@posteo.jp>
Date
Commit4ec25cdfd63d213f50c8651bc7f20b6d2585a196
Parenteae08b6
6 files changed, 48 insertions(+), 37 deletions(-)
Msrc/db/index.ts
@@ -133,7 +133,6 @@ interface ReleaseAssetTable {
133133 release_id: number;
134134 filename: string;
135135 size: number;
136- content_type: string;
137136 created_at: string;
138137 }
139138
Msrc/db/schema.sql
@@ -134,7 +134,6 @@ CREATE TABLE IF NOT EXISTS release_assets (
134134 release_id INTEGER NOT NULL REFERENCES releases(id) ON DELETE CASCADE,
135135 filename TEXT NOT NULL,
136136 size INTEGER NOT NULL,
137- content_type TEXT NOT NULL,
138137 created_at TEXT NOT NULL
139138 );
140139
Msrc/routes/releases.tsx
@@ -230,7 +230,6 @@ export const releasesRoutes = new Elysia()
230230 filename: string;
231231 data: Blob;
232232 size: number;
233- contentType: string;
234233 }[] = [];
235234 if (rawFiles) {
236235 const files = Array.isArray(rawFiles) ? rawFiles : [rawFiles];
@@ -240,7 +239,6 @@ export const releasesRoutes = new Elysia()
240239 filename: sanitizeFilename(file.name),
241240 data: file,
242241 size: file.size,
243- contentType: file.type || "application/octet-stream",
244242 });
245243 }
246244 }
@@ -292,7 +290,6 @@ export const releasesRoutes = new Elysia()
292290 release_id: id,
293291 filename: f.filename,
294292 size: f.size,
295- content_type: f.contentType,
296293 created_at: now,
297294 })
298295 .execute();
Msrc/styles/components.css
@@ -717,24 +717,22 @@
717717 flex-direction: column;
718718 gap: var(--space-1);
719719 }
720- .title-edit-details {
721- border: none;
722- align-self: flex-start;
720+ .title-edit-toggle {
721+ display: none;
723722 }
724- .title-with-edit:has(.title-edit-details[open]) .issue-detail-title {
723+ .title-edit-form-area {
725724 display: none;
726725 }
727- .title-with-edit:has(.title-edit-details[open]) > .title-edit-details {
726+ .title-edit-toggle:checked + .title-with-edit .issue-detail-title {
728727 display: none;
729728 }
730- .title-edit-details > summary {
731- list-style: none;
729+ .title-edit-open {
730+ align-self: flex-start;
732731 }
733-
734- .title-edit-form-area {
732+ .title-edit-toggle:checked + .title-with-edit .title-edit-open {
735733 display: none;
736734 }
737- .title-with-edit:has(.title-edit-details[open]) .title-edit-form-area {
735+ .title-edit-toggle:checked + .title-with-edit .title-edit-form-area {
738736 display: flex;
739737 flex: 1;
740738 min-width: 0;
@@ -1754,17 +1752,21 @@
17541752 flex-shrink: 0;
17551753 cursor: pointer;
17561754 display: block;
1755+ width: 2rem;
1756+ height: 2rem;
1757+ border-radius: 50%;
1758+ overflow: hidden;
17571759 line-height: 0;
17581760 }
17591761 .label-color-input {
17601762 display: block;
1761- width: 2rem;
1762- height: 2rem;
1763+ width: 150%;
1764+ height: 150%;
1765+ margin: -25%;
17631766 cursor: pointer;
17641767 appearance: none;
1765- box-sizing: border-box;
1766- clip-path: circle(50%);
17671768 border: none;
1769+ padding: 0;
17681770 }
17691771
17701772 /* Label filter (details/summary popup) */
Msrc/views/issues/IssueDetail.tsx
@@ -64,6 +64,13 @@ export function IssueDetail({
6464 <div class="issue-detail">
6565 <div class="issue-detail-header">
6666 <span class="issue-number">#{issue.number}</span>
67+ {canEditIssue && (
68+ <input
69+ type="checkbox"
70+ id="title-edit-toggle"
71+ class="title-edit-toggle"
72+ />
73+ )}
6774 <div class="title-with-edit">
6875 <h2 class="issue-detail-title">{issue.title}</h2>
6976 {canEditIssue && (
@@ -95,21 +102,21 @@ export function IssueDetail({
95102 >
96103 Save
97104 </button>
98- <button
99- type="button"
105+ <label
106+ for="title-edit-toggle"
100107 class="btn btn-sm"
101- onclick="this.closest('.title-with-edit').querySelector('details').removeAttribute('open')"
102108 >
103109 Cancel
104- </button>
110+ </label>
105111 </div>
106112 </form>
107113 </div>
108- <details class="title-edit-details">
109- <summary class="btn btn-xs">
110- Edit title
111- </summary>
112- </details>
114+ <label
115+ for="title-edit-toggle"
116+ class="btn btn-xs title-edit-open"
117+ >
118+ Edit title
119+ </label>
113120 </>
114121 )}
115122 </div>
Msrc/views/patches/PatchDetail.tsx
@@ -85,6 +85,13 @@ export function PatchDetail({
8585 <div class="issue-detail">
8686 <div class="issue-detail-header">
8787 <span class="issue-number">#{patch.number}</span>
88+ {canEdit && (
89+ <input
90+ type="checkbox"
91+ id="title-edit-toggle"
92+ class="title-edit-toggle"
93+ />
94+ )}
8895 <div class="title-with-edit">
8996 <h2 class="issue-detail-title">{patch.title}</h2>
9097 {canEdit && (
@@ -116,21 +123,21 @@ export function PatchDetail({
116123 >
117124 Save
118125 </button>
119- <button
120- type="button"
126+ <label
127+ for="title-edit-toggle"
121128 class="btn btn-sm"
122- onclick="this.closest('.title-with-edit').querySelector('details').removeAttribute('open')"
123129 >
124130 Cancel
125- </button>
131+ </label>
126132 </div>
127133 </form>
128134 </div>
129- <details class="title-edit-details">
130- <summary class="btn btn-xs">
131- Edit title
132- </summary>
133- </details>
135+ <label
136+ for="title-edit-toggle"
137+ class="btn btn-xs title-edit-open"
138+ >
139+ Edit title
140+ </label>
134141 </>
135142 )}
136143 </div>