nodebb-plugin-niki-loyalty 1.0.5 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-niki-loyalty",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "Niki The Cat Coffee Loyalty System - Earn points while studying on IEU Forum.",
5
5
  "main": "library.js",
6
6
  "nbbpm": {
@@ -2,14 +2,15 @@
2
2
 
3
3
  $(document).ready(function () {
4
4
  // --- AYARLAR ---
5
- // Buraya logonun linkini koy. Eğer link yoksa geçici bir kedi ikonu koydum.
6
- const NIKI_LOGO_URL = 'https://i.ibb.co/nZvtpss/logo-placeholder.png';
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="${NIKI_LOGO_URL}" class="niki-widget-logo" alt="Niki">
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, sadece veriyi güncelle
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 (Kesin çözüm)
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);
Binary file