From f30c8943d98c90e8c37eb97ca0b6fe58e75c71b5 Mon Sep 17 00:00:00 2001 From: Pranav Raj Sreepuram Date: Sun, 26 Jul 2020 21:50:59 +0530 Subject: [PATCH] chore: Display app version on settings/admin area --- .../administrate/components/_navigation.scss | 8 +++++++- .../stylesheets/administrate/reset/_normalize.scss | 1 + app/controllers/dashboard_controller.rb | 2 ++ .../routes/dashboard/settings/account/Index.vue | 11 +++++++++++ app/javascript/shared/store/globalConfig.js | 2 ++ .../super_admin/application/_navigation.html.erb | 11 +++++++---- config/app.yml | 8 ++++---- 7 files changed, 34 insertions(+), 9 deletions(-) diff --git a/app/assets/stylesheets/administrate/components/_navigation.scss b/app/assets/stylesheets/administrate/components/_navigation.scss index f6b1a641d..1e7e35d25 100644 --- a/app/assets/stylesheets/administrate/components/_navigation.scss +++ b/app/assets/stylesheets/administrate/components/_navigation.scss @@ -1,6 +1,6 @@ .logo-brand { margin-bottom: $space-normal; - padding: $space-normal $space-smaller; + padding: $space-normal $space-smaller $space-small; text-align: center; } @@ -70,3 +70,9 @@ left: $space-normal; position: fixed; } + +.app-version { + color: $color-gray; + font-size: $font-size-small; + padding-top: $space-smaller; +} diff --git a/app/assets/stylesheets/administrate/reset/_normalize.scss b/app/assets/stylesheets/administrate/reset/_normalize.scss index fa4e73dd4..01f77c433 100644 --- a/app/assets/stylesheets/administrate/reset/_normalize.scss +++ b/app/assets/stylesheets/administrate/reset/_normalize.scss @@ -13,6 +13,7 @@ html { line-height: 1.15; /* 1 */ -ms-text-size-adjust: 100%; /* 2 */ -webkit-text-size-adjust: 100%; /* 2 */ + -moz-osx-font-smoothing: grayscale; } /* Sections diff --git a/app/controllers/dashboard_controller.rb b/app/controllers/dashboard_controller.rb index 20fa6f027..27fa7fb86 100644 --- a/app/controllers/dashboard_controller.rb +++ b/app/controllers/dashboard_controller.rb @@ -17,6 +17,8 @@ class DashboardController < ActionController::Base 'PRIVACY_URL', 'DISPLAY_MANIFEST', 'CREATE_NEW_ACCOUNT_FROM_DASHBOARD' + ).merge( + APP_VERSION: Chatwoot.config[:version] ) end end diff --git a/app/javascript/dashboard/routes/dashboard/settings/account/Index.vue b/app/javascript/dashboard/routes/dashboard/settings/account/Index.vue index 8ade5fd8e..e7da6e884 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/account/Index.vue +++ b/app/javascript/dashboard/routes/dashboard/settings/account/Index.vue @@ -64,6 +64,10 @@ +
+ {{ `v${globalConfig.appVersion}` }} +
+ diff --git a/app/javascript/shared/store/globalConfig.js b/app/javascript/shared/store/globalConfig.js index b8ce572fa..4b1e75162 100644 --- a/app/javascript/shared/store/globalConfig.js +++ b/app/javascript/shared/store/globalConfig.js @@ -1,4 +1,5 @@ const { + APP_VERSION: appVersion, CREATE_NEW_ACCOUNT_FROM_DASHBOARD: createNewAccountFromDashboard, INSTALLATION_NAME: installationName, LOGO_THUMBNAIL: logoThumbnail, @@ -9,6 +10,7 @@ const { } = window.globalConfig; const state = { + appVersion, createNewAccountFromDashboard, installationName, logo, diff --git a/app/views/super_admin/application/_navigation.html.erb b/app/views/super_admin/application/_navigation.html.erb index 6ecc5bd90..f4c66cc2e 100644 --- a/app/views/super_admin/application/_navigation.html.erb +++ b/app/views/super_admin/application/_navigation.html.erb @@ -22,6 +22,7 @@ as defined by the routes in the `admin/` namespace diff --git a/config/app.yml b/config/app.yml index eff724611..a33711257 100644 --- a/config/app.yml +++ b/config/app.yml @@ -1,5 +1,5 @@ shared: &shared - version: '1.6.1' + version: '1.7.0' development: <<: *shared @@ -7,8 +7,8 @@ development: production: <<: *shared -staging: +staging: <<: *shared -test: - <<: *shared \ No newline at end of file +test: + <<: *shared