1
0
mirror of https://github.com/louislam/uptime-kuma.git synced 2024-11-28 08:48:45 +02:00

Merge pull request #3246 from chakflying/ui/monitor-group-select

UI: Improve no group monitor message
This commit is contained in:
Louis Lam 2023-06-17 16:43:03 +08:00 committed by GitHub
commit 596402e71f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 2 deletions

View File

@ -266,6 +266,11 @@ optgroup {
background-color: $dark-bg2;
}
.form-select:disabled {
color: rgba($dark-font-color, 0.7);
background-color: $dark-bg;
}
.form-control, .form-select {
border-color: $dark-border-color;
}

View File

@ -750,5 +750,6 @@
"Badge value (For Testing only.)": "Badge value (For Testing only.)",
"Badge URL": "Badge URL",
"Group": "Group",
"Monitor Group": "Monitor Group"
"Monitor Group": "Monitor Group",
"noGroupMonitorMsg": "Not Available. Create a Group Monitor First."
}

View File

@ -96,7 +96,8 @@
<div class="my-3">
<label for="parent" class="form-label">{{ $t("Monitor Group") }}</label>
<select v-model="monitor.parent" class="form-select" :disabled="sortedMonitorList.length === 0">
<option :value="null" selected>{{ $t("None") }}</option>
<option v-if="sortedMonitorList.length === 0" :value="null" selected>{{ $t("noGroupMonitorMsg") }}</option>
<option v-else :value="null" selected>{{ $t("None") }}</option>
<option v-for="parentMonitor in sortedMonitorList" :key="parentMonitor.id" :value="parentMonitor.id">{{ parentMonitor.pathName }}</option>
</select>
</div>