From 2936b1ae96675d21043faed9222dd3c95343e410 Mon Sep 17 00:00:00 2001 From: V13Axel Date: Sun, 12 Nov 2023 15:55:57 -0500 Subject: [PATCH] Bunch of mobile improvements --- resources/js/events-manager.js | 36 ++++++++++- resources/sass/app-dark.scss | 6 +- .../views/layouts/manage_events.blade.php | 59 +++++++++---------- 3 files changed, 68 insertions(+), 33 deletions(-) diff --git a/resources/js/events-manager.js b/resources/js/events-manager.js index 908c6f103..5bd0172ab 100755 --- a/resources/js/events-manager.js +++ b/resources/js/events-manager.js @@ -18,7 +18,7 @@ const events_manager = { selected: {}, visibility: "any", updateCategoryTo: null, - showFilters: true, + showFilters: false, init() { this.$watch("window.events", () => { @@ -35,6 +35,40 @@ const events_manager = { }); }, + hideSelected($dispatch) { + Object.entries(this.selected) + .filter((entry) => entry[1]) + .forEach((event) => { + let canonicalEvent = window.events.find( + (canonicalEvent) => + canonicalEvent.id.toString() === event[0], + ); + + canonicalEvent.settings.hide = true; + }); + + this.selected = {}; + + $dispatch("events-changed"); + }, + + unhideSelected($dispatch) { + Object.entries(this.selected) + .filter((entry) => entry[1]) + .forEach((event) => { + let canonicalEvent = window.events.find( + (canonicalEvent) => + canonicalEvent.id.toString() === event[0], + ); + + canonicalEvent.settings.hide = false; + }); + + this.selected = {}; + + $dispatch("events-changed"); + }, + eventVisibilityTooltip(event) { if (event.settings.hide_full) { return "This event is entirely hidden from the calendar."; diff --git a/resources/sass/app-dark.scss b/resources/sass/app-dark.scss index ad4cb30b2..59f1c69db 100755 --- a/resources/sass/app-dark.scss +++ b/resources/sass/app-dark.scss @@ -204,7 +204,11 @@ body { } .border{ - border: 1px solid rgba(166, 168, 179, 0.32) !important; + border: 1px solid rgb(51, 65, 85) !important; +} + +.border-right { + border-right: 1px solid rgb(51, 65, 85) !important; } .btn-outline-secondary { diff --git a/resources/views/layouts/manage_events.blade.php b/resources/views/layouts/manage_events.blade.php index d5b0badf6..2bc9b9179 100755 --- a/resources/views/layouts/manage_events.blade.php +++ b/resources/views/layouts/manage_events.blade.php @@ -26,10 +26,12 @@ class="layout_background clickable_background hidden"
-
+
+ +
+ @click="search = ''" + :class="search.length ? 'grid' : 'hidden'">
@@ -40,7 +42,7 @@ class="layout_background clickable_background hidden"
-
+