fix: get auth method from the frontend constants
This commit is contained in:
parent
9d078349ba
commit
f6ee3188f5
@ -44,7 +44,7 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="!isHidePasswordForm" class="column">
|
<div v-if="!noAuth" class="column">
|
||||||
<form
|
<form
|
||||||
class="card"
|
class="card"
|
||||||
v-if="!authStore.user?.lockPassword"
|
v-if="!authStore.user?.lockPassword"
|
||||||
@ -96,11 +96,12 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useAuthStore } from "@/stores/auth";
|
import { useAuthStore } from "@/stores/auth";
|
||||||
import { useLayoutStore } from "@/stores/layout";
|
import { useLayoutStore } from "@/stores/layout";
|
||||||
import { users as api, settings } from "@/api";
|
import { users as api } from "@/api";
|
||||||
import AceEditorTheme from "@/components/settings/AceEditorTheme.vue";
|
import AceEditorTheme from "@/components/settings/AceEditorTheme.vue";
|
||||||
import Languages from "@/components/settings/Languages.vue";
|
import Languages from "@/components/settings/Languages.vue";
|
||||||
import { computed, inject, onMounted, ref } from "vue";
|
import { computed, inject, onMounted, ref } from "vue";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
|
import { authMethod, noAuth } from "@/utils/constants";
|
||||||
|
|
||||||
const layoutStore = useLayoutStore();
|
const layoutStore = useLayoutStore();
|
||||||
const authStore = useAuthStore();
|
const authStore = useAuthStore();
|
||||||
@ -118,7 +119,6 @@ const singleClick = ref<boolean>(false);
|
|||||||
const dateFormat = ref<boolean>(false);
|
const dateFormat = ref<boolean>(false);
|
||||||
const locale = ref<string>("");
|
const locale = ref<string>("");
|
||||||
const aceEditorTheme = ref<string>("");
|
const aceEditorTheme = ref<string>("");
|
||||||
const isHidePasswordForm = ref<boolean>(false);
|
|
||||||
|
|
||||||
const passwordClass = computed(() => {
|
const passwordClass = computed(() => {
|
||||||
const baseClass = "input input--block";
|
const baseClass = "input input--block";
|
||||||
@ -143,9 +143,7 @@ onMounted(async () => {
|
|||||||
dateFormat.value = authStore.user.dateFormat;
|
dateFormat.value = authStore.user.dateFormat;
|
||||||
aceEditorTheme.value = authStore.user.aceEditorTheme;
|
aceEditorTheme.value = authStore.user.aceEditorTheme;
|
||||||
layoutStore.loading = false;
|
layoutStore.loading = false;
|
||||||
const { authMethod } = await settings.get();
|
|
||||||
isCurrentPasswordRequired.value = authMethod == "json";
|
isCurrentPasswordRequired.value = authMethod == "json";
|
||||||
isHidePasswordForm.value = authMethod == "noauth";
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user