mirror of
https://github.com/tiddly-gittly/TidGi-Desktop.git
synced 2025-12-06 02:30:47 -08:00
feat: make server options more visible
This commit is contained in:
parent
0538aa2d30
commit
f2fb081a79
2 changed files with 9 additions and 8 deletions
|
|
@ -190,6 +190,13 @@ export default function EditWorkspace(): JSX.Element {
|
|||
</title>
|
||||
</Helmet>
|
||||
<FlexGrow>
|
||||
{!isSubWiki && (
|
||||
<>
|
||||
<Divider />
|
||||
<ServerOptions workspace={workspace} workspaceSetter={workspaceSetter} />
|
||||
<Divider />
|
||||
</>
|
||||
)}
|
||||
<TextField
|
||||
id='outlined-full-width'
|
||||
label={t('EditWorkspace.Name')}
|
||||
|
|
@ -293,13 +300,6 @@ export default function EditWorkspace(): JSX.Element {
|
|||
isCreateMainWorkspace={!isSubWiki}
|
||||
/>
|
||||
)}
|
||||
{!isSubWiki && (
|
||||
<>
|
||||
<Divider />
|
||||
<ServerOptions workspace={workspace} workspaceSetter={workspaceSetter} />
|
||||
<Divider />
|
||||
</>
|
||||
)}
|
||||
{storageService !== SupportedStorageServices.local && (
|
||||
<>
|
||||
<List>
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ const AServerOptionsAccordion = styled(Accordion)`
|
|||
`;
|
||||
const AServerOptionsAccordionSummary = styled(AccordionSummary)`
|
||||
padding: 0;
|
||||
flex-direction: row-reverse;
|
||||
`;
|
||||
const HttpsCertKeyListItem: typeof ListItem = styled(ListItem)`
|
||||
flex-direction: row;
|
||||
|
|
@ -72,7 +73,7 @@ export function ServerOptions(props: IServerOptionsProps) {
|
|||
const actualIP = useActualIp(getDefaultHTTPServerIP(port), id);
|
||||
// some feature need a username to work, so if userName is empty, assign a fallbackUserName DEFAULT_USER_NAME
|
||||
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
||||
const fallbackUserName = usePromiseValue<string>(async () => (await window.service.auth.get('userName')) as string, '');
|
||||
const fallbackUserName = usePromiseValue<string>(async () => (await window.service.auth.get('userName'))!, '');
|
||||
const userNameIsEmpty = !(userName || fallbackUserName);
|
||||
const alreadyEnableSomeServerOptions = readOnlyMode;
|
||||
return (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue