nodebb-plugin-pdf-secure2 1.2.38 → 1.3.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/.claude/settings.local.json +11 -0
- package/lib/controllers.js +105 -0
- package/lib/gemini-chat.js +125 -0
- package/library.js +257 -246
- package/package.json +2 -1
- package/plugin.json +4 -1
- package/static/lib/admin.js +25 -0
- package/static/lib/main.js +468 -468
- package/static/lib/pdf.min.mjs +20 -20
- package/static/lib/pdf.worker.min.mjs +20 -20
- package/static/templates/admin/plugins/pdf-secure.tpl +14 -5
- package/static/viewer-app.js +2 -2
- package/static/viewer.html +6353 -5893
- package/static/lib/pdf-secure (1).pdf +0 -0
- package/static/lib/viewer.js +0 -161
- package/static/viewer-yedek.html +0 -4548
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
<div class="row m-0">
|
|
5
5
|
<div id="spy-container" class="col-12 col-md-8 px-0 mb-4" tabindex="0">
|
|
6
|
-
<form role="form" class="pdf-secure-settings">
|
|
6
|
+
<form role="form" class="pdf-secure-settings" id="pdf-secure-settings">
|
|
7
7
|
<div class="mb-4">
|
|
8
8
|
<h5 class="fw-bold tracking-tight settings-header">PDF Secure Viewer Settings</h5>
|
|
9
9
|
|
|
@@ -13,28 +13,37 @@
|
|
|
13
13
|
|
|
14
14
|
<div class="mb-3">
|
|
15
15
|
<label class="form-label" for="premiumGroup">Premium Group Name</label>
|
|
16
|
-
<input type="text" id="premiumGroup" name="premiumGroup" title="Premium Group Name" class="form-control" placeholder="Premium" value="Premium">
|
|
16
|
+
<input type="text" id="premiumGroup" name="premiumGroup" data-key="premiumGroup" title="Premium Group Name" class="form-control" placeholder="Premium" value="Premium">
|
|
17
17
|
<div class="form-text">Users in this group can view full PDFs with all tools. Others can only see the first page.</div>
|
|
18
18
|
</div>
|
|
19
19
|
|
|
20
20
|
<div class="mb-3">
|
|
21
21
|
<label class="form-label" for="vipGroup">VIP Group Name</label>
|
|
22
|
-
<input type="text" id="vipGroup" name="vipGroup" title="VIP Group Name" class="form-control" placeholder="VIP" value="VIP">
|
|
22
|
+
<input type="text" id="vipGroup" name="vipGroup" data-key="vipGroup" title="VIP Group Name" class="form-control" placeholder="VIP" value="VIP">
|
|
23
23
|
<div class="form-text">Users in this group get all Premium features plus VIP badge and early access to new features.</div>
|
|
24
24
|
</div>
|
|
25
25
|
|
|
26
26
|
<div class="mb-3">
|
|
27
27
|
<label class="form-label" for="liteGroup">Lite Group Name</label>
|
|
28
|
-
<input type="text" id="liteGroup" name="liteGroup" title="Lite Group Name" class="form-control" placeholder="Lite" value="Lite">
|
|
28
|
+
<input type="text" id="liteGroup" name="liteGroup" data-key="liteGroup" title="Lite Group Name" class="form-control" placeholder="Lite" value="Lite">
|
|
29
29
|
<div class="form-text">Users in this group can view full PDFs but only with zoom and fullscreen. No annotations, sidebar, or other tools.</div>
|
|
30
30
|
</div>
|
|
31
31
|
|
|
32
32
|
<div class="form-check form-switch mb-3">
|
|
33
|
-
<input type="checkbox" class="form-check-input" id="watermarkEnabled" name="watermarkEnabled">
|
|
33
|
+
<input type="checkbox" class="form-check-input" id="watermarkEnabled" name="watermarkEnabled" data-key="watermarkEnabled">
|
|
34
34
|
<label for="watermarkEnabled" class="form-check-label">Enable Watermark</label>
|
|
35
35
|
<div class="form-text">Show a watermark overlay on PDF pages.</div>
|
|
36
36
|
</div>
|
|
37
37
|
</div>
|
|
38
|
+
<div class="mb-4">
|
|
39
|
+
<h5 class="fw-bold tracking-tight settings-header">AI Chat Settings</h5>
|
|
40
|
+
|
|
41
|
+
<div class="mb-3">
|
|
42
|
+
<label class="form-label" for="geminiApiKey">Google Gemini API Key</label>
|
|
43
|
+
<input type="password" id="geminiApiKey" name="geminiApiKey" data-key="geminiApiKey" title="Gemini API Key" class="form-control" placeholder="Enter your Gemini API key">
|
|
44
|
+
<div class="form-text">Google Gemini API anahtarinizi girin. <a href="https://ai.google.dev" target="_blank" rel="noopener">ai.google.dev</a> adresinden alinabilir. Premium/VIP kullanicilar PDF Chat ozelligini kullanabilir.</div>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
38
47
|
</form>
|
|
39
48
|
</div>
|
|
40
49
|
|
package/static/viewer-app.js
CHANGED
|
@@ -485,7 +485,7 @@
|
|
|
485
485
|
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"/>
|
|
486
486
|
</svg>
|
|
487
487
|
<h2>Hata</h2>
|
|
488
|
-
<p>${err.message}</p>
|
|
488
|
+
<p>${err.message.replace(/[<>&"']/g, c => ({'<':'<','>':'>','&':'&','"':'"',"'":'''}[c]))}</p>
|
|
489
489
|
`;
|
|
490
490
|
}
|
|
491
491
|
}
|
|
@@ -2676,7 +2676,7 @@
|
|
|
2676
2676
|
function toggleFullscreen() {
|
|
2677
2677
|
if (window.self !== window.top) {
|
|
2678
2678
|
// Inside iframe: ask parent to handle fullscreen
|
|
2679
|
-
window.parent.postMessage({ type: 'pdf-secure-fullscreen-toggle' },
|
|
2679
|
+
window.parent.postMessage({ type: 'pdf-secure-fullscreen-toggle' }, window.location.origin);
|
|
2680
2680
|
} else {
|
|
2681
2681
|
// Standalone mode: use native fullscreen
|
|
2682
2682
|
if (document.fullscreenElement) {
|