Merge pull request #340 from Ponkhy/default-notification

Added the option for default notifications
This commit is contained in:
Louis Lam
2021-09-08 12:49:14 +08:00
committed by GitHub
20 changed files with 122 additions and 15 deletions

View File

@@ -178,6 +178,8 @@
{{ notification.name }}
<a href="#" @click="$refs.notificationDialog.show(notification.id)">{{ $t("Edit") }}</a>
</label>
<span v-if="notification.isDefault == true" class="badge bg-primary ms-2">Default</span>
</div>
<button class="btn btn-primary me-2" type="button" @click="$refs.notificationDialog.show()">
@@ -296,6 +298,12 @@ export default {
dns_resolve_type: "A",
dns_resolve_server: "1.1.1.1",
}
for (let i = 0; i < this.$root.notificationList.length; i++) {
if (this.$root.notificationList[i].isDefault == true) {
this.monitor.notificationIDList[this.$root.notificationList[i].id] = true;
}
}
} else if (this.isEdit) {
this.$root.getSocket().emit("getMonitor", this.$route.params.id, (res) => {
if (res.ok) {