Update toolbar buttons and file input handling in App.tsx
This commit is contained in:
@@ -5180,17 +5180,11 @@ export function App({ store, initialStatusMessage }: AppProps) {
|
|||||||
>
|
>
|
||||||
Add
|
Add
|
||||||
</button>
|
</button>
|
||||||
<button className="toolbar__button" type="button" disabled={!editorState.storageAvailable} onClick={handleSaveDraft}>
|
<button className="toolbar__button" type="button" data-testid="save-project-button" onClick={() => void handleSaveProject()}>
|
||||||
Save Draft
|
Save Project
|
||||||
</button>
|
</button>
|
||||||
<button className="toolbar__button" type="button" disabled={!editorState.storageAvailable} onClick={handleLoadDraft}>
|
<button className="toolbar__button" type="button" data-testid="load-project-button" onClick={handleLoadProjectButtonClick}>
|
||||||
Load Draft
|
Load Project
|
||||||
</button>
|
|
||||||
<button className="toolbar__button" type="button" onClick={handleExportJson}>
|
|
||||||
Export JSON
|
|
||||||
</button>
|
|
||||||
<button className="toolbar__button" type="button" onClick={handleImportJsonButtonClick}>
|
|
||||||
Import JSON
|
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -7856,11 +7850,11 @@ export function App({ store, initialStatusMessage }: AppProps) {
|
|||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
<input
|
<input
|
||||||
ref={importInputRef}
|
ref={importProjectInputRef}
|
||||||
className="visually-hidden"
|
className="visually-hidden"
|
||||||
type="file"
|
type="file"
|
||||||
accept=".json,application/json"
|
accept={`${PROJECT_PACKAGE_FILE_EXTENSION},.zip,application/zip`}
|
||||||
onChange={handleImportJsonChange}
|
onChange={handleLoadProjectChange}
|
||||||
/>
|
/>
|
||||||
<input
|
<input
|
||||||
ref={importModelInputRef}
|
ref={importModelInputRef}
|
||||||
|
|||||||
Reference in New Issue
Block a user