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"?client_id={quote(settings.KEYCLOAK_CLIENT_ID, safe='')}"
|
||||||
f"&redirect_uri={redirect_uri}"
|
f"&redirect_uri={redirect_uri}"
|
||||||
)
|
)
|
||||||
|
account_url = f"{issuer}/account"
|
||||||
|
account_password_url = f"{account_url}/#/security/signingin"
|
||||||
|
|
||||||
return jsonify(
|
return jsonify(
|
||||||
{
|
{
|
||||||
@ -38,5 +40,7 @@ def register(app) -> None:
|
|||||||
"client_id": settings.KEYCLOAK_CLIENT_ID,
|
"client_id": settings.KEYCLOAK_CLIENT_ID,
|
||||||
"login_url": login_url,
|
"login_url": login_url,
|
||||||
"reset_url": reset_url,
|
"reset_url": reset_url,
|
||||||
|
"account_url": account_url,
|
||||||
|
"account_password_url": account_password_url,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
@ -10,6 +10,8 @@ export const auth = reactive({
|
|||||||
groups: [],
|
groups: [],
|
||||||
loginUrl: "",
|
loginUrl: "",
|
||||||
resetUrl: "",
|
resetUrl: "",
|
||||||
|
accountUrl: "",
|
||||||
|
accountPasswordUrl: "",
|
||||||
token: "",
|
token: "",
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -44,6 +46,8 @@ export async function initAuth() {
|
|||||||
auth.enabled = Boolean(cfg.enabled);
|
auth.enabled = Boolean(cfg.enabled);
|
||||||
auth.loginUrl = cfg.login_url || "";
|
auth.loginUrl = cfg.login_url || "";
|
||||||
auth.resetUrl = cfg.reset_url || "";
|
auth.resetUrl = cfg.reset_url || "";
|
||||||
|
auth.accountUrl = cfg.account_url || "";
|
||||||
|
auth.accountPasswordUrl = cfg.account_password_url || "";
|
||||||
|
|
||||||
if (!auth.enabled) return;
|
if (!auth.enabled) return;
|
||||||
|
|
||||||
|
|||||||
@ -11,6 +11,15 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="hero-actions">
|
<div class="hero-actions">
|
||||||
<div v-if="auth.authenticated" class="pill mono pill-ok">{{ auth.username }}</div>
|
<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>
|
<button v-else class="pill mono" type="button" @click="doLogin">Login</button>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
@ -112,10 +121,10 @@
|
|||||||
<span class="v mono">{{ jellyfin.username }}</span>
|
<span class="v mono">{{ jellyfin.username }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="jellyfin.syncDetail" class="hint mono">{{ jellyfin.syncDetail }}</div>
|
|
||||||
<div v-if="jellyfin.error" class="error-box">
|
<div v-if="jellyfin.error" class="error-box">
|
||||||
<div class="mono">{{ jellyfin.error }}</div>
|
<div class="mono">{{ jellyfin.error }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-if="jellyfin.syncDetail" class="hint mono jellyfin-detail">{{ jellyfin.syncDetail }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -528,6 +537,10 @@ button.primary {
|
|||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.jellyfin-detail {
|
||||||
|
margin-top: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
.copy {
|
.copy {
|
||||||
background: transparent;
|
background: transparent;
|
||||||
border: 1px solid rgba(255, 255, 255, 0.14);
|
border: 1px solid rgba(255, 255, 255, 0.14);
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
<p class="eyebrow">Atlas</p>
|
<p class="eyebrow">Atlas</p>
|
||||||
<h1>Apps</h1>
|
<h1>Apps</h1>
|
||||||
<p class="lede">
|
<p class="lede">
|
||||||
Service shortcuts for Atlas. Nextcloud is the hub, but everything is available directly too.
|
Service shortcuts for Atlas.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
@ -168,8 +168,8 @@ const sections = [
|
|||||||
apps: [
|
apps: [
|
||||||
{
|
{
|
||||||
name: "Monero Node",
|
name: "Monero Node",
|
||||||
url: "https://monero.bstein.dev",
|
url: "/monero",
|
||||||
target: "_blank",
|
target: "_self",
|
||||||
description: "Faster sync using the Atlas Monero node.",
|
description: "Faster sync using the Atlas Monero node.",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@ -235,7 +235,7 @@ const sections = [
|
|||||||
|
|
||||||
.tiles {
|
.tiles {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
|
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
<p class="eyebrow">Atlas</p>
|
<p class="eyebrow">Atlas</p>
|
||||||
<h1>Request Access</h1>
|
<h1>Request Access</h1>
|
||||||
<p class="lede">
|
<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>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
@ -19,7 +19,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p class="muted">
|
<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>
|
</p>
|
||||||
|
|
||||||
<form class="form" @submit.prevent="submit" v-if="!submitted">
|
<form class="form" @submit.prevent="submit" v-if="!submitted">
|
||||||
@ -43,7 +43,7 @@
|
|||||||
class="input mono"
|
class="input mono"
|
||||||
type="email"
|
type="email"
|
||||||
autocomplete="email"
|
autocomplete="email"
|
||||||
placeholder="you@example.com"
|
placeholder="you@example.com (optional)"
|
||||||
:disabled="submitting"
|
:disabled="submitting"
|
||||||
/>
|
/>
|
||||||
</label>
|
</label>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user