mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-01-18 18:38:07 +00: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
1 changed files with 5 additions and 5 deletions
|
@ -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="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">
|
||||
{{ $t("selectedMonitorCount", [ selectedMonitorCount ]) }}
|
||||
|
@ -69,7 +69,7 @@
|
|||
<Confirm ref="confirmPause" :yes-text="$t('Yes')" :no-text="$t('No')" @yes="pauseSelected">
|
||||
{{ $t("pauseMonitorMsg") }}
|
||||
</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") }}
|
||||
</Confirm>
|
||||
</template>
|
||||
|
@ -333,9 +333,9 @@ export default {
|
|||
* confirm or cancel the deletion of the selected monitors.
|
||||
* @returns {void}
|
||||
*/
|
||||
deleteSelectedDialog() {
|
||||
deleteSelectedMonitorDialog() {
|
||||
// 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.
|
||||
* @returns {void}
|
||||
*/
|
||||
deleteSelected() {
|
||||
deleteSelectedMonitor() {
|
||||
// Iterate over each selected monitor's ID and delete it
|
||||
Object.keys(this.selectedMonitors).forEach(id => {
|
||||
// Call the root method to delete the monitor by its ID
|
||||
|
|
Loading…
Reference in a new issue