nodebb-plugin-niki-loyalty 1.0.4 → 1.0.6
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/client.js +6 -5
- package/static/logo.png +0 -0
package/package.json
CHANGED
package/static/lib/client.js
CHANGED
|
@@ -2,14 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
$(document).ready(function () {
|
|
4
4
|
// --- AYARLAR ---
|
|
5
|
-
//
|
|
6
|
-
|
|
5
|
+
// Logoyu yerel dosyadan çekiyoruz (İnternet linki değil)
|
|
6
|
+
// Bu sayede "resim yüklenmedi" hatası almazsın.
|
|
7
|
+
const NIKI_LOGO_PATH = config.relative_path + '/plugins/nodebb-plugin-niki-loyalty/static/logo.png';
|
|
7
8
|
|
|
8
9
|
// Widget HTML Şablonu
|
|
9
10
|
const widgetHtml = `
|
|
10
11
|
<div id="niki-floating-widget" class="niki-hidden">
|
|
11
12
|
<div class="niki-widget-content" onclick="ajaxify.go('niki-wallet')">
|
|
12
|
-
<img src="${
|
|
13
|
+
<img src="${NIKI_LOGO_PATH}" class="niki-widget-logo" alt="Niki">
|
|
13
14
|
<div class="niki-widget-text">
|
|
14
15
|
<span class="niki-lbl">PUANIM</span>
|
|
15
16
|
<span class="niki-val" id="niki-live-points">...</span>
|
|
@@ -23,12 +24,12 @@ $(document).ready(function () {
|
|
|
23
24
|
// Eğer giriş yapmamışsa çalışma
|
|
24
25
|
if (!app.user.uid || app.user.uid <= 0) return;
|
|
25
26
|
|
|
26
|
-
// Widget zaten varsa tekrar ekleme
|
|
27
|
+
// Widget zaten varsa tekrar ekleme
|
|
27
28
|
if ($('#niki-floating-widget').length === 0) {
|
|
28
29
|
$('body').append(widgetHtml);
|
|
29
30
|
}
|
|
30
31
|
|
|
31
|
-
// VERİYİ DOĞRU YERDEN ÇEK: wallet-data API'si
|
|
32
|
+
// VERİYİ DOĞRU YERDEN ÇEK: wallet-data API'si
|
|
32
33
|
$.get('/api/niki-loyalty/wallet-data', function(data) {
|
|
33
34
|
// Puanı güncelle
|
|
34
35
|
$('#niki-live-points').text(data.points || 0);
|
package/static/logo.png
ADDED
|
Binary file
|