mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-08 22:33:24 +00:00
Use power icons for power management
This commit is contained in:
3
app/icons/no-power.svg
Normal file
3
app/icons/no-power.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512">
|
||||
<path d="M437.020 74.98c-48.353-48.351-112.64-74.98-181.020-74.98s-132.667 26.629-181.020 74.98c-48.351 48.353-74.98 112.64-74.98 181.020s26.629 132.667 74.98 181.020c48.353 48.351 112.64 74.98 181.020 74.98s132.667-26.629 181.020-74.98c48.351-48.353 74.98-112.64 74.98-181.020s-26.629-132.667-74.98-181.020zM448 256c0 41.407-13.177 79.794-35.556 111.19l-267.633-267.634c31.396-22.379 69.782-35.556 111.189-35.556 105.869 0 192 86.131 192 192zM64 256c0-41.407 13.177-79.793 35.556-111.189l267.635 267.634c-31.397 22.378-69.784 35.555-111.191 35.555-105.869 0-192-86.131-192-192z"></path>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 697 B |
3
app/icons/power.svg
Normal file
3
app/icons/power.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512">
|
||||
<path d="M192 0l-192 256h192l-128 256 448-320h-256l192-192z"></path>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 178 B |
@@ -42,8 +42,6 @@ function($rootScope, $location, $window, $doc, $state, $translate, localeFormat,
|
||||
// Global Reference variables
|
||||
$rootScope.insurance = { opts: [{ name: 'standard', pct: 0.05 }, { name: 'alpha', pct: 0.025 }, { name: 'beta', pct: 0.0375 }] };
|
||||
$rootScope.discounts = { opts: Discounts };
|
||||
$rootScope.STATUS = ['', 'disabled', 'off', 'on'];
|
||||
$rootScope.STATUS_CLASS = ['', 'disabled', 'warning', 'secondary-disabled'];
|
||||
$rootScope.sizeRatio = Persist.getSizeRatio();
|
||||
$rootScope.title = 'Coriolis';
|
||||
|
||||
|
||||
@@ -229,8 +229,8 @@
|
||||
<th style="width:3em;" class="sortable" ng-click="sortPwr('type')" translate="TYPE"></th>
|
||||
<th style="width:4em;" class="sortable" ng-click="sortPwr('priority')" translate="PRI"></th>
|
||||
<th colspan="2" class="sortable" ng-click="sortPwr('c.power')" translate="PWR"></th>
|
||||
<th style="width:3em;" class="sortable" ng-click="sortPwr(statusRetracted)" translate="RET"></th>
|
||||
<th style="width:3em;" class="sortable" ng-click="sortPwr(statusDeployed)" translate="DEP"></th>
|
||||
<th style="width:3em;" class="sortable" ng-click="sortPwr(statusRetracted)" translate="ret"></th>
|
||||
<th style="width:3em;" class="sortable" ng-click="sortPwr(statusDeployed)" translate="dep"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -250,11 +250,19 @@
|
||||
<td class="le shorten cap" ng-click="togglePwr(c)" ng-bind="cName(c)"></td>
|
||||
<td ng-click="togglePwr(c)"><u ng-bind="c.type | translate"></u></td>
|
||||
<td><span ng-click="decPriority(c)" class="flip">►</span> {{c.priority + 1}} <span ng-click="incPriority(c)">►</span></td>
|
||||
<td class="ri" style="width:3.25em;">{{fPwr(c.c.power)}}</td>
|
||||
<td class="ri" style="width:3em;"><u>{{f1Pct(c.c.power/ship.powerAvailable)}}</u></td>
|
||||
<td ng-if="!c.enabled" class="disabled upp" colspan="2" translate="disabled"></td>
|
||||
<td class="upp" ng-if="c.enabled" ng-class="STATUS_CLASS[statusRetracted(c)]">{{STATUS[statusRetracted(c)] | translate}}</td>
|
||||
<td class="upp" ng-if="c.enabled" ng-class="STATUS_CLASS[statusDeployed(c)]">{{STATUS[statusDeployed(c)] | translate}}</td>
|
||||
<td class="ri" style="width:3.25em;" ng-click="togglePwr(c)">{{fPwr(c.c.power)}}</td>
|
||||
<td class="ri" style="width:3em;" ng-click="togglePwr(c)"><u>{{f1Pct(c.c.power/ship.powerAvailable)}}</u></td>
|
||||
<td ng-if="!c.enabled" class="disabled upp" colspan="2" translate="disabled" ng-click="togglePwr(c)"></td>
|
||||
<td class="upp" ng-if="c.enabled" ng-click="togglePwr(c)">
|
||||
<svg class="icon secondary-disabled" ng-if="statusRetracted(c) == 3"><use xlink:href="#power"><title class="cap">{{'on' | translate}}</title></use></svg>
|
||||
<svg class="icon warning" ng-if="statusRetracted(c) == 2"><use xlink:href="#no-power"><title class="cap">{{'off' | translate}}</title></use></svg>
|
||||
<span class="disabled" translate="disabled" ng-if="statusRetracted(c) == 1"></span>
|
||||
</td>
|
||||
<td class="upp" ng-if="c.enabled" ng-click="togglePwr(c)">
|
||||
<svg class="icon secondary-disabled" ng-if="statusDeployed(c) == 3"><use xlink:href="#power"><title class="cap">{{'on' | translate}}</title></use></svg>
|
||||
<svg class="icon warning" ng-if="statusDeployed(c) == 2"><use xlink:href="#no-power"><title class="cap">{{'off' | translate}}</title></use></svg>
|
||||
<span class="disabled" translate="disabled" ng-if="statusDeployed(c) == 1"></span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user