Added post addBackend options to force export, or import data directly after.

This commit is contained in:
Abdulmhsen B. A. A.
2024-07-08 16:00:44 +03:00
parent 667487602e
commit 2c5c41fc7a
5 changed files with 106 additions and 62 deletions

View File

@@ -302,8 +302,11 @@ const copyText = (str, showNotification = true) => {
notification('success', 'Success', 'Text copied to clipboard.')
}
const makeConsoleCommand = (cmd) => {
const makeConsoleCommand = (cmd, run = false) => {
const params = new URLSearchParams();
if (run) {
params.append('run', 'true');
}
// -- base64 encode the command to prevent XSS
params.append('cmd', btoa(cmd));
return `/console?${params.toString()}`
@@ -311,7 +314,6 @@ const makeConsoleCommand = (cmd) => {
const stringToRegex = (str) => new RegExp(str.match(/\/(.+)\/.*/)[1], str.match(/\/.+\/(.*)/)[1])
/**
* Make history search link.
*