nodebb-plugin-admin-chats 1.0.0 → 1.0.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/client.js +7 -4
- package/package.json +1 -1
package/client.js
CHANGED
|
@@ -24,14 +24,17 @@ $(document).ready(function() {
|
|
|
24
24
|
|
|
25
25
|
$(window).on('action:ajaxify.end', function(ev, data) {
|
|
26
26
|
|
|
27
|
-
if (app.user.isAdmin &&
|
|
27
|
+
if (app.user.isAdmin && ajaxify.data.template.name.startsWith('account/')) {
|
|
28
28
|
const userSlug = ajaxify.data.userslug || (ajaxify.data.user && ajaxify.data.user.userslug);
|
|
29
|
+
|
|
29
30
|
if (userSlug) {
|
|
30
|
-
const buttonText = isEnglishSystem() ? "View Chats" : "
|
|
31
|
+
const buttonText = isEnglishSystem() ? "View Chats" : "צפיה בצ'אטים";
|
|
32
|
+
|
|
33
|
+
const relativePath = config.relative_path || '';
|
|
31
34
|
|
|
32
35
|
const btnHtml = `
|
|
33
36
|
<li role="presentation">
|
|
34
|
-
<a class="dropdown-item rounded-1 d-flex align-items-center gap-2" href="/user/${userSlug}/chats" role="menuitem">
|
|
37
|
+
<a class="dropdown-item rounded-1 d-flex align-items-center gap-2" href="${relativePath}/user/${userSlug}/chats" role="menuitem">
|
|
35
38
|
<i class="far fa-fw fa-comments"></i>
|
|
36
39
|
<span>${buttonText}</span>
|
|
37
40
|
</a>
|
|
@@ -56,4 +59,4 @@ $(document).ready(function() {
|
|
|
56
59
|
$(window).on('action:chat.closed', function() {
|
|
57
60
|
setTimeout(replaceAdminEmptyStateText, 200);
|
|
58
61
|
});
|
|
59
|
-
});
|
|
62
|
+
});
|