mirror of
https://github.com/discourse/discourse.git
synced 2025-03-03 17:59:20 +00:00
This pr replaces `{{{ }}}` usage by a {{html-safe}} helper. While it doesn't solve the underlying issue, it gives us a path forward without risking breaking too much existing behavior. Also introduces an htmlSafe computed macro: ``` import { htmlSafe } from "discourse/lib/computed"; htmlDescription: htmlSafe("description") ``` Overtime {{html-safe}} usage should be removed and moved to components properties or specialized components/helpers.
34 lines
1.1 KiB
Handlebars
34 lines
1.1 KiB
Handlebars
{{#if showBackupStats}}
|
|
<div class="backups">
|
|
<h3 class="storage-stats-title">
|
|
<a href={{get-url '/admin/backups'}}>{{d-icon "archive"}} {{i18n "admin.dashboard.backups"}}</a>
|
|
</h3>
|
|
<p>
|
|
{{#if backupStats.free_bytes}}
|
|
{{i18n "admin.dashboard.space_used_and_free" usedSize=usedBackupSpace freeSize=freeBackupSpace}}
|
|
{{else}}
|
|
{{i18n "admin.dashboard.space_used" usedSize=usedBackupSpace}}
|
|
{{/if}}
|
|
|
|
<br>
|
|
{{i18n "admin.dashboard.backup_count" count=backupStats.count location=backupLocationName}}
|
|
|
|
{{#if backupStats.last_backup_taken_at}}
|
|
<br>
|
|
{{i18n "admin.dashboard.lastest_backup" date=(format-date backupStats.last_backup_taken_at leaveAgo="true")}}
|
|
{{/if}}
|
|
</p>
|
|
</div>
|
|
{{/if}}
|
|
|
|
<div class="uploads">
|
|
<h3 class="storage-stats-title">{{d-icon "upload"}} {{i18n "admin.dashboard.uploads"}}</h3>
|
|
<p>
|
|
{{#if uploadStats.free_bytes}}
|
|
{{i18n "admin.dashboard.space_used_and_free" usedSize=usedUploadSpace freeSize=freeUploadSpace}}
|
|
{{else}}
|
|
{{i18n "admin.dashboard.space_used" usedSize=usedUploadSpace}}
|
|
{{/if}}
|
|
</p>
|
|
</div>
|