Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Add flush page for local storage.
James Coledbd67254528a
diff --git a/app/Http/Controllers/DebugController.php b/app/Http/Controllers/DebugController.phpindex 2f556b3296..8552433efa 100644--- a/app/Http/Controllers/DebugController.php+++ b/app/Http/Controllers/DebugController.php@@ -106,7 +106,7 @@ final class DebugController extends Controller** @throws FireflyException*/- public function flush(Request $request): RedirectResponse+ public function flush(Request $request): View{if ($this->hasNoTables() || $this->isOldVersionInstalled()) {throw new FireflyException('This is not the moment.');@@ -128,8 +128,8 @@ final class DebugController extends Controller}Artisan::call('view:clear');-- return redirect(route('index'));+ return view('flush');+ //return redirect(route('index'));}/**diff --git a/resources/assets/v3/js/pages/flush.js b/resources/assets/v3/js/pages/flush.jsnew file mode 100644index 0000000000..9eebc34751--- /dev/null+++ b/resources/assets/v3/js/pages/flush.js@@ -0,0 +1,25 @@+/*+ * dashboard.js+ * Copyright (c) 2026 [email protected]+ *+ * This file is part of Firefly III (https://github.com/firefly-iii).+ *+ * This program is free software: you can redistribute it and/or modify+ * it under the terms of the GNU Affero General Public License as+ * published by the Free Software Foundation, either version 3 of the+ * License, or (at your option) any later version.+ *+ * This program is distributed in the hope that it will be useful,+ * but WITHOUT ANY WARRANTY; without even the implied warranty of+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+ * GNU Affero General Public License for more details.+ *+ * You should have received a copy of the GNU Affero General Public License+ * along with this program. If not, see <https://www.gnu.org/licenses/>.+ */++import '../boot/blank-bootstrap.js';+window.onload = function(){+ localStorage.clear();+ window.location = document.getElementsByTagName('base')[0].href;+}diff --git a/resources/assets/v3/vite.config.js b/resources/assets/v3/vite.config.jsindex 0493dbb06f..56584580fc 100644--- a/resources/assets/v3/vite.config.js+++ b/resources/assets/v3/vite.config.js@@ -47,6 +47,7 @@ export default defineConfig(({command, mode, isSsrBuild, isPreview}) => {// generic'js/pages/generic.js','js/pages/blank.js', // small bootstrap+ 'js/pages/flush.js',// accounts'js/pages/accounts/create.js',diff --git a/resources/views/flush.blade.php b/resources/views/flush.blade.phpnew file mode 100644index 0000000000..0314844910--- /dev/null+++ b/resources/views/flush.blade.php@@ -0,0 +1,3 @@+@extends('layout.v3.flush')+@section('content')+@endsectiondiff --git a/resources/views/layout/v3/auth.blade.php b/resources/views/layout/v3/auth.blade.phpindex 673713f76c..cc8e3f0701 100644--- a/resources/views/layout/v3/auth.blade.php+++ b/resources/views/layout/v3/auth.blade.php@@ -31,8 +31,8 @@<body class="login-page bg-body-secondary"><div class="login-box"><div class="login-logo">- <img src="images/logo-session.png" width="68" height="100" alt="Logo" title="Logo"/><br>@if(true===$IS_DEMO_SITE)+ <img src="images/logo-session.png" width="68" height="100" alt="Logo" title="Logo"/><br><a href="{{ route('index', null, true) }}"><strong>Firefly</strong> III</a>@endif</div>diff --git a/resources/views/layout/v3/flush.blade.php b/resources/views/layout/v3/flush.blade.phpnew file mode 100644index 0000000000..a3b6140c96--- /dev/null+++ b/resources/views/layout/v3/flush.blade.php@@ -0,0 +1,48 @@+<!doctype html>+<html lang="{{ __('config.html_language') }}">+<head>+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>+ <meta charset="UTF-8">+ <meta http-equiv="X-UA-Compatible" content="IE=edge">+ <meta name="csrf-token" content="{{ csrf_token() }}">+ <meta name="robots" content="noindex, nofollow, noarchive, noodp, NoImageIndex, noydir">+ <meta name="apple-mobile-web-app-capable" content="yes">+ <meta name="mobile-web-app-capable" content="yes">+ <!--+ (FLUSH)+ If the base href URL begins with "http://" but you are sure it should start with "https://",+ please visit the following page: https://bit.ly/FF3-broken-base-href+ -->+ <base href="{{ route('index', null, true) }}/">+ <title>@yield('status') - {{ $title ?? 'Firefly III' }}</title>+ <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"/>+ <meta name="theme-color" content="#007bff" media="(prefers-color-scheme: light)"/>+ <meta name="theme-color" content="#1a1a1a" media="(prefers-color-scheme: dark)"/>+ <meta name="color-scheme" content="light dark">+ @vite(['sass/app.scss'])+ <x-layout.fav-icons/>+ <script nonce="{{ $JS_NONCE ?? '' }}">+ (() => {+ 'use strict'+ document.documentElement.setAttribute('data-bs-theme', (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'))+ })()+ </script>+</head>+<body class="bg-body-tertiary">+<main class="align-items-center min-vh-100 py-5">+ <div class="container">+ <div class="row justify-content-center">+ <div class="col-md-12 col-lg-8 col-xl-8">+ <p class="text-center">+ <img src="images/logo-session.png" width="68" height="100" alt="Firefly III Logo" title="Firefly III"/><br>+ </p>+ <h1 style="text-align:center;"><em class="bi bi-hourglass"></em></h1>+ @yield('content')+ </div>+ </div>+ </div>+</main>+@vite(['js/pages/flush.js'])+@yield('scripts')+</body>+</html>