Skip to content

Commit

Permalink
✨ Small fixes and improvements (#522)
Browse files Browse the repository at this point in the history
  • Loading branch information
MontaGhanmy authored May 15, 2024
1 parent a8de167 commit 757a475
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 22 deletions.
1 change: 0 additions & 1 deletion tdrive/frontend/public/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@
"components.searchpopup.no_results_for": "There were no results for",
"components.searchpopup.try_new_search": "Try a new search",
"components.searchpopup.recent_files": "Recent files",
"components.searchpopup.soon": "This feature is coming soon \uD83D\uDE80",
"components.userlistmanager.no_users": "No users.",
"components.notifications.hidden_notifications_button.children": "New messages",
"scenes.app.popup.adduserfromtdriveconsole.current_users_state": "{{$1}} email(s) will be added",
Expand Down
1 change: 0 additions & 1 deletion tdrive/frontend/public/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,6 @@
"components.side_menu.home": "Disque partagé",
"components.side_menu.shared_with_me": "Partagé avec moi",
"components.side_menu.my_drive": "Mon disque",
"components.searchpopup.soon": "Cette fonctionnalité arrive bientôt 🚀",
"components.side_menu.buttons.upload": "Télécharger",
"components.side_menu.buttons.create": "Créer",
"components.side_menu.buttons.empty_trash": "Vider la corbeille",
Expand Down
1 change: 0 additions & 1 deletion tdrive/frontend/public/locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@
"components.searchpopup.try_new_search": "Искать еще раз",
"components.searchpopup.recent_files": "Последние файлы",
"components.searchpopup.header_title": "Поиск",
"components.searchpopup.soon": "Эта функциональность будет доступна скоро \uD83D\uDE80",
"components.searchpopup.start_search": "Введите ключевые слова, чтобы начать поиск.",
"scenes.apps.account.on_console": "Чтобы изменить глобальные настройки учетной записи, нажмите «Перейти к консоли».",
"general.user.deactivated": "Пользователь больше не состоит в этой компании",
Expand Down
1 change: 0 additions & 1 deletion tdrive/frontend/public/locales/vn.json
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@
"components.searchpopup.no_results_for": "Không có kết quả nào cho",
"components.searchpopup.try_new_search": "Thử tìm kiếm mới",
"components.searchpopup.recent_files": "Các tệp gần đây",
"components.searchpopup.soon": "Tính năng này sẽ sớm ra mắt \uD83D\uDE80",
"components.userlistmanager.no_users": "Không có người dùng.",
"components.notifications.hidden_notifications_button.children": "Tin nhắn mới",
"scenes.app.popup.adduserfromtdriveconsole.current_users_state": "{{$1}} email(s) sẽ được thêm",
Expand Down
6 changes: 5 additions & 1 deletion tdrive/frontend/src/app/features/auth/auth-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,17 +163,17 @@ 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 {
onClick(viewId || '', item?.id || '');
}
}}
>
<Title>
<Title noColor={last} className={last ? 'text-blue-500' : ''}>
{(() => {
const isTrash = viewId?.includes('trash_') || viewId === 'trash';
const fileName = cutFileName(item?.name) || '';
Expand Down
2 changes: 1 addition & 1 deletion tdrive/frontend/src/app/views/client/body/drive/shared.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
13 changes: 0 additions & 13 deletions tdrive/frontend/src/app/views/client/common/search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 757a475

Please sign in to comment.