Skip to content

Commit

Permalink
refactor: remove port config when create, make server options more ob…
Browse files Browse the repository at this point in the history
…vious
  • Loading branch information
linonetwo committed Mar 27, 2024
1 parent 794136a commit 2ff9c69
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 20 deletions.
12 changes: 0 additions & 12 deletions src/pages/AddWorkspace/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
14 changes: 7 additions & 7 deletions src/pages/EditWorkspace/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,13 @@ export default function EditWorkspace(): JSX.Element {
isCreateMainWorkspace={!isSubWiki}
/>
)}
{!isSubWiki && (
<>
<Divider />
<ServerOptions workspace={workspace} workspaceSetter={workspaceSetter} />
<Divider />
</>
)}
{storageService !== SupportedStorageServices.local && (
<>
<List>
Expand Down Expand Up @@ -403,13 +410,6 @@ export default function EditWorkspace(): JSX.Element {
}}
/>
)}
{!isSubWiki && (
<>
<Divider />
<ServerOptions workspace={workspace} workspaceSetter={workspaceSetter} />
<Divider />
</>
)}
</FlexGrow>
{!isEqual(workspace, originalWorkspace) && (
<SaveCancelButtonsContainer>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/EditWorkspace/server.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 2ff9c69

Please sign in to comment.