nodebb-plugin-admin-chats 3.8.0 → 3.8.1
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.
- package/package.json +1 -1
- package/static/lib/live-updates.js +0 -14
package/package.json
CHANGED
|
@@ -25,18 +25,4 @@ $(document).ready(function () {
|
|
|
25
25
|
refreshIfOpen(data && data.roomId);
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
|
-
|
|
29
|
-
// Core toggles the `deleted` class on a message when it's deleted/restored,
|
|
30
|
-
// but doesn't itself swap which of the delete/restore actions is visible.
|
|
31
|
-
$(document).on('click', '[data-action="delete"], [data-action="restore"]', function () {
|
|
32
|
-
const $message = $(this).closest('[component="chat/message"]');
|
|
33
|
-
if (!$message.length) {
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
setTimeout(function () {
|
|
37
|
-
const isDeleted = $message.hasClass('deleted');
|
|
38
|
-
$message.find('[data-action="delete"]').toggleClass('hidden', isDeleted).toggle(!isDeleted);
|
|
39
|
-
$message.find('[data-action="restore"]').toggleClass('hidden', !isDeleted).toggle(isDeleted);
|
|
40
|
-
}, 50);
|
|
41
|
-
});
|
|
42
28
|
});
|