diff --git a/src/App.vue b/src/App.vue index 76bffc39..6d159359 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,6 +1,6 @@ @@ -44,12 +44,16 @@ export default { show: { required: true, type: Boolean + }, + themeData: { + required: true, + type:Object } }, computed: { themeCss(){ return{ - '--theme-bg-color':config.app.themeBgColor + '--theme-bg-color': this.themeData.themeColor ? this.themeData.themeColor : config.app.themeBgColor } } }, diff --git a/src/config.js b/src/config.js index dcf617b5..98e052b6 100644 --- a/src/config.js +++ b/src/config.js @@ -9,8 +9,8 @@ const config = { version: process.env.VUE_APP_VERSION, buttonBgColor: process.env.VUE_APP_BTN_BACKGROUND || "#f1b319", buttonTextColor: process.env.VUE_APP_BTN_TXT_COLOR || "black", - headerBGColor:process.env.VUE_APP_HEADER_BACKGROUND || "rgba(241, 179, 25, 0.24)", - headerTextColor:process.env.VUE_APP_HEADER_TEXT_COLOR || "#212529" + headerBGColor: process.env.VUE_APP_HEADER_BACKGROUND || "rgba(241, 179, 25, 0.24)", + headerTextColor: process.env.VUE_APP_HEADER_TEXT_COLOR || "#212529", themeBgColor: process.env.VUE_APP_THEME_BACKGROUND || "rgb(54, 55, 64)", }, recaptchaSiteKey: process.env.VUE_APP_RECAPTCHA_SITE_KEY, diff --git a/src/router.js b/src/router.js index 8294808a..3953448d 100644 --- a/src/router.js +++ b/src/router.js @@ -97,6 +97,20 @@ const router = new Router({ title: `${config.appName} - Teams` }, }, + { + path: "/admin/setting/org", + name: "Org", + component: () => + import ( + /* webpackChunkName: "dashboard" */ + "./views/admin/setting/OrgSetting.vue" + ), + meta: { + requiresAuth: true, + admin: true, + title: `${config.appName} - Org` + }, + }, { path: "/admin/createapp", name: "CreateApp", diff --git a/src/views/admin/TeamMate.vue b/src/views/admin/TeamMate.vue index aaedb502..8fe19280 100644 --- a/src/views/admin/TeamMate.vue +++ b/src/views/admin/TeamMate.vue @@ -1,36 +1,4 @@ \ No newline at end of file diff --git a/src/views/participant/Event.vue b/src/views/participant/Event.vue index 1a3d8a2b..df85c51c 100644 --- a/src/views/participant/Event.vue +++ b/src/views/participant/Event.vue @@ -11,17 +11,18 @@ @@ -216,6 +218,34 @@ export default { this.eventData = { ...resp.data } + + // If it is old event then just recreating this variable using default values from config + if (!this.eventData['orgData']){ + this.eventData['orgData'] = {} + if (!this.eventData['orgData'].buttonBGColor){ + this.eventData['orgData'].buttonBGColor = config.app.buttonBgColor + } + + if (!this.eventData['orgData'].buttonTextColor) { + this.eventData['orgData'].buttonTextColor = config.app.buttonTextColor + } + + if (!this.eventData['orgData'].themeColor) { + this.eventData['orgData'].themeColor = config.app.themeBgColor + } + } + + eventBus.$emit('UpdateThemeEvent', { + logoPath: this.eventData['orgData'].logoPath, + themeColor: this.eventData['orgData'].themeColor + }) + + /// deleting data wich is not required. + delete this.eventData['orgData'].logoPath + delete this.eventData['orgData'].themeColor + delete this.eventData['orgData'].adminId + delete this.eventData['orgData'].subDomain + delete this.eventData['orgData']._id } else { this.notifyErr(Messages.EVENT.INVALID_PROJECT_SLUG) }