Skip to content

A self-hosted media server and file management system

fix: login message should be in config not vite

aminnausine77d89924a4f
diff --git a/app/Console/Commands/GenerateManifest.php b/app/Console/Commands/GenerateManifest.php
index 2a5f97c4..72663966 100644
--- a/app/Console/Commands/GenerateManifest.php
+++ b/app/Console/Commands/GenerateManifest.php
@@ -27,10 +27,11 @@ class GenerateManifest extends Command {
'os' => php_uname('s') . ' ' . php_uname('v'),
'cpu_arch' => php_uname('m'),
'cpu_cores' => trim(shell_exec('nproc') ?? '') ?: 'unknown',
+ 'login_message' => config('app.login_message')
], JSON_PRETTY_PRINT);
try {
- File::put(public_path('manifest.json'), json_encode($data, JSON_PRETTY_PRINT));
+ File::put(public_path('manifest.json'), $data);
$this->info("App manifest generated: $version ($commit)");
} catch (\Throwable $e) {
$this->error('❌ Failed to write manifest: ' . $e->getMessage());
diff --git a/app/Support/AppManifest.php b/app/Support/AppManifest.php
index 6458fb48..80a8a4ee 100644
--- a/app/Support/AppManifest.php
+++ b/app/Support/AppManifest.php
@@ -20,6 +20,7 @@ class AppManifest {
return [
'version' => $data['version'] ?? 'unknown',
'commit' => $data['commit'] ?? null,
+ 'loginMessage' => $data['login_message'] ?? null
];
}
diff --git a/config/app.php b/config/app.php
index 1445c1c2..c6a563ce 100755
--- a/config/app.php
+++ b/config/app.php
@@ -167,4 +167,6 @@ return [
// 'Example' => App\Facades\Example::class,
// 'FFMpeg' => ProtoneMedia\LaravelFFMpeg\Support\FFMpeg::class,
])->toArray(),
+
+ 'login_message' => env("LOGIN_MESSAGE", "Enter your email and password below to log in")
];
diff --git a/resources/js/types/types.ts b/resources/js/types/types.ts
index 02088cb2..03632ce1 100644
--- a/resources/js/types/types.ts
+++ b/resources/js/types/types.ts
@@ -213,6 +213,7 @@ export interface DropdownMenuItem {
export interface AppManifest {
version: string;
commit: string | null;
+ loginMessage?: string;
}
export interface BreadCrumbItem {
diff --git a/resources/js/views/LoginView.vue b/resources/js/views/LoginView.vue
index 38a8b741..35478ca2 100755
--- a/resources/js/views/LoginView.vue
+++ b/resources/js/views/LoginView.vue
@@ -1,15 +1,18 @@
<script setup lang="ts">
+import { useAppStore } from '@/stores/AppStore';
+import { storeToRefs } from 'pinia';
+
import AuthHeader from '@/components/headers/AuthHeader.vue';
import LayoutAuth from '@/layouts/LayoutAuth.vue';
import LoginForm from '@/components/forms/LoginForm.vue';
import AuthCard from '@/components/cards/AuthCard.vue';
-const loginMessage = import.meta.env.VITE_LOGIN_MESSAGE;
+const { appManifest } = storeToRefs(useAppStore());
</script>
<template>
<LayoutAuth>
- <AuthHeader class="whitespace-pre-wrap">{{ loginMessage ?? 'Enter your email and password below to log in' }}</AuthHeader>
+ <AuthHeader class="whitespace-pre-wrap">{{ appManifest?.loginMessage ?? 'Enter your email and password below to log in' }}</AuthHeader>
<AuthCard>
<LoginForm />
</AuthCard>