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

View File

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

View File

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

View File

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

View File

@ -40,7 +40,7 @@
<!-- Right side --> <!-- Right side -->
<div class="level-right"> <div class="level-right">
<p class="level-item"> <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>
<p class="level-item"> <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> <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}} {{end}}
</p> </p>
<p class="level-item"> <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>
</div> </div>
</nav> </nav>

View File

@ -41,7 +41,7 @@
<!-- Right side --> <!-- Right side -->
<div class="level-right"> <div class="level-right">
<p class="level-item"> <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>
</div> </div>
</nav> </nav>

View File

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

View File

@ -40,7 +40,7 @@
<!-- Right side --> <!-- Right side -->
<div class="level-right"> <div class="level-right">
<p class="level-item"> <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>
<p class="level-item"> <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> <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> <span class="icon"><i class="fas fa-edit"></i></span>
</a> </a>
<button class="button is-small is-danger is-outlined tooltip is-tooltip-bottom" data-tooltip="{{ i18n("button.delete") }}" data-action="delete-template"> <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> </button>
</td> </td>
</tr> </tr>

View File

@ -40,10 +40,10 @@
<!-- Right side --> <!-- Right side -->
<div class="level-right"> <div class="level-right">
<p class="level-item"> <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>
<p class="level-item"> <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>
<p class="level-item"> <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> <a class="button is-success" href="new"><span class="icon"><i class="fas fa-plus"></i></span><span>{{ i18n("button.new") }}</span></a>