nodebb-plugin-pdf-secure2 1.4.1 → 1.4.2

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.
@@ -38,6 +38,7 @@ ${SECURITY_RULES}`;
38
38
 
39
39
  const SYSTEM_INSTRUCTION_VIP = `Sen bir PDF döküman asistanı ve ders öğretmenisin. Bu döküman bir üniversite ders materyalidir. Kurallar:
40
40
  - Kullanıcının yazdığı dilde cevap ver
41
+ - Önce kısa ve net cevapla, sonra gerekirse detaylandır. Gereksiz yere uzatma
41
42
  - Konuyu örneklerle ve analojilerle açıkla, soyut kavramları somutlaştır
42
43
  - Matematiksel işlemleri adım adım çöz, her adımı gerekçesiyle açıkla
43
44
  - Sınav ve quiz hazırlığı için ipuçları, stratejiler ve olası soru kalıpları ver
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-pdf-secure2",
3
- "version": "1.4.1",
3
+ "version": "1.4.2",
4
4
  "description": "Secure PDF viewer plugin for NodeBB - prevents downloading, enables canvas-only rendering with Premium group support",
5
5
  "main": "library.js",
6
6
  "repository": {
@@ -653,6 +653,8 @@
653
653
  right: 0;
654
654
  bottom: 0;
655
655
  width: 320px;
656
+ min-width: 280px;
657
+ max-width: 600px;
656
658
  background: var(--bg-secondary);
657
659
  border-left: 1px solid var(--border-color);
658
660
  display: flex;
@@ -663,6 +665,22 @@
663
665
  pointer-events: none;
664
666
  }
665
667
 
668
+ /* Resize handle on the left edge of chat sidebar */
669
+ .chatResizeHandle {
670
+ position: absolute;
671
+ left: -4px;
672
+ top: 0;
673
+ bottom: 0;
674
+ width: 8px;
675
+ cursor: col-resize;
676
+ z-index: 51;
677
+ }
678
+ .chatResizeHandle:hover,
679
+ .chatResizeHandle.active {
680
+ background: var(--accent);
681
+ opacity: 0.3;
682
+ }
683
+
666
684
  #chatSidebar.open {
667
685
  transform: translateX(0);
668
686
  pointer-events: auto;
@@ -2834,6 +2852,7 @@
2834
2852
 
2835
2853
  <!-- Chat Sidebar -->
2836
2854
  <div id="chatSidebar">
2855
+ <div class="chatResizeHandle" id="chatResizeHandle"></div>
2837
2856
  <div class="sidebarHeader">
2838
2857
  <div class="chatHeaderTitle">
2839
2858
  <svg viewBox="0 0 24 24"><path d="M19 9l1.25-2.75L23 5l-2.75-1.25L19 1l-1.25 2.75L15 5l2.75 1.25L19 9zm-7.5.5L9 4 6.5 9.5 1 12l5.5 2.5L9 20l2.5-5.5L17 12l-5.5-2.5z"/></svg>
@@ -4456,6 +4475,43 @@
4456
4475
  }
4457
4476
  });
4458
4477
 
4478
+ // Chat sidebar resize (drag left edge to expand)
4479
+ (function () {
4480
+ var handle = document.getElementById('chatResizeHandle');
4481
+ if (!handle) return;
4482
+ var dragging = false;
4483
+ var startX = 0;
4484
+ var startWidth = 0;
4485
+
4486
+ handle.addEventListener('mousedown', function (e) {
4487
+ if (window.innerWidth < 600) return; // Disable on mobile
4488
+ dragging = true;
4489
+ startX = e.clientX;
4490
+ startWidth = chatSidebarEl.offsetWidth;
4491
+ handle.classList.add('active');
4492
+ chatSidebarEl.style.transition = 'none';
4493
+ document.body.style.cursor = 'col-resize';
4494
+ document.body.style.userSelect = 'none';
4495
+ e.preventDefault();
4496
+ });
4497
+
4498
+ document.addEventListener('mousemove', function (e) {
4499
+ if (!dragging) return;
4500
+ var newWidth = startWidth + (startX - e.clientX);
4501
+ newWidth = Math.max(280, Math.min(600, newWidth));
4502
+ chatSidebarEl.style.width = newWidth + 'px';
4503
+ });
4504
+
4505
+ document.addEventListener('mouseup', function () {
4506
+ if (!dragging) return;
4507
+ dragging = false;
4508
+ handle.classList.remove('active');
4509
+ chatSidebarEl.style.transition = '';
4510
+ document.body.style.cursor = '';
4511
+ document.body.style.userSelect = '';
4512
+ });
4513
+ })();
4514
+
4459
4515
  // Sepia Reading Mode
4460
4516
  let sepiaMode = false;
4461
4517
  document.getElementById('sepiaBtn').onclick = () => {
package/test/image.png DELETED
Binary file