confirmation modal
All checks were successful
Build and Push Docker Image / build (push) Successful in 11s
All checks were successful
Build and Push Docker Image / build (push) Successful in 11s
This commit is contained in:
parent
4d7af5592b
commit
41fca99b2f
@ -1,4 +1,9 @@
|
||||
|
||||
**unreleased**
|
||||
|
||||
- Enhancement: Added confirmation modal for closing a server
|
||||
-
|
||||
|
||||
**v0.2.0**
|
||||
|
||||
- Enhancement: Improved warning when server doesn't include bot member
|
||||
|
@ -244,6 +244,24 @@ function selectServer(primaryKey) {
|
||||
// #region Delete Server Btn
|
||||
|
||||
$("#deleteSelectedServerBtn").on("click", async function() {
|
||||
const notes = [
|
||||
"No Subscriptions, Filters or Tracked Content will be deleted.",
|
||||
"No data will be deleted for other users.",
|
||||
"The server will no longer appear on your sidebar.",
|
||||
"You can re-add the server",
|
||||
"All Subscriptions, Filters and Tracked Content will be available when/if you re-add the server."
|
||||
];
|
||||
const notesString = arrayToHtmlList(notes).prop("outerHTML");
|
||||
|
||||
await confirmDeleteModal(
|
||||
"Close this server?",
|
||||
`This is a safe, non-permanent action:<br><br>${notesString}`,
|
||||
deleteSelectedServer,
|
||||
null
|
||||
);
|
||||
});
|
||||
|
||||
async function deleteSelectedServer() {
|
||||
var activeServer = getCurrentlyActiveServer();
|
||||
|
||||
if (!activeServer) {
|
||||
@ -261,8 +279,7 @@ $("#deleteSelectedServerBtn").on("click", async function() {
|
||||
alert(error)
|
||||
alert(JSON.stringify(error, null, 4))
|
||||
}
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
// #endregion
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user