Skip to content

TagSpaces is an offline, open source, document manager with tagging support

chore: making protecting layer for location loading disappear after 5 secs

Ilian Sapundshiev8e30c8dd7685
diff --git a/app/components/LocationManager.tsx b/app/components/LocationManager.tsx
index 19f4e3ac0..e86006010 100644
--- a/app/components/LocationManager.tsx
+++ b/app/components/LocationManager.tsx
@@ -137,18 +137,31 @@ function LocationManager(props: Props) {
{isLoading &&
(PlatformIO.haveObjectStoreSupport() ||
PlatformIO.haveWebDavSupport()) && (
- <div
- style={{
- position: 'absolute',
- zIndex: 1000,
- height: 'calc(100% - 180px)',
- width: 310,
- backdropFilter: 'grayscale(1)'
- // backgroundColor: 'red'
- // backdropFilter: 'blur(2px)',
- // backgroundColor: '#fafafaAA' // red: '#eb585882' '#d9d9d980'
- }}
- />
+ <>
+ <style>
+ {`
+ @keyframes hide {
+ to {
+ width: 0;
+ }
+ }
+ }
+ `}
+ </style>
+ <div
+ style={{
+ position: 'absolute',
+ zIndex: 1000,
+ height: 'calc(100% - 180px)',
+ width: 310,
+ backdropFilter: 'grayscale(1)',
+ animation: 'hide 1ms linear 5s 1 forwards'
+ // backgroundColor: 'red'
+ // backdropFilter: 'blur(2px)',
+ // backgroundColor: '#fafafaAA' // red: '#eb585882' '#d9d9d980'
+ }}
+ />
+ </>
)}
<LocationManagerMenu
importLocations={() => {
diff --git a/app/components/dialogs/settings/SettingsExtensions.tsx b/app/components/dialogs/settings/SettingsExtensions.tsx
index 71703674d..10852ec3f 100644
--- a/app/components/dialogs/settings/SettingsExtensions.tsx
+++ b/app/components/dialogs/settings/SettingsExtensions.tsx
@@ -105,17 +105,18 @@ function SettingsExtensions(props: Props) {
</AccordionSummary>
<AccordionDetails>
<List>
- {props.extension
- .filter(ext => !ext.extensionExternal)
- .map(ext => (
- <ListItem key={ext.extensionId} disablePadding>
- {ext.extensionName} ({ext.version})
- </ListItem>
- ))}
+ {props.extension &&
+ props.extension
+ .filter(ext => !ext.extensionExternal)
+ .map(ext => (
+ <ListItem key={ext.extensionId} disablePadding>
+ {ext.extensionName} ({ext.version})
+ </ListItem>
+ ))}
</List>
</AccordionDetails>
</Accordion>
- <Accordion>
+ <Accordion defaultExpanded>
<AccordionSummary
expandIcon={<ExpandMoreIcon />}
aria-controls="installed-content"
@@ -125,28 +126,33 @@ function SettingsExtensions(props: Props) {
</AccordionSummary>
<AccordionDetails>
<List>
- {props.extension
- .filter(ext => ext.extensionExternal)
- .map(ext => (
- <ListItem key={ext.extensionId} disablePadding>
- {ext.extensionName} ({ext.version})
- <Tooltip title={i18n.t('core:removeExtension')}>
- <IconButton
- aria-label={i18n.t('core:delete')}
- onClick={() => {
- props.removeExtension(ext.extensionId);
- props.removeSupportedFileTypes(ext.extensionId);
- PlatformFacade.removeExtension(ext.extensionId);
- }}
- data-tid="revisionsTID"
- size="large"
- >
- <DeleteIcon color={'action'} />
- </IconButton>
- </Tooltip>
- </ListItem>
- ))}
+ {props.extension &&
+ props.extension
+ .filter(ext => ext.extensionExternal)
+ .map(ext => (
+ <ListItem key={ext.extensionId} disablePadding>
+ {ext.extensionName} ({ext.version})
+ <Tooltip title={i18n.t('core:removeExtension')}>
+ <IconButton
+ aria-label={i18n.t('core:delete')}
+ onClick={() => {
+ props.removeExtension(ext.extensionId);
+ props.removeSupportedFileTypes(ext.extensionId);
+ PlatformFacade.removeExtension(ext.extensionId);
+ }}
+ data-tid="revisionsTID"
+ size="large"
+ >
+ <DeleteIcon color={'action'} />
+ </IconButton>
+ </Tooltip>
+ </ListItem>
+ ))}
</List>
+ {props.extension &&
+ props.extension.filter(ext => ext.extensionExternal).length < 1 && (
+ <Typography variant="subtitle1">No extensions found</Typography>
+ )}
{props.isDevMode && (
<Box style={{ textAlign: 'center' }}>
<Button