From 31e8f46e03c5d054ed838842159e4e9a3d03339e Mon Sep 17 00:00:00 2001 From: oxpoe Date: Fri, 6 Nov 2026 11:13:44 +0700 Subject: [PATCH] feat(portal): kustomisasi banner, status, hero, sosial dari Pengaturan - banner + warna, status jaringan, hero badge/title/subtitle - link maps/instagram/facebook/tiktok di footer - boolean portal_banner_enabled - versi 0.6.14 --- CHANGELOG.md | 9 ++++++ README.md | 2 +- package.json | 2 +- routes/adminPortal.js | 1 + version.txt | 2 +- views/admin/settings.ejs | 65 ++++++++++++++++++++++++++++++++++++++++ views/login.ejs | 41 +++++++++++++++++++++++-- 7 files changed, 116 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 48ec734..d8a8160 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,15 @@ Format mengikuti [Keep a Changelog](https://keepachangelog.com/) dan [Semantic Versioning](https://semver.org/). +## [0.6.14] — 2026-11-06 — "portal-custom" + +### Ditambahkan +- **Kustomisasi Beranda & Portal Pelanggan** dari Pengaturan: + - banner pengumuman (info/warning/danger/success), + - status jaringan + keterangan, + - badge, judul, dan deskripsi hero, + - link Google Maps, Instagram, Facebook, TikTok di footer. + ## [0.6.13] — 2026-11-06 — "webhook-shopeepay" ### Diperbaiki diff --git a/README.md b/README.md index c772a43..96b8f22 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@

Lisensi: ISC - Versi 0.6.13 (webhook-shopeepay) + Versi 0.6.14 (portal-custom) Node.js >= 20 Docker Demo diff --git a/package.json b/package.json index 7086704..a623a5d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "open-isp", - "version": "0.6.13", + "version": "0.6.14", "description": "OPEN-ISP \u2014 sistem billing & manajemen ISP open-source (PWA pelanggan, multi-OLT, RADIUS, WhatsApp, QRIS)", "main": "app-customer.js", "scripts": { diff --git a/routes/adminPortal.js b/routes/adminPortal.js index 5dc264c..f9fdb21 100644 --- a/routes/adminPortal.js +++ b/routes/adminPortal.js @@ -5069,6 +5069,7 @@ router.post('/settings', requireAdminSession, express.urlencoded({ extended: tru if (newSettings.auto_deactivate_enabled !== undefined) newSettings.auto_deactivate_enabled = (newSettings.auto_deactivate_enabled === 'true'); if (newSettings.auto_deactivate_months !== undefined) newSettings.auto_deactivate_months = parseInt(newSettings.auto_deactivate_months) || 3; newSettings.use_builtin_acs = (newSettings.use_builtin_acs === 'true' || newSettings.use_builtin_acs === true); + newSettings.portal_banner_enabled = (newSettings.portal_banner_enabled === 'true' || newSettings.portal_banner_enabled === true); // Multi-Router Mode settings if (!newSettings.multi_router_mode) newSettings.multi_router_mode = 'disabled'; diff --git a/version.txt b/version.txt index 4655c9e..5c858bd 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -0.6.13 \ No newline at end of file +0.6.14 \ No newline at end of file diff --git a/views/admin/settings.ejs b/views/admin/settings.ejs index f9cdde4..b8c2397 100644 --- a/views/admin/settings.ejs +++ b/views/admin/settings.ejs @@ -392,6 +392,71 @@ +

+
Kustomisasi Beranda & Portal Pelanggan
+
+
+
Banner & Status
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
Hero & Media Sosial
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+
+
+
+
+
+
<%= t('admin.settings.external_api', 'API Eksternal') %>
diff --git a/views/login.ejs b/views/login.ejs index 356edaf..39e34a0 100644 --- a/views/login.ejs +++ b/views/login.ejs @@ -31,6 +31,21 @@ +<% + const _portal = (typeof settings !== 'undefined' && settings) ? settings : {}; + const _pbColors = { + info: { bg: 'rgba(59,130,246,.16)', border: '#3b82f6', fg: '#bfdbfe' }, + warning: { bg: 'rgba(245,158,11,.16)', border: '#f59e0b', fg: '#fde68a' }, + danger: { bg: 'rgba(239,68,68,.16)', border: '#ef4444', fg: '#fecaca' }, + success: { bg: 'rgba(34,197,94,.16)', border: '#22c55e', fg: '#bbf7d0' } + }; + const _pb = _pbColors[_portal.portal_banner_type] || _pbColors.info; +%> +<% if (_portal.portal_banner_enabled && _portal.portal_banner_text) { %> +
+ <%= _portal.portal_banner_text %> +
+<% } %>