nodebb-plugin-discord-onekite 1.1.17 → 1.1.19

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/README.md CHANGED
@@ -1,9 +1,8 @@
1
- # nodebb-plugin-discord-onekite v1.1.4.9
1
+ # nodebb-plugin-discord-onekite v1.1.4.11
2
2
 
3
- ACP uses official NodeBB approach (quickstart):
4
- - `settings.sync()` + `settings.persist()`
5
- - save button partial (bottom-right)
3
+ Fixes ACP saving:
4
+ - Inputs now use `data-field` attributes (required by NodeBB `settings` module), so values persist.
6
5
 
7
- Discord embed:
8
- - clickable title (embed.url)
9
- - description = message excerpt only
6
+ Toast:
7
+ - Title: "Succès"
8
+ - Message: "Paramètres enregistrés"
package/library.js CHANGED
@@ -182,15 +182,6 @@ Plugin.init = async ({ router }) => {
182
182
  [],
183
183
  controllers.renderAdminPage
184
184
  );
185
-
186
- // AJAX save endpoint for ACP (used by admin.js)
187
- res.json({ ok: true });
188
- } catch (e) {
189
- console.error('[discord-onekite] save failed', e);
190
- res.status(500).json({ ok: false });
191
- }
192
- }
193
- );
194
185
  };
195
186
 
196
187
  Plugin.addAdminNavigation = (header) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-discord-onekite",
3
- "version": "1.1.17",
3
+ "version": "1.1.19",
4
4
  "description": "Discord webhook notifier for Onekite (NodeBB v4.x only)",
5
5
  "main": "library.js",
6
6
  "license": "MIT",
@@ -14,7 +14,7 @@ define('admin/plugins/discord-onekite', ['settings'], function (settings) {
14
14
  e.preventDefault();
15
15
  settings.persist('discord-onekite', $form, function () {
16
16
  if (window.app && typeof app.alertSuccess === 'function') {
17
- app.alertSuccess('Paramètres enregistrés !');
17
+ if (typeof app.alert === 'function') { app.alert({ type: 'success', title: 'Succès', message: 'Paramètres enregistrés' }); } else { app.alertSuccess('Paramètres enregistrés'); }
18
18
  }
19
19
  });
20
20
  });
@@ -5,11 +5,11 @@
5
5
  <form role="form" class="discord-onekite-settings">
6
6
  <div class="mb-3">
7
7
  <label class="form-label" for="webhookUrl">Discord Webhook URL</label>
8
- <input type="text" class="form-control" id="webhookUrl" name="webhookUrl" value="{settings.webhookUrl}" placeholder="https://discord.com/api/webhooks/..." />
8
+ <input type="text" class="form-control" id="webhookUrl" data-field="webhookUrl" value="{settings.webhookUrl}" placeholder="https://discord.com/api/webhooks/..." />
9
9
  </div>
10
10
 
11
11
  <div class="form-check mb-3">
12
- <input class="form-check-input" type="checkbox" id="notifyReplies" name="notifyReplies" <!-- IF settings.notifyReplies -->checked<!-- ENDIF settings.notifyReplies -->>
12
+ <input class="form-check-input" type="checkbox" id="notifyReplies" data-field="notifyReplies" <!-- IF settings.notifyReplies -->checked<!-- ENDIF settings.notifyReplies -->>
13
13
  <label class="form-check-label" for="notifyReplies">
14
14
  Notifier aussi les réponses (si décoché : uniquement les nouveaux sujets)
15
15
  </label>
@@ -17,7 +17,7 @@
17
17
 
18
18
  <div class="mb-3">
19
19
  <label class="form-label" for="cids">Catégories à notifier</label>
20
- <select class="form-select" id="cids" name="cids" multiple size="12">
20
+ <select class="form-select" id="cids" data-field="cids" multiple size="12">
21
21
  <!-- BEGIN categories -->
22
22
  <option value="{categories.cid}" <!-- IF categories.selected -->selected<!-- ENDIF categories.selected -->>{categories.name}</option>
23
23
  <!-- END categories -->