feat(gowa): tombol salin webhook secret
All checks were successful
CI / test (push) Successful in 1m36s
All checks were successful
CI / test (push) Successful in 1m36s
- input secret diberi id + tombol copy - feedback ikon centang - versi 0.5.20
This commit is contained in:
@@ -2,6 +2,11 @@
|
||||
|
||||
Format mengikuti [Keep a Changelog](https://keepachangelog.com/) dan [Semantic Versioning](https://semver.org/).
|
||||
|
||||
## [0.5.20] — 2026-11-06 — "copy-secret"
|
||||
|
||||
### Ditambahkan
|
||||
- Tombol **salin** di samping **Webhook Secret** GOWA (sama seperti tombol salin Webhook URL), dengan umpan balik ikon centang.
|
||||
|
||||
## [0.5.19] — 2026-11-06 — "restart-notice"
|
||||
|
||||
### Ditambahkan
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
<p align="center">
|
||||
<img src="https://img.shields.io/badge/lisensi-ISC-ADFF2F" alt="Lisensi: ISC">
|
||||
<img src="https://img.shields.io/badge/versi-0.5.19_restart--notice-ADFF2F" alt="Versi 0.5.19 (restart-notice)">
|
||||
<img src="https://img.shields.io/badge/versi-0.5.20_copy--secret-ADFF2F" alt="Versi 0.5.20 (copy-secret)">
|
||||
<img src="https://img.shields.io/badge/Node.js-%E2%89%A520-339933" alt="Node.js >= 20">
|
||||
<img src="https://img.shields.io/badge/docker-ready-2496ED?logo=docker&logoColor=white" alt="Docker">
|
||||
<a href="https://demo-openisp.oxpoe.xyz"><img src="https://img.shields.io/badge/demo-live-ADFF2F?logo=googlechrome&logoColor=black" alt="Demo"></a>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "open-isp",
|
||||
"version": "0.5.19",
|
||||
"version": "0.5.20",
|
||||
"description": "OPEN-ISP \u2014 sistem billing & manajemen ISP open-source (PWA pelanggan, multi-OLT, RADIUS, WhatsApp, QRIS)",
|
||||
"main": "app-customer.js",
|
||||
"scripts": {
|
||||
|
||||
@@ -1 +1 @@
|
||||
0.5.19
|
||||
0.5.20
|
||||
@@ -220,7 +220,10 @@
|
||||
</div>
|
||||
<div class="fg" style="flex:1;">
|
||||
<label class="fl">Webhook Secret (HMAC)</label>
|
||||
<input class="fc" name="gowa_webhook_secret" value="<%= gowaSettings.gowa_webhook_secret %>" placeholder="otomatis dibuat">
|
||||
<div style="display:flex;gap:8px;">
|
||||
<input class="fc" id="gowa_webhook_secret" name="gowa_webhook_secret" value="<%= gowaSettings.gowa_webhook_secret %>" placeholder="otomatis dibuat">
|
||||
<button type="button" class="btn btn-g" onclick="copyGowaSecret(this)" title="Salin webhook secret"><i class="bi bi-copy"></i></button>
|
||||
</div>
|
||||
<div style="font-size:11px;color:var(--muted);margin-top:4px">Dibuat otomatis (32 byte). Samakan dengan <code>WHATSAPP_WEBHOOK_SECRET</code> di GOWA.</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -347,6 +350,21 @@
|
||||
render();
|
||||
_gowaQrTick = setInterval(function () { remaining--; if (remaining < 0) remaining = 0; render(); }, 1000);
|
||||
}
|
||||
function copyGowaSecret(btn) {
|
||||
var el = document.getElementById('gowa_webhook_secret');
|
||||
if (!el) return;
|
||||
var val = String(el.value || '');
|
||||
try { el.select(); document.execCommand('copy'); } catch (e) {}
|
||||
if (navigator.clipboard && window.isSecureContext) {
|
||||
navigator.clipboard.writeText(val).catch(function () {});
|
||||
}
|
||||
if (btn) {
|
||||
var old = btn.innerHTML;
|
||||
btn.innerHTML = '<i class="bi bi-check2"></i>';
|
||||
setTimeout(function () { btn.innerHTML = old; }, 1200);
|
||||
}
|
||||
}
|
||||
|
||||
function copyGowaWebhook() {
|
||||
var el = document.getElementById('gowa_webhook_url');
|
||||
if (!el) return;
|
||||
|
||||
Reference in New Issue
Block a user