MCPcopy Create free account
hub / github.com/dedsec1121fk/DedSec / menu

Function menu

Scripts/Settings.py:7752–7781  ·  view source on GitHub ↗
(stdscr)

Source from the content-addressed store, hash-verified

7750 await loadWebSettingsMeta();
7751 }
7752 }
7753
7754 async function saveEditor() {
7755 if (!state.currentFilePath) {
7756 showToast(t('Open a text file first'), true);
7757 return;
7758 }
7759 try {
7760 await apiPost('/api/fs/write', { path: state.currentFilePath, content: document.getElementById('editorArea').value });
7761 showToast(t('File saved'));
7762 await loadFiles(state.filesPath);
7763 } catch (err) { handleError(err); }
7764 }
7765
7766 async function pasteClipboard() {
7767 if (!state.clipboard) {
7768 showToast(t('Clipboard is empty'), true);
7769 return;
7770 }
7771 var source = state.clipboard.path;
7772 var name = source.split('/').pop();
7773 var destination = state.filesPath.replace(/\/$/, '') + '/' + name;
7774 try {
7775 var endpoint = state.clipboard.mode === 'move' ? '/api/fs/move' : '/api/fs/copy';
7776 await apiPost(endpoint, { source: source, destination: destination });
7777 state.clipboard = null;
7778 await loadFiles(state.filesPath);
7779 showToast(t('Paste complete'));
7780 } catch (err) { handleError(err); }
7781 }
7782
7783 async function saveSettings() {
7784 try {

Callers

nothing calls this directly

Calls 4

get_settings_optionsFunction · 0.70
_Function · 0.70
safe_curses_addstrFunction · 0.70
clearMethod · 0.45

Tested by

no test coverage detected