|
4 | 4 | import { t } from '../lib/i18n.js' |
5 | 5 |
|
6 | 6 | let open = $state(false) |
| 7 | + let showAbout = $state(false) |
| 8 | + const appVersion = __APP_VERSION__ |
7 | 9 | const SCALES = [1, 1.2, 1.4] |
8 | 10 | const SCALE_LABELS = { 1: '100%', 1.2: '120%', 1.4: '140%' } |
9 | 11 |
|
|
180 | 182 | <span class="row-value on">{$preferences.lang === 'no' ? 'EN →' : 'NO →'}</span> |
181 | 183 | </button> |
182 | 184 |
|
| 185 | + <div class="divider"></div> |
| 186 | +
|
| 187 | + <!-- About --> |
| 188 | + <button class="row" onclick={() => showAbout = !showAbout} role="menuitem"> |
| 189 | + <span class="row-icon"> |
| 190 | + <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"> |
| 191 | + <circle cx="12" cy="12" r="10"/> |
| 192 | + <line x1="12" y1="16" x2="12" y2="12"/> |
| 193 | + <line x1="12" y1="8" x2="12.01" y2="8"/> |
| 194 | + </svg> |
| 195 | + </span> |
| 196 | + <span class="row-label">{$t('about')}</span> |
| 197 | + <span class="row-value on">{showAbout ? '▲' : '▼'}</span> |
| 198 | + </button> |
| 199 | +
|
| 200 | + {#if showAbout} |
| 201 | + <div class="about-section"> |
| 202 | + <div class="about-row"> |
| 203 | + <span class="about-label">{$t('version')}</span> |
| 204 | + <span class="about-value">{appVersion}</span> |
| 205 | + </div> |
| 206 | + <div class="about-row"> |
| 207 | + <span class="about-label">{$t('sourceCode')}</span> |
| 208 | + <a class="about-link" href="https://github.com/GilbN/nsf-timer" target="_blank" rel="noopener">GitHub</a> |
| 209 | + </div> |
| 210 | + <div class="about-row"> |
| 211 | + <span class="about-label">{$t('license')}</span> |
| 212 | + <span class="about-value">MIT</span> |
| 213 | + </div> |
| 214 | + <div class="about-row"> |
| 215 | + <span class="about-label">{$t('reportBug')}</span> |
| 216 | + <a class="about-link" href="https://github.com/GilbN/nsf-timer/issues" target="_blank" rel="noopener">GitHub Issues</a> |
| 217 | + </div> |
| 218 | + </div> |
| 219 | + {/if} |
| 220 | +
|
183 | 221 | </div> |
184 | 222 | {/if} |
185 | 223 | </div> |
|
299 | 337 | background: rgba(255,255,255,0.06); |
300 | 338 | margin: 2px 0; |
301 | 339 | } |
| 340 | +
|
| 341 | + .about-section { |
| 342 | + padding: 6px 14px 10px; |
| 343 | + display: flex; |
| 344 | + flex-direction: column; |
| 345 | + gap: 6px; |
| 346 | + } |
| 347 | +
|
| 348 | + .about-row { |
| 349 | + display: flex; |
| 350 | + justify-content: space-between; |
| 351 | + align-items: center; |
| 352 | + font-size: 0.75rem; |
| 353 | + } |
| 354 | +
|
| 355 | + .about-label { |
| 356 | + color: var(--text-secondary); |
| 357 | + } |
| 358 | +
|
| 359 | + .about-value { |
| 360 | + color: var(--text-primary); |
| 361 | + font-weight: 600; |
| 362 | + font-size: 0.6875rem; |
| 363 | + letter-spacing: 0.04em; |
| 364 | + } |
| 365 | +
|
| 366 | + .about-link { |
| 367 | + color: var(--accent); |
| 368 | + text-decoration: none; |
| 369 | + font-weight: 600; |
| 370 | + font-size: 0.6875rem; |
| 371 | + } |
| 372 | +
|
| 373 | + .about-link:hover { |
| 374 | + text-decoration: underline; |
| 375 | + } |
302 | 376 | </style> |
0 commit comments