diff --git a/src/Controllers/BadasoMenuController.php b/src/Controllers/BadasoMenuController.php index e606f43c8..cd2d55637 100644 --- a/src/Controllers/BadasoMenuController.php +++ b/src/Controllers/BadasoMenuController.php @@ -174,10 +174,15 @@ public function addMenuItem(Request $request) 'target' => ['required'], ]); + $url = $request->get('url'); + if (filter_var($url, FILTER_VALIDATE_URL) === false) { + $url = substr($request->get('url'), 0, 1) != '/' ? '/'.$request->get('url') : $request->get('url'); + } + $new_menu_item = new MenuItem(); $new_menu_item->menu_id = $request->get('menu_id'); $new_menu_item->title = $request->get('title'); - $new_menu_item->url = substr($request->get('url'), 0, 1) != '/' ? '/'.$request->get('url') : $request->get('url'); + $new_menu_item->url = $url; $new_menu_item->target = $request->get('target') ? $request->get('target') : '_self'; $new_menu_item->icon_class = $request->get('icon_class'); $new_menu_item->color = $request->get('color'); @@ -233,10 +238,15 @@ public function editMenuItem(Request $request) 'target' => ['required'], ]); + $url = $request->get('url'); + if (filter_var($url, FILTER_VALIDATE_URL) === false) { + $url = substr($request->get('url'), 0, 1) != '/' ? '/'.$request->get('url') : $request->get('url'); + } + $menu_item = MenuItem::find($request->menu_item_id); $menu_item->menu_id = $request->get('menu_id'); $menu_item->title = $request->get('title'); - $menu_item->url = substr($request->get('url'), 0, 1) != '/' ? '/'.$request->get('url') : $request->get('url'); + $menu_item->url = $url; $menu_item->target = $request->get('target') ? $request->get('target') : '_self'; $menu_item->icon_class = $request->get('icon_class'); $menu_item->color = $request->get('color'); diff --git a/src/Mail/ForgotPassword.php b/src/Mail/ForgotPassword.php index b218616aa..251773961 100644 --- a/src/Mail/ForgotPassword.php +++ b/src/Mail/ForgotPassword.php @@ -33,6 +33,6 @@ public function __construct($user, $token) public function build() { return $this - ->markdown('Badaso::mail.forgot-password'); + ->markdown('badaso::mail.forgot-password'); } } diff --git a/src/Mail/SendUserVerification.php b/src/Mail/SendUserVerification.php index 1825a2d39..f35e3cb9b 100644 --- a/src/Mail/SendUserVerification.php +++ b/src/Mail/SendUserVerification.php @@ -34,6 +34,6 @@ public function build() { return $this ->subject('Email Verification | Badaso') - ->markdown('Badaso::mail.email-verification'); + ->markdown('badaso::mail.email-verification'); } } diff --git a/src/Seeder/Configurations/SiteManagementSeeder.php b/src/Seeder/Configurations/SiteManagementSeeder.php index adf8caf91..a3f949bab 100644 --- a/src/Seeder/Configurations/SiteManagementSeeder.php +++ b/src/Seeder/Configurations/SiteManagementSeeder.php @@ -55,7 +55,7 @@ public function run() 3 => [ 'key' => 'adminPanelHeaderColor', 'display_name' => 'Admin Panel Header Color', - 'value' => '#000', + 'value' => '#fff', 'details' => '', 'type' => 'color_picker', 'order' => 4, diff --git a/src/resources/js/app.js b/src/resources/js/app.js index 5cdc38ecd..2da63f76d 100644 --- a/src/resources/js/app.js +++ b/src/resources/js/app.js @@ -115,6 +115,7 @@ Vue.prototype.$constants = { }; Vue.prototype.$loadingConfig = { type: "sound", + color: "#06bbd3" }; let baseUrl = process.env.MIX_ADMIN_PANEL_ROUTE_PREFIX diff --git a/src/resources/js/assets/scss/layout/_vs-modified.scss b/src/resources/js/assets/scss/layout/_vs-modified.scss index 3812b7aa0..5d04e8272 100644 --- a/src/resources/js/assets/scss/layout/_vs-modified.scss +++ b/src/resources/js/assets/scss/layout/_vs-modified.scss @@ -234,4 +234,14 @@ th .vs-table-text { .vs-checkbox-primary input:checked+.vs-checkbox { border: 2px solid $primary!important; background: $primary; +} + +.vs-progress-primary { + .vs-progress--foreground { + background: $primary; + } + + .vs-progress--indeterminate { + background: $primary; + } } \ No newline at end of file diff --git a/src/resources/js/components/BadasoColorPicker.vue b/src/resources/js/components/BadasoColorPicker.vue index 12c4eba8f..f69fe02c1 100644 --- a/src/resources/js/components/BadasoColorPicker.vue +++ b/src/resources/js/components/BadasoColorPicker.vue @@ -151,7 +151,7 @@ export default { this.updateColors(val); this.$emit("input", val); } - }, + } }, mounted() { this.setColor(this.color || "#000000"); diff --git a/src/resources/js/components/BadasoSidebarItem.vue b/src/resources/js/components/BadasoSidebarItem.vue new file mode 100644 index 000000000..38f8bf3b7 --- /dev/null +++ b/src/resources/js/components/BadasoSidebarItem.vue @@ -0,0 +1,78 @@ + + diff --git a/src/resources/js/layout/admin/header/Navbar.vue b/src/resources/js/layout/admin/header/Navbar.vue index 6da0e13b7..7b9e7240b 100644 --- a/src/resources/js/layout/admin/header/Navbar.vue +++ b/src/resources/js/layout/admin/header/Navbar.vue @@ -45,15 +45,16 @@ left class="cursor-pointer ml-1 mr-md-3" > -
-

0 New

+

0 New

Notification

diff --git a/src/resources/js/layout/admin/sidebar/SideBar.vue b/src/resources/js/layout/admin/sidebar/SideBar.vue index 5223c640d..94efe536a 100644 --- a/src/resources/js/layout/admin/sidebar/SideBar.vue +++ b/src/resources/js/layout/admin/sidebar/SideBar.vue @@ -27,7 +27,7 @@ :subTitle="user.email" icon="person_pin" > - Profile - - + + Logout - + - + {{ $t("sidebar.dashboard") }} - +
- {{ menu.title }} - - + {{ menu.title }} - +
@@ -134,49 +138,53 @@ :icon="menu.iconClass" >
- {{ menu.title }} - - + {{ menu.title }} - +
diff --git a/src/resources/js/pages/menu-management/builder.vue b/src/resources/js/pages/menu-management/builder.vue index 36f07a1c0..e11226659 100644 --- a/src/resources/js/pages/menu-management/builder.vue +++ b/src/resources/js/pages/menu-management/builder.vue @@ -63,73 +63,6 @@ - - - - - - - - - - - - - - {{ $t("menu.builder.popup.edit.button.cancel") }} - - - {{ $t("menu.builder.popup.edit.button.edit") }} - - - @@ -295,7 +293,14 @@ export default { menuId: this.$route.params.id, }) .then((response) => { - this.menuItems = response.data.menuItems; + this.menuItems = response.data.menuItems.map((item) => { + let _item = item + _item.editItem = false + _item.title = item.title ? item.title : '' + _item.iconClass = item.iconClass ? item.iconClass : '' + _item.color = item.color ? item.color : '#000000' + return _item; + }); this.savedItems = [...response.data.menuItems]; this.flatSavedItems = this.flattenItems([...response.data.menuItems]); this.$vs.loading.close(); @@ -411,11 +416,7 @@ export default { }); }, editMenuItem(menuItem) { - this.menuItem = menuItem; - this.menuItem.target = menuItem.target - ? menuItem.target - : this.menuItemTargets[0].value; - this.editMenuItemPopUp = true; + menuItem.editItem = true }, addMenuItem(menuItem) { this.menuItem = { @@ -475,18 +476,18 @@ export default { this.$vs.loading.close(); }); }, - updateMenuItem() { + updateMenuItem(data) { this.errors = {}; this.$vs.loading(this.$loadingConfig); this.$api.menu .editItem({ menuId: this.$route.params.id, - menuItemId: this.menuItem.id, - title: this.menuItem.title, - url: this.menuItem.url, - target: this.menuItem.target, - iconClass: this.menuItem.iconClass, - color: this.menuItem.color, + menuItemId: data.id, + title: data.title, + url: data.url, + target: data.target, + iconClass: data.iconClass, + color: data.color, }) .then((response) => { this.editMenuItemPopUp = false;