mirror of
https://github.com/tiddly-gittly/TidGi-Desktop.git
synced 2026-03-10 08:50:20 -07:00
refactor: remove port config when create, make server options more obvious
This commit is contained in:
parent
794136a13f
commit
2ff9c697ac
3 changed files with 8 additions and 20 deletions
|
|
@ -136,18 +136,6 @@ export function AddWorkspace(): JSX.Element {
|
|||
{/* Force it only show sync option when clone online wiki, because many user encounter sync problem here. Recommend them create local first and sync later. */}
|
||||
{isCreateSyncedWorkspace && <SyncedWikiDescription isCreateSyncedWorkspace={isCreateSyncedWorkspace} isCreateSyncedWorkspaceSetter={() => {}} />}
|
||||
<MainSubWikiDescription isCreateMainWorkspace={isCreateMainWorkspace} isCreateMainWorkspaceSetter={isCreateMainWorkspaceSetter} />
|
||||
{isCreateMainWorkspace && (
|
||||
<LocationPickerContainer>
|
||||
<LocationPickerInput
|
||||
error={errorInWhichComponent.wikiPort}
|
||||
onChange={(event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {
|
||||
form.wikiPortSetter(Number(event.target.value));
|
||||
}}
|
||||
label={t('AddWorkspace.WikiServerPort')}
|
||||
value={wikiPort}
|
||||
/>
|
||||
</LocationPickerContainer>
|
||||
)}
|
||||
</AccordionDetails>
|
||||
</Accordion>
|
||||
|
||||
|
|
|
|||
|
|
@ -292,6 +292,13 @@ export default function EditWorkspace(): JSX.Element {
|
|||
isCreateMainWorkspace={!isSubWiki}
|
||||
/>
|
||||
)}
|
||||
{!isSubWiki && (
|
||||
<>
|
||||
<Divider />
|
||||
<ServerOptions workspace={workspace} workspaceSetter={workspaceSetter} />
|
||||
<Divider />
|
||||
</>
|
||||
)}
|
||||
{storageService !== SupportedStorageServices.local && (
|
||||
<>
|
||||
<List>
|
||||
|
|
@ -403,13 +410,6 @@ export default function EditWorkspace(): JSX.Element {
|
|||
}}
|
||||
/>
|
||||
)}
|
||||
{!isSubWiki && (
|
||||
<>
|
||||
<Divider />
|
||||
<ServerOptions workspace={workspace} workspaceSetter={workspaceSetter} />
|
||||
<Divider />
|
||||
</>
|
||||
)}
|
||||
</FlexGrow>
|
||||
{!isEqual(workspace, originalWorkspace) && (
|
||||
<SaveCancelButtonsContainer>
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ export function ServerOptions(props: IServerOptionsProps) {
|
|||
<AServerOptionsAccordion defaultExpanded={alreadyEnableSomeServerOptions}>
|
||||
<Tooltip title={t('EditWorkspace.ClickToExpand')}>
|
||||
<AServerOptionsAccordionSummary expandIcon={<ExpandMoreIcon />}>
|
||||
{t('EditWorkspace.ServerOptions')}
|
||||
{t('EditWorkspace.ServerOptions')} ({t('EditWorkspace.EnableHTTPAPI')})
|
||||
</AServerOptionsAccordionSummary>
|
||||
</Tooltip>
|
||||
<AccordionDetails>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue