Refactor QR set popups to new popup
| @@ -1,4 +1,4 @@ | ||
| 1 | 1 | import { callPopupPopup } from '../../../../../scriptpopup.js'; |
| 2 | 2 | import { getSortableDelay } from '../../../../utils.js'; |
| 3 | 3 | import { log, warn } from '../../index.js'; |
| 4 | 4 | import { QuickReply } from '../QuickReply.js'; |
| @@ -280,7 +280,7 @@ export class SettingsUi { | ||
| 280 | 280 | } |
| 281 | 281 | |
| 282 | 282 | async deleteQrSet() { |
| 283 | 283 | const confirmed = await callPopupPopup.show.confirm('Delete Quick Reply Set', `Are you sure you want to delete the Quick Reply Set "${this.currentQrSet.name}"?<br>This cannot be undone.`, 'confirm'); |
| 284 | 284 | if (confirmed) { |
| 285 | 285 | await this.doDeleteQrSet(this.currentQrSet); |
| 286 | 286 | this.rerender(); |
| @@ -305,7 +305,7 @@ export class SettingsUi { | ||
| 305 | 305 | } |
| 306 | 306 | |
| 307 | 307 | async renameQrSet() { |
| 308 | 308 | const newName = await callPopupPopup.show.input('Enter new name for theRename Quick Reply Set:', 'inputEnter a new name:', this.currentQrSet.name); |
| 309 | 309 | if (newName && newName.length > 0) { |
| 310 | 310 | const existingSet = QuickReplySet.get(newName); |
| 311 | 311 | if (existingSet) { |
| @@ -343,11 +343,11 @@ export class SettingsUi { | ||
| 343 | 343 | } |
| 344 | 344 | |
| 345 | 345 | async addQrSet() { |
| 346 | 346 | const name = await callPopupPopup.show.input('QuickCreate Replya Setnew Name:World Info', 'inputEnter a name for the new Quick Reply Set:'); |
| 347 | 347 | if (name && name.length > 0) { |
| 348 | 348 | const oldQrs = QuickReplySet.get(name); |
| 349 | 349 | if (oldQrs) { |
| 350 | 350 | const replace = await callPopupPopup.show.confirm('Replace existing World Info', `A Quick Reply Set named "${name}" already exists.<br>Do you want to overwrite the existing Quick Reply Set?<br>The existing set will be deleted. This cannot be undone.`, 'confirm'); |
| 351 | 351 | if (replace) { |
| 352 | 352 | const idx = QuickReplySet.list.indexOf(oldQrs); |
| 353 | 353 | await this.doDeleteQrSet(oldQrs); |
| @@ -408,7 +408,7 @@ export class SettingsUi { | ||
| 408 | 408 | qrs.init(); |
| 409 | 409 | const oldQrs = QuickReplySet.get(props.name); |
| 410 | 410 | if (oldQrs) { |
| 411 | 411 | const replace = await callPopupPopup.show.confirm('Replace existing World Info', `A Quick Reply Set named "${qrs.name}" already exists.<br>Do you want to overwrite the existing Quick Reply Set?<br>The existing set will be deleted. This cannot be undone.`, 'confirm'); |
| 412 | 412 | if (replace) { |
| 413 | 413 | const idx = QuickReplySet.list.indexOf(oldQrs); |
| 414 | 414 | await this.doDeleteQrSet(oldQrs); |