Remove trailing zero for integer value

This commit is contained in:
cuigh 2018-04-10 17:37:44 +08:00
parent bca5d6d01d
commit 02ffa6c0f1
14 changed files with 33 additions and 33 deletions

View File

@ -1057,7 +1057,7 @@ var Swirl;
<td><input name="${this.name}s[${this.index}].value" class="input is-small" type="text"></td>
<td>
<a class="button is-small is-danger is-outlined" data-action="delete-${this.alias}">
<span class="icon is-small"><i class="fas fa-trash"></i></span>
<span class="icon is-small"><i class="far fa-trash-alt"></i></span>
</a>
</td>
</tr>`;
@ -1145,7 +1145,7 @@ var Swirl;
<p class="card-header-title is-paddingless">${this.opts.title}</p>
<a data-action="remove-chart" class="card-header-icon" aria-label="remove chart">
<span class="icon">
<i class="fas fa-trash has-text-danger" aria-hidden="true"></i>
<i class="far fa-trash-alt has-text-danger" aria-hidden="true"></i>
</span>
</a>
</header>
@ -1244,7 +1244,7 @@ var Swirl;
case "size:gigabytes":
return value.toFixed(2) + 'G';
default:
return value.toFixed(2);
return value % 1 === 0 ? value.toString() : value.toFixed(2);
}
}
getColors() {
@ -2257,7 +2257,7 @@ var Swirl;
<td>
<a class="button is-small is-outlined is-danger" data-action="delete-mount">
<span class="icon is-small">
<i class="fas fa-trash"></i>
<i class="far fa-trash-alt"></i>
</span>
</a>
</td>
@ -2290,7 +2290,7 @@ var Swirl;
<td>
<a class="button is-small is-outlined is-danger" data-action="delete-endpoint-port">
<span class="icon is-small">
<i class="fas fa-trash"></i>
<i class="far fa-trash-alt"></i>
</span>
</a>
</td>
@ -2317,7 +2317,7 @@ var Swirl;
<td>
<a class="button is-small is-outlined is-danger" data-action="delete-constraint">
<span class="icon is-small">
<i class="fas fa-trash"></i>
<i class="far fa-trash-alt"></i>
</span>
</a>
</td>
@ -2333,7 +2333,7 @@ var Swirl;
<td>
<a class="button is-small is-outlined is-danger" data-action="delete-preference">
<span class="icon is-small">
<i class="fas fa-trash"></i>
<i class="far fa-trash-alt"></i>
</span>
</a>
</td>
@ -2359,7 +2359,7 @@ var Swirl;
<td>
<a class="button is-small is-outlined is-danger" data-action="delete-${this.name}">
<span class="icon is-small">
<i class="fas fa-trash"></i>
<i class="far fa-trash-alt"></i>
</span>
</a>
</td>

File diff suppressed because one or more lines are too long

View File

@ -31,7 +31,7 @@ namespace Swirl.Core {
<p class="card-header-title is-paddingless">${this.opts.title}</p>
<a data-action="remove-chart" class="card-header-icon" aria-label="remove chart">
<span class="icon">
<i class="fas fa-trash has-text-danger" aria-hidden="true"></i>
<i class="far fa-trash-alt has-text-danger" aria-hidden="true"></i>
</span>
</a>
</header>
@ -141,7 +141,7 @@ namespace Swirl.Core {
case "size:gigabytes":
return value.toFixed(2) + 'G';
default:
return value.toFixed(2);
return value % 1 === 0 ? value.toString() : value.toFixed(2);
}
}

View File

@ -108,7 +108,7 @@ namespace Swirl.Core {
<td><input name="${this.name}s[${this.index}].value" class="input is-small" type="text"></td>
<td>
<a class="button is-small is-danger is-outlined" data-action="delete-${this.alias}">
<span class="icon is-small"><i class="fas fa-trash"></i></span>
<span class="icon is-small"><i class="far fa-trash-alt"></i></span>
</a>
</td>
</tr>`;

View File

