style fixes, remove release file types
Msrc/db/index.ts
| @@ -133,7 +133,6 @@ interface ReleaseAssetTable { | |||
|---|---|---|---|
| 133 | 133 | release_id: number; | |
| 134 | 134 | filename: string; | |
| 135 | 135 | size: number; | |
| 136 | - | content_type: string; | |
| 137 | 136 | created_at: string; | |
| 138 | 137 | } | |
| 139 | 138 | ||
Msrc/db/schema.sql
| @@ -134,7 +134,6 @@ CREATE TABLE IF NOT EXISTS release_assets ( | |||
|---|---|---|---|
| 134 | 134 | release_id INTEGER NOT NULL REFERENCES releases(id) ON DELETE CASCADE, | |
| 135 | 135 | filename TEXT NOT NULL, | |
| 136 | 136 | size INTEGER NOT NULL, | |
| 137 | - | content_type TEXT NOT NULL, | |
| 138 | 137 | created_at TEXT NOT NULL | |
| 139 | 138 | ); | |
| 140 | 139 | ||
Msrc/routes/releases.tsx
| @@ -230,7 +230,6 @@ export const releasesRoutes = new Elysia() | |||
|---|---|---|---|
| 230 | 230 | filename: string; | |
| 231 | 231 | data: Blob; | |
| 232 | 232 | size: number; | |
| 233 | - | contentType: string; | |
| 234 | 233 | }[] = []; | |
| 235 | 234 | if (rawFiles) { | |
| 236 | 235 | const files = Array.isArray(rawFiles) ? rawFiles : [rawFiles]; | |
| @@ -240,7 +239,6 @@ export const releasesRoutes = new Elysia() | |||
|---|---|---|---|
| 240 | 239 | filename: sanitizeFilename(file.name), | |
| 241 | 240 | data: file, | |
| 242 | 241 | size: file.size, | |
| 243 | - | contentType: file.type || "application/octet-stream", | |
| 244 | 242 | }); | |
| 245 | 243 | } | |
| 246 | 244 | } | |
| @@ -292,7 +290,6 @@ export const releasesRoutes = new Elysia() | |||
|---|---|---|---|
| 292 | 290 | release_id: id, | |
| 293 | 291 | filename: f.filename, | |
| 294 | 292 | size: f.size, | |
| 295 | - | content_type: f.contentType, | |
| 296 | 293 | created_at: now, | |
| 297 | 294 | }) | |
| 298 | 295 | .execute(); | |
Msrc/styles/components.css
| @@ -717,24 +717,22 @@ | |||
|---|---|---|---|
| 717 | 717 | flex-direction: column; | |
| 718 | 718 | gap: var(--space-1); | |
| 719 | 719 | } | |
| 720 | - | .title-edit-details { | |
| 721 | - | border: none; | |
| 722 | - | align-self: flex-start; | |
| 720 | + | .title-edit-toggle { | |
| 721 | + | display: none; | |
| 723 | 722 | } | |
| 724 | - | .title-with-edit:has(.title-edit-details[open]) .issue-detail-title { | |
| 723 | + | .title-edit-form-area { | |
| 725 | 724 | display: none; | |
| 726 | 725 | } | |
| 727 | - | .title-with-edit:has(.title-edit-details[open]) > .title-edit-details { | |
| 726 | + | .title-edit-toggle:checked + .title-with-edit .issue-detail-title { | |
| 728 | 727 | display: none; | |
| 729 | 728 | } | |
| 730 | - | .title-edit-details > summary { | |
| 731 | - | list-style: none; | |
| 729 | + | .title-edit-open { | |
| 730 | + | align-self: flex-start; | |
| 732 | 731 | } | |
| 733 | - | ||
| 734 | - | .title-edit-form-area { | |
| 732 | + | .title-edit-toggle:checked + .title-with-edit .title-edit-open { | |
| 735 | 733 | display: none; | |
| 736 | 734 | } | |
| 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 { | |
| 738 | 736 | display: flex; | |
| 739 | 737 | flex: 1; | |
| 740 | 738 | min-width: 0; | |
| @@ -1754,17 +1752,21 @@ | |||
|---|---|---|---|
| 1754 | 1752 | flex-shrink: 0; | |
| 1755 | 1753 | cursor: pointer; | |
| 1756 | 1754 | display: block; | |
| 1755 | + | width: 2rem; | |
| 1756 | + | height: 2rem; | |
| 1757 | + | border-radius: 50%; | |
| 1758 | + | overflow: hidden; | |
| 1757 | 1759 | line-height: 0; | |
| 1758 | 1760 | } | |
| 1759 | 1761 | .label-color-input { | |
| 1760 | 1762 | display: block; | |
| 1761 | - | width: 2rem; | |
| 1762 | - | height: 2rem; | |
| 1763 | + | width: 150%; | |
| 1764 | + | height: 150%; | |
| 1765 | + | margin: -25%; | |
| 1763 | 1766 | cursor: pointer; | |
| 1764 | 1767 | appearance: none; | |
| 1765 | - | box-sizing: border-box; | |
| 1766 | - | clip-path: circle(50%); | |
| 1767 | 1768 | border: none; | |
| 1769 | + | padding: 0; | |
| 1768 | 1770 | } | |
| 1769 | 1771 | ||
| 1770 | 1772 | /* Label filter (details/summary popup) */ | |
Msrc/views/issues/IssueDetail.tsx
| @@ -64,6 +64,13 @@ export function IssueDetail({ | |||
|---|---|---|---|
| 64 | 64 | <div class="issue-detail"> | |
| 65 | 65 | <div class="issue-detail-header"> | |
| 66 | 66 | <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 | + | )} | |
| 67 | 74 | <div class="title-with-edit"> | |
| 68 | 75 | <h2 class="issue-detail-title">{issue.title}</h2> | |
| 69 | 76 | {canEditIssue && ( | |
| @@ -95,21 +102,21 @@ export function IssueDetail({ | |||
|---|---|---|---|
| 95 | 102 | > | |
| 96 | 103 | Save | |
| 97 | 104 | </button> | |
| 98 | - | <button | |
| 99 | - | type="button" | |
| 105 | + | <label | |
| 106 | + | for="title-edit-toggle" | |
| 100 | 107 | class="btn btn-sm" | |
| 101 | - | onclick="this.closest('.title-with-edit').querySelector('details').removeAttribute('open')" | |
| 102 | 108 | > | |
| 103 | 109 | Cancel | |
| 104 | - | </button> | |
| 110 | + | </label> | |
| 105 | 111 | </div> | |
| 106 | 112 | </form> | |
| 107 | 113 | </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> | |
| 113 | 120 | </> | |
| 114 | 121 | )} | |
| 115 | 122 | </div> | |
Msrc/views/patches/PatchDetail.tsx
| @@ -85,6 +85,13 @@ export function PatchDetail({ | |||
|---|---|---|---|
| 85 | 85 | <div class="issue-detail"> | |
| 86 | 86 | <div class="issue-detail-header"> | |
| 87 | 87 | <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 | + | )} | |
| 88 | 95 | <div class="title-with-edit"> | |
| 89 | 96 | <h2 class="issue-detail-title">{patch.title}</h2> | |
| 90 | 97 | {canEdit && ( | |
| @@ -116,21 +123,21 @@ export function PatchDetail({ | |||
|---|---|---|---|
| 116 | 123 | > | |
| 117 | 124 | Save | |
| 118 | 125 | </button> | |
| 119 | - | <button | |
| 120 | - | type="button" | |
| 126 | + | <label | |
| 127 | + | for="title-edit-toggle" | |
| 121 | 128 | class="btn btn-sm" | |
| 122 | - | onclick="this.closest('.title-with-edit').querySelector('details').removeAttribute('open')" | |
| 123 | 129 | > | |
| 124 | 130 | Cancel | |
| 125 | - | </button> | |
| 131 | + | </label> | |
| 126 | 132 | </div> | |
| 127 | 133 | </form> | |
| 128 | 134 | </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> | |
| 134 | 141 | </> | |
| 135 | 142 | )} | |
| 136 | 143 | </div> | |