mirror of
https://github.com/discourse/discourse.git
synced 2025-01-19 04:52:45 +08:00
New layout for version check on admin dashboard
This commit is contained in:
parent
49c66037b1
commit
70f5ee5fa9
|
@ -1,45 +1,51 @@
|
|||
<div class="dashboard-left">
|
||||
<div {{bindAttr class=":version-check versionCheck.critical_updates:critical:normal"}}>
|
||||
{{#if Discourse.SiteSettings.version_checks}}
|
||||
{{#if loading }}
|
||||
<p>{{i18n loading}}</p>
|
||||
{{else}}
|
||||
<p>
|
||||
{{i18n admin.dashboard.version}}: <span class="version-number">{{ versionCheck.installed_version }}</span>
|
||||
|
||||
{{#if versionCheck.installed_sha}}
|
||||
<span class="git-version">(<a {{bindAttr href="versionCheck.gitLink"}} target="_blank">{{versionCheck.shortSha}}</a>)</span>
|
||||
{{/if}}
|
||||
</p>
|
||||
|
||||
<p class="version-notes">
|
||||
{{i18n admin.dashboard.latest_version}}: <span class="version-number">{{ versionCheck.latest_version }}</span>
|
||||
{{#if versionCheck.upToDate }}
|
||||
<span class='icon update-to-date'>☻</span> {{i18n admin.dashboard.up_to_date}}
|
||||
{{else}}
|
||||
<span {{bindAttr class=":icon versionCheck.critical_updates:critical-updates-available:updates-available"}}>
|
||||
{{#if versionCheck.behindByOneVersion}}
|
||||
☺
|
||||
{{#if Discourse.SiteSettings.version_checks}}
|
||||
<div {{bindAttr class=":dashboard-stats :version-check versionCheck.critical_updates:critical:normal"}}>
|
||||
<table class="table table-condensed table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th>{{i18n admin.dashboard.installed_version}}</th>
|
||||
<th>{{i18n admin.dashboard.latest_version}}</th>
|
||||
<th> </th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
{{#unless loading}}
|
||||
<tbody>
|
||||
<td class="title">{{i18n admin.dashboard.version}}</td>
|
||||
<td class="version-number">{{ versionCheck.installed_version }}</td>
|
||||
<td class="version-number">{{ versionCheck.latest_version }}</td>
|
||||
<td class="face">
|
||||
{{#if versionCheck.upToDate }}
|
||||
<span class='icon update-to-date'>☻</span>
|
||||
{{else}}
|
||||
☹
|
||||
<span {{bindAttr class=":icon versionCheck.critical_updates:critical-updates-available:updates-available"}}>
|
||||
{{#if versionCheck.behindByOneVersion}}
|
||||
☺
|
||||
{{else}}
|
||||
☹
|
||||
{{/if}}
|
||||
</span>
|
||||
{{/if}}
|
||||
</span>
|
||||
<span class="critical-note">{{i18n admin.dashboard.critical_available}}</span>
|
||||
<span class="normal-note">{{i18n admin.dashboard.updates_available}}</span>
|
||||
{{i18n admin.dashboard.please_upgrade}}
|
||||
{{/if}}
|
||||
</p>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
<p class="update-nag">
|
||||
<i class="icon icon-github"></i>
|
||||
<a href="https://github.com/discourse/discourse" target="_blank">{{i18n admin.dashboard.update_often}}</a>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
<td class="version-notes">
|
||||
{{#if versionCheck.upToDate }}
|
||||
{{i18n admin.dashboard.up_to_date}}
|
||||
{{else}}
|
||||
<span class="critical-note">{{i18n admin.dashboard.critical_available}}</span>
|
||||
<span class="normal-note">{{i18n admin.dashboard.updates_available}}</span>
|
||||
{{i18n admin.dashboard.please_upgrade}}
|
||||
{{/if}}
|
||||
</td>
|
||||
</tbody>
|
||||
{{/unless}}
|
||||
</table>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
|
||||
<div class="dashboard-stats">
|
||||
<div class="dashboard-stats total-users">
|
||||
{{i18n admin.dashboard.total_users}}: <strong>{{#unless loading}}{{ totalUsers }}{{/unless}}</strong><br/>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -302,11 +302,15 @@ table {
|
|||
.version-check {
|
||||
.version-number {
|
||||
font-size: 18px;
|
||||
font-weight: bold
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.face {
|
||||
width: 20px;
|
||||
}
|
||||
|
||||
.version-notes .icon {
|
||||
margin-left: 20px;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
|
@ -372,6 +376,10 @@ table {
|
|||
width: 33px;
|
||||
}
|
||||
}
|
||||
|
||||
&.total-users {
|
||||
margin-left: 45px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -687,12 +687,13 @@ en:
|
|||
|
||||
dashboard:
|
||||
title: "Admin Dashboard"
|
||||
version: "Installed version"
|
||||
up_to_date: "You are running the latest version of Discourse."
|
||||
version: "Version"
|
||||
up_to_date: "You're up to date!"
|
||||
critical_available: "A critical update is available."
|
||||
updates_available: "Updates are available."
|
||||
please_upgrade: "Please upgrade!"
|
||||
latest_version: "Latest version"
|
||||
installed_version: "Installed"
|
||||
latest_version: "Latest"
|
||||
update_often: 'Please update often!'
|
||||
total_users: "Total Users"
|
||||
moderator_short: "mod"
|
||||
|
|
Loading…
Reference in New Issue
Block a user