fix: add public page search ui

This commit is contained in:
JimmFly
2023-02-07 12:09:09 +08:00
parent b52f6ed63b
commit a54bc69d46

View File

@@ -72,7 +72,7 @@ export const QuickSearch = ({ open, onClose }: TransitionsModalProps) => {
width={620} width={620}
style={{ style={{
maxHeight: '80vh', maxHeight: '80vh',
minHeight: '350px', minHeight: isPublic && query.length === 0 ? '72px' : '350px',
top: '12vh', top: '12vh',
}} }}
> >
@@ -100,37 +100,41 @@ export const QuickSearch = ({ open, onClose }: TransitionsModalProps) => {
/> />
<StyledShortcut>{isMac() ? '⌘ + K' : 'Ctrl + K'}</StyledShortcut> <StyledShortcut>{isMac() ? '⌘ + K' : 'Ctrl + K'}</StyledShortcut>
</StyledModalHeader> </StyledModalHeader>
<StyledModalDivider /> {isPublic && query.length === 0 ? null : (
<Command.List> <>
<StyledContent> <StyledModalDivider />
{!isPublic ? ( <Command.List>
<Results <StyledContent>
query={query} {!isPublic ? (
loading={loading} <Results
setLoading={setLoading} query={query}
setShowCreatePage={setShowCreatePage} loading={loading}
/> setLoading={setLoading}
) : ( setShowCreatePage={setShowCreatePage}
<PublishedResults />
query={query} ) : (
loading={loading} <PublishedResults
setLoading={setLoading} query={query}
onClose={onClose} loading={loading}
setPublishWorkspaceName={setPublishWorkspaceName} setLoading={setLoading}
/> onClose={onClose}
)} setPublishWorkspaceName={setPublishWorkspaceName}
</StyledContent> />
{!isPublic ? ( )}
showCreatePage ? ( </StyledContent>
<> {!isPublic ? (
<StyledModalDivider /> showCreatePage ? (
<StyledModalFooter> <>
<Footer query={query} /> <StyledModalDivider />
</StyledModalFooter> <StyledModalFooter>
</> <Footer query={query} />
) : null </StyledModalFooter>
) : null} </>
</Command.List> ) : null
) : null}
</Command.List>
</>
)}
</Command> </Command>
</ModalWrapper> </ModalWrapper>
</Modal> </Modal>