mirror of
				https://github.com/lingble/chatwoot.git
				synced 2025-10-30 18:47:51 +00:00 
			
		
		
		
	chore: Display app version on settings/admin area
This commit is contained in:
		| @@ -1,6 +1,6 @@ | |||||||
| .logo-brand { | .logo-brand { | ||||||
|   margin-bottom: $space-normal; |   margin-bottom: $space-normal; | ||||||
|   padding: $space-normal $space-smaller; |   padding: $space-normal $space-smaller $space-small; | ||||||
|   text-align: center; |   text-align: center; | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -70,3 +70,9 @@ | |||||||
|   left: $space-normal; |   left: $space-normal; | ||||||
|   position: fixed; |   position: fixed; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | .app-version { | ||||||
|  |   color: $color-gray; | ||||||
|  |   font-size: $font-size-small; | ||||||
|  |   padding-top: $space-smaller; | ||||||
|  | } | ||||||
|   | |||||||
| @@ -13,6 +13,7 @@ html { | |||||||
|   line-height: 1.15; /* 1 */ |   line-height: 1.15; /* 1 */ | ||||||
|   -ms-text-size-adjust: 100%; /* 2 */ |   -ms-text-size-adjust: 100%; /* 2 */ | ||||||
|   -webkit-text-size-adjust: 100%; /* 2 */ |   -webkit-text-size-adjust: 100%; /* 2 */ | ||||||
|  |   -moz-osx-font-smoothing: grayscale; | ||||||
| } | } | ||||||
|  |  | ||||||
| /* Sections | /* Sections | ||||||
|   | |||||||
| @@ -17,6 +17,8 @@ class DashboardController < ActionController::Base | |||||||
|       'PRIVACY_URL', |       'PRIVACY_URL', | ||||||
|       'DISPLAY_MANIFEST', |       'DISPLAY_MANIFEST', | ||||||
|       'CREATE_NEW_ACCOUNT_FROM_DASHBOARD' |       'CREATE_NEW_ACCOUNT_FROM_DASHBOARD' | ||||||
|  |     ).merge( | ||||||
|  |       APP_VERSION: Chatwoot.config[:version] | ||||||
|     ) |     ) | ||||||
|   end |   end | ||||||
| end | end | ||||||
|   | |||||||
| @@ -64,6 +64,10 @@ | |||||||
|           </label> |           </label> | ||||||
|         </div> |         </div> | ||||||
|       </div> |       </div> | ||||||
|  |       <div class="current-version"> | ||||||
|  |         {{ `v${globalConfig.appVersion}` }} | ||||||
|  |       </div> | ||||||
|  |  | ||||||
|       <woot-submit-button |       <woot-submit-button | ||||||
|         class="button nice success button--fixed-right-top" |         class="button nice success button--fixed-right-top" | ||||||
|         :button-text="$t('GENERAL_SETTINGS.SUBMIT')" |         :button-text="$t('GENERAL_SETTINGS.SUBMIT')" | ||||||
| @@ -106,6 +110,7 @@ export default { | |||||||
|   }, |   }, | ||||||
|   computed: { |   computed: { | ||||||
|     ...mapGetters({ |     ...mapGetters({ | ||||||
|  |       globalConfig: 'globalConfig/get', | ||||||
|       getAccount: 'accounts/getAccount', |       getAccount: 'accounts/getAccount', | ||||||
|       uiFlags: 'accounts/getUIFlags', |       uiFlags: 'accounts/getUIFlags', | ||||||
|     }), |     }), | ||||||
| @@ -196,4 +201,10 @@ export default { | |||||||
|     padding: $space-normal; |     padding: $space-normal; | ||||||
|   } |   } | ||||||
| } | } | ||||||
|  |  | ||||||
|  | .current-version { | ||||||
|  |   font-size: var(--font-size-small); | ||||||
|  |   text-align: center; | ||||||
|  |   padding: var(--space-normal); | ||||||
|  | } | ||||||
| </style> | </style> | ||||||
|   | |||||||
| @@ -1,4 +1,5 @@ | |||||||
| const { | const { | ||||||
|  |   APP_VERSION: appVersion, | ||||||
|   CREATE_NEW_ACCOUNT_FROM_DASHBOARD: createNewAccountFromDashboard, |   CREATE_NEW_ACCOUNT_FROM_DASHBOARD: createNewAccountFromDashboard, | ||||||
|   INSTALLATION_NAME: installationName, |   INSTALLATION_NAME: installationName, | ||||||
|   LOGO_THUMBNAIL: logoThumbnail, |   LOGO_THUMBNAIL: logoThumbnail, | ||||||
| @@ -9,6 +10,7 @@ const { | |||||||
| } = window.globalConfig; | } = window.globalConfig; | ||||||
|  |  | ||||||
| const state = { | const state = { | ||||||
|  |   appVersion, | ||||||
|   createNewAccountFromDashboard, |   createNewAccountFromDashboard, | ||||||
|   installationName, |   installationName, | ||||||
|   logo, |   logo, | ||||||
|   | |||||||
| @@ -22,6 +22,7 @@ as defined by the routes in the `admin/` namespace | |||||||
| <div class="navigation" role="navigation"> | <div class="navigation" role="navigation"> | ||||||
|   <div class="logo-brand"> |   <div class="logo-brand"> | ||||||
|     <%= link_to image_tag('/brand-assets/logo.svg', alt: 'Chatwoot Admin Dashboard'), super_admin_root_url %> |     <%= link_to image_tag('/brand-assets/logo.svg', alt: 'Chatwoot Admin Dashboard'), super_admin_root_url %> | ||||||
|  |     <div class="app-version">v<%= Chatwoot.config[:version] %></div> | ||||||
|   </div> |   </div> | ||||||
|  |  | ||||||
|   <ul> |   <ul> | ||||||
| @@ -45,8 +46,10 @@ as defined by the routes in the `admin/` namespace | |||||||
|       <%= link_to "Sidekiq", sidekiq_web_url %> |       <%= link_to "Sidekiq", sidekiq_web_url %> | ||||||
|     </li> |     </li> | ||||||
|   </ul> |   </ul> | ||||||
|   <li class="navigation__link logout"> |   <ul class="logout"> | ||||||
|     <i class="ion ion-log-out"></i> |     <li class="navigation__link"> | ||||||
|     <%= link_to "Logout", super_admin_logout_url %> |       <i class="ion ion-log-out"></i> | ||||||
|   </li> |       <%= link_to "Logout", super_admin_logout_url %> | ||||||
|  |     </li> | ||||||
|  |   </ul> | ||||||
| </div> | </div> | ||||||
|   | |||||||
| @@ -1,5 +1,5 @@ | |||||||
| shared: &shared | shared: &shared | ||||||
|   version: '1.6.1' |   version: '1.7.0' | ||||||
|  |  | ||||||
| development: | development: | ||||||
|   <<: *shared |   <<: *shared | ||||||
| @@ -7,8 +7,8 @@ development: | |||||||
| production: | production: | ||||||
|   <<: *shared |   <<: *shared | ||||||
|  |  | ||||||
| staging:  | staging: | ||||||
|   <<: *shared |   <<: *shared | ||||||
|  |  | ||||||
| test:  | test: | ||||||
|   <<: *shared |   <<: *shared | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Pranav Raj Sreepuram
					Pranav Raj Sreepuram