collavre_slack 0.2.7 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/javascript/collavre_slack.js +5 -5
- data/lib/collavre_slack/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8700d4cf3be0ac6d384a5d4860da91cffb2216951c2689e480103d833100dac1
|
|
4
|
+
data.tar.gz: 050735120aa672d534ec4473aa83e7996e0b1e688d0581bccbd93a1a3d5a4eef
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 301365a9d7c37b398a393ddf9aafc80a77352fbff14b006ee25deccf7f5b8dc04a64ff26922e850a009988c9dc9e8f8a2c56fd13aaae82f44942ef2298720b6f
|
|
7
|
+
data.tar.gz: 627a82d5443d629fd14080ade5af31b634d8bf3682803a0725bed22d1e1e22d0c7ea7d071f312c12a424527a419d04875824ff778d74a5dddebf95186d206177
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { filterChannels, reconcileSelection, buildChannelViewModels } from './slack_channel_list.js';
|
|
2
2
|
import { csrfToken, showError, clearError, updateStepVisibility, openOAuthPopup, fetchWithCsrf, setupModalClose } from 'collavre/modules/integration_wizard';
|
|
3
|
+
import { alertDialog, confirmDialog } from 'collavre/lib/utils/dialog';
|
|
3
4
|
|
|
4
5
|
let slackIntegrationInitialized = false;
|
|
5
6
|
|
|
@@ -152,7 +153,7 @@ if (!slackIntegrationInitialized) {
|
|
|
152
153
|
deleteBtn.textContent = modal.dataset.deleteButtonLabel || 'Remove';
|
|
153
154
|
deleteBtn.style.cssText = 'padding:0.25em 0.5em;font-size:0.8em;';
|
|
154
155
|
deleteBtn.addEventListener('click', function () {
|
|
155
|
-
performDeleteLink(link);
|
|
156
|
+
performDeleteLink(link, deleteBtn);
|
|
156
157
|
});
|
|
157
158
|
|
|
158
159
|
li.appendChild(channelInfo);
|
|
@@ -189,10 +190,9 @@ if (!slackIntegrationInitialized) {
|
|
|
189
190
|
}
|
|
190
191
|
}
|
|
191
192
|
|
|
192
|
-
function performDeleteLink(link) {
|
|
193
|
-
if (!
|
|
193
|
+
async function performDeleteLink(link, btn) {
|
|
194
|
+
if (!(await confirmDialog(modal.dataset.deleteConfirm, { danger: true }))) return;
|
|
194
195
|
|
|
195
|
-
const btn = event.target;
|
|
196
196
|
btn.disabled = true;
|
|
197
197
|
btn.textContent = '...';
|
|
198
198
|
clearError(errorEl);
|
|
@@ -334,7 +334,7 @@ if (!slackIntegrationInitialized) {
|
|
|
334
334
|
openBtn.addEventListener('click', function () {
|
|
335
335
|
creativeId = this.dataset.creativeId;
|
|
336
336
|
if (!creativeId) {
|
|
337
|
-
|
|
337
|
+
alertDialog(modal.dataset.noCreative);
|
|
338
338
|
return;
|
|
339
339
|
}
|
|
340
340
|
modal.style.display = 'flex';
|