Small fixes and improvements (#522)

This commit is contained in:
Montassar Ghanmy
2024-05-15 16:48:19 +01:00
committed by GitHub
parent a8de167547
commit 757a4759f8
8 changed files with 9 additions and 22 deletions
@@ -132,7 +132,11 @@ class AuthService {
if (token) {
this.logger.info("Save auth token to storage and cookie")
JWT.updateJWT(token);
this.cookies.set(AuthService.AUTH_TOKEN_COOKIE, JWT.getJWT(), { path: "/" });
this.cookies.set(AuthService.AUTH_TOKEN_COOKIE, JWT.getJWT(), {
path: '/',
secure: true,
sameSite: 'none',
});
// TODO: Update the user from API?
// this.updateUser();
} else {
@@ -163,9 +163,9 @@ const PathItem = ({
MenusManager.openMenu(trashMenuItems, { x: evt.clientX, y: evt.clientY }, 'center');
} else {
if (viewId === 'root') {
onClick('root', '')
onClick('root', '');
} else if (viewId === 'user_' + user?.id) {
onClick('user_' + user?.id, '')
onClick('user_' + user?.id, '');
}
}
} else {
@@ -173,7 +173,7 @@ const PathItem = ({
}
}}
>
<Title>
<Title noColor={last} className={last ? 'text-blue-500' : ''}>
{(() => {
const isTrash = viewId?.includes('trash_') || viewId === 'trash';
const fileName = cutFileName(item?.name) || '';
@@ -80,7 +80,7 @@ export default () => {
</a>
</div>
</div>
<div className="h-full main-view public p-4">
<div className="h-full main-view public p-4 pb-16">
<AccessChecker folderId={documentId} token={token}>
<Drive initialParentId={documentId} inPublicSharing />
</AccessChecker>
@@ -31,19 +31,6 @@ export default (): JSX.Element => {
prefix={() => (
<SearchIcon className={'h-5 w-5 absolute m-auto top-0 bottom-0 left-3 text-blue-500'} />
)}
suffix={() => (
<Button
theme="white"
size="sm"
className={
'rounded-full h-7 w-7 absolute m-auto top-0 bottom-0 right-3 text-zinc-500'
}
icon={() => <AdjustmentsIcon className="w-5 h-5 text-zinc-500" />}
onClick={() => {
ToasterService.info(Languages.t('components.searchpopup.soon'));
}}
/>
)}
input={({ className }) => (
<Input
value={searchState.query}