diff --git a/changelog.md b/changelog.md index 9f40b881..ad0074f2 100644 --- a/changelog.md +++ b/changelog.md @@ -18,6 +18,9 @@ ## Hotfixes - `v1.0.4-hf1`: - Fix typo in French translation + - `v1.0.4-hf3`: + - Add collation fix. + - Cli db seed tool # Twake Drive v1.0.3 diff --git a/tdrive/backend/node/src/cli/cmds/dev_cmds/seed_db.ts b/tdrive/backend/node/src/cli/cmds/dev_cmds/seed_db.ts new file mode 100644 index 00000000..bb7f4b40 --- /dev/null +++ b/tdrive/backend/node/src/cli/cmds/dev_cmds/seed_db.ts @@ -0,0 +1,179 @@ +import * as mongo from "mongodb"; +import { v4 as uuidv4 } from "uuid"; +import yargs from "yargs"; +import tdrive from "../../../tdrive"; +import gr from "../../../services/global-resolver"; +import { getInstance } from "../../../services/user/entities/user"; +import { getInstance as getCompanyInstance } from "../../../services/user/entities/company"; +import PasswordEncoder from "../../../utils/password-encoder"; +import { getDefaultDriveItem } from "../../../services/documents/utils"; + +type CLIArgs = { + start: number; +}; + +const services = [ + "auth", + "storage", + "user", + "files", + "counter", + "cron", + "message-queue", + "push", + "search", + "tracker", + "email-pusher", + "workspaces", + "console", + "applications", + "database", + "webserver", +]; +const createTree = async ( + depth: number, + folderData: any, + parent: string, + context: any, + client: mongo.MongoClient, +) => { + const documentRepo = await gr.services.documents.documents.repository; + // Create an array to hold promises + const createFolderPromises = []; + + // Loop from 0 to depth + for (let i = 0; i < depth; i++) { + // Modify folder data for each iteration + folderData.name = `folder_${i}`; + folderData.parent_id = parent; // All siblings share the same parent + folderData.id = uuidv4(); + + // Push the folder creation promise to the array + // createFolderPromises.push( + // gr.services.documents.documents.create( + // null, + // folderData, + // {}, + // { + // ...context, + // user: { + // ...context.user, + // server_request: false, + // }, + // }, + // ), + // ); + // createFolderPromises.push(documentRepo.save(getDefaultDriveItem(folderData, context))); + createFolderPromises.push(getDefaultDriveItem(folderData, context)); + } + /// const createdFolders = await documentRepo.saveAll(createFolderPromises); + await client.db("tdrive").collection("drive_files").insertMany(createFolderPromises); + + // Wait for all folder creation promises to resolve in parallel + // const createdFolders = await Promise.all(createFolderPromises); + + // Optionally, return the created folders + // return createdFolders; +}; + +const command: yargs.CommandModule = { + command: "seed", + describe: "Seed the db", + builder: { + start: { + default: 0, + type: "number", + description: "Start start for the users", + }, + output: { + default: "", + type: "string", + description: "Folder containing the exported data", + }, + }, + handler: async argv => { + console.log("🌱 Seeding the database with start: ", argv.start); + const usersNumber = 1000; + const defaultPassword = "password"; + const userRole = "admin"; + const folderTreeDepth = 1000; + + const platform = await tdrive.run(services); + await gr.doInit(platform); + + let client: mongo.MongoClient; + client = (await gr.database.getConnector()).getClient(); + + // Manage the default company + const companies = await gr.services.companies.getCompanies(); + let company = companies.getEntities()?.[0]; + if (!company) { + const newCompany = getCompanyInstance({ + name: "Tdrive", + plan: { name: "Local", limits: undefined, features: undefined }, + }); + company = await gr.services.companies.createCompany(newCompany); + } + + console.log("✅ Company created: ", company.id); + + // encoding the user password + const passwordEncoder = new PasswordEncoder(); + const encodedPassword = await passwordEncoder.encodePassword(defaultPassword); + // Step 1: Generate 10k users + const usersData = Array.from({ length: usersNumber }, (_, i) => { + const userNumber = i + argv.start * 1000; + return { + first_name: `User ${userNumber}`, + last_name: `Lastname ${userNumber}`, + username_canonical: `user${userNumber}`, + email_canonical: `user${userNumber}@example.com`, + password: encodedPassword, + cache: { + companies: [], + }, + }; + }); + + // for each user, get the user and add it to allUsers + const allUsers = []; + for (const userData of usersData) { + const newUser = getInstance(userData); + const user = await gr.services.users.create(newUser); + allUsers.push(user.entity); + } + console.log("✅ Users created:: ", allUsers); + + // // for each user, assign a role + for (const user of allUsers) { + console.log("User is:: ", user); + // Update user company + await gr.services.companies.setUserRole(company.id, user.id, userRole); + await gr.services.workspaces.processPendingUser(user); + } + console.log("✅ Users created"); + + let updateBegin = Date.now(); + let createTreePromises = []; + for (const user of allUsers) { + // console.log progress percentage + const context = { company, user }; + const parentDrive = `user_${user.id}`; + const folderData = await getDefaultDriveItem( + { + parent_id: parentDrive, + company_id: company.id, + is_directory: true, + }, + context, + ); + // create folder tree + await createTree(folderTreeDepth, folderData, parentDrive, context, client); + console.log(`✅ User ${user.id} folder tree created`); + } + // await Promise.all(createTreePromises); + console.log("✅ Finished execution, took: ", (Date.now() - updateBegin) / 1000, "s"); + }, +}; + +export default command; diff --git a/tdrive/backend/node/src/core/platform/services/database/services/orm/connectors/abstract-connector.ts b/tdrive/backend/node/src/core/platform/services/database/services/orm/connectors/abstract-connector.ts index a8ba3555..daaf5810 100644 --- a/tdrive/backend/node/src/core/platform/services/database/services/orm/connectors/abstract-connector.ts +++ b/tdrive/backend/node/src/core/platform/services/database/services/orm/connectors/abstract-connector.ts @@ -47,4 +47,7 @@ export abstract class AbstractConnector implements getType(): DatabaseType { return this.type; } + getClient() { + return this.getClient(); + } } diff --git a/tdrive/backend/node/src/core/platform/services/database/services/orm/connectors/index.ts b/tdrive/backend/node/src/core/platform/services/database/services/orm/connectors/index.ts index f1c6792e..6e1f50d6 100644 --- a/tdrive/backend/node/src/core/platform/services/database/services/orm/connectors/index.ts +++ b/tdrive/backend/node/src/core/platform/services/database/services/orm/connectors/index.ts @@ -99,6 +99,11 @@ export interface Connector extends Initializable { * @returns Pagination */ getOffsetPagination(options: Paginable): Pagination; + + /** + * Get the db client + */ + getClient(): any; } export declare type ConnectionOptions = MongoConnectionOptions | PostgresConnectionOptions; diff --git a/tdrive/backend/node/src/version.ts b/tdrive/backend/node/src/version.ts index aba10f0d..e9ae5627 100644 --- a/tdrive/backend/node/src/version.ts +++ b/tdrive/backend/node/src/version.ts @@ -1,7 +1,7 @@ export default { - current: /* @VERSION_DETAIL */ "1.0.4-hf2", + current: /* @VERSION_DETAIL */ "1.0.4-hf3", minimal: { - web: /* @MIN_VERSION_WEB */ "1.0.4-hf2", - mobile: /* @MIN_VERSION_MOBILE */ "1.0.4-hf2", + web: /* @MIN_VERSION_WEB */ "1.0.4-hf3", + mobile: /* @MIN_VERSION_MOBILE */ "1.0.4-hf3", }, }; diff --git a/tdrive/frontend/public/public/img/grid/calendar.svg b/tdrive/frontend/public/public/img/grid/calendar.svg index 20dca75c..5f8725ba 100644 --- a/tdrive/frontend/public/public/img/grid/calendar.svg +++ b/tdrive/frontend/public/public/img/grid/calendar.svg @@ -1,22 +1,23 @@ - - - - - - + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + diff --git a/tdrive/frontend/public/public/img/grid/contacts.svg b/tdrive/frontend/public/public/img/grid/contacts.svg index 29cda53b..65485999 100644 --- a/tdrive/frontend/public/public/img/grid/contacts.svg +++ b/tdrive/frontend/public/public/img/grid/contacts.svg @@ -1,27 +1,23 @@ - - - - - - - + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + diff --git a/tdrive/frontend/public/public/img/grid/drive.svg b/tdrive/frontend/public/public/img/grid/drive.svg index 61a544b7..148b9486 100644 --- a/tdrive/frontend/public/public/img/grid/drive.svg +++ b/tdrive/frontend/public/public/img/grid/drive.svg @@ -1,18 +1,24 @@ - - - - - - + + + + + + + - - - - - - - - + + + + + + + + + + + + + diff --git a/tdrive/frontend/public/public/img/grid/mail.svg b/tdrive/frontend/public/public/img/grid/mail.svg index 534c4848..622e2ae7 100644 --- a/tdrive/frontend/public/public/img/grid/mail.svg +++ b/tdrive/frontend/public/public/img/grid/mail.svg @@ -1,22 +1,23 @@ - - - - - - + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + diff --git a/tdrive/frontend/public/public/img/grid/twake.svg b/tdrive/frontend/public/public/img/grid/twake.svg index ef7f1e66..0824d3b9 100644 --- a/tdrive/frontend/public/public/img/grid/twake.svg +++ b/tdrive/frontend/public/public/img/grid/twake.svg @@ -1,22 +1,28 @@ - - - - - - + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + diff --git a/tdrive/frontend/public/public/img/grid/visio.svg b/tdrive/frontend/public/public/img/grid/visio.svg index a682787e..7cdfb537 100644 --- a/tdrive/frontend/public/public/img/grid/visio.svg +++ b/tdrive/frontend/public/public/img/grid/visio.svg @@ -1,23 +1,24 @@ - - - - - - - + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + diff --git a/tdrive/frontend/public/public/img/logo/logo-text-black.png b/tdrive/frontend/public/public/img/logo/logo-text-black.png index 5af3c80e..ac1c2f73 100644 Binary files a/tdrive/frontend/public/public/img/logo/logo-text-black.png and b/tdrive/frontend/public/public/img/logo/logo-text-black.png differ diff --git a/tdrive/frontend/public/public/img/logo/logo-text-black.svg b/tdrive/frontend/public/public/img/logo/logo-text-black.svg index 07c38234..8cbff67b 100644 --- a/tdrive/frontend/public/public/img/logo/logo-text-black.svg +++ b/tdrive/frontend/public/public/img/logo/logo-text-black.svg @@ -1,48 +1,55 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + - + - + - + - + - - - - - - - - + + + diff --git a/tdrive/frontend/public/public/img/logo/logo-text-white.png b/tdrive/frontend/public/public/img/logo/logo-text-white.png index c63f39e3..2e3d6f22 100644 Binary files a/tdrive/frontend/public/public/img/logo/logo-text-white.png and b/tdrive/frontend/public/public/img/logo/logo-text-white.png differ diff --git a/tdrive/frontend/public/public/img/logo/logo-text-white.svg b/tdrive/frontend/public/public/img/logo/logo-text-white.svg index a75fbfdf..b1b685d0 100644 --- a/tdrive/frontend/public/public/img/logo/logo-text-white.svg +++ b/tdrive/frontend/public/public/img/logo/logo-text-white.svg @@ -1,48 +1,55 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + - + - + - + - + - - - - - - - - + + + diff --git a/tdrive/frontend/src/app/atoms/avatar/index.tsx b/tdrive/frontend/src/app/atoms/avatar/index.tsx index ae337dcd..a8a09efa 100644 --- a/tdrive/frontend/src/app/atoms/avatar/index.tsx +++ b/tdrive/frontend/src/app/atoms/avatar/index.tsx @@ -47,7 +47,7 @@ export default function Avatar(props: AvatarProps) { className += ' border border-gray flex items-center justify-center bg-center bg-cover ' + - (props.nogradient ? ' bg-zinc-100 dark:bg-zinc-800 text-zinc-900 dark:text-white ' : ''); + (props.nogradient ? ' bg-zinc-100 dark:bg-zinc-900 text-zinc-900 dark:text-white ' : ''); const spl_title = avatarTitle.split(' '); diff --git a/tdrive/frontend/src/app/atoms/badge/index.tsx b/tdrive/frontend/src/app/atoms/badge/index.tsx index 87a99175..cc95afd6 100644 --- a/tdrive/frontend/src/app/atoms/badge/index.tsx +++ b/tdrive/frontend/src/app/atoms/badge/index.tsx @@ -18,10 +18,10 @@ export const Badge = (props: BadgeProps) => { if (props.theme === 'danger') className = 'text-white bg-rose-500 border-transparent '; if (props.theme === 'default') - className = 'text-black dark:text-white bg-white dark:bg-zinc-800 border-gray-300'; + className = 'text-black dark:text-white bg-white dark:bg-zinc-900 border-gray-300'; if (props.theme === 'outline') - className = 'text-blue-500 bg-white dark:bg-zinc-800 border-blue-500'; + className = 'text-blue-500 bg-white dark:bg-zinc-900 border-blue-500'; if (props.size === 'lg') className = className + ' text-lg h-11'; else if (props.size === 'sm') className = className + ' text-sm h-7 px-3'; diff --git a/tdrive/frontend/src/app/atoms/button/button.tsx b/tdrive/frontend/src/app/atoms/button/button.tsx index 1b16d8f1..8f8b4613 100644 --- a/tdrive/frontend/src/app/atoms/button/button.tsx +++ b/tdrive/frontend/src/app/atoms/button/button.tsx @@ -28,7 +28,7 @@ export const Button = (props: ButtonProps) => { if (props.theme === 'default') className = - 'text-black dark:text-white bg-white dark:bg-zinc-800 dark:hover:bg-zinc-700 dark:active:bg-zinc-900 hover:bg-zinc-50 active:bg-zinc-200 border-zinc-300'; + 'text-black dark:text-white bg-white dark:bg-zinc-900 dark:hover:bg-zinc-700 dark:active:bg-zinc-900 hover:bg-zinc-50 active:bg-zinc-200 border-zinc-300'; if (props.theme === 'white') className = @@ -36,7 +36,7 @@ export const Button = (props: ButtonProps) => { if (props.theme === 'outline') className = - 'text-blue-500 bg-white dark:bg-zinc-800 dark:hover:bg-zinc-700 dark:active:bg-zinc-900 hover:bg-zinc-50 active:bg-zinc-200 border-blue-500'; + 'text-blue-500 bg-white dark:bg-zinc-900 dark:hover:bg-zinc-700 dark:active:bg-zinc-900 hover:bg-zinc-50 active:bg-zinc-200 border-blue-500'; if (props.theme === 'dark') className = diff --git a/tdrive/frontend/src/app/atoms/input/input-text.tsx b/tdrive/frontend/src/app/atoms/input/input-text.tsx index a9cab85d..41d78753 100644 --- a/tdrive/frontend/src/app/atoms/input/input-text.tsx +++ b/tdrive/frontend/src/app/atoms/input/input-text.tsx @@ -27,10 +27,10 @@ const baseTextClassName = ' dark:text-white text-black '; export const defaultInputClassName = (theme: ThemeName = 'plain') => { const themeClasses = { - 'plain': 'bg-zinc-100 border-zinc-100 dark:bg-zinc-800 dark:border-zinc-800' + baseTextClassName, - 'blue': 'bg-zinc-100 border-zinc-100 dark:bg-zinc-800 dark:border-zinc-800 text-blue-700 dark:text-blue-500', + 'plain': 'bg-zinc-100 border-zinc-100 dark:bg-zinc-900 dark:border-zinc-800' + baseTextClassName, + 'blue': 'bg-zinc-100 border-zinc-100 dark:bg-zinc-900 dark:border-zinc-800 text-blue-700 dark:text-blue-500', 'rose': 'text-rose-500 bg-rose-100 dark:text-rose-300 dark:bg-rose-900 border-rose-500', - 'outline': 'bg-zinc-50 border-zinc-300 dark:bg-zinc-800 dark:border-zinc-700' + baseTextClassName, + 'outline': 'bg-zinc-50 border-zinc-300 dark:bg-zinc-900 dark:border-zinc-700' + baseTextClassName, }; return ( baseInputClassName + diff --git a/tdrive/frontend/src/app/components/auto-complete/auto-complete.tsx b/tdrive/frontend/src/app/components/auto-complete/auto-complete.tsx index 08591cdd..ce288706 100644 --- a/tdrive/frontend/src/app/components/auto-complete/auto-complete.tsx +++ b/tdrive/frontend/src/app/components/auto-complete/auto-complete.tsx @@ -367,7 +367,7 @@ export default class AutoComplete extends Component { {!this.props.hideResult && this.state.currentList.length > 0 ? (
(this.original_menu = node)} className={ - 'menu-list ' + (this.props.withFrame ? 'as_frame text-black bg-white dark:bg-zinc-800 dark:text-white rounded-lg ' : '') + this.props.animationClass + 'menu-list ' + (this.props.withFrame ? 'as_frame text-black bg-white dark:bg-zinc-900 dark:text-white rounded-lg ' : '') + this.props.animationClass } > {(this.props.menu || []) @@ -81,7 +81,12 @@ export default class MenuComponent extends React.Component { this.hoverMenu(item.ref, item); }} > - {item.text} + {item.icon && ( +
+ {typeof item.icon === 'string' ? : item.icon} +
+ )} +
{item.text}
); } else if (item.type == 'react-element') { diff --git a/tdrive/frontend/src/app/components/menus/menu.scss b/tdrive/frontend/src/app/components/menus/menu.scss index f1466eff..0c3e478c 100755 --- a/tdrive/frontend/src/app/components/menus/menu.scss +++ b/tdrive/frontend/src/app/components/menus/menu.scss @@ -45,13 +45,17 @@ font-size: 12px; font-weight: 500; margin: 8px 16px; - color: var(--grey-dark); + display: flex; + + .icon { + color: var(--grey-dark); + } } .menu-custom { font-size: 12px; font-weight: 500; - margin: 8px 8px; + margin: 0.875rem 0.625rem; padding: 0 8px; .menu-cancel-margin, diff --git a/tdrive/frontend/src/app/components/menus/menus-body-layer.jsx b/tdrive/frontend/src/app/components/menus/menus-body-layer.jsx index 0f998ecc..b721a512 100755 --- a/tdrive/frontend/src/app/components/menus/menus-body-layer.jsx +++ b/tdrive/frontend/src/app/components/menus/menus-body-layer.jsx @@ -188,8 +188,8 @@ export default class MenusBodyLayer extends React.Component { zIndex: 1050, position: 'absolute', transform: item.positionType === 'bottom' ? '' : 'translateY(-50%)', - left: item.position.x, - top: item.position.y, + left: item.position.x - 140, + top: item.position.y + 2, marginTop: item.position.marginTop, marginLeft: item.position.marginLeft, }} diff --git a/tdrive/frontend/src/app/environment/version.ts b/tdrive/frontend/src/app/environment/version.ts index 1ae3445e..4090f98a 100644 --- a/tdrive/frontend/src/app/environment/version.ts +++ b/tdrive/frontend/src/app/environment/version.ts @@ -1,5 +1,5 @@ export default { - version: /* @VERSION */ '1.0.4-hf2', - version_detail: /* @VERSION_DETAIL */ '1.0.4-hf2', + version: /* @VERSION */ '1.0.4-hf3', + version_detail: /* @VERSION_DETAIL */ '1.0.4-hf3', version_name: /* @VERSION_NAME */ 'Ghost-Dog', }; \ No newline at end of file diff --git a/tdrive/frontend/src/app/views/client/body/drive/components/access-level-dropdown.stories.tsx b/tdrive/frontend/src/app/views/client/body/drive/components/access-level-dropdown.stories.tsx index df48f591..7f9c76cf 100644 --- a/tdrive/frontend/src/app/views/client/body/drive/components/access-level-dropdown.stories.tsx +++ b/tdrive/frontend/src/app/views/client/body/drive/components/access-level-dropdown.stories.tsx @@ -59,7 +59,7 @@ export const EndOfInputBox = {
diff --git a/tdrive/frontend/src/app/views/client/body/drive/modals/create/index.tsx b/tdrive/frontend/src/app/views/client/body/drive/modals/create/index.tsx index 64c13379..c3a3bbc5 100644 --- a/tdrive/frontend/src/app/views/client/body/drive/modals/create/index.tsx +++ b/tdrive/frontend/src/app/views/client/body/drive/modals/create/index.tsx @@ -175,7 +175,7 @@ const CreateModalOption = (props: { icon: ReactNode; text: string; onClick: () = return (
{props.icon}
diff --git a/tdrive/frontend/src/app/views/client/body/drive/modals/update-access/internal-users-access.tsx b/tdrive/frontend/src/app/views/client/body/drive/modals/update-access/internal-users-access.tsx index 043caa7e..f798fbc2 100644 --- a/tdrive/frontend/src/app/views/client/body/drive/modals/update-access/internal-users-access.tsx +++ b/tdrive/frontend/src/app/views/client/body/drive/modals/update-access/internal-users-access.tsx @@ -119,7 +119,7 @@ export const InternalUsersAccessManager = ({
)} {!loading && resultFooterText && <> -
+
{resultFooterText}
} diff --git a/tdrive/frontend/src/app/views/client/body/drive/modals/upload/index.tsx b/tdrive/frontend/src/app/views/client/body/drive/modals/upload/index.tsx index e0fe0ecc..34b63cba 100644 --- a/tdrive/frontend/src/app/views/client/body/drive/modals/upload/index.tsx +++ b/tdrive/frontend/src/app/views/client/body/drive/modals/upload/index.tsx @@ -99,7 +99,7 @@ const CreateModalOption = (props: { icon: ReactNode; text: string; onClick: () = return (
{props.icon}
diff --git a/tdrive/frontend/src/app/views/client/body/drive/shared.tsx b/tdrive/frontend/src/app/views/client/body/drive/shared.tsx index 8c9f9af1..a00dc7aa 100755 --- a/tdrive/frontend/src/app/views/client/body/drive/shared.tsx +++ b/tdrive/frontend/src/app/views/client/body/drive/shared.tsx @@ -141,7 +141,7 @@ const AccessChecker = ({ return (
-
+
You don't have access to this document or folder.
The public link you are using may be invalid or expired. diff --git a/tdrive/frontend/src/app/views/client/common/account.tsx b/tdrive/frontend/src/app/views/client/common/account.tsx index a2314bd1..62e9d93a 100644 --- a/tdrive/frontend/src/app/views/client/common/account.tsx +++ b/tdrive/frontend/src/app/views/client/common/account.tsx @@ -1,5 +1,4 @@ import Avatar from '@atoms/avatar'; -import { Base, Info } from '@atoms/text'; import Menu from '@components/menus/menu'; import LoginService from '@features/auth/login-service'; import { useCurrentUser } from '@features/users/hooks/use-current-user'; @@ -21,6 +20,18 @@ export default ({ sidebar }: { sidebar?: boolean }): JSX.Element => { className="flex flex-row items-center max-w-xs cursor-pointer" position="bottom" menu={[ + // user name / email + { + type: 'text', + text: currentUserService.getFullName(user), + }, + { + type: 'text', + text: user.email, + icon: 'envelope-info', + hide: !FeatureTogglesService.isActiveFeatureName(FeatureNames.COMPANY_DISPLAY_EMAIL), + }, + { type: 'separator' }, { type: 'menu', icon: 'user', @@ -47,19 +58,6 @@ export default ({ sidebar }: { sidebar?: boolean }): JSX.Element => { avatar={user.thumbnail} title={currentUserService.getFullName(user)} /> -
- - {currentUserService.getFullName(user)} - - - { !FeatureTogglesService.isActiveFeatureName(FeatureNames.COMPANY_DISPLAY_EMAIL) && ( - - {user.email} - - )} -
); }; diff --git a/tdrive/frontend/src/app/views/client/common/app-grid.tsx b/tdrive/frontend/src/app/views/client/common/app-grid.tsx index 5114f888..9d83c1fc 100644 --- a/tdrive/frontend/src/app/views/client/common/app-grid.tsx +++ b/tdrive/frontend/src/app/views/client/common/app-grid.tsx @@ -27,10 +27,13 @@ export default ({ className }: { className?: string }): JSX.Element => { target="_blank" rel="noreferrer" href={app.url} - className="inline-block flex flex-col items-center justify-center cursor-pointer hover:bg-zinc-100 dark:hover:bg-zinc-900 rounded-md p-2 pb-1" + className="inline-block flex flex-col items-center justify-center cursor-pointer hover:bg-zinc-100 dark:hover:bg-zinc-800 rounded-md p-2 pb-1" > - - {app.name} + + {app.name} ); })} diff --git a/tdrive/frontend/src/app/views/client/common/disk-usage.tsx b/tdrive/frontend/src/app/views/client/common/disk-usage.tsx index 6f2128b0..18550e32 100644 --- a/tdrive/frontend/src/app/views/client/common/disk-usage.tsx +++ b/tdrive/frontend/src/app/views/client/common/disk-usage.tsx @@ -35,7 +35,7 @@ const DiskUsage = () => { return ( <> {FeatureTogglesService.isActiveFeatureName(FeatureNames.COMPANY_USER_QUOTA) && ( -
+
{used > 90 && ( @@ -62,7 +62,7 @@ const DiskUsage = () => {
)} {!FeatureTogglesService.isActiveFeatureName(FeatureNames.COMPANY_USER_QUOTA) && ( -
+
{formatBytesToInt(usedBytes)} diff --git a/tdrive/frontend/src/app/views/client/header/index.tsx b/tdrive/frontend/src/app/views/client/header/index.tsx index 82b54aaf..3c415e64 100644 --- a/tdrive/frontend/src/app/views/client/header/index.tsx +++ b/tdrive/frontend/src/app/views/client/header/index.tsx @@ -7,7 +7,13 @@ import version from '../../../environment/version'; export default ({ openSideMenu }: { openSideMenu: () => void }) => { return ( -
+
void }) => { alt="Tdrive" />
-
+
 v{version.version} diff --git a/tdrive/frontend/src/app/views/client/side-bar/index.tsx b/tdrive/frontend/src/app/views/client/side-bar/index.tsx index c333e4cc..3dbd0b00 100644 --- a/tdrive/frontend/src/app/views/client/side-bar/index.tsx +++ b/tdrive/frontend/src/app/views/client/side-bar/index.tsx @@ -37,7 +37,7 @@ export default () => { ); const active = false; const { sharedWithMe, inTrash, path } = useDriveItem(parentId); - const activeClass = 'bg-zinc-50 dark:bg-zinc-800 !text-blue-500'; + const activeClass = 'bg-zinc-50 dark:bg-zinc-900 !text-blue-500'; let folderType = 'home'; if ((path || [])[0]?.id === 'user_' + user?.id) folderType = 'personal'; if (inTrash) folderType = 'trash'; diff --git a/tdrive/frontend/src/app/views/error/index.tsx b/tdrive/frontend/src/app/views/error/index.tsx index 6bf4a245..4bf12c05 100644 --- a/tdrive/frontend/src/app/views/error/index.tsx +++ b/tdrive/frontend/src/app/views/error/index.tsx @@ -22,7 +22,7 @@ export default () => { } return ( -
+
{' '}