make translations not a breaking change and move it down a bit
This commit is contained in:
parent
ea3a933350
commit
4543edebd6
@ -85,12 +85,12 @@ export default {
|
||||
|
||||
title() {
|
||||
if (this.type === "1y") {
|
||||
return `1 ${this.$tc("year", 1)}`;
|
||||
return this.$tc("years", 1, {n:1});
|
||||
}
|
||||
if (this.type === "720") {
|
||||
return `30 ${this.$tc("day", 30)}`;
|
||||
return this.$tc("days", 30, {n:30});
|
||||
}
|
||||
return `24 ${this.$tc("hour", 24)}`;
|
||||
return this.$tc("hours", 24, {n:24});
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@ -79,7 +79,7 @@
|
||||
<ActionInput
|
||||
v-model="tlsExpiryNotifInput"
|
||||
:type="'number'"
|
||||
:placeholder="$t('day')"
|
||||
:placeholder="$tc('days', 1, {n:1})"
|
||||
:icon="'plus'"
|
||||
:action="() => addTlsExpiryNotifDay(tlsExpiryNotifInput)"
|
||||
:action-aria-label="$t('Add a new expiry notification day')"
|
||||
@ -117,7 +117,7 @@
|
||||
<ActionInput
|
||||
v-model="domainExpiryNotifInput"
|
||||
:type="'number'"
|
||||
:placeholder="$t('day')"
|
||||
:placeholder="$tc('days', 1, {n:1})"
|
||||
:icon="'plus'"
|
||||
:action="() => addDomainExpiryNotifDay(domainExpiryNotifInput)"
|
||||
:action-aria-label="$t('Add a new expiry notification day')"
|
||||
|
||||
@ -55,11 +55,11 @@
|
||||
"Monitor": "Monitor | Monitors",
|
||||
"now": "now",
|
||||
"time ago": "{0} ago",
|
||||
"day": "day | days",
|
||||
"hour": "{n} hour | {n} hours",
|
||||
"minute": "minute | minutes",
|
||||
"days": "{n} day | {n} days",
|
||||
"hours": "{n} hour | {n} hours",
|
||||
"minutes": "{n} minute | {n} minutes",
|
||||
"minuteShort": "{n} min | {n} min",
|
||||
"year": "year | years",
|
||||
"years": "{n} year | {n} years",
|
||||
"Response": "Response",
|
||||
"Ping": "Ping",
|
||||
"Monitor Type": "Monitor Type",
|
||||
@ -670,8 +670,7 @@
|
||||
"recurringIntervalMessage": "Run once every day | Run once every {0} days",
|
||||
"affectedMonitorsDescription": "Select monitors that are affected by current maintenance",
|
||||
"affectedStatusPages": "Show this maintenance message on selected status pages",
|
||||
"Quick Duration": "Quick Duration",
|
||||
"Set end time based on start time": "Set end time based on start time",
|
||||
"Sets end time based on start time": "Sets end time based on start time",
|
||||
"Please set start time first": "Please set start time first",
|
||||
"noMonitorsSelectedWarning": "You are creating a maintenance without any affected monitors. Are you sure you want to continue?",
|
||||
"noMonitorsOrStatusPagesSelectedError": "Cannot create maintenance without affected monitors or status pages",
|
||||
|
||||
@ -123,106 +123,6 @@
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- Single Maintenance Window -->
|
||||
<template v-if="maintenance.strategy === 'single'">
|
||||
<div class="my-3">
|
||||
<label class="form-label">{{ $t("Quick Duration") }}</label>
|
||||
<div class="d-flex gap-2 flex-wrap">
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-sm"
|
||||
:class="
|
||||
currentDurationMinutes === 15 ? 'btn-primary' : 'btn-outline-primary'
|
||||
"
|
||||
:disabled="currentDurationMinutes === 15"
|
||||
@click="setQuickDuration(15)"
|
||||
>
|
||||
{{ $tc("minuteShort", 15) }}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-sm"
|
||||
:class="
|
||||
currentDurationMinutes === 30 ? 'btn-primary' : 'btn-outline-primary'
|
||||
"
|
||||
:disabled="currentDurationMinutes === 30"
|
||||
@click="setQuickDuration(30)"
|
||||
>
|
||||
{{ $tc("minuteShort", 30) }}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-sm"
|
||||
:class="
|
||||
currentDurationMinutes === 60 ? 'btn-primary' : 'btn-outline-primary'
|
||||
"
|
||||
:disabled="currentDurationMinutes === 60"
|
||||
@click="setQuickDuration(60)"
|
||||
>
|
||||
{{ $tc("hour", 1) }}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-sm"
|
||||
:class="
|
||||
currentDurationMinutes === 120 ? 'btn-primary' : 'btn-outline-primary'
|
||||
"
|
||||
:disabled="currentDurationMinutes === 120"
|
||||
@click="setQuickDuration(120)"
|
||||
>
|
||||
{{ $tc("hour", 2) }}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-sm"
|
||||
:class="
|
||||
currentDurationMinutes === 240 ? 'btn-primary' : 'btn-outline-primary'
|
||||
"
|
||||
:disabled="currentDurationMinutes === 240"
|
||||
@click="setQuickDuration(240)"
|
||||
>
|
||||
{{ $tc("hour", 4) }}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-sm"
|
||||
:class="
|
||||
currentDurationMinutes === 480 ? 'btn-primary' : 'btn-outline-primary'
|
||||
"
|
||||
:disabled="currentDurationMinutes === 480"
|
||||
@click="setQuickDuration(480)"
|
||||
>
|
||||
{{ $tc("hour", 8) }}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-sm"
|
||||
:class="
|
||||
currentDurationMinutes === 720 ? 'btn-primary' : 'btn-outline-primary'
|
||||
"
|
||||
:disabled="currentDurationMinutes === 720"
|
||||
@click="setQuickDuration(720)"
|
||||
>
|
||||
{{ $tc("hour", 12) }}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-sm"
|
||||
:class="
|
||||
currentDurationMinutes === 1440 ? 'btn-primary' : 'btn-outline-primary'
|
||||
"
|
||||
:disabled="currentDurationMinutes === 1440"
|
||||
@click="setQuickDuration(1440)"
|
||||
>
|
||||
{{ $tc("hour", 24) }}
|
||||
</button>
|
||||
</div>
|
||||
<div class="form-text">
|
||||
{{ $t("Set end time based on start time") }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template v-if="maintenance.strategy === 'cron'">
|
||||
<!-- Cron -->
|
||||
<div class="my-3">
|
||||
@ -428,6 +328,102 @@
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template v-if="maintenance.strategy === 'single'">
|
||||
<div class="my-3">
|
||||
<div class="d-flex gap-2 flex-wrap">
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-sm"
|
||||
:class="
|
||||
currentDurationMinutes === 15 ? 'btn-primary' : 'btn-outline-primary'
|
||||
"
|
||||
:disabled="currentDurationMinutes === 15"
|
||||
@click="setQuickDuration(15)"
|
||||
>
|
||||
{{ $tc("minuteShort", 15, { n: 15 }) }}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-sm"
|
||||
:class="
|
||||
currentDurationMinutes === 30 ? 'btn-primary' : 'btn-outline-primary'
|
||||
"
|
||||
:disabled="currentDurationMinutes === 30"
|
||||
@click="setQuickDuration(30)"
|
||||
>
|
||||
{{ $tc("minuteShort", 30, { n: 30 }) }}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-sm"
|
||||
:class="
|
||||
currentDurationMinutes === 60 ? 'btn-primary' : 'btn-outline-primary'
|
||||
"
|
||||
:disabled="currentDurationMinutes === 60"
|
||||
@click="setQuickDuration(60)"
|
||||
>
|
||||
{{ $tc("hours", 1, { n: 1 }) }}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-sm"
|
||||
:class="
|
||||
currentDurationMinutes === 120 ? 'btn-primary' : 'btn-outline-primary'
|
||||
"
|
||||
:disabled="currentDurationMinutes === 120"
|
||||
@click="setQuickDuration(120)"
|
||||
>
|
||||
{{ $tc("hours", 2, { n: 2 }) }}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-sm"
|
||||
:class="
|
||||
currentDurationMinutes === 240 ? 'btn-primary' : 'btn-outline-primary'
|
||||
"
|
||||
:disabled="currentDurationMinutes === 240"
|
||||
@click="setQuickDuration(240)"
|
||||
>
|
||||
{{ $tc("hours", 4, { n: 4 }) }}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-sm"
|
||||
:class="
|
||||
currentDurationMinutes === 480 ? 'btn-primary' : 'btn-outline-primary'
|
||||
"
|
||||
:disabled="currentDurationMinutes === 480"
|
||||
@click="setQuickDuration(480)"
|
||||
>
|
||||
{{ $tc("hours", 8, { n: 8 }) }}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-sm"
|
||||
:class="
|
||||
currentDurationMinutes === 720 ? 'btn-primary' : 'btn-outline-primary'
|
||||
"
|
||||
:disabled="currentDurationMinutes === 720"
|
||||
@click="setQuickDuration(720)"
|
||||
>
|
||||
{{ $tc("hours", 12, { n: 12 }) }}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-sm"
|
||||
:class="
|
||||
currentDurationMinutes === 1440 ? 'btn-primary' : 'btn-outline-primary'
|
||||
"
|
||||
:disabled="currentDurationMinutes === 1440"
|
||||
@click="setQuickDuration(1440)"
|
||||
>
|
||||
{{ $tc("hours", 24, { n: 24 }) }}
|
||||
</button>
|
||||
</div>
|
||||
<div class="form-text">{{ $t("Sets end time based on start time") }}</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user