TagSpaces is an offline, open source, document manager with tagging support
polish: ui improvements
Ilian Sapundshiev6026da93e653
diff --git a/app/components/EntryContainer.tsx b/app/components/EntryContainer.tsxindex d99ccf755..d7ca1647c 100644--- a/app/components/EntryContainer.tsx+++ b/app/components/EntryContainer.tsx@@ -785,7 +785,7 @@ const EntryContainer = (props: Props) => {<Tooltip title={i18n.t('core:openInFullWidth')}><IconButtondata-tid="openInFullWidthTID"- title={i18n.t('core:openInFullWidth')}+ // title={i18n.t('core:openInFullWidth')}aria-label={i18n.t('core:openInFullWidth')}onClick={props.toggleEntryFullWidth}>diff --git a/app/components/FolderContainer.tsx b/app/components/FolderContainer.tsxindex 081f09cff..782730a03 100644--- a/app/components/FolderContainer.tsx+++ b/app/components/FolderContainer.tsx@@ -506,7 +506,7 @@ const FolderContainer = (props: Props) => {<FolderSeparatorIcon /></Button>))}- {!isDesktopMode && pathParts.length > 0 && (+ {!isDesktopMode && pathParts.length >= 0 && (<React.Fragment><IconButtononClick={loadParentDirectoryContent}diff --git a/app/components/MobileNavigation.tsx b/app/components/MobileNavigation.tsxindex 1b586a9ce..ae1df3854 100644--- a/app/components/MobileNavigation.tsx+++ b/app/components/MobileNavigation.tsx@@ -17,6 +17,7 @@*/import React from 'react';+import uuidv1 from 'uuid';import { connect } from 'react-redux';import { bindActionCreators } from 'redux';import classNames from 'classnames';@@ -46,11 +47,13 @@ import {isReadOnlyMode,getDirectoryPath} from '../reducers/app';+import LoadingLazy from './LoadingLazy';import { actions as SettingsActions, isFirstRun } from '../reducers/settings';const styles: any = (theme: any) => ({bottomToolbar: {- marginTop: 9,+ paddingTop: 9,+ paddingBottom: 3,textAlign: 'center',backgroundColor: theme.palette.background.default},@@ -63,6 +66,15 @@ const styles: any = (theme: any) => ({}});+const ProTeaserDialog = React.lazy(() =>+ import(/* webpackChunkName: "ProTeaserDialog" */ './dialogs/ProTeaserDialog')+);+const ProTeaserDialogAsync = props => (+ <React.Suspense fallback={<LoadingLazy />}>+ <ProTeaserDialog {...props} />+ </React.Suspense>+);+interface Props {classes: any;isFirstRun: boolean;@@ -104,7 +116,9 @@ class MobileNavigation extends React.Component<Props, State> {};toggleProTeaser = () => {- this.setState({ isProTeaserVisible: !this.state.isProTeaserVisible });+ this.setState(prevState => ({+ isProTeaserVisible: !prevState.isProTeaserVisible+ }));};render() {@@ -119,6 +133,7 @@ class MobileNavigation extends React.Component<Props, State> {toggleOnboardingDialog,toggleSettingsDialog,toggleKeysDialog,+ toggleAboutDialog,openLocationManagerPanel,openTagLibraryPanel,openSearchPanel,@@ -152,6 +167,7 @@ class MobileNavigation extends React.Component<Props, State> {<HelpFeedbackPanelopenFileNatively={openFileNatively}openURLExternally={openURLExternally}+ toggleAboutDialog={toggleAboutDialog}toggleKeysDialog={toggleKeysDialog}toggleOnboardingDialog={toggleOnboardingDialog}toggleProTeaser={this.toggleProTeaser}@@ -243,6 +259,14 @@ class MobileNavigation extends React.Component<Props, State> {><NewFileIcon color="primary" /></IconButton>+ {this.state.isProTeaserVisible && (+ <ProTeaserDialogAsync+ open={this.state.isProTeaserVisible}+ onClose={this.toggleProTeaser}+ openURLExternally={openURLExternally}+ key={uuidv1()}+ />+ )}</div></div>);diff --git a/app/components/SidePanels.css.tsx b/app/components/SidePanels.css.tsxindex 815de769f..fa8116b42 100644--- a/app/components/SidePanels.css.tsx+++ b/app/components/SidePanels.css.tsx@@ -22,7 +22,8 @@ export default (theme: any) =>panel: {height: '100%',// maxHeight: '100%',- // padding: 5,+ paddingLeft: 5,+ paddingRight: 5,// paddingBottom: 50,// overflowY: 'hidden',backgroundColor: theme.palette.background.defaultdiff --git a/app/components/WelcomePanel.tsx b/app/components/WelcomePanel.tsxindex 96886cdd1..58f6b95bc 100644--- a/app/components/WelcomePanel.tsx+++ b/app/components/WelcomePanel.tsx@@ -206,27 +206,48 @@ const WelcomePanel = (props: Props) => {buttononClick={() => {// const p = window.location.protocol + '//';- // @ts-ignore// window.location = window.location.href.replace(p, p + 'log:out@');+ // @ts-ignoreconst newHref = window.location.href.replace('http://','http://' + new Date().getTime() + '@');- let xmlhttp;- if (window.XMLHttpRequest) {- xmlhttp = new XMLHttpRequest();- } else {- // @ts-ignore- xmlhttp = new ActiveXObject('Microsoft.XMLHTTP');- }- xmlhttp.onreadystatechange = () => {- if (xmlhttp.readyState === 4) window.location.reload();- };- xmlhttp.open('GET', newHref, true);- xmlhttp.setRequestHeader('Authorization', 'Basic YXNkc2E6');- xmlhttp.send();- return false;+ // @ts-ignore+ window.location.href = newHref;++ // const newHref = window.location.href.replace(+ // 'http://',+ // 'http://' + new Date().getTime() + '@'+ // );+ // let xmlhttp;+ // if (window.XMLHttpRequest) {+ // xmlhttp = new XMLHttpRequest();+ // } else {+ // // @ts-ignore+ // xmlhttp = new ActiveXObject('Microsoft.XMLHTTP');+ // }+ // xmlhttp.onreadystatechange = () => {+ // if (xmlhttp.readyState === 4) window.location.reload();+ // };+ // xmlhttp.open('GET', newHref, true);+ // xmlhttp.setRequestHeader('Authorization', 'Basic YXNkc2E6');+ // xmlhttp.send();+ // return false;+ // let xmlhttp;+ // if (window.XMLHttpRequest) {+ // xmlhttp = new XMLHttpRequest();+ // } else {+ // // @ts-ignore+ // xmlhttp = new ActiveXObject('Microsoft.XMLHTTP');+ // }+ // xmlhttp.onreadystatechange = () => {+ // if (xmlhttp.readyState === 4) window.location.reload();+ // };+ // xmlhttp.open('GET', newHref, true);+ // xmlhttp.setRequestHeader('Authorization', 'Basic YXNkc2E6');+ // xmlhttp.send();+ // return false;}}><Button startIcon={<LogoutIcon />}>{i18n.t('core:Logout')}</Button>diff --git a/app/perspectives/grid-perspective/components/MainToolbar.tsx b/app/perspectives/grid-perspective/components/MainToolbar.tsxindex a3abc9c26..bfa330cee 100644--- a/app/perspectives/grid-perspective/components/MainToolbar.tsx+++ b/app/perspectives/grid-perspective/components/MainToolbar.tsx@@ -95,7 +95,7 @@ const MainToolbar = (props: Props) => {{layoutType === 'row' ? (<Tooltip title={i18n.t('core:switchToGridView')}><IconButton- title={i18n.t('core:switchToGridView')}+ // title={i18n.t('core:switchToGridView')}aria-label={i18n.t('core:switchToGridView')}data-tid="gridPerspectiveSwitchLayoutToGrid"onClick={() => {@@ -108,7 +108,7 @@ const MainToolbar = (props: Props) => {) : (<Tooltip title={i18n.t('core:switchToListView')}><IconButton- title={i18n.t('core:switchToListView')}+ // title={i18n.t('core:switchToListView')}aria-label={i18n.t('core:switchToListView')}data-tid="gridPerspectiveSwitchLayoutToRow"onClick={() => {@@ -122,7 +122,7 @@ const MainToolbar = (props: Props) => {{!isReadOnlyMode && (<Tooltip title={i18n.t('core:tagSelectedEntries')}><IconButton- title={i18n.t('core:tagSelectedEntries')}+ // title={i18n.t('core:tagSelectedEntries')}aria-label={i18n.t('core:tagSelectedEntries')}data-tid="gridPerspectiveAddRemoveTags"disabled={selectedEntries.length < 1}@@ -135,7 +135,7 @@ const MainToolbar = (props: Props) => {{!isReadOnlyMode && (<Tooltip title={i18n.t('core:copyMoveSelectedEntries')}><IconButton- title={i18n.t('core:copyMoveSelectedEntries')}+ // title={i18n.t('core:copyMoveSelectedEntries')}aria-label={i18n.t('core:copyMoveSelectedEntries')}data-tid="gridPerspectiveCopySelectedFiles"disabled={!fileOperationsEnabled}@@ -148,7 +148,7 @@ const MainToolbar = (props: Props) => {{!isReadOnlyMode && (<Tooltip title={i18n.t('core:deleteSelectedEntries')}><IconButton- title={i18n.t('core:deleteSelectedEntries')}+ // title={i18n.t('core:deleteSelectedEntries')}aria-label={i18n.t('core:deleteSelectedEntries')}data-tid="gridPerspectiveDeleteMultipleFiles"disabled={!fileOperationsEnabled}@@ -160,7 +160,7 @@ const MainToolbar = (props: Props) => {)}<Tooltip title={i18n.t('core:sort')}><IconButton- title={i18n.t('core:sort')}+ // title={i18n.t('core:sort')}aria-label={i18n.t('core:sort')}data-tid="gridPerspectiveSortMenu"onClick={e => {@@ -172,7 +172,7 @@ const MainToolbar = (props: Props) => {</Tooltip><Tooltip title={i18n.t('core:options')}><IconButton- title={i18n.t('core:options')}+ // title={i18n.t('core:options')}data-tid="gridPerspectiveOptionsMenu"onClick={e => {handleOptionsMenu(e);