mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-24 09:28:31 +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 React from 'react';
|
||||||
|
import TemplateLibraryModal from './TemplateLibraryModal/';
|
||||||
|
|
||||||
export const BlankPage = function BlankPage({
|
export const BlankPage = function BlankPage({
|
||||||
createApp,
|
createApp,
|
||||||
|
|
@ -7,6 +8,9 @@ export const BlankPage = function BlankPage({
|
||||||
handleImportApp,
|
handleImportApp,
|
||||||
isImportingApp,
|
isImportingApp,
|
||||||
fileInput,
|
fileInput,
|
||||||
|
showTemplateLibraryModal,
|
||||||
|
hideTemplateLibraryModal,
|
||||||
|
viewTemplateLibraryModal,
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
|
@ -41,11 +45,20 @@ export const BlankPage = function BlankPage({
|
||||||
<input type="file" ref={fileInput} style={{ display: 'none' }} />
|
<input type="file" ref={fileInput} style={{ display: 'none' }} />
|
||||||
</label>
|
</label>
|
||||||
</a>
|
</a>
|
||||||
|
<a onClick={viewTemplateLibraryModal} className="btn btn-primary" style={{ marginLeft: '24px' }}>
|
||||||
|
Choose from template
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<TemplateLibraryModal
|
||||||
|
show={showTemplateLibraryModal}
|
||||||
|
onHide={hideTemplateLibraryModal}
|
||||||
|
onCloseButtonClick={hideTemplateLibraryModal}
|
||||||
|
darkMode={darkMode}
|
||||||
|
/>
|
||||||
</div>
|
</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() {
|
render() {
|
||||||
const {
|
const {
|
||||||
|
|
@ -541,6 +546,9 @@ class HomePage extends React.Component {
|
||||||
handleImportApp={this.handleImportApp}
|
handleImportApp={this.handleImportApp}
|
||||||
creatingApp={creatingApp}
|
creatingApp={creatingApp}
|
||||||
darkMode={this.props.darkMode}
|
darkMode={this.props.darkMode}
|
||||||
|
showTemplateLibraryModal={this.state.showTemplateLibraryModal}
|
||||||
|
viewTemplateLibraryModal={this.showTemplateLibraryModal}
|
||||||
|
hideTemplateLibraryModal={this.hideTemplateLibraryModal}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue