diff options
author | Frankie B <git@diskfloppy.me> | 2023-09-08 23:19:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-08 23:19:40 +0100 |
commit | 26901f82220fe18c0ad6e2bfc23c59b451a4e198 (patch) | |
tree | b199f4d6680b8b62869e5062768e519db846511d /resources/views/pages/bookmarks.blade.php | |
parent | 5d148485408bb169cba60c9a82d188442630d233 (diff) |
feat: add error handling (#14)
* Remove commented out crap
* Update theme to use some colors from catppuccin, add error handling for API/DB
Diffstat (limited to 'resources/views/pages/bookmarks.blade.php')
-rw-r--r-- | resources/views/pages/bookmarks.blade.php | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/resources/views/pages/bookmarks.blade.php b/resources/views/pages/bookmarks.blade.php index 54d464d..d7d8283 100644 --- a/resources/views/pages/bookmarks.blade.php +++ b/resources/views/pages/bookmarks.blade.php @@ -3,7 +3,18 @@ @section('description', 'This is the personal homepage of floppydisk.') @section('content') @php - $categories = DB::select(' + $db_alive = true; + try { + DB::connection()->getPdo(); + } catch (Exception $e) { + $db_alive = false; + } + @endphp + @if (!$db_alive) + @include('components.errors.db-error') + @else + @php + $categories = DB::select(' SELECT id, name FROM bookmark__categories ORDER BY priority ASC @@ -37,4 +48,5 @@ </table> <br> @endforeach + @endif @stop |