diff --git a/docs/docs/documentation/getting-started/installation/backend-config.md b/docs/docs/documentation/getting-started/installation/backend-config.md index 3c73d3405..98f01fc3e 100644 --- a/docs/docs/documentation/getting-started/installation/backend-config.md +++ b/docs/docs/documentation/getting-started/installation/backend-config.md @@ -4,22 +4,22 @@ ### General -| Variables | Default | Description | -| ----------------------------- | :-------------------: | -------------------------------------------------------------------------------------------------- | -| PUID | 911 | UserID permissions between host OS and container | -| PGID | 911 | GroupID permissions between host OS and container | -| DEFAULT_GROUP | Home | The default group for users | -| DEFAULT_HOUSEHOLD | Family | The default household for users in each group | -| BASE_URL | http://localhost:8080 | Used for Notifications | -| TOKEN_TIME | 48 | The time in hours that a login/auth token is valid. Must be <= 87600 (10 years, in hours). | -| API_PORT | 9000 | The port exposed by backend API. **Do not change this if you're running in Docker** | -| API_DOCS | True | Turns on/off access to the API documentation locally | -| TZ | UTC | Must be set to get correct date/time on the server | -| ALLOW_SIGNUP\* | false | Allow user sign-up without token | -| ALLOW_PASSWORD_LOGIN | true | Whether or not to display the username+password input fields. Keep set to true unless you use OIDC authentication | -| LOG_CONFIG_OVERRIDE | | Override the config for logging with a custom path | -| LOG_LEVEL | info | Logging level (e.g. critical, error, warning, info, debug) | -| DAILY_SCHEDULE_TIME | 23:45 | The time of day to run daily server tasks, in HH:MM format. Use the server's local time, *not* UTC | +| Variables | Default | Description | +| ----------------------------- | :-------------------: | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| PUID | 911 | UserID permissions between host OS and container | +| PGID | 911 | GroupID permissions between host OS and container | +| DEFAULT_GROUP | Home | The default group for users | +| DEFAULT_HOUSEHOLD | Family | The default household for users in each group | +| BASE_URL | http://localhost:8080 | Used for Notifications | +| TOKEN_TIME | 48 | The time in hours that a login/auth token is valid. Must be <= 9600 (400 days, in hours). | +| API_PORT | 9000 | The port exposed by backend API. **Do not change this if you're running in Docker** | +| API_DOCS | True | Turns on/off access to the API documentation locally | +| TZ | UTC | Must be set to get correct date/time on the server | +| ALLOW_SIGNUP\* | false | Allow user sign-up without token | +| ALLOW_PASSWORD_LOGIN | true | Whether or not to display the username+password input fields. Keep set to true unless you use OIDC authentication | +| LOG_CONFIG_OVERRIDE | | Override the config for logging with a custom path | +| LOG_LEVEL | info | Logging level (e.g. critical, error, warning, info, debug) | +| DAILY_SCHEDULE_TIME | 23:45 | The time of day to run daily server tasks, in HH:MM format. Use the server's local time, *not* UTC | \* Starting in v1.4.0 this was changed to default to `false` as part of a security review of the application. diff --git a/frontend/components/Domain/Recipe/RecipePage/RecipePageParts/RecipePageParseDialog.vue b/frontend/components/Domain/Recipe/RecipePage/RecipePageParts/RecipePageParseDialog.vue index 6c11f59ed..d146edb29 100644 --- a/frontend/components/Domain/Recipe/RecipePage/RecipePageParts/RecipePageParseDialog.vue +++ b/frontend/components/Domain/Recipe/RecipePage/RecipePageParts/RecipePageParseDialog.vue @@ -196,7 +196,7 @@ import { VueDraggable } from "vue-draggable-plus"; import type { IngredientFood, IngredientUnit, ParsedIngredient, RecipeIngredient } from "~/lib/api/types/recipe"; import type { Parser } from "~/lib/api/user/recipes/recipe"; import type { NoUndefinedField } from "~/lib/api/types/non-generated"; -import { useAppInfo, useUserApi } from "~/composables/api"; +import { useUserApi } from "~/composables/api"; import { parseIngredientText } from "~/composables/recipes"; import { useFoodData, useFoodStore, useUnitData, useUnitStore } from "~/composables/store"; import { useGlobalI18n } from "~/composables/use-global-i18n"; @@ -213,9 +213,9 @@ const emit = defineEmits<{ (e: "save", value: NoUndefinedField): void; }>(); +const { $appInfo } = useNuxtApp(); const i18n = useGlobalI18n(); const api = useUserApi(); -const appInfo = useAppInfo(); const drag = ref(false); const unitStore = useUnitStore(); @@ -238,7 +238,7 @@ const availableParsers = computed(() => { { text: i18n.t("recipe.parser.openai-parser"), value: "openai", - hide: !appInfo.value?.enableOpenai, + hide: !$appInfo.enableOpenai, }, ]; }); diff --git a/frontend/components/Layout/DefaultLayout.vue b/frontend/components/Layout/DefaultLayout.vue index a45d7da8b..97b19cc28 100644 --- a/frontend/components/Layout/DefaultLayout.vue +++ b/frontend/components/Layout/DefaultLayout.vue @@ -97,7 +97,6 @@ diff --git a/frontend/lib/api/types/admin.ts b/frontend/lib/api/types/admin.ts index fcb33e202..a596fc210 100644 --- a/frontend/lib/api/types/admin.ts +++ b/frontend/lib/api/types/admin.ts @@ -18,6 +18,7 @@ export interface AdminAboutInfo { oidcProviderName: string; enableOpenai: boolean; enableOpenaiImageServices: boolean; + tokenTime: number; versionLatest: string; apiPort: number; apiDocs: boolean; @@ -50,6 +51,7 @@ export interface AppInfo { oidcProviderName: string; enableOpenai: boolean; enableOpenaiImageServices: boolean; + tokenTime: number; } export interface AppStartupInfo { isFirstLogin: boolean; diff --git a/frontend/nuxt.config.ts b/frontend/nuxt.config.ts index ed49e74d4..3c89549dc 100644 --- a/frontend/nuxt.config.ts +++ b/frontend/nuxt.config.ts @@ -72,7 +72,6 @@ export default defineNuxtConfig({ apiUrl: process.env.API_URL || "http://localhost:9000", public: { AUTH_TOKEN, - TOKEN_TIME: process.env.TOKEN_TIME || "48", GLOBAL_MIDDLEWARE: process.env.GLOBAL_MIDDLEWARE || undefined, SUB_PATH: process.env.SUB_PATH || "", // ============================================== diff --git a/frontend/pages/g/[groupSlug]/r/create.vue b/frontend/pages/g/[groupSlug]/r/create.vue index 37ae21311..54108921f 100644 --- a/frontend/pages/g/[groupSlug]/r/create.vue +++ b/frontend/pages/g/[groupSlug]/r/create.vue @@ -43,7 +43,6 @@