mirror of
https://github.com/mealie-recipes/mealie.git
synced 2026-02-16 12:53:12 -05:00
committed by
GitHub
parent
5aafb56c4f
commit
904e6b7d82
@@ -114,14 +114,14 @@ export default defineNuxtComponent({
|
||||
middleware: ["advanced-only"],
|
||||
setup() {
|
||||
const i18n = useI18n();
|
||||
const $auth = useMealieAuth();
|
||||
const auth = useMealieAuth();
|
||||
|
||||
useSeoMeta({
|
||||
title: i18n.t("settings.token.api-tokens"),
|
||||
});
|
||||
|
||||
const user = computed(() => {
|
||||
return $auth.user.value;
|
||||
return auth.user.value;
|
||||
});
|
||||
|
||||
const api = useUserApi();
|
||||
@@ -136,7 +136,7 @@ export default defineNuxtComponent({
|
||||
createdToken.value = "";
|
||||
loading.value = false;
|
||||
name.value = "";
|
||||
$auth.refresh();
|
||||
auth.refresh();
|
||||
}
|
||||
|
||||
async function createToken(name: string) {
|
||||
@@ -161,7 +161,7 @@ export default defineNuxtComponent({
|
||||
|
||||
async function deleteToken(id: number) {
|
||||
const { data } = await api.users.deleteAPIToken(id);
|
||||
$auth.refresh();
|
||||
auth.refresh();
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
file-name="profile"
|
||||
accept="image/*"
|
||||
:url="`/api/users/${userCopy.id}/image`"
|
||||
@uploaded="$auth.refresh()"
|
||||
@uploaded="auth.refresh()"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
@@ -231,9 +231,9 @@ export default defineNuxtComponent({
|
||||
},
|
||||
setup() {
|
||||
const i18n = useI18n();
|
||||
const $auth = useMealieAuth();
|
||||
const auth = useMealieAuth();
|
||||
const { getDefaultActivityLabels, getActivityLabel, getActivityKey } = useDefaultActivity();
|
||||
const user = computed(() => $auth.user.value);
|
||||
const user = computed(() => auth.user.value);
|
||||
|
||||
useSeoMeta({
|
||||
title: i18n.t("settings.profile"),
|
||||
@@ -267,7 +267,7 @@ export default defineNuxtComponent({
|
||||
if (!userCopy.value?.id) return;
|
||||
const { response } = await api.users.updateOne(userCopy.value.id, userCopy.value);
|
||||
if (response?.status === 200) {
|
||||
$auth.refresh();
|
||||
auth.refresh();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -303,7 +303,7 @@ export default defineNuxtComponent({
|
||||
domUpdatePassword,
|
||||
passwordsMatch,
|
||||
validators,
|
||||
$auth,
|
||||
auth,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
@@ -294,17 +294,17 @@ export default defineNuxtComponent({
|
||||
scrollToTop: true,
|
||||
async setup() {
|
||||
const i18n = useI18n();
|
||||
const $auth = useMealieAuth();
|
||||
const auth = useMealieAuth();
|
||||
const { $appInfo } = useNuxtApp();
|
||||
const route = useRoute();
|
||||
const groupSlug = computed(() => route.params.groupSlug || $auth.user.value?.groupSlug || "");
|
||||
const groupSlug = computed(() => route.params.groupSlug || auth.user.value?.groupSlug || "");
|
||||
|
||||
useSeoMeta({
|
||||
title: i18n.t("settings.profile"),
|
||||
});
|
||||
|
||||
const user = computed<UserOut | null>(() => {
|
||||
const authUser = $auth.user.value;
|
||||
const authUser = auth.user.value;
|
||||
if (!authUser) return null;
|
||||
|
||||
// Override canInvite if password login is disabled
|
||||
|
||||
Reference in New Issue
Block a user