fix: indentation and quotation
This commit is contained in:
parent
23f71b184f
commit
08405e8c81
@ -142,7 +142,7 @@ export default {
|
||||
version: () => version,
|
||||
disableExternal: () => disableExternal,
|
||||
disableUsedPercentage: () => disableUsedPercentage,
|
||||
canLogout: () => (!noAuth && loginPage) || authMethod === "oidc"
|
||||
canLogout: () => (!noAuth && loginPage) || authMethod === "oidc",
|
||||
},
|
||||
asyncComputed: {
|
||||
usage: {
|
||||
|
||||
@ -21,9 +21,9 @@ export function parseToken(token) {
|
||||
}
|
||||
|
||||
export async function validateLogin() {
|
||||
let jwt = localStorage.getItem("jwt")
|
||||
let jwt = localStorage.getItem("jwt");
|
||||
|
||||
if (authMethod === 'oidc' && (!jwt || jwt === "null")) {
|
||||
if (authMethod === "oidc" && (!jwt || jwt === "null")) {
|
||||
jwt = cookie("auth");
|
||||
}
|
||||
|
||||
@ -48,7 +48,6 @@ export async function login(username, password, recaptcha) {
|
||||
});
|
||||
|
||||
const body = await res.text();
|
||||
|
||||
if (res.status === 200) {
|
||||
parseToken(body);
|
||||
} else {
|
||||
@ -69,7 +68,7 @@ export async function renew(jwt) {
|
||||
if (res.status === 200) {
|
||||
parseToken(body);
|
||||
} else {
|
||||
if (authMethod === 'oidc') {
|
||||
if (authMethod === "oidc") {
|
||||
clearLoginState();
|
||||
document.location.replace(document.location.pathname);
|
||||
}
|
||||
|
||||
@ -47,9 +47,9 @@
|
||||
<h1>{{ name }}</h1>
|
||||
<div v-if="error !== ''" class="wrong">{{ error }}</div>
|
||||
<input
|
||||
class="button button--block"
|
||||
type="submit"
|
||||
:value="$t('login.oidc')"
|
||||
class="button button--block"
|
||||
type="submit"
|
||||
:value="$t('login.oidc')"
|
||||
/>
|
||||
</form>
|
||||
</div>
|
||||
@ -102,7 +102,7 @@ export default {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
||||
if (authMethod === 'oidc') {
|
||||
if (authMethod === "oidc") {
|
||||
return document.location.reload();
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user