fix: #6263 remove reserved prefix (#7033)

This commit is contained in:
Zachary Schaffter
2026-02-14 13:05:42 -08:00
committed by GitHub
parent 5aafb56c4f
commit 904e6b7d82
55 changed files with 158 additions and 158 deletions

View File

@@ -165,14 +165,14 @@ export function clearPageState(slug: string) {
}
/**
* usePageUser provides a wrapper around $auth that provides a type-safe way to
* usePageUser provides a wrapper around auth that provides a type-safe way to
* access the UserOut type from the context. If no user is logged in then an empty
* object with all properties set to their zero value is returned.
*/
export function usePageUser(): { user: UserOut } {
const $auth = useMealieAuth();
const auth = useMealieAuth();
if (!$auth.user.value) {
if (!auth.user.value) {
return {
user: {
id: "",
@@ -188,5 +188,5 @@ export function usePageUser(): { user: UserOut } {
};
}
return { user: $auth.user.value };
return { user: auth.user.value };
}

View File

@@ -1,14 +1,14 @@
export const useLoggedInState = function () {
const $auth = useMealieAuth();
const auth = useMealieAuth();
const route = useRoute();
const loggedIn = computed(() => $auth.loggedIn.value);
const loggedIn = computed(() => auth.loggedIn.value);
const isOwnGroup = computed(() => {
if (!route.params.groupSlug) {
return loggedIn.value;
}
else {
return loggedIn.value && $auth.user.value?.groupSlug === route.params.groupSlug;
return loggedIn.value && auth.user.value?.groupSlug === route.params.groupSlug;
}
});

View File

@@ -6,10 +6,10 @@ const loading = ref(false);
const ready = ref(false);
export const useUserSelfRatings = function () {
const $auth = useMealieAuth();
const auth = useMealieAuth();
async function refreshUserRatings() {
if (!$auth.user.value || loading.value) {
if (!auth.user.value || loading.value) {
return;
}
@@ -27,7 +27,7 @@ export const useUserSelfRatings = function () {
loading.value = true;
const api = useUserApi();
const userId = $auth.user.value?.id || "";
const userId = auth.user.value?.id || "";
await api.users.setRating(userId, slug, rating, isFavorite);
loading.value = false;