@ -63,7 +63,7 @@ namespace Swirl.Service {
<td>
<a class="button is-small is-outlined is-danger" data-action="delete-mount">
<span class="icon is-small">
<i class="fas fa-trash"></i>
<i class="far fa-trash-alt"></i>
</span>
</a>
</td>
@ -97,7 +97,7 @@ namespace Swirl.Service {
<td>
<a class="button is-small is-outlined is-danger" data-action="delete-endpoint-port">
<span class="icon is-small">
<i class="fas fa-trash"></i>
<i class="far fa-trash-alt"></i>
</span>
</a>
</td>
@ -125,7 +125,7 @@ namespace Swirl.Service {
<td>
<a class="button is-small is-outlined is-danger" data-action="delete-constraint">
<span class="icon is-small">
<i class="fas fa-trash"></i>
<i class="far fa-trash-alt"></i>
</span>
</a>
</td>
@ -142,7 +142,7 @@ namespace Swirl.Service {
<td>
<a class="button is-small is-outlined is-danger" data-action="delete-preference">
<span class="icon is-small">
<i class="fas fa-trash"></i>
<i class="far fa-trash-alt"></i>
</span>
</a>
</td>
@ -176,7 +176,7 @@ namespace Swirl.Service {
<td>
<a class="button is-small is-outlined is-danger" data-action="delete-${this.name}">
<span class="icon is-small">
<i class="fas fa-trash"></i>
<i class="far fa-trash-alt"></i>
</span>
</a>
</td>

View File

@ -64,7 +64,7 @@
<td>
<a class="button is-small is-danger is-outlined" data-action="delete-{{n}}">
<span class="icon is-small">
<i class="fas fa-trash"></i>
<i class="far fa-trash-alt"></i>
</span>
</a>
</td>
@ -105,7 +105,7 @@
<td>
<a class="button is-small is-danger is-outlined" data-action="delete-{{n}}">
<span class="icon is-small">
<i class="fas fa-trash"></i>
<i class="far fa-trash-alt"></i>
</span>
</a>
</td>

View File

@ -160,7 +160,7 @@
<td>
<a class="button is-small is-outlined is-danger" data-action="delete-endpoint-port">
<span class="icon is-small">
<i class="fas fa-trash"></i>
<i class="far fa-trash-alt"></i>
</span>
</a>
</td>
@ -221,7 +221,7 @@
<td>
<a class="button is-small is-outlined is-danger" data-action="delete-mount">
<span class="icon is-small">
<i class="fas fa-trash"></i>
<i class="far fa-trash-alt"></i>
</span>
</a>
</td>
@ -261,7 +261,7 @@
<td>
<a class="button is-small is-outlined is-danger" data-action="delete-secret">
<span class="icon is-small">
<i class="fas fa-trash"></i>
<i class="far fa-trash-alt"></i>
</span>
</a>
</td>
@ -301,7 +301,7 @@
<td>
<a class="button is-small is-outlined is-danger" data-action="delete-config">
<span class="icon is-small">
<i class="fas fa-trash"></i>
<i class="far fa-trash-alt"></i>
</span>
</a>
</td>
@ -386,7 +386,7 @@
<td>
<a class="button is-small is-outlined is-danger" data-action="delete-constraint">
<span class="icon is-small">
<i class="fas fa-trash"></i>
<i class="far fa-trash-alt"></i>
</span>
</a>
</td>
@ -419,7 +419,7 @@
<td>
<a class="button is-small is-outlined is-danger" data-action="delete-preference">
<span class="icon is-small">
<i class="fas fa-trash"></i>
<i class="far fa-trash-alt"></i>
</span>
</a>
</td>

View File

@ -40,7 +40,7 @@
<!-- Right side -->
<div class="level-right">
<p class="level-item">
<button id="btn-delete" class="button is-danger"><span class="icon"><i class="fas fa-trash"></i></span><span>{{ i18n("button.delete") }}</span></button>
<button id="btn-delete" class="button is-danger"><span class="icon"><i class="far fa-trash-alt"></i></span><span>{{ i18n("button.delete") }}</span></button>
</p>
<p class="level-item">
<a href="new" class="button is-success"><span class="icon"><i class="fas fa-plus"></i></span><span>{{ i18n("button.new") }}</span></a>

View File

@ -54,7 +54,7 @@
{{end}}
</p>
<p class="level-item">
<button id="btn-delete" class="button is-danger"><span class="icon"><i class="fas fa-trash"></i></span><span>{{ i18n("button.delete") }}</span></button>
<button id="btn-delete" class="button is-danger"><span class="icon"><i class="far fa-trash-alt"></i></span><span>{{ i18n("button.delete") }}</span></button>
</p>
</div>
</nav>

View File

@ -41,7 +41,7 @@
<!-- Right side -->
<div class="level-right">
<p class="level-item">
<button id="btn-delete" class="button is-danger"><span class="icon"><i class="fas fa-trash"></i></span><span>{{ i18n("button.delete") }}</span></button>
<button id="btn-delete" class="button is-danger"><span class="icon"><i class="far fa-trash-alt"></i></span><span>{{ i18n("button.delete") }}</span></button>
</p>
</div>
</nav>

View File

@ -13,7 +13,7 @@
<p class="control has-icons-left">
<input name="name" class="input" type="text" placeholder="" data-v-rule="native" required>
<span class="icon is-small is-left">
<i class="fas fa-user"></i>
<i class="far fa-user"></i>
</span>
</p>
</div>

View File

@ -40,7 +40,7 @@
<!-- Right side -->
<div class="level-right">
<p class="level-item">
<button id="btn-delete" class="button is-danger"><span class="icon"><i class="fas fa-trash"></i></span><span>{{ i18n("button.delete") }}</span></button>
<button id="btn-delete" class="button is-danger"><span class="icon"><i class="far fa-trash-alt"></i></span><span>{{ i18n("button.delete") }}</span></button>
</p>
<p class="level-item">
<a href="new" class="button is-success"><span class="icon"><i class="fas fa-plus"></i></span><span>{{ i18n("button.new") }}</span></a>

View File

@ -59,7 +59,7 @@
<span class="icon"><i class="fas fa-edit"></i></span>
</a>
<button class="button is-small is-danger is-outlined tooltip is-tooltip-bottom" data-tooltip="{{ i18n("button.delete") }}" data-action="delete-template">
<span class="icon"><i class="fas fa-trash"></i></span>
<span class="icon"><i class="far fa-trash-alt"></i></span>
</button>
</td>
</tr>

View File

@ -40,10 +40,10 @@
<!-- Right side -->
<div class="level-right">
<p class="level-item">
<button id="btn-delete" class="button is-danger"><span class="icon"><i class="fas fa-trash"></i></span><span>{{ i18n("button.delete") }}</span></button>
<button id="btn-delete" class="button is-danger"><span class="icon"><i class="far fa-trash-alt"></i></span><span>{{ i18n("button.delete") }}</span></button>
</p>
<p class="level-item">
<button id="btn-prune" class="button is-warning"><span class="icon"><i class="fas fa-trash-alt"></i></span><span>{{ i18n("button.prune") }}</span></button>
<button id="btn-prune" class="button is-warning"><span class="icon"><i class="fas fa-times"></i></span><span>{{ i18n("button.prune") }}</span></button>
</p>
<p class="level-item">
<a class="button is-success" href="new"><span class="icon"><i class="fas fa-plus"></i></span><span>{{ i18n("button.new") }}</span></a>