mirror of
https://github.com/kuhyx/steam-backlog-enforcer.git
synced 2026-11-28 03:09:04 +01:00
Some checks failed
dependency freshness / dependencies on newest stable (push) Has been cancelled
md-naming / markdown naming convention (push) Has been cancelled
pre-commit / pre-commit (${{ matrix.group }}) (mypy, mypy, ) (push) Has been cancelled
pre-commit / pre-commit (${{ matrix.group }}) (pylint, pylint, ) (push) Has been cancelled
pre-commit / pre-commit (${{ matrix.group }}) (rest, , mypy,pylint) (push) Has been cancelled
Tests / test (push) Has been cancelled
Tests / web-coverage (push) Has been cancelled
repo-contract / repo contract (push) Has been cancelled
Todo: 9b9342ba
32 lines
979 B
TypeScript
32 lines
979 B
TypeScript
// `<setup-card>` (was SetupCard in screens/System.tsx): whether setup is
|
|
// done, without ever showing the key.
|
|
|
|
import { q } from '../../api/queries'
|
|
import { define, h } from '../../lib/dom'
|
|
import { LiveElement } from '../../lib/element'
|
|
import { pageHref } from '../../lib/runner'
|
|
import { card, facts, link } from '../../ui/build'
|
|
|
|
export class SetupCardElement extends LiveElement {
|
|
protected override setup(): void {
|
|
this.watch(q.setup)
|
|
}
|
|
|
|
protected update(): void {
|
|
const data = q.setup.state.data
|
|
this.replaceChildren(
|
|
card(
|
|
'Setup',
|
|
facts([
|
|
['Configured', data ? (data.configured ? 'Yes' : 'No') : '…'],
|
|
['Steam API key', data ? (data.has_api_key ? 'Stored (never shown)' : 'Missing') : '…'],
|
|
['Steam ID', h('span', { class: 'mono' }, data?.steam_id ?? '—')],
|
|
]),
|
|
{ aside: link(pageHref('/setup'), 'Open setup') },
|
|
),
|
|
)
|
|
}
|
|
}
|
|
|
|
define('setup-card', SetupCardElement)
|