mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 02:26:55 -07:00
Refactor code
This commit is contained in:
parent
c12cb10972
commit
967109f4b2
3 changed files with 5 additions and 11 deletions
|
@ -3,13 +3,13 @@
|
|||
{{'Requests.Remaining.Quota' | translate: {remaining: remaining.remaining, total: remaining.limit} }}
|
||||
</h4>
|
||||
<h4 class="text-center" *ngIf="daysUntil > 1">
|
||||
{{daysUntil == 1 ? 'Requests.Remaining.NextDay' : "Requests.Remaining.NextDays" | translate: {time: daysUntil} }}
|
||||
{{'Requests.Remaining.NextDays' | translate: {time: daysUntil} }}
|
||||
</h4>
|
||||
<h4 class="text-center" *ngIf="hoursUntil > 1 && daysUntil <= 1">
|
||||
{{hoursUntil == 1 ? 'Requests.Remaining.NextHour' : "Requests.Remaining.NextHours" | translate: {time: hoursUntil} }}
|
||||
{{'Requests.Remaining.NextHours' | translate: {time: hoursUntil} }}
|
||||
</h4>
|
||||
<h4 class="text-center" *ngIf="minutesUntil > 1 && hoursUntil <= 1 && daysUntil <= 1" #minutes>
|
||||
{{minutesUntil == 1 ? 'Requests.Remaining.NextMinute' : "Requests.Remaining.NextMinutes" | translate: {time: minutesUntil} }}
|
||||
<h4 class="text-center" *ngIf="minutesUntil >= 1 && hoursUntil <= 1 && daysUntil <= 1" #minutes>
|
||||
{{(minutesUntil == 1 ? 'Requests.Remaining.NextMinute' : 'Requests.Remaining.NextMinutes') | translate: {time: minutesUntil} }}
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -27,10 +27,6 @@ export class RemainingRequestsComponent implements OnInit {
|
|||
this.update();
|
||||
});
|
||||
|
||||
setInterval(() => {
|
||||
self.calculateTime();
|
||||
}, 10000);
|
||||
|
||||
setInterval(() => {
|
||||
self.update();
|
||||
}, 60000);
|
||||
|
|
|
@ -149,9 +149,7 @@
|
|||
"Remaining": {
|
||||
"Quota": "{{remaining}}/{{total}} requests remaining",
|
||||
"NextDays": "Another request will be added in {{time}} days",
|
||||
"NextDay": "Another request will be added in {{time}} day",
|
||||
"NextHours": "Another request will be added in {{time} hours",
|
||||
"NextHour": "Another request will be added in {{time} hour",
|
||||
"NextHours": "Another request will be added in {{time}} hours",
|
||||
"NextMinutes": "Another request will be added in {{time}} minutes",
|
||||
"NextMinute": "Another request will be added in {{time}} minute"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue