payment-skill 1.1.8 → 1.1.10
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 +1 -1
- package/public/dashboard.js +7 -16
package/package.json
CHANGED
package/public/dashboard.js
CHANGED
|
@@ -181,7 +181,7 @@ function updateDomainsList(domainList) {
|
|
|
181
181
|
const container = document.getElementById('domains-list');
|
|
182
182
|
if (!container) return;
|
|
183
183
|
|
|
184
|
-
console.log('Domains:', domains);
|
|
184
|
+
console.log('Domains received:', JSON.stringify(domains, null, 2));
|
|
185
185
|
|
|
186
186
|
if (domains.length === 0) {
|
|
187
187
|
container.innerHTML = '<span style="color: var(--text-secondary); font-size: 10px;">No domains configured</span>';
|
|
@@ -215,21 +215,6 @@ function updateDomainsList(domainList) {
|
|
|
215
215
|
`}).join('');
|
|
216
216
|
}
|
|
217
217
|
|
|
218
|
-
async function addDomain() {
|
|
219
|
-
const domain = document.getElementById('new-domain').value.trim();
|
|
220
|
-
if (!domain) return;
|
|
221
|
-
|
|
222
|
-
const result = await apiPost('/api/limits/domains', { domain });
|
|
223
|
-
document.getElementById('new-domain').value = '';
|
|
224
|
-
|
|
225
|
-
// Use returned controls to ensure correct mode
|
|
226
|
-
if (result.controls) {
|
|
227
|
-
updateDomainsList(result.controls.domains || [], result.controls.mode || 'blacklist');
|
|
228
|
-
} else {
|
|
229
|
-
await loadLimits();
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
|
|
233
218
|
async function removeDomain(domain) {
|
|
234
219
|
try {
|
|
235
220
|
const response = await fetch(`${API_BASE}/api/limits/domains/${encodeURIComponent(domain)}`, { method: 'DELETE' });
|
|
@@ -251,10 +236,13 @@ async function addBlockedDomain() {
|
|
|
251
236
|
const domain = document.getElementById('new-blocked-domain').value.trim();
|
|
252
237
|
if (!domain) return;
|
|
253
238
|
|
|
239
|
+
console.log('Adding blocked domain:', domain);
|
|
254
240
|
const result = await apiPost('/api/limits/domains', { domain, type: 'blocked' });
|
|
241
|
+
console.log('API result:', JSON.stringify(result, null, 2));
|
|
255
242
|
document.getElementById('new-blocked-domain').value = '';
|
|
256
243
|
|
|
257
244
|
if (result.controls) {
|
|
245
|
+
console.log('Controls received:', JSON.stringify(result.controls, null, 2));
|
|
258
246
|
updateDomainsList(result.controls.domains || []);
|
|
259
247
|
} else {
|
|
260
248
|
await loadLimits();
|
|
@@ -265,10 +253,13 @@ async function addAllowedDomain() {
|
|
|
265
253
|
const domain = document.getElementById('new-allowed-domain').value.trim();
|
|
266
254
|
if (!domain) return;
|
|
267
255
|
|
|
256
|
+
console.log('Adding allowed domain:', domain);
|
|
268
257
|
const result = await apiPost('/api/limits/domains', { domain, type: 'allowed' });
|
|
258
|
+
console.log('API result:', JSON.stringify(result, null, 2));
|
|
269
259
|
document.getElementById('new-allowed-domain').value = '';
|
|
270
260
|
|
|
271
261
|
if (result.controls) {
|
|
262
|
+
console.log('Controls received:', JSON.stringify(result.controls, null, 2));
|
|
272
263
|
updateDomainsList(result.controls.domains || []);
|
|
273
264
|
} else {
|
|
274
265
|
await loadLimits();
|