Repository: louislam/uptime-kuma
File: src/components/settings/Notifications.vue (Vue)

Code before:
    data() {
        return {
            toastSuccessTimeoutSecs: 20,
            toastErrorTimeoutSecs: -1,
            /**
             * Variable to store the input for new certificate expiry day.
             */
            expiryNotifInput: null,
        };
    },

    computed: {
        settings() {
            return this.$parent.$parent.$parent.settings;
        },
        saveSettings() {
            return this.$parent.$parent.$parent.saveSettings;
        },
        settingsLoaded() {
            return this.$parent.$parent.$parent.settingsLoaded;
        },
    },

    watch: {
        // Parse, store and apply new timeout settings.
        toastSuccessTimeoutSecs: function (newTimeout) {
            const parsedTimeout = parseInt(newTimeout);
            if (parsedTimeout != null && !Number.isNaN(parsedTimeout)) {
                localStorage.toastSuccessTimeout = newTimeout > 0 ? newTimeout * 1000 : newTimeout;
            }
        },
        toastErrorTimeoutSecs: function (newTimeout) {
            const parsedTimeout = parseInt(newTimeout);
            if (parsedTimeout != null && !Number.isNaN(parsedTimeout)) {
                localStorage.toastErrorTimeout = newTimeout > 0 ? newTimeout * 1000 : newTimeout;
            }
        }
    },

    mounted() {
        this.loadToastTimeoutSettings();
    },

    methods: {
        /**
         * Remove a day from expiry notification days.
         * @param {number} day The day to remove.
         */
        removeExpiryNotifDay(day) {
            this.settings.tlsExpiryNotifyDays = this.settings.tlsExpiryNotifyDays.filter(d => d !== day);
        },

Review comment (suggestion):
```suggestion
        toastSuccessTimeoutSecs(newTimeout) {
```

This seems to fit better with how it is styled in the rest of the code base and in the VueJS docs.

Code after:
    data() {
        return {
            toastSuccessTimeoutSecs: 20,
            toastErrorTimeoutSecs: -1,
            /**
             * Variable to store the input for new certificate expiry day.
             */
            expiryNotifInput: null,
        };
    },

    computed: {
        settings() {
            return this.$parent.$parent.$parent.settings;
        },
        saveSettings() {
            return this.$parent.$parent.$parent.saveSettings;
        },
        settingsLoaded() {
            return this.$parent.$parent.$parent.settingsLoaded;
        },
    },

    watch: {
        // Parse, store and apply new timeout settings.
        toastSuccessTimeoutSecs(newTimeout) {
            const parsedTimeout = parseInt(newTimeout);
            if (parsedTimeout != null && !Number.isNaN(parsedTimeout)) {
                localStorage.toastSuccessTimeout = newTimeout > 0 ? newTimeout * 1000 : newTimeout;
            }
        },
        toastErrorTimeoutSecs(newTimeout) {
            const parsedTimeout = parseInt(newTimeout);
            if (parsedTimeout != null && !Number.isNaN(parsedTimeout)) {
                localStorage.toastErrorTimeout = newTimeout > 0 ? newTimeout * 1000 : newTimeout;
            }
        }
    },

    mounted() {
        this.loadToastTimeoutSettings();
    },

    methods: {
        /**
         * Remove a day from expiry notification days.
         * @param {number} day The day to remove.
         * @returns {void}
         */
        removeExpiryNotifDay(day) {
            this.settings.tlsExpiryNotifyDays = this.settings.tlsExpiryNotifyDays.filter(d => d !== day);