mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-05 22:38:48 +00:00
updated homepage with template chossing option (#2165)
This commit is contained in:
parent
8c990df18d
commit
5afbf1f0ed
2 changed files with 22 additions and 1 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import React from 'react';
|
||||
import TemplateLibraryModal from './TemplateLibraryModal/';
|
||||
|
||||
export const BlankPage = function BlankPage({
|
||||
createApp,
|
||||
|
|
@ -7,6 +8,9 @@ export const BlankPage = function BlankPage({
|
|||
handleImportApp,
|
||||
isImportingApp,
|
||||
fileInput,
|
||||
showTemplateLibraryModal,
|
||||
hideTemplateLibraryModal,
|
||||
viewTemplateLibraryModal,
|
||||
}) {
|
||||
return (
|
||||
<div>
|
||||
|
|
@ -41,11 +45,20 @@ export const BlankPage = function BlankPage({
|
|||
<input type="file" ref={fileInput} style={{ display: 'none' }} />
|
||||
</label>
|
||||
</a>
|
||||
<a onClick={viewTemplateLibraryModal} className="btn btn-primary" style={{ marginLeft: '24px' }}>
|
||||
Choose from template
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<TemplateLibraryModal
|
||||
show={showTemplateLibraryModal}
|
||||
onHide={hideTemplateLibraryModal}
|
||||
onCloseButtonClick={hideTemplateLibraryModal}
|
||||
darkMode={darkMode}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -424,7 +424,12 @@ class HomePage extends React.Component {
|
|||
});
|
||||
};
|
||||
|
||||
showTemplateLibraryModal = () => this.setState({ showTemplateLibraryModal: true });
|
||||
showTemplateLibraryModal = () => {
|
||||
this.setState({ showTemplateLibraryModal: true });
|
||||
};
|
||||
hideTemplateLibraryModal = () => {
|
||||
this.setState({ showTemplateLibraryModal: false });
|
||||
};
|
||||
|
||||
render() {
|
||||
const {
|
||||
|
|
@ -541,6 +546,9 @@ class HomePage extends React.Component {
|
|||
handleImportApp={this.handleImportApp}
|
||||
creatingApp={creatingApp}
|
||||
darkMode={this.props.darkMode}
|
||||
showTemplateLibraryModal={this.state.showTemplateLibraryModal}
|
||||
viewTemplateLibraryModal={this.showTemplateLibraryModal}
|
||||
hideTemplateLibraryModal={this.hideTemplateLibraryModal}
|
||||
/>
|
||||
)}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue