mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-08-05 13:35:23 +02:00
Merge branch 'mealie-next' into mealie-next
This commit is contained in:
commit
18a405808a
29 changed files with 129 additions and 80 deletions
|
@ -27,7 +27,7 @@
|
|||
</div>
|
||||
|
||||
<section>
|
||||
<BaseCardSectionTitle class="pb-0" :icon="$globals.icons.wrench" :title="$t('admin.maintenance.summary-title')">
|
||||
<BaseCardSectionTitle class="pb-0" :icon="$globals.icons.wrench" :title="$tc('admin.maintenance.summary-title')">
|
||||
</BaseCardSectionTitle>
|
||||
<div class="mb-6 ml-2 d-flex" style="gap: 0.3rem">
|
||||
<BaseButton color="info" @click="getSummary">
|
||||
|
@ -55,7 +55,7 @@
|
|||
<BaseCardSectionTitle
|
||||
class="pb-0 mt-8"
|
||||
:icon="$globals.icons.wrench"
|
||||
:title="$t('admin.mainentance.actions-title')"
|
||||
:title="$tc('admin.mainentance.actions-title')"
|
||||
>
|
||||
<i18n path="admin.maintenance.actions-description">
|
||||
<template #destructive-in-bold>
|
||||
|
@ -103,13 +103,14 @@ export default defineComponent({
|
|||
});
|
||||
|
||||
const adminApi = useAdminApi();
|
||||
const { i18n } = useContext();
|
||||
|
||||
// ==========================================================================
|
||||
// General Info
|
||||
|
||||
const infoResults = ref<MaintenanceSummary>({
|
||||
dataDirSize: "unknown",
|
||||
logFileSize: "unknown",
|
||||
dataDirSize: i18n.tc("about.unknown-version"),
|
||||
logFileSize: i18n.tc("about.unknown-version"),
|
||||
cleanableDirs: 0,
|
||||
cleanableImages: 0,
|
||||
});
|
||||
|
@ -119,8 +120,8 @@ export default defineComponent({
|
|||
const { data } = await adminApi.maintenance.getInfo();
|
||||
|
||||
infoResults.value = data ?? {
|
||||
dataDirSize: "unknown",
|
||||
logFileSize: "unknown",
|
||||
dataDirSize: i18n.tc("about.unknown-version"),
|
||||
logFileSize: i18n.tc("about.unknown-version"),
|
||||
cleanableDirs: 0,
|
||||
cleanableImages: 0,
|
||||
};
|
||||
|
@ -128,7 +129,6 @@ export default defineComponent({
|
|||
state.fetchingInfo = false;
|
||||
}
|
||||
|
||||
const { i18n } = useContext();
|
||||
|
||||
const info = computed(() => {
|
||||
return [
|
||||
|
@ -163,7 +163,7 @@ export default defineComponent({
|
|||
};
|
||||
|
||||
function storageDetailsText(key: string) {
|
||||
return storageTitles[key] ?? "unknown";
|
||||
return storageTitles[key] ?? i18n.tc("about.unknown-version");
|
||||
}
|
||||
|
||||
const storageDetails = ref<MaintenanceStorageDetails | null>(null);
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent, useRoute, onMounted, ref } from "@nuxtjs/composition-api";
|
||||
import { defineComponent, useRoute, onMounted, ref, useContext } from "@nuxtjs/composition-api";
|
||||
import GroupPreferencesEditor from "~/components/Domain/Group/GroupPreferencesEditor.vue";
|
||||
import { useAdminApi } from "~/composables/api";
|
||||
import { alert } from "~/composables/use-toast";
|
||||
|
@ -39,6 +39,8 @@ export default defineComponent({
|
|||
setup() {
|
||||
const route = useRoute();
|
||||
|
||||
const { i18n } = useContext();
|
||||
|
||||
const groupId = route.value.params.id;
|
||||
|
||||
// ==============================================
|
||||
|
@ -56,7 +58,7 @@ export default defineComponent({
|
|||
const { data, error } = await adminApi.groups.getOne(groupId);
|
||||
|
||||
if (error?.response?.status === 404) {
|
||||
alert.error("User Not Found");
|
||||
alert.error(i18n.tc("user.user-not-found"));
|
||||
userError.value = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -4,15 +4,15 @@
|
|||
<template #header>
|
||||
<v-img max-height="125" max-width="125" :src="require('~/static/svgs/manage-profile.svg')"></v-img>
|
||||
</template>
|
||||
<template #title> Admin User Management </template>
|
||||
Changes to this user will be reflected immediately.
|
||||
<template #title> {{ $t("user.admin-user-management") }} </template>
|
||||
{{ $t("user.changes-reflected-immediately") }}
|
||||
</BasePageTitle>
|
||||
<AppToolbar back> </AppToolbar>
|
||||
<v-form v-if="!userError" ref="refNewUserForm" @submit.prevent="handleSubmit">
|
||||
<v-card outlined>
|
||||
<v-card-text>
|
||||
<div class="d-flex">
|
||||
<p>User Id: {{ user.id }}</p>
|
||||
<p> {{ $t("user.user-id-with-value", {id: user.id} ) }}</p>
|
||||
</div>
|
||||
<v-select
|
||||
v-if="groups"
|
||||
|
@ -24,7 +24,7 @@
|
|||
item-value="name"
|
||||
:return-object="false"
|
||||
filled
|
||||
label="User Group"
|
||||
:label="$tc('group.user-group')"
|
||||
:rules="[validators.required]"
|
||||
></v-select>
|
||||
<div class="d-flex py-2 pr-2">
|
||||
|
@ -45,7 +45,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { computed, defineComponent, useRoute, onMounted, ref } from "@nuxtjs/composition-api";
|
||||
import { computed, defineComponent, useRoute, onMounted, ref, useContext } from "@nuxtjs/composition-api";
|
||||
import { useAdminApi } from "~/composables/api";
|
||||
import { useGroups } from "~/composables/use-groups";
|
||||
import { alert } from "~/composables/use-toast";
|
||||
|
@ -59,6 +59,7 @@ export default defineComponent({
|
|||
setup() {
|
||||
const { userForm } = useUserForm();
|
||||
const { groups } = useGroups();
|
||||
const { i18n } = useContext();
|
||||
const route = useRoute();
|
||||
|
||||
const userId = route.value.params.id;
|
||||
|
@ -84,7 +85,7 @@ export default defineComponent({
|
|||
const { data, error } = await adminApi.users.getOne(userId);
|
||||
|
||||
if (error?.response?.status === 404) {
|
||||
alert.error("User Not Found");
|
||||
alert.error(i18n.tc("user.user-not-found"));
|
||||
userError.value = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
</div>
|
||||
|
||||
<section>
|
||||
<BaseCardSectionTitle class="pb-0" :icon="$globals.icons.cog" :title="$t('settings.configuration')"> </BaseCardSectionTitle>
|
||||
<BaseCardSectionTitle class="pb-0" :icon="$globals.icons.cog" :title="$tc('settings.configuration')"> </BaseCardSectionTitle>
|
||||
<v-card class="mb-4">
|
||||
<template v-for="(check, idx) in simpleChecks">
|
||||
<v-list-item :key="`list-item-${idx}`">
|
||||
|
@ -61,7 +61,7 @@
|
|||
</section>
|
||||
|
||||
<section>
|
||||
<BaseCardSectionTitle class="pt-2" :icon="$globals.icons.docker" :title="$t('settings.docker-volume')" />
|
||||
<BaseCardSectionTitle class="pt-2" :icon="$globals.icons.docker" :title="$tc('settings.docker-volume')" />
|
||||
<v-alert
|
||||
border="left"
|
||||
colored-border
|
||||
|
@ -77,7 +77,7 @@
|
|||
</HelpIcon>
|
||||
</div>
|
||||
<div>
|
||||
<template v-if="docker.state === DockerVolumeState.Error"> {{ $t('settings.volumes-are-misconfigured') }}. </template>
|
||||
<template v-if="docker.state === DockerVolumeState.Error"> {{ $t('settings.volumes-are-misconfigured') }} </template>
|
||||
<template v-else-if="docker.state === DockerVolumeState.Success">
|
||||
{{ $t('settings.volumes-are-configured-correctly') }}
|
||||
</template>
|
||||
|
@ -116,7 +116,7 @@
|
|||
<template v-if="tested">
|
||||
<v-divider class="my-x mt-6"></v-divider>
|
||||
<v-card-text class="px-0">
|
||||
<h4>Email Test Results</h4>
|
||||
<h4> {{ $tc("settings.email-test-results") }}</h4>
|
||||
<span class="pl-4">
|
||||
{{ success ? $t('settings.succeeded') : $t('settings.failed') }}
|
||||
</span>
|
||||
|
@ -128,7 +128,7 @@
|
|||
|
||||
<!-- General App Info -->
|
||||
<section class="mt-4">
|
||||
<BaseCardSectionTitle class="pb-0" :icon="$globals.icons.cog" :title="$t('settings.general-about')"> </BaseCardSectionTitle>
|
||||
<BaseCardSectionTitle class="pb-0" :icon="$globals.icons.cog" :title="$tc('settings.general-about')"> </BaseCardSectionTitle>
|
||||
<v-card class="mb-4">
|
||||
<template v-for="(property, idx) in appInfo">
|
||||
<v-list-item :key="property.name">
|
||||
|
@ -466,12 +466,12 @@ export default defineComponent({
|
|||
if (ignoreChecks[item.id]) {
|
||||
return;
|
||||
}
|
||||
const status = item.status ? "Yes" : "No";
|
||||
const status = item.status ? i18n.tc("general.yes") : i18n.tc("general.no");
|
||||
text += `${item.text.toString()}: ${status}\n`;
|
||||
});
|
||||
|
||||
text += `Email Configured: ${appConfig.value.emailReady ? "Yes" : "No"}\n`;
|
||||
text += `Docker Volumes: ${docker.state}`;
|
||||
text += `${i18n.tc("settings.email-configured")}: ${appConfig.value.emailReady ? i18n.tc("general.yes") : i18n.tc("general.no")}\n`;
|
||||
text += `${i18n.tc("settings.docker-volume")}: ${docker.state}`;
|
||||
|
||||
return text;
|
||||
});
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<v-container fill-height fluid class="d-flex justify-center align-center">
|
||||
<v-card color="background d-flex flex-column align-center" flat width="600px">
|
||||
<v-card-title class="headline justify-center"> Forgot Password </v-card-title>
|
||||
<v-card-title class="headline justify-center"> {{ $t('user.forgot-password') }} </v-card-title>
|
||||
<BaseDivider />
|
||||
<v-card-text>
|
||||
<v-form @submit.prevent="requestLink()">
|
||||
|
@ -15,7 +15,7 @@
|
|||
:label="$t('user.email')"
|
||||
type="text"
|
||||
/>
|
||||
<p class="text-center">Please enter your email address and we will send you a link to reset your password.</p>
|
||||
<p class="text-center">{{ $t('user.forgot-password-text') }}</p>
|
||||
<v-card-actions class="justify-center">
|
||||
<div class="max-button">
|
||||
<v-btn :loading="loading" color="primary" type="submit" large rounded class="rounded-xl" block>
|
||||
|
@ -34,7 +34,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent, toRefs, reactive } from "@nuxtjs/composition-api";
|
||||
import { defineComponent, toRefs, reactive, useContext } from "@nuxtjs/composition-api";
|
||||
import { useUserApi } from "~/composables/api";
|
||||
import { alert } from "~/composables/use-toast";
|
||||
export default defineComponent({
|
||||
|
@ -47,6 +47,7 @@ export default defineComponent({
|
|||
error: false,
|
||||
});
|
||||
|
||||
const { i18n } = useContext();
|
||||
const api = useUserApi();
|
||||
|
||||
async function requestLink() {
|
||||
|
@ -57,11 +58,11 @@ export default defineComponent({
|
|||
if (response?.status === 200) {
|
||||
state.loading = false;
|
||||
state.error = false;
|
||||
alert.success("Link successfully sent");
|
||||
alert.success(i18n.tc("profile.email-sent"));
|
||||
} else {
|
||||
state.loading = false;
|
||||
state.error = true;
|
||||
alert.error("Email failure");
|
||||
alert.error(i18n.tc("profile.error-sending-email"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -73,7 +74,7 @@ export default defineComponent({
|
|||
|
||||
head() {
|
||||
return {
|
||||
title: this.$t("user.login") as string,
|
||||
title: this.$tc("user.login"),
|
||||
};
|
||||
},
|
||||
});
|
||||
|
@ -83,4 +84,4 @@ export default defineComponent({
|
|||
.max-button {
|
||||
width: 300px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
|
|
@ -115,7 +115,7 @@ export default defineComponent({
|
|||
},
|
||||
head() {
|
||||
return {
|
||||
title: this.$t("settings.pages") as string,
|
||||
title: this.$t("cookbook.cookbooks") as string,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
lockBulkImport = false;
|
||||
"
|
||||
>
|
||||
Clear
|
||||
{{ $t('general.clear') }}
|
||||
</BaseButton>
|
||||
<v-spacer></v-spacer>
|
||||
<BaseButton class="mr-1 mb-1" color="info" @click="bulkUrls.push({ url: '', categories: [], tags: [] })">
|
||||
|
|
|
@ -45,10 +45,11 @@
|
|||
>
|
||||
<v-card-text>
|
||||
{{ $t("general.confirm-delete-generic") }}
|
||||
<p v-if="deleteTarget" class="mt-4 ml-4">{{ deleteTarget.name }}</p>
|
||||
</v-card-text>
|
||||
</BaseDialog>
|
||||
|
||||
<!-- Recipe Data Table -->
|
||||
<!-- Data Table -->
|
||||
<BaseCardSectionTitle :icon="$globals.icons.categories" section :title="$tc('data-pages.categories.category-data')"> </BaseCardSectionTitle>
|
||||
<CrudTable
|
||||
:table-config="tableConfig"
|
||||
|
|
|
@ -151,10 +151,11 @@
|
|||
>
|
||||
<v-card-text>
|
||||
{{ $t("general.confirm-delete-generic") }}
|
||||
<p v-if="deleteTarget" class="mt-4 ml-4">{{ deleteTarget.name }}</p>
|
||||
</v-card-text>
|
||||
</BaseDialog>
|
||||
|
||||
<!-- Recipe Data Table -->
|
||||
<!-- Data Table -->
|
||||
<BaseCardSectionTitle :icon="$globals.icons.foods" section :title="$tc('data-pages.foods.food-data')"> </BaseCardSectionTitle>
|
||||
<CrudTable
|
||||
:table-config="tableConfig"
|
||||
|
@ -394,6 +395,7 @@ export default defineComponent({
|
|||
deleteEventHandler,
|
||||
deleteDialog,
|
||||
deleteFood,
|
||||
deleteTarget,
|
||||
// Alias Manager
|
||||
aliasManagerDialog,
|
||||
aliasManagerEventHandler,
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
>
|
||||
<v-card-text>
|
||||
{{ $t("general.confirm-delete-generic") }}
|
||||
<MultiPurposeLabel v-if="deleteTarget" class="mt-4 ml-4" :label="deleteTarget" />
|
||||
</v-card-text>
|
||||
</BaseDialog>
|
||||
|
||||
|
@ -79,7 +80,7 @@
|
|||
</v-card-text>
|
||||
</BaseDialog>
|
||||
|
||||
<!-- Recipe Data Table -->
|
||||
<!-- Data Table -->
|
||||
<BaseCardSectionTitle :icon="$globals.icons.tags" section :title="$tc('data-pages.labels.labels')"> </BaseCardSectionTitle>
|
||||
<CrudTable
|
||||
:table-config="tableConfig"
|
||||
|
@ -228,13 +229,19 @@ export default defineComponent({
|
|||
labels: labelStore.labels,
|
||||
validators,
|
||||
|
||||
deleteEventHandler,
|
||||
deleteLabel,
|
||||
// create
|
||||
createLabel,
|
||||
createLabelData: labelData.data,
|
||||
|
||||
// edit
|
||||
editLabel,
|
||||
editEventHandler,
|
||||
editSaveLabel,
|
||||
createLabel,
|
||||
createLabelData: labelData.data,
|
||||
|
||||
// delete
|
||||
deleteEventHandler,
|
||||
deleteLabel,
|
||||
deleteTarget,
|
||||
|
||||
// Seed
|
||||
seedDatabase,
|
||||
|
|
|
@ -121,7 +121,7 @@
|
|||
<template #icon>
|
||||
{{ $globals.icons.database }}
|
||||
</template>
|
||||
Import
|
||||
{{ $t('general.import') }}}
|
||||
</BaseButton>
|
||||
<BaseButton
|
||||
color="info"
|
||||
|
@ -140,7 +140,7 @@
|
|||
</section>
|
||||
|
||||
<section class="mt-10">
|
||||
<!-- Downloads Data Table -->
|
||||
<!-- Data Table -->
|
||||
<BaseCardSectionTitle :icon="$globals.icons.database" section :title="$tc('data-pages.recipes.data-exports')">
|
||||
{{ $t('data-pages.recipes.data-exports-description') }}
|
||||
</BaseCardSectionTitle>
|
||||
|
|
|
@ -45,10 +45,11 @@
|
|||
>
|
||||
<v-card-text>
|
||||
{{ $t("general.confirm-delete-generic") }}
|
||||
<p v-if="deleteTarget" class="mt-4 ml-4">{{ deleteTarget.name }}</p>
|
||||
</v-card-text>
|
||||
</BaseDialog>
|
||||
|
||||
<!-- Recipe Data Table -->
|
||||
<!-- Data Table -->
|
||||
<BaseCardSectionTitle :icon="$globals.icons.tags" section :title="$tc('data-pages.tags.tag-data')"> </BaseCardSectionTitle>
|
||||
<CrudTable
|
||||
:table-config="tableConfig"
|
||||
|
|
|
@ -47,10 +47,11 @@
|
|||
>
|
||||
<v-card-text>
|
||||
{{ $t("general.confirm-delete-generic") }}
|
||||
<p v-if="deleteTarget" class="mt-4 ml-4">{{ deleteTarget.name }}</p>
|
||||
</v-card-text>
|
||||
</BaseDialog>
|
||||
|
||||
<!-- Tool Data Table -->
|
||||
<!-- Data Table -->
|
||||
<BaseCardSectionTitle :icon="$globals.icons.potSteam" section :title="$tc('data-pages.tools.tool-data')"> </BaseCardSectionTitle>
|
||||
<CrudTable
|
||||
:table-config="tableConfig"
|
||||
|
|
|
@ -125,6 +125,7 @@
|
|||
>
|
||||
<v-card-text>
|
||||
{{ $t("general.confirm-delete-generic") }}
|
||||
<p v-if="deleteTarget" class="mt-4 ml-4">{{ deleteTarget.name }}</p>
|
||||
</v-card-text>
|
||||
</BaseDialog>
|
||||
|
||||
|
@ -165,7 +166,7 @@
|
|||
</v-card-text>
|
||||
</BaseDialog>
|
||||
|
||||
<!-- Recipe Data Table -->
|
||||
<!-- Data Table -->
|
||||
<BaseCardSectionTitle :icon="$globals.icons.units" section :title="$tc('data-pages.units.unit-data')"> </BaseCardSectionTitle>
|
||||
<CrudTable
|
||||
:table-config="tableConfig"
|
||||
|
@ -421,6 +422,7 @@ export default defineComponent({
|
|||
deleteEventHandler,
|
||||
deleteDialog,
|
||||
deleteUnit,
|
||||
deleteTarget,
|
||||
// Alias Manager
|
||||
aliasManagerDialog,
|
||||
aliasManagerEventHandler,
|
||||
|
|
|
@ -392,6 +392,11 @@ export default defineComponent({
|
|||
getMigrationReports,
|
||||
};
|
||||
},
|
||||
head() {
|
||||
return {
|
||||
title: this.$tc("settings.migrations"),
|
||||
};
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
@ -181,7 +181,7 @@ export default defineComponent({
|
|||
const optionsSections: OptionSection[] = [
|
||||
{
|
||||
id: 1,
|
||||
text: "Recipe Events",
|
||||
text: i18n.tc("events.recipe-events"),
|
||||
options: [
|
||||
{
|
||||
text: i18n.t("general.create") as string,
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<v-container v-if="report">
|
||||
<BaseCardSectionTitle :title="report.name"> </BaseCardSectionTitle>
|
||||
|
||||
<v-card-text> Report Id: {{ id }} </v-card-text>
|
||||
<v-card-text> {{ $t('group.report-with-id', { id:id }) }} </v-card-text>
|
||||
|
||||
<v-data-table :headers="itemHeaders" :items="report.entries" :items-per-page="50" show-expand>
|
||||
<template #item.success="{ item }">
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
<v-card-text>
|
||||
{{ $t("user-registration.provide-registration-token-description") }}
|
||||
<v-form ref="domTokenForm" class="mt-4" @submit.prevent>
|
||||
<v-text-field v-model="token" v-bind="inputAttrs" label="Group Token" :rules="[validators.required]" />
|
||||
<v-text-field v-model="token" v-bind="inputAttrs" :label="$t('group.group-token')" :rules="[validators.required]" />
|
||||
</v-form>
|
||||
</v-card-text>
|
||||
<v-divider />
|
||||
|
@ -244,7 +244,7 @@
|
|||
</div>
|
||||
|
||||
<v-card-actions class="justify-center flex-column py-8">
|
||||
<v-btn text class="mb-2" to="/login"> Login </v-btn>
|
||||
<v-btn text class="mb-2" to="/login"> {{ $t("user.login") }} </v-btn>
|
||||
<BaseButton large color="primary" @click="langDialog = true">
|
||||
<template #icon> {{ $globals.icons.translate }}</template>
|
||||
{{ $t("language-dialog.choose-language") }}
|
||||
|
@ -472,7 +472,7 @@ export default defineComponent({
|
|||
}
|
||||
const { response } = await api.register.register(payload);
|
||||
if (response?.status === 201) {
|
||||
alert.success("Registration Success");
|
||||
alert.success(i18n.tc("user-registration.registration-success"));
|
||||
router.push("/login");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<v-container fill-height fluid class="d-flex justify-center align-center">
|
||||
<v-card color="background d-flex flex-column align-center" flat width="600px">
|
||||
<v-card-title class="headline justify-center"> Reset Password </v-card-title>
|
||||
<v-card-title class="headline justify-center"> {{ $t("user.reset-password") }} </v-card-title>
|
||||
<BaseDivider />
|
||||
<v-card-text>
|
||||
<v-form @submit.prevent="requestLink()">
|
||||
|
@ -23,7 +23,7 @@
|
|||
class="rounded-lg"
|
||||
:prepend-icon="$globals.icons.lock"
|
||||
name="password"
|
||||
label="Password"
|
||||
:label="$t('user.password')"
|
||||
type="password"
|
||||
:rules="[validators.required]"
|
||||
/>
|
||||
|
@ -35,11 +35,11 @@
|
|||
class="rounded-lg"
|
||||
:prepend-icon="$globals.icons.lock"
|
||||
name="password"
|
||||
label="Confirm Password"
|
||||
:label="$t('user.confirm-password')"
|
||||
type="password"
|
||||
:rules="[validators.required, passwordMatch]"
|
||||
/>
|
||||
<p class="text-center">Please enter your new password.</p>
|
||||
<p class="text-center">{{ $t("user.please-enter-password") }}</p>
|
||||
<v-card-actions class="justify-center">
|
||||
<div class="max-button">
|
||||
<v-btn
|
||||
|
@ -67,7 +67,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent, toRefs, reactive } from "@nuxtjs/composition-api";
|
||||
import { defineComponent, toRefs, reactive, useContext } from "@nuxtjs/composition-api";
|
||||
import { useUserApi } from "~/composables/api";
|
||||
import { alert } from "~/composables/use-toast";
|
||||
import { validators } from "@/composables/use-validators";
|
||||
|
@ -84,7 +84,8 @@ export default defineComponent({
|
|||
error: false,
|
||||
});
|
||||
|
||||
const passwordMatch = () => state.password === state.passwordConfirm || "Passwords do not match";
|
||||
const { i18n } = useContext();
|
||||
const passwordMatch = () => state.password === state.passwordConfirm || i18n.tc("user.password-must-match");
|
||||
|
||||
// ===================
|
||||
// Token Getter
|
||||
|
@ -108,11 +109,11 @@ export default defineComponent({
|
|||
if (response?.status === 200) {
|
||||
state.loading = false;
|
||||
state.error = false;
|
||||
alert.success("Password Reset Successful");
|
||||
alert.success(i18n.tc("user.password-updated"));
|
||||
} else {
|
||||
state.loading = false;
|
||||
state.error = true;
|
||||
alert.error("Something Went Wrong");
|
||||
alert.error(i18n.tc("events.something-went-wrong"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -137,4 +138,4 @@ export default defineComponent({
|
|||
.max-button {
|
||||
width: 300px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
|
|
@ -393,8 +393,8 @@ export default defineComponent({
|
|||
};
|
||||
|
||||
const contextMenu = [
|
||||
{ title: "Delete", action: contextActions.delete },
|
||||
{ title: "Ingredient", action: contextActions.setIngredient },
|
||||
{ title: i18n.tc("general.delete"), action: contextActions.delete },
|
||||
{ title: i18n.tc("recipe.ingredient"), action: contextActions.setIngredient },
|
||||
];
|
||||
|
||||
function contextMenuAction(action: string, item: ShoppingListItemOut, idx: number) {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<template #header>
|
||||
<v-img max-height="200px" max-width="200px" :src="require('~/static/svgs/manage-api-tokens.svg')"></v-img>
|
||||
</template>
|
||||
<template #title> API Tokens </template>
|
||||
<template #title> {{ $tc("settings.token.api-tokens") }} </template>
|
||||
{{ $tc('settings.token.you-have-token-count', user.tokens.length) }}
|
||||
</BasePageTitle>
|
||||
<section class="d-flex justify-center">
|
||||
|
@ -42,7 +42,7 @@
|
|||
</v-card-actions>
|
||||
</v-card>
|
||||
</section>
|
||||
<BaseCardSectionTitle class="mt-10" title="Active Tokens"> </BaseCardSectionTitle>
|
||||
<BaseCardSectionTitle class="mt-10" :title="$tc('settings.token.active-tokens')"> </BaseCardSectionTitle>
|
||||
<section class="d-flex flex-column">
|
||||
<div v-for="(token, index) in $auth.user.tokens" :key="index">
|
||||
<v-card outlined class="mb-2">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue