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
commit d761d54d0e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 122 additions and 15 deletions

View file

@ -436,6 +436,25 @@
</template>
<!-- DEPRECATED! Please create vue component in "./src/components/notifications/{notification name}.vue" -->
<div class="mb-3">
<hr class="dropdown-divider">
<div class="form-check form-switch">
<input v-model="notification.isDefault" class="form-check-input" type="checkbox">
<label class="form-check-label">{{ $t("Default enabled") }}</label>
</div>
<div class="form-text">
{{ $t("enableDefaultNotificationDescription") }}
</div>
<br>
<div class="form-check form-switch">
<input v-model="notification.applyExisting" class="form-check-input" type="checkbox">
<label class="form-check-label">{{ $t("Also apply to existing monitors") }}</label>
</div>
</div>
</div>
<div class="modal-footer">
<button v-if="id" type="button" class="btn btn-danger" :disabled="processing" @click="deleteConfirm">
@ -445,6 +464,7 @@
{{ $t("Test") }}
</button>
<button type="submit" class="btn btn-primary" :disabled="processing">
<div v-if="processing" class="spinner-border spinner-border-sm me-1"></div>
{{ $t("Save") }}
</button>
</div>
@ -485,6 +505,7 @@ export default {
name: "",
type: null,
gotifyPriority: 8,
isDefault: false,
},
appriseInstalled: false,
}
@ -534,6 +555,7 @@ export default {
this.notification = {
name: "",
type: null,
isDefault: false,
}
// Default set to Telegram