4a91a7d2e2
* fix repo in api client Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> * web: re-organise files to match their interface Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> * core: include version in script tags Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> * cleanup maybe broken Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> * revert rename Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> * web: get rid of Client.ts Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> * move more to common Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> * more moving Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> * format Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> * unfuck files that vscode fucked, thanks Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> * move more Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> * finish moving (maybe) Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> * ok more moving Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> * fix more stuff that vs code destroyed Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> * get rid "web" prefix for virtual package Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> * fix locales Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> * use custom base element Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> * fix css file Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> * don't run autoDetectLanguage when importing locale Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> * fix circular dependencies Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> * web: fix build Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
97 lines
4.2 KiB
TypeScript
97 lines
4.2 KiB
TypeScript
import { ModalButton } from "@goauthentik/elements/buttons/ModalButton";
|
|
import "@goauthentik/elements/buttons/TokenCopyButton";
|
|
|
|
import { t } from "@lingui/macro";
|
|
|
|
import { TemplateResult, html } from "lit";
|
|
import { customElement, property } from "lit/decorators.js";
|
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
|
|
import { Outpost, OutpostTypeEnum } from "@goauthentik/api";
|
|
|
|
@customElement("ak-outpost-deployment-modal")
|
|
export class OutpostDeploymentModal extends ModalButton {
|
|
@property({ attribute: false })
|
|
outpost?: Outpost;
|
|
|
|
renderModalInner(): TemplateResult {
|
|
return html`<div class="pf-c-modal-box__header">
|
|
<h1 class="pf-c-title pf-m-2xl">${t`Outpost Deployment Info`}</h1>
|
|
</div>
|
|
<div class="pf-c-modal-box__body">
|
|
<p>
|
|
<a
|
|
target="_blank"
|
|
href="https://goauthentik.io/docs/outposts?utm_source=authentik#deploy"
|
|
>${t`View deployment documentation`}</a
|
|
>
|
|
</p>
|
|
<form class="pf-c-form">
|
|
<div class="pf-c-form__group">
|
|
<label class="pf-c-form__label">
|
|
<span class="pf-c-form__label-text">AUTHENTIK_HOST</span>
|
|
</label>
|
|
<input
|
|
class="pf-c-form-control"
|
|
readonly
|
|
type="text"
|
|
value="${document.location.origin}"
|
|
/>
|
|
</div>
|
|
<div class="pf-c-form__group">
|
|
<label class="pf-c-form__label">
|
|
<span class="pf-c-form__label-text">AUTHENTIK_TOKEN</span>
|
|
</label>
|
|
<div>
|
|
<ak-token-copy-button
|
|
class="pf-m-primary"
|
|
identifier="${ifDefined(this.outpost?.tokenIdentifier)}"
|
|
>
|
|
${t`Click to copy token`}
|
|
</ak-token-copy-button>
|
|
</div>
|
|
</div>
|
|
<h3>
|
|
${t`If your authentik Instance is using a self-signed certificate, set this value.`}
|
|
</h3>
|
|
<div class="pf-c-form__group">
|
|
<label class="pf-c-form__label">
|
|
<span class="pf-c-form__label-text">AUTHENTIK_INSECURE</span>
|
|
</label>
|
|
<input class="pf-c-form-control" readonly type="text" value="true" />
|
|
</div>
|
|
${this.outpost?.type == OutpostTypeEnum.Proxy
|
|
? html`
|
|
<h3>
|
|
${t`If your authentik_host setting does not match the URL you want to login with, add this setting.`}
|
|
</h3>
|
|
<div class="pf-c-form__group">
|
|
<label class="pf-c-form__label">
|
|
<span class="pf-c-form__label-text"
|
|
>AUTHENTIK_HOST_BROWSER</span
|
|
>
|
|
</label>
|
|
<input
|
|
class="pf-c-form-control"
|
|
readonly
|
|
type="text"
|
|
value="${document.location.origin}"
|
|
/>
|
|
</div>
|
|
`
|
|
: html``}
|
|
</form>
|
|
</div>
|
|
<footer class="pf-c-modal-box__footer pf-m-align-left">
|
|
<button
|
|
class="pf-c-button pf-m-primary"
|
|
@click=${() => {
|
|
this.open = false;
|
|
}}
|
|
>
|
|
${t`Close`}
|
|
</button>
|
|
</footer>`;
|
|
}
|
|
}
|