Web:Client:Article: fix interface jumping after change files root folder to room

This commit is contained in:
TimofeyBoyko 2022-10-13 12:22:09 +05:00
parent 9750335b3e
commit 7f72382d32
2 changed files with 34 additions and 31 deletions

View File

@ -445,27 +445,31 @@ const ArticleMainButtonContent = (props) => {
/> />
)} )}
<input {isVisitor ? null : (
id="customFileInput" <>
className="custom-file-input" <input
multiple id="customFileInput"
type="file" className="custom-file-input"
onChange={onFileChange} multiple
onClick={onInputClick} type="file"
ref={inputFilesElement} onChange={onFileChange}
style={{ display: "none" }} onClick={onInputClick}
/> ref={inputFilesElement}
<input style={{ display: "none" }}
id="customFolderInput" />
className="custom-file-input" <input
webkitdirectory="" id="customFolderInput"
mozdirectory="" className="custom-file-input"
type="file" webkitdirectory=""
onChange={onFileChange} mozdirectory=""
onClick={onInputClick} type="file"
ref={inputFolderElement} onChange={onFileChange}
style={{ display: "none" }} onClick={onInputClick}
/> ref={inputFolderElement}
style={{ display: "none" }}
/>
</>
)}
</> </>
); );
}; };

View File

@ -132,12 +132,13 @@ const FilesSection = React.memo(({}) => {
exact exact
restricted restricted
withManager withManager
path={[ path={["/accounts", "/accounts/filter", "/accounts/create/:type"]}
"/accounts", component={Accounts}
"/accounts/filter", />
"/accounts/create/:type",
"/accounts/view/@self", <PrivateRoute
]} exact
path={["/accounts/view/@self"]}
component={Accounts} component={Accounts}
/> />
@ -241,7 +242,7 @@ class FilesContent extends React.Component {
} }
} }
const Files = inject(({ auth, filesStore, treeFoldersStore }) => { const Files = inject(({ auth, filesStore }) => {
const { const {
frameConfig, frameConfig,
isFrame, isFrame,
@ -251,11 +252,9 @@ const Files = inject(({ auth, filesStore, treeFoldersStore }) => {
isEncryptionSupport, isEncryptionSupport,
} = auth.settingsStore; } = auth.settingsStore;
const { isRoomsFolder } = treeFoldersStore;
const { isVisitor } = auth.userStore.user; const { isVisitor } = auth.userStore.user;
const withMainButton = !isVisitor || !isRoomsFolder; const withMainButton = !isVisitor;
return { return {
isDesktop: isDesktopClient, isDesktop: isDesktopClient,