|
50 | 50 | color: var(--on-surface-quiet); |
51 | 51 | border: 1px solid var(--outline); |
52 | 52 | } |
53 | | - .badge.status .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--on-surface-muted); } |
54 | | - .badge.status[data-status="1"] .dot { background: var(--status-ongoing); } |
55 | | - .badge.status[data-status="2"] .dot { background: var(--status-completed); } |
56 | | - .badge.status[data-status="4"] .dot { background: var(--status-completed); } |
57 | | - .badge.status[data-status="6"] .dot { background: var(--status-hiatus); } |
58 | | - .badge.status[data-status="5"] .dot { background: var(--error); } |
| 53 | + .badge.status .icon { |
| 54 | + width: 13px; height: 13px; |
| 55 | + flex: 0 0 auto; |
| 56 | + color: var(--on-surface-muted); |
| 57 | + } |
| 58 | + .badge.status .icon svg { display: block; width: 100%; height: 100%; } |
| 59 | + .badge.status[data-status="1"] .icon { color: var(--status-ongoing); } |
| 60 | + .badge.status[data-status="2"] .icon { color: var(--status-completed); } |
| 61 | + .badge.status[data-status="4"] .icon { color: var(--status-completed); } |
| 62 | + .badge.status[data-status="6"] .icon { color: var(--status-hiatus); } |
| 63 | + .badge.status[data-status="5"] .icon { color: var(--error); } |
59 | 64 |
|
60 | 65 | .actions { margin-top: 20px; } |
61 | 66 | </style> |
@@ -106,6 +111,25 @@ <h1 class="title" id="title">Opening in Taison…</h1> |
106 | 111 | "6": "On hiatus", |
107 | 112 | }; |
108 | 113 |
|
| 114 | + // Match the icons used in the Taison app (MangaInfoHeader.kt / DuplicateMangaDialog.kt): |
| 115 | + // Material Outlined Schedule / DoneAll / AttachMoney / Done / Close / Pause. |
| 116 | + const STATUS_ICON_PATHS = { |
| 117 | + "1": "M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z", |
| 118 | + "2": "M18 7l-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41L6 19l1.41-1.41L1.83 12 .41 13.41z", |
| 119 | + "3": "M11.8 10.9c-2.27-.59-3-1.2-3-2.15 0-1.09 1.01-1.85 2.7-1.85 1.78 0 2.44.85 2.5 2.1h2.21c-.07-1.72-1.12-3.3-3.21-3.81V3h-3v2.16c-1.94.42-3.5 1.68-3.5 3.61 0 2.31 1.91 3.46 4.7 4.13 2.5.6 3 1.48 3 2.41 0 .69-.49 1.79-2.7 1.79-2.06 0-2.87-.92-2.98-2.1h-2.2c.12 2.19 1.76 3.42 3.68 3.83V21h3v-2.15c1.95-.37 3.5-1.5 3.5-3.55 0-2.84-2.43-3.81-4.7-4.4z", |
| 120 | + "4": "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z", |
| 121 | + "5": "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z", |
| 122 | + "6": "M6 19h4V5H6v14zm8-14v14h4V5h-4z", |
| 123 | + }; |
| 124 | + |
| 125 | + function statusIconSvg(code) { |
| 126 | + const path = STATUS_ICON_PATHS[code]; |
| 127 | + if (!path) return ""; |
| 128 | + return '<span class="icon" aria-hidden="true">' + |
| 129 | + '<svg viewBox="0 0 24 24" fill="currentColor"><path d="' + path + '"/></svg>' + |
| 130 | + '</span>'; |
| 131 | + } |
| 132 | + |
109 | 133 | const titleEl = document.getElementById("title"); |
110 | 134 | const byEl = document.getElementById("by"); |
111 | 135 | const srcNameEl = document.getElementById("source-name"); |
@@ -145,7 +169,7 @@ <h1 class="title" id="title">Opening in Taison…</h1> |
145 | 169 | if (status && STATUS_LABELS[status]) { |
146 | 170 | badges.push( |
147 | 171 | '<span class="badge status" data-status="' + esc(status) + '">' + |
148 | | - '<span class="dot"></span>' + esc(STATUS_LABELS[status]) + |
| 172 | + statusIconSvg(status) + esc(STATUS_LABELS[status]) + |
149 | 173 | '</span>' |
150 | 174 | ); |
151 | 175 | } |
|
0 commit comments