add to favorites basic functionality

This commit is contained in:
Jan Prochazka
2020-12-12 18:33:42 +01:00
parent b1a2093e6b
commit 3dcc761c14
23 changed files with 243 additions and 44 deletions

View File

@@ -104,7 +104,7 @@ function GenerateSctriptButton({ modalState }) {
icon: 'img shell',
tabComponent: 'ShellTab',
},
code
{ editor: code }
);
modalState.close();
};

View File

@@ -13,7 +13,12 @@ export default function SaveTabModal({ data, folder, format, modalState, tabid,
changeTab(tabid, setOpenedTabs, (tab) => ({
...tab,
title: name,
props: { ...tab.props, savedFile: name },
props: {
...tab.props,
savedFile: name,
savedFolder: folder,
savedFormat: format,
},
}));
const handleKeyboard = React.useCallback(