diff --git a/app/Repositories/ConfigurationRepository.php b/app/Repositories/ConfigurationRepository.php index 24fc667..0e56783 100755 --- a/app/Repositories/ConfigurationRepository.php +++ b/app/Repositories/ConfigurationRepository.php @@ -4,6 +4,7 @@ use App\Configuration; use Carbon\Carbon; +use File; class ConfigurationRepository { @@ -111,6 +112,8 @@ public function create($params) $config->text_value = !is_numeric($value) ? $value : null; $config->save(); } + + $this->setDefaultCover($params); $this->setLocale($params); } @@ -158,4 +161,37 @@ public function setConfiguration() \App::setLocale(config('config.locale') ?: 'en'); Carbon::setLocale(config('config.locale') ?: 'en'); } + + /** + * @param array $params + */ + protected function setDefaultCover($params) + { + switch ($params['color_theme']) { + case "blue": + case "blue-dark": + case "default": + case "default-dark": + File::copy(public_path() . '/images/cover-default-blue.png', public_path() . '/uploads/images/cover-default.png'); + break; + case "green": + case "green-dark": + File::copy(public_path() . '/images/cover-default-green.png', public_path() . '/uploads/images/cover-default.png'); + break; + case "megna": + case "megna-dark": + File::copy(public_path() . '/images/cover-default-megna.png', public_path() . '/uploads/images/cover-default.png'); + break; + case "purple": + case "purple-dark": + File::copy(public_path() . '/images/cover-default-purple.png', public_path() . '/uploads/images/cover-default.png'); + break; + case "red": + case "red-dark": + File::copy(public_path() . '/images/cover-default-red.png', public_path() . '/uploads/images/cover-default.png'); + break; + default: + File::copy(public_path() . '/images/cover-default-red.png', public_path() . '/uploads/images/cover-default.png'); + } + } } diff --git a/config/system.php b/config/system.php index 448dbf8..d8b20bb 100755 --- a/config/system.php +++ b/config/system.php @@ -20,6 +20,7 @@ "facebook_group" => "", "default_cover" => "uploads/images/cover-default.png", "maintenance_mode_message" => "Briefly unavailable for scheduled maintenance. Check back in a minute.", + "app_url" => config('app.url'), ], "default_role" => [ "admin" => "admin", @@ -45,7 +46,8 @@ "email_verification", "facebook_group", "default_cover", - "maintenance_mode_message" + "maintenance_mode_message", + "app_url" ], "upload_path" => [ "config" => "uploads/config", diff --git a/package.json b/package.json index 1e29c8d..df25f72 100755 --- a/package.json +++ b/package.json @@ -25,9 +25,9 @@ "js-cookie": "^2.1.4", "laravel-vue-pagination": "^1.0.6", "uuid": "^3.1.0", - "v-mask": "^1.3.0", "v-tooltip": "^2.0.0-beta.12", "vue": "^2.5.16", + "vue-meta": "^1.5.2", "vue-multiselect": "^2.0.6", "vue-router": "^2.7.0", "vue-sortable": "^0.1.3", diff --git a/public/images/cover-default-blue.png b/public/images/cover-default-blue.png new file mode 100755 index 0000000..3fd2c3a Binary files /dev/null and b/public/images/cover-default-blue.png differ diff --git a/public/images/cover-default-green.png b/public/images/cover-default-green.png new file mode 100755 index 0000000..7cafd0d Binary files /dev/null and b/public/images/cover-default-green.png differ diff --git a/public/images/cover-default-megna.png b/public/images/cover-default-megna.png new file mode 100755 index 0000000..2ab45fc Binary files /dev/null and b/public/images/cover-default-megna.png differ diff --git a/public/images/cover-default-purple.png b/public/images/cover-default-purple.png new file mode 100755 index 0000000..132f8bd Binary files /dev/null and b/public/images/cover-default-purple.png differ diff --git a/public/images/cover-default-red.png b/public/images/cover-default-red.png new file mode 100755 index 0000000..b34e16b Binary files /dev/null and b/public/images/cover-default-red.png differ diff --git a/public/images/favicon.ico b/public/images/favicon.ico deleted file mode 100644 index e69de29..0000000 diff --git a/public/uploads/images/cover-default.png b/public/uploads/images/cover-default.png old mode 100644 new mode 100755 index 09a1f27..b34e16b Binary files a/public/uploads/images/cover-default.png and b/public/uploads/images/cover-default.png differ diff --git a/resources/assets/js/app.js b/resources/assets/js/app.js index 708b201..6d9cbf6 100755 --- a/resources/assets/js/app.js +++ b/resources/assets/js/app.js @@ -12,7 +12,7 @@ import Vue from 'vue' import VueRouter from 'vue-router' import Form from './services/form' import helper from './services/helper' -import VueMask from 'v-mask' +import Meta from 'vue-meta' import VuejsDialog from "vuejs-dialog" import Sortable from 'vue-sortable' import paginationRecord from './components/PaginationRecord' @@ -39,7 +39,7 @@ Vue.prototype.$last = function (item, list) { }; Vue.use(VueRouter); -Vue.use(VueMask); +Vue.use(Meta); Vue.use(VuejsDialog, { message: i18n.general.proceed_with_request, okText: i18n.general.yes, diff --git a/resources/assets/js/components/SummernoteEditor.vue b/resources/assets/js/components/SummernoteEditor.vue index 248711c..96f7acb 100755 --- a/resources/assets/js/components/SummernoteEditor.vue +++ b/resources/assets/js/components/SummernoteEditor.vue @@ -102,8 +102,8 @@ let stringStripper = /(\n|\r| class=(")?Mso[a-zA-Z]+(")?)/g; let output = input.replace(stringStripper, ' '); - let commentSripper = new RegExp('', 'g'); - output = output.replace(commentSripper, ''); + let commentStripper = new RegExp('', 'g'); + output = output.replace(commentStripper, ''); let allowedTags = [ '
', '
', '
', '',
@@ -121,6 +121,8 @@
output = output.replace(attributeStripper, '');
}
+ output = output.replace(/[&]nbsp[;]/gi," ");
+
return output;
},
updatePastedText() {
diff --git a/resources/assets/js/layouts/Header.vue b/resources/assets/js/layouts/Header.vue
index 55b1597..e141731 100755
--- a/resources/assets/js/layouts/Header.vue
+++ b/resources/assets/js/layouts/Header.vue
@@ -44,7 +44,7 @@
-