web: start: build
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
parent
da740aa322
commit
1d79f06f60
5 changed files with 206 additions and 0 deletions
|
|
@ -30,6 +30,7 @@ class ApiClient extends HTMLElement {
|
|||
async connectedCallback() {
|
||||
this.style.display = 'none'
|
||||
|
||||
// Support login-gate (static token) and biscuit-gate (attenuated token).
|
||||
const gate = document.querySelector('login-gate')
|
||||
this.#credentials = gate ? await gate.ready : null
|
||||
|
||||
|
|
@ -37,6 +38,7 @@ class ApiClient extends HTMLElement {
|
|||
this.agent = this.#buildAgent()
|
||||
}
|
||||
|
||||
|
||||
get creds() {
|
||||
return this.#credentials ?? {}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue