portal: polish password links and request copy
This commit is contained in:
parent
90f0937f73
commit
6ae48eed9d
@ -29,6 +29,8 @@ def register(app) -> None:
|
||||
f"?client_id={quote(settings.KEYCLOAK_CLIENT_ID, safe='')}"
|
||||
f"&redirect_uri={redirect_uri}"
|
||||
)
|
||||
account_url = f"{issuer}/account"
|
||||
account_password_url = f"{account_url}/#/security/signingin"
|
||||
|
||||
return jsonify(
|
||||
{
|
||||
@ -38,5 +40,7 @@ def register(app) -> None:
|
||||
"client_id": settings.KEYCLOAK_CLIENT_ID,
|
||||
"login_url": login_url,
|
||||
"reset_url": reset_url,
|
||||
"account_url": account_url,
|
||||
"account_password_url": account_password_url,
|
||||
}
|
||||
)
|
||||
|
||||
@ -10,6 +10,8 @@ export const auth = reactive({
|
||||
groups: [],
|
||||
loginUrl: "",
|
||||
resetUrl: "",
|
||||
accountUrl: "",
|
||||
accountPasswordUrl: "",
|
||||
token: "",
|
||||
});
|
||||
|
||||
@ -44,6 +46,8 @@ export async function initAuth() {
|
||||
auth.enabled = Boolean(cfg.enabled);
|
||||
auth.loginUrl = cfg.login_url || "";
|
||||
auth.resetUrl = cfg.reset_url || "";
|
||||
auth.accountUrl = cfg.account_url || "";
|
||||
auth.accountPasswordUrl = cfg.account_password_url || "";
|
||||
|
||||
if (!auth.enabled) return;
|
||||
|
||||
|
||||
@ -11,6 +11,15 @@
|
||||
</div>
|
||||
<div class="hero-actions">
|
||||
<div v-if="auth.authenticated" class="pill mono pill-ok">{{ auth.username }}</div>
|
||||
<a
|
||||
v-if="auth.authenticated && auth.accountPasswordUrl"
|
||||
class="pill mono"
|
||||
:href="auth.accountPasswordUrl"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>
|
||||
Change password
|
||||
</a>
|
||||
<button v-else class="pill mono" type="button" @click="doLogin">Login</button>
|
||||
</div>
|
||||
</section>
|
||||
@ -112,10 +121,10 @@
|
||||
<span class="v mono">{{ jellyfin.username }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="jellyfin.syncDetail" class="hint mono">{{ jellyfin.syncDetail }}</div>
|
||||
<div v-if="jellyfin.error" class="error-box">
|
||||
<div class="mono">{{ jellyfin.error }}</div>
|
||||
</div>
|
||||
<div v-if="jellyfin.syncDetail" class="hint mono jellyfin-detail">{{ jellyfin.syncDetail }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -528,6 +537,10 @@ button.primary {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.jellyfin-detail {
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
.copy {
|
||||
background: transparent;
|
||||
border: 1px solid rgba(255, 255, 255, 0.14);
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<p class="eyebrow">Atlas</p>
|
||||
<h1>Apps</h1>
|
||||
<p class="lede">
|
||||
Service shortcuts for Atlas. Nextcloud is the hub, but everything is available directly too.
|
||||
Service shortcuts for Atlas.
|
||||
</p>
|
||||
</div>
|
||||
</section>
|
||||
@ -168,8 +168,8 @@ const sections = [
|
||||
apps: [
|
||||
{
|
||||
name: "Monero Node",
|
||||
url: "https://monero.bstein.dev",
|
||||
target: "_blank",
|
||||
url: "/monero",
|
||||
target: "_self",
|
||||
description: "Faster sync using the Atlas Monero node.",
|
||||
},
|
||||
],
|
||||
@ -235,7 +235,7 @@ const sections = [
|
||||
|
||||
.tiles {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
|
||||
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<p class="eyebrow">Atlas</p>
|
||||
<h1>Request Access</h1>
|
||||
<p class="lede">
|
||||
Self-serve signups are not enabled yet. Request access and an admin can approve your account.
|
||||
Request access and an admin can approve your account.
|
||||
</p>
|
||||
</div>
|
||||
</section>
|
||||
@ -19,7 +19,7 @@
|
||||
</div>
|
||||
|
||||
<p class="muted">
|
||||
This creates a pending request in Atlas. If approved, you'll receive an email with next steps (if you provided one).
|
||||
This creates a pending request in Atlas. If approved, check your request code for an onboarding link to complete setup.
|
||||
</p>
|
||||
|
||||
<form class="form" @submit.prevent="submit" v-if="!submitted">
|
||||
@ -43,7 +43,7 @@
|
||||
class="input mono"
|
||||
type="email"
|
||||
autocomplete="email"
|
||||
placeholder="you@example.com"
|
||||
placeholder="you@example.com (optional)"
|
||||
:disabled="submitting"
|
||||
/>
|
||||
</label>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user