removed free table (data sheet) concept

This commit is contained in:
Jan Prochazka
2023-02-25 09:51:08 +01:00
parent 7c4a47c4c6
commit a77492440e
20 changed files with 65 additions and 857 deletions

View File

@@ -42,30 +42,26 @@
apiCall('archive/refresh-files', { folder });
};
function handleNewDataSheet() {
function handleNewJsonLines() {
showModal(InputTextModal, {
value: '',
label: 'New file name',
header: 'Create new data sheet',
header: 'Create new JSON lines',
onConfirm: async file => {
await apiCall('archive/save-free-table', {
await apiCall('archive/save-rows', {
folder: $currentArchive,
file,
data: createFreeTableModel(),
rows: [
{ id: 1, value: 'val1' },
{ id: 1, value: 'val2' },
],
});
openNewTab({
title: file,
icon: 'img free-table',
tabComponent: 'FreeTableTab',
icon: 'img archive',
tabComponent: 'ArchiveFileTab',
props: {
initialArgs: {
functionName: 'archiveReader',
props: {
fileName: file,
folderName: $currentArchive,
},
},
archiveFile: file,
archiveFolder: $currentArchive,
},
@@ -75,7 +71,7 @@
}
function createAddMenu() {
return [{ text: 'New data sheet', onClick: handleNewDataSheet }];
return [{ text: 'New NDJSON file', onClick: handleNewJsonLines }];
}
</script>