mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-01-30 08:13:22 -05:00
Refactored: Rename deletion methods and references for consistency
- Renamed `deleteSelectedDialog` to `deleteSelectedMonitorDialog` for better clarity. - Updated the corresponding method `deleteSelected` to `deleteSelectedMonitor` to reflect the new naming convention. - Updated references in the template and JavaScript to match the new method names. - Ensured consistency in naming to improve code readability and maintainability. No functionality changes were made; only method names were modified for clarity. modified: src/components/MonitorList.vue
This commit is contained in:
parent
cd6d4e3c1c
commit
6a96694c17
@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
<button class="btn-outline-normal" @click="pauseDialog"><font-awesome-icon icon="pause" size="sm" /> {{ $t("Pause") }}</button>
|
<button class="btn-outline-normal" @click="pauseDialog"><font-awesome-icon icon="pause" size="sm" /> {{ $t("Pause") }}</button>
|
||||||
<button class="btn-outline-normal" @click="resumeSelected"><font-awesome-icon icon="play" size="sm" /> {{ $t("Resume") }}</button>
|
<button class="btn-outline-normal" @click="resumeSelected"><font-awesome-icon icon="play" size="sm" /> {{ $t("Resume") }}</button>
|
||||||
<button class="btn-outline-normal text-danger" @click="deleteSelectedDialog"><font-awesome-icon icon="trash" size="sm" /> {{ $t("Delete") }}</button>
|
<button class="btn-outline-normal text-danger" @click="deleteSelectedMonitorDialog"><font-awesome-icon icon="trash" size="sm" /> {{ $t("Delete") }}</button>
|
||||||
|
|
||||||
<span v-if="selectedMonitorCount > 0">
|
<span v-if="selectedMonitorCount > 0">
|
||||||
{{ $t("selectedMonitorCount", [ selectedMonitorCount ]) }}
|
{{ $t("selectedMonitorCount", [ selectedMonitorCount ]) }}
|
||||||
@ -69,7 +69,7 @@
|
|||||||
<Confirm ref="confirmPause" :yes-text="$t('Yes')" :no-text="$t('No')" @yes="pauseSelected">
|
<Confirm ref="confirmPause" :yes-text="$t('Yes')" :no-text="$t('No')" @yes="pauseSelected">
|
||||||
{{ $t("pauseMonitorMsg") }}
|
{{ $t("pauseMonitorMsg") }}
|
||||||
</Confirm>
|
</Confirm>
|
||||||
<Confirm ref="confirmDeleteSelected" :yes-text="$t('Yes')" :no-text="$t('No')" @yes="deleteSelected">
|
<Confirm ref="confirmDeleteSelectedMonitor" :yes-text="$t('Yes')" :no-text="$t('No')" @yes="deleteSelectedMonitor">
|
||||||
{{ $t("deleteSelectedMonitorMsg") }}
|
{{ $t("deleteSelectedMonitorMsg") }}
|
||||||
</Confirm>
|
</Confirm>
|
||||||
</template>
|
</template>
|
||||||
@ -333,9 +333,9 @@ export default {
|
|||||||
* confirm or cancel the deletion of the selected monitors.
|
* confirm or cancel the deletion of the selected monitors.
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
deleteSelectedDialog() {
|
deleteSelectedMonitorDialog() {
|
||||||
// Show the confirmation dialog for deletion
|
// Show the confirmation dialog for deletion
|
||||||
this.$refs.confirmDeleteSelected.show();
|
this.$refs.confirmDeleteSelectedMonitor.show();
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -344,7 +344,7 @@ export default {
|
|||||||
* the user interface, and reloads the page to reflect the changes.
|
* the user interface, and reloads the page to reflect the changes.
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
deleteSelected() {
|
deleteSelectedMonitor() {
|
||||||
// Iterate over each selected monitor's ID and delete it
|
// Iterate over each selected monitor's ID and delete it
|
||||||
Object.keys(this.selectedMonitors).forEach(id => {
|
Object.keys(this.selectedMonitors).forEach(id => {
|
||||||
// Call the root method to delete the monitor by its ID
|
// Call the root method to delete the monitor by its ID
|
||||||
|
Loading…
x
Reference in New Issue
Block a user