chore: Display app version on settings/admin area

This commit is contained in:
Pranav Raj Sreepuram 2020-07-26 21:50:59 +05:30
parent 703027b834
commit f30c8943d9
7 changed files with 34 additions and 9 deletions

View file

@ -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;
}

View file

@ -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

View file

@ -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

View file

@ -64,6 +64,10 @@
</label>
</div>
</div>
<div class="current-version">
{{ `v${globalConfig.appVersion}` }}
</div>
<woot-submit-button
class="button nice success button--fixed-right-top"
:button-text="$t('GENERAL_SETTINGS.SUBMIT')"
@ -106,6 +110,7 @@ export default {
},
computed: {
...mapGetters({
globalConfig: 'globalConfig/get',
getAccount: 'accounts/getAccount',
uiFlags: 'accounts/getUIFlags',
}),
@ -196,4 +201,10 @@ export default {
padding: $space-normal;
}
}
.current-version {
font-size: var(--font-size-small);
text-align: center;
padding: var(--space-normal);
}
</style>

View file

@ -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,

View file

@ -22,6 +22,7 @@ as defined by the routes in the `admin/` namespace
<div class="navigation" role="navigation">
<div class="logo-brand">
<%= 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>
<ul>
@ -45,8 +46,10 @@ as defined by the routes in the `admin/` namespace
<%= link_to "Sidekiq", sidekiq_web_url %>
</li>
</ul>
<li class="navigation__link logout">
<ul class="logout">
<li class="navigation__link">
<i class="ion ion-log-out"></i>
<%= link_to "Logout", super_admin_logout_url %>
</li>
</ul>
</div>

View file

@ -1,5 +1,5 @@
shared: &shared
version: '1.6.1'
version: '1.7.0'
development:
<<: *shared