├── src ├── backend │ ├── __init__.py │ ├── core │ │ ├── __init__.py │ │ ├── services │ │ │ ├── __init__.py │ │ │ └── sdk_relay.py │ │ ├── tests │ │ │ ├── __init__.py │ │ │ ├── swagger │ │ │ │ ├── __init__.py │ │ │ │ └── test_openapi_schema.py │ │ │ ├── authentication │ │ │ │ └── __init__.py │ │ │ ├── external_api │ │ │ │ └── items │ │ │ │ │ └── __init__.py │ │ │ ├── utils │ │ │ │ └── urls.py │ │ │ └── test_settings.py │ │ ├── migrations │ │ │ ├── __init__.py │ │ │ ├── 0013_active_unnaccent_postgres_extension.py │ │ │ ├── 00006_create_pg_trgm_extension.py │ │ │ ├── 0005_item_description.py │ │ │ ├── 0004_item_size.py │ │ │ ├── 0002_item_mimetype_alter_user_language.py │ │ │ ├── 0007_item_hard_deleted_at.py │ │ │ ├── 0003_item_main_workspace_alter_user_language.py │ │ │ ├── 0012_item_malware_detection_info.py │ │ │ ├── 0008_alter_item_options_and_more.py │ │ │ ├── 0009_alter_user_language.py │ │ │ ├── 0014_alter_user_language.py │ │ │ ├── 0010_alter_item_upload_state.py │ │ │ ├── 0011_update_items_upload_state_value.py │ │ │ └── 0015_user_claims_alter_user_language.py │ │ ├── templatetags │ │ │ └── __init__.py │ │ ├── management │ │ │ └── commands │ │ │ │ ├── __init__.py │ │ │ │ └── update_suspicious_item_file_hash.py │ │ ├── authentication │ │ │ ├── exceptions.py │ │ │ └── views.py │ │ ├── templates │ │ │ └── core │ │ │ │ └── generate_document.html │ │ ├── entitlements │ │ │ ├── __init__.py │ │ │ ├── entitlements_backend.py │ │ │ └── dummy_entitlements_backend.py │ │ ├── storage │ │ │ ├── __init__.py │ │ │ ├── storage_compute_backend.py │ │ │ └── creator_storage_compute_backend.py │ │ ├── enums.py │ │ ├── apps.py │ │ ├── api │ │ │ ├── fields.py │ │ │ └── __init__.py │ │ └── signals.py │ ├── demo │ │ ├── __init__.py │ │ ├── tests │ │ │ ├── __init__.py │ │ │ └── test_commands_create_demo.py │ │ ├── management │ │ │ ├── __init__.py │ │ │ └── commands │ │ │ │ └── __init__.py │ │ └── defaults.py │ ├── e2e │ │ ├── __init__.py │ │ ├── management │ │ │ └── commands │ │ │ │ └── __init__.py │ │ ├── utils.py │ │ ├── serializers.py │ │ ├── urls.py │ │ └── viewsets.py │ ├── wopi │ │ ├── __init__.py │ │ ├── services │ │ │ ├── __init__.py │ │ │ └── lock.py │ │ ├── tasks │ │ │ └── __init__.py │ │ ├── tests │ │ │ ├── __init__.py │ │ │ ├── services │ │ │ │ ├── __init__.py │ │ │ │ └── test_lock.py │ │ │ ├── tasks │ │ │ │ └── __init__.py │ │ │ ├── viewset │ │ │ │ └── __init__.py │ │ │ ├── management_commands │ │ │ │ ├── __init__.py │ │ │ │ └── test_trigger_wopi_configuration.py │ │ │ └── conftest.py │ │ ├── migrations │ │ │ └── __init__.py │ │ ├── management │ │ │ └── commands │ │ │ │ ├── __init__.py │ │ │ │ └── trigger_wopi_configuration.py │ │ ├── apps.py │ │ ├── urls.py │ │ └── permissions.py │ ├── MANIFEST.in │ ├── drive │ │ ├── __init__.py │ │ ├── wsgi.py │ │ └── celery_app.py │ └── manage.py ├── frontend │ ├── apps │ │ ├── sdk-consumer │ │ │ ├── src │ │ │ │ ├── App.css │ │ │ │ ├── vite-env.d.ts │ │ │ │ └── main.tsx │ │ │ ├── tsconfig.json │ │ │ ├── vite.config.ts │ │ │ ├── .gitignore │ │ │ ├── index.html │ │ │ ├── tsconfig.node.json │ │ │ ├── package.json │ │ │ ├── tsconfig.app.json │ │ │ ├── eslint.config.js │ │ │ └── public │ │ │ │ └── vite.svg │ │ ├── drive │ │ │ ├── src │ │ │ │ ├── features │ │ │ │ │ ├── explorer │ │ │ │ │ │ ├── api │ │ │ │ │ │ │ └── useAccesses.tsx │ │ │ │ │ │ ├── constants.ts │ │ │ │ │ │ ├── components │ │ │ │ │ │ │ ├── app-view │ │ │ │ │ │ │ │ ├── ExplorerFilters.scss │ │ │ │ │ │ │ │ └── ExplorerSearchButton.tsx │ │ │ │ │ │ │ ├── tree │ │ │ │ │ │ │ │ ├── ExploreDragOverlay.tsx │ │ │ │ │ │ │ │ └── nav │ │ │ │ │ │ │ │ │ ├── ExplorerTreeNav.tsx │ │ │ │ │ │ │ │ │ └── ExplorerTreeNavItem.tsx │ │ │ │ │ │ │ ├── embedded-explorer │ │ │ │ │ │ │ │ ├── hooks.tsx │ │ │ │ │ │ │ │ ├── EmbeddedExplorerGridUpdatedAtCell.tsx │ │ │ │ │ │ │ │ └── EmbeddedExplorerGridMobileCell.tsx │ │ │ │ │ │ │ ├── trash │ │ │ │ │ │ │ │ └── utils.tsx │ │ │ │ │ │ │ ├── icons │ │ │ │ │ │ │ │ └── ItemIcon.scss │ │ │ │ │ │ │ ├── toasts │ │ │ │ │ │ │ │ └── addItemsMovedToast.tsx │ │ │ │ │ │ │ ├── Draggable.tsx │ │ │ │ │ │ │ ├── modals │ │ │ │ │ │ │ │ ├── move │ │ │ │ │ │ │ │ │ └── ExplorerMoveFolderModal.scss │ │ │ │ │ │ │ │ └── HardDeleteConfirmationModal.tsx │ │ │ │ │ │ │ ├── Droppable.tsx │ │ │ │ │ │ │ ├── workspaces-explorer │ │ │ │ │ │ │ │ └── WorkspacesExplorer.tsx │ │ │ │ │ │ │ └── item-actions │ │ │ │ │ │ │ │ └── ImportDropdown.tsx │ │ │ │ │ │ └── hooks │ │ │ │ │ │ │ ├── useBreadcrumb.tsx │ │ │ │ │ │ │ ├── useInfiniteItems.ts │ │ │ │ │ │ │ ├── useInfiniteChildren.ts │ │ │ │ │ │ │ ├── useDeleteItem.tsx │ │ │ │ │ │ │ └── useQueries.tsx │ │ │ │ │ ├── layouts │ │ │ │ │ │ └── components │ │ │ │ │ │ │ ├── explorer │ │ │ │ │ │ │ └── ExplorerLayout.scss │ │ │ │ │ │ │ ├── global │ │ │ │ │ │ │ ├── GlobalLayout.scss │ │ │ │ │ │ │ └── GlobalLayout.tsx │ │ │ │ │ │ │ ├── left-panel │ │ │ │ │ │ │ ├── LeftPanelMobile.scss │ │ │ │ │ │ │ └── LeftPanelMobile.tsx │ │ │ │ │ │ │ ├── header │ │ │ │ │ │ │ └── index.scss │ │ │ │ │ │ │ └── simple │ │ │ │ │ │ │ └── SimpleLayout.tsx │ │ │ │ │ ├── errors │ │ │ │ │ │ └── AppError.ts │ │ │ │ │ ├── ui │ │ │ │ │ │ ├── components │ │ │ │ │ │ │ ├── infinite-scroll │ │ │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ │ │ └── InfiniteScroll.scss │ │ │ │ │ │ │ ├── spinner │ │ │ │ │ │ │ │ ├── SpinnerPage.scss │ │ │ │ │ │ │ │ └── SpinnerPage.tsx │ │ │ │ │ │ │ ├── responsive │ │ │ │ │ │ │ │ ├── index.scss │ │ │ │ │ │ │ │ └── ResponsiveDivs.tsx │ │ │ │ │ │ │ ├── info │ │ │ │ │ │ │ │ ├── InfoRow.scss │ │ │ │ │ │ │ │ └── InfoRow.tsx │ │ │ │ │ │ │ ├── generic-disclaimer │ │ │ │ │ │ │ │ ├── GenericDisclaimer.scss │ │ │ │ │ │ │ │ └── GenericDisclaimer.tsx │ │ │ │ │ │ │ ├── user │ │ │ │ │ │ │ │ └── UserProfile.tsx │ │ │ │ │ │ │ ├── gaufre │ │ │ │ │ │ │ │ └── Gaufre.tsx │ │ │ │ │ │ │ ├── breadcrumbs │ │ │ │ │ │ │ │ └── index.scss │ │ │ │ │ │ │ ├── toaster │ │ │ │ │ │ │ │ └── index.scss │ │ │ │ │ │ │ └── icon │ │ │ │ │ │ │ │ └── Icon.tsx │ │ │ │ │ │ ├── preview │ │ │ │ │ │ │ ├── pdf-preview │ │ │ │ │ │ │ │ ├── pdf-preview.scss │ │ │ │ │ │ │ │ └── PreviewPdf.tsx │ │ │ │ │ │ │ ├── wopi │ │ │ │ │ │ │ │ └── WopiEditor.scss │ │ │ │ │ │ │ ├── components │ │ │ │ │ │ │ │ ├── controls │ │ │ │ │ │ │ │ │ └── PreviewControls.scss │ │ │ │ │ │ │ │ └── duration-bar │ │ │ │ │ │ │ │ │ └── DurationBar.tsx │ │ │ │ │ │ │ ├── audio-player │ │ │ │ │ │ │ │ └── audio-player.scss │ │ │ │ │ │ │ ├── preview.scss │ │ │ │ │ │ │ ├── suspicious │ │ │ │ │ │ │ │ ├── SuspiciousPreview.scss │ │ │ │ │ │ │ │ └── SuspiciousPreview.tsx │ │ │ │ │ │ │ ├── error │ │ │ │ │ │ │ │ └── ErrorPreview.scss │ │ │ │ │ │ │ └── not-supported │ │ │ │ │ │ │ │ └── NotSupportedPreview.scss │ │ │ │ │ │ └── cunningham │ │ │ │ │ │ │ └── useCunninghamTheme.ts │ │ │ │ │ ├── users │ │ │ │ │ │ ├── types.ts │ │ │ │ │ │ └── hooks │ │ │ │ │ │ │ └── useUserQueries.tsx │ │ │ │ │ ├── i18n │ │ │ │ │ │ ├── conf.ts │ │ │ │ │ │ └── utils.ts │ │ │ │ │ ├── items │ │ │ │ │ │ ├── components │ │ │ │ │ │ │ └── ItemInfo.scss │ │ │ │ │ │ └── utils.ts │ │ │ │ │ ├── drivers │ │ │ │ │ │ ├── implementations │ │ │ │ │ │ │ ├── ResanaDriver.ts │ │ │ │ │ │ │ └── DummyDriver.ts │ │ │ │ │ │ ├── utils.tsx │ │ │ │ │ │ └── DTOs │ │ │ │ │ │ │ ├── InvitationDTO.ts │ │ │ │ │ │ │ └── AccessesDTO.ts │ │ │ │ │ ├── config │ │ │ │ │ │ ├── useApiConfig.ts │ │ │ │ │ │ ├── Config.ts │ │ │ │ │ │ └── ConfigProvider.tsx │ │ │ │ │ ├── auth │ │ │ │ │ │ ├── components │ │ │ │ │ │ │ ├── LogoutButton.tsx │ │ │ │ │ │ │ └── LoginButton.tsx │ │ │ │ │ │ └── types.ts │ │ │ │ │ ├── analytics │ │ │ │ │ │ └── AnalyticsProvider.tsx │ │ │ │ │ ├── sdk │ │ │ │ │ │ └── SdkRelayManager.ts │ │ │ │ │ └── api │ │ │ │ │ │ └── utils.ts │ │ │ │ ├── assets │ │ │ │ │ ├── grid_empty.png │ │ │ │ │ ├── home │ │ │ │ │ │ └── banner.png │ │ │ │ │ ├── search-dev.png │ │ │ │ │ ├── empty-selection.png │ │ │ │ │ ├── mutliple-selection.png │ │ │ │ │ ├── icons │ │ │ │ │ │ ├── settings.svg │ │ │ │ │ │ ├── upload_file.svg │ │ │ │ │ │ ├── trash.svg │ │ │ │ │ │ ├── undo.svg │ │ │ │ │ │ ├── delete_filled.svg │ │ │ │ │ │ ├── undo_blue.svg │ │ │ │ │ │ ├── upload_folder.svg │ │ │ │ │ │ ├── create_folder.svg │ │ │ │ │ │ ├── cancel.svg │ │ │ │ │ │ ├── cancel_blue.svg │ │ │ │ │ │ └── info.svg │ │ │ │ │ ├── files │ │ │ │ │ │ └── icons │ │ │ │ │ │ │ ├── mime-video-mini.svg │ │ │ │ │ │ │ ├── mime-other-mini.svg │ │ │ │ │ │ │ ├── mime-folder-mini.svg │ │ │ │ │ │ │ ├── mime-audio-mini.svg │ │ │ │ │ │ │ ├── mime-powerpoint-mini.svg │ │ │ │ │ │ │ └── mime-image-mini.svg │ │ │ │ │ ├── tree │ │ │ │ │ │ ├── folder.svg │ │ │ │ │ │ └── main-workspace.svg │ │ │ │ │ ├── logo-icon.svg │ │ │ │ │ ├── folder │ │ │ │ │ │ └── folder.svg │ │ │ │ │ └── workspace_logo.svg │ │ │ │ ├── utils │ │ │ │ │ ├── useLayout.tsx │ │ │ │ │ ├── entitlements.ts │ │ │ │ │ └── useQueries.ts │ │ │ │ ├── pages │ │ │ │ │ ├── _document.tsx │ │ │ │ │ ├── explorer │ │ │ │ │ │ └── items │ │ │ │ │ │ │ ├── public.tsx │ │ │ │ │ │ │ ├── shared.tsx │ │ │ │ │ │ │ └── [id].tsx │ │ │ │ │ ├── 401.tsx │ │ │ │ │ ├── 403.tsx │ │ │ │ │ └── sdk │ │ │ │ │ │ ├── index.tsx │ │ │ │ │ │ └── index.scss │ │ │ │ └── hooks │ │ │ │ │ ├── useThemeCustomization.tsx │ │ │ │ │ └── useCopyToClipboard.tsx │ │ │ ├── .env │ │ │ ├── __mocks__ │ │ │ │ └── fileMock.js │ │ │ ├── .env.development │ │ │ ├── public │ │ │ │ └── assets │ │ │ │ │ ├── favicon.png │ │ │ │ │ ├── 401-background.png │ │ │ │ │ ├── 403-background.png │ │ │ │ │ ├── anct_favicon.png │ │ │ │ │ └── logo-suite-numerique.png │ │ │ ├── next.config.ts │ │ │ ├── eslint.config.mjs │ │ │ ├── svg.d.ts │ │ │ ├── tsconfig.json │ │ │ ├── .gitignore │ │ │ ├── conf │ │ │ │ └── default.conf │ │ │ └── jest.config.ts │ │ └── e2e │ │ │ ├── __tests__ │ │ │ └── app-drive │ │ │ │ ├── assets │ │ │ │ ├── pv_cm.pdf │ │ │ │ └── test-image.heic │ │ │ │ ├── db.setup.ts │ │ │ │ ├── login.spec.ts │ │ │ │ ├── item │ │ │ │ └── right-content-info.spec.ts │ │ │ │ ├── create-folder.spec.ts │ │ │ │ ├── utils-item.ts │ │ │ │ ├── utils-explorer.ts │ │ │ │ └── utils-embedded-grid.ts │ │ │ ├── .gitignore │ │ │ ├── package.json │ │ │ └── tsconfig.json │ ├── packages │ │ └── sdk │ │ │ ├── README.md │ │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── Config.ts │ │ │ ├── vite-env.d.ts │ │ │ ├── utils.ts │ │ │ └── Types.ts │ │ │ ├── .env.development │ │ │ ├── .env.production │ │ │ ├── CHANGELOG.md │ │ │ ├── tsconfig.json │ │ │ ├── tsconfig.node.json │ │ │ ├── CONTRIBUTING.md │ │ │ ├── vite.config.ts │ │ │ ├── tsconfig.app.json │ │ │ └── public │ │ │ └── vite.svg │ └── package.json ├── helm │ └── drive │ │ ├── Chart.yaml │ │ ├── templates │ │ ├── theme_customization_file_cm.yaml │ │ ├── media_svc.yaml │ │ ├── backend_svc.yaml │ │ ├── frontend_svc.yaml │ │ ├── posthog_svc.yaml │ │ └── posthog_assets_svc.yaml │ │ └── generate-readme.sh └── mail │ ├── html-to-text.config.json │ ├── bin │ ├── mjml-to-html │ └── html-to-plain-text │ └── package.json ├── docs ├── assets │ ├── drive-UI.png │ └── banner-drive.png ├── examples │ └── helm │ │ ├── redis.values.yaml │ │ ├── postgresql.values.yaml │ │ ├── keycloak.values.yaml │ │ └── minio.values.yaml ├── architecture.md ├── installation │ └── README.md └── theming.md ├── cron.json ├── env.d └── development │ ├── crowdin │ ├── postgresql │ ├── kc_postgresql │ └── postgresql.e2e ├── bin ├── start-kind.sh ├── manage ├── compose ├── pytest ├── fernetkey ├── clear_db_e2e.sql ├── scalingo_postcompile ├── update_openapi_schema ├── scalingo_postfrontend ├── scalingo_run_web ├── postgres_e2e ├── update_app_cacert.sh ├── pylint └── scalingo_pgdump.sh ├── .github ├── PULL_REQUEST_TEMPLATE.md ├── ISSUE_TEMPLATE.md ├── ISSUE_TEMPLATE │ ├── Bug_report.md │ ├── Support_question.md │ └── Feature_request.md └── workflows │ ├── helmfile-linter.yaml │ ├── release-helm-chart.yaml │ └── front-dependencies-installation.yml ├── Procfile ├── docker ├── files │ ├── etc │ │ └── nginx │ │ │ └── conf.d │ │ │ └── default.conf │ └── usr │ │ └── local │ │ ├── etc │ │ └── gunicorn │ │ │ └── drive.py │ │ └── bin │ │ └── entrypoint └── onlyoffice │ ├── log4js │ └── production.json │ └── local-development.json ├── .dockerignore ├── renovate.json ├── LICENSE ├── .gitignore ├── SECURITY.md └── gitlint └── gitlint_emoji.py /src/backend/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/backend/core/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/backend/demo/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/backend/e2e/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/backend/wopi/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/backend/core/services/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/backend/core/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/backend/demo/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/backend/wopi/services/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/backend/wopi/tasks/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/backend/wopi/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/backend/core/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/backend/core/templatetags/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/backend/core/tests/swagger/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/backend/demo/management/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/backend/wopi/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/backend/wopi/tests/services/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/backend/wopi/tests/tasks/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/backend/wopi/tests/viewset/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/frontend/apps/sdk-consumer/src/App.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/backend/core/management/commands/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/backend/demo/management/commands/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/backend/e2e/management/commands/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/backend/core/tests/authentication/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/backend/core/tests/external_api/items/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/backend/wopi/tests/management_commands/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/frontend/apps/drive/src/features/explorer/api/useAccesses.tsx: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/frontend/apps/drive/.env: -------------------------------------------------------------------------------- 1 | NEXT_PUBLIC_S3_DOMAIN_REPLACE= 2 | NEXT_PUBLIC_API_ORIGIN= -------------------------------------------------------------------------------- /src/frontend/apps/drive/src/features/layouts/components/explorer/ExplorerLayout.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/frontend/apps/drive/__mocks__/fileMock.js: -------------------------------------------------------------------------------- 1 | module.exports = "test-file-stub"; 2 | 3 | -------------------------------------------------------------------------------- /src/frontend/apps/sdk-consumer/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /src/backend/wopi/management/commands/__init__.py: -------------------------------------------------------------------------------- 1 | """Management commands for the wopi app.""" 2 | -------------------------------------------------------------------------------- /src/frontend/apps/drive/src/features/errors/AppError.ts: -------------------------------------------------------------------------------- 1 | export class AppError extends Error {} 2 | -------------------------------------------------------------------------------- /src/frontend/packages/sdk/README.md: -------------------------------------------------------------------------------- 1 |
2 | 3 | # 🗂️ Drive SDK 4 | 5 |
6 | -------------------------------------------------------------------------------- /docs/assets/drive-UI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suitenumerique/drive/HEAD/docs/assets/drive-UI.png -------------------------------------------------------------------------------- /docs/assets/banner-drive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suitenumerique/drive/HEAD/docs/assets/banner-drive.png -------------------------------------------------------------------------------- /cron.json: -------------------------------------------------------------------------------- 1 | { 2 | "jobs": [ 3 | { 4 | "command": "0 0 * * * bin/scalingo_pgdump.sh" 5 | } 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /src/frontend/packages/sdk/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./Config"; 2 | export * from "./Types"; 3 | export * from "./Picker"; 4 | -------------------------------------------------------------------------------- /src/helm/drive/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | type: application 3 | name: drive 4 | version: 0.10.1 5 | appVersion: latest 6 | -------------------------------------------------------------------------------- /src/frontend/apps/drive/src/features/ui/components/infinite-scroll/index.ts: -------------------------------------------------------------------------------- 1 | export { InfiniteScroll } from "./InfiniteScroll"; 2 | -------------------------------------------------------------------------------- /src/frontend/apps/drive/src/features/ui/preview/pdf-preview/pdf-preview.scss: -------------------------------------------------------------------------------- 1 | .pdf-container__iframe { 2 | border: none; 3 | } 4 | -------------------------------------------------------------------------------- /env.d/development/crowdin: -------------------------------------------------------------------------------- 1 | CROWDIN_PERSONAL_TOKEN=Your-Personal-Token 2 | CROWDIN_PROJECT_ID=Your-Project-Id 3 | CROWDIN_BASE_PATH=/app/src 4 | -------------------------------------------------------------------------------- /src/frontend/apps/drive/.env.development: -------------------------------------------------------------------------------- 1 | NEXT_PUBLIC_S3_DOMAIN_REPLACE=http://localhost:9000 2 | NEXT_PUBLIC_API_ORIGIN=http://localhost:8071 3 | -------------------------------------------------------------------------------- /src/frontend/apps/drive/src/features/users/types.ts: -------------------------------------------------------------------------------- 1 | export type User = { 2 | id: string; 3 | name: string; 4 | email?: string; 5 | 6 | }; 7 | -------------------------------------------------------------------------------- /bin/start-kind.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | curl https://raw.githubusercontent.com/numerique-gouv/tools/refs/heads/main/kind/create_cluster.sh | bash -s -- drive 3 | -------------------------------------------------------------------------------- /src/frontend/apps/drive/public/assets/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suitenumerique/drive/HEAD/src/frontend/apps/drive/public/assets/favicon.png -------------------------------------------------------------------------------- /src/frontend/apps/drive/src/assets/grid_empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suitenumerique/drive/HEAD/src/frontend/apps/drive/src/assets/grid_empty.png -------------------------------------------------------------------------------- /src/frontend/apps/drive/src/assets/home/banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suitenumerique/drive/HEAD/src/frontend/apps/drive/src/assets/home/banner.png -------------------------------------------------------------------------------- /src/frontend/apps/drive/src/assets/search-dev.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suitenumerique/drive/HEAD/src/frontend/apps/drive/src/assets/search-dev.png -------------------------------------------------------------------------------- /src/frontend/packages/sdk/.env.development: -------------------------------------------------------------------------------- 1 | VITE_SDK_URL=http://localhost:3000/sdk 2 | VITE_SDK_API_URL=http://localhost:8071/api/v1.0 3 | VITE_SDK_DEBUG=True -------------------------------------------------------------------------------- /bin/manage: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # shellcheck source=bin/_config.sh 4 | source "$(dirname "${BASH_SOURCE[0]}")/_config.sh" 5 | 6 | _django_manage "$@" 7 | -------------------------------------------------------------------------------- /bin/compose: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # shellcheck source=bin/_config.sh 4 | source "$(dirname "${BASH_SOURCE[0]}")/_config.sh" 5 | 6 | _docker_compose "$@" 7 | -------------------------------------------------------------------------------- /src/frontend/apps/drive/public/assets/401-background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suitenumerique/drive/HEAD/src/frontend/apps/drive/public/assets/401-background.png -------------------------------------------------------------------------------- /src/frontend/apps/drive/public/assets/403-background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suitenumerique/drive/HEAD/src/frontend/apps/drive/public/assets/403-background.png -------------------------------------------------------------------------------- /src/frontend/apps/drive/public/assets/anct_favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suitenumerique/drive/HEAD/src/frontend/apps/drive/public/assets/anct_favicon.png -------------------------------------------------------------------------------- /src/frontend/apps/drive/src/assets/empty-selection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suitenumerique/drive/HEAD/src/frontend/apps/drive/src/assets/empty-selection.png -------------------------------------------------------------------------------- /src/frontend/apps/drive/src/features/i18n/conf.ts: -------------------------------------------------------------------------------- 1 | export const LANGUAGES_ALLOWED = ["en-us", "fr-fr"]; 2 | export const LANGUAGE_LOCAL_STORAGE = "main-language"; 3 | -------------------------------------------------------------------------------- /src/frontend/apps/drive/src/assets/mutliple-selection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suitenumerique/drive/HEAD/src/frontend/apps/drive/src/assets/mutliple-selection.png -------------------------------------------------------------------------------- /src/frontend/apps/drive/src/features/ui/preview/wopi/WopiEditor.scss: -------------------------------------------------------------------------------- 1 | .wopi-editor-iframe { 2 | width: 100%; 3 | height: calc(100vh - 52px); 4 | border: none; 5 | } 6 | -------------------------------------------------------------------------------- /src/frontend/apps/e2e/__tests__/app-drive/assets/pv_cm.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suitenumerique/drive/HEAD/src/frontend/apps/e2e/__tests__/app-drive/assets/pv_cm.pdf -------------------------------------------------------------------------------- /src/frontend/packages/sdk/src/Config.ts: -------------------------------------------------------------------------------- 1 | export const DEFAULT_CONFIG = { 2 | url: import.meta.env.VITE_SDK_URL, 3 | apiUrl: import.meta.env.VITE_SDK_API_URL, 4 | }; 5 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ## Purpose 2 | 3 | Description... 4 | 5 | 6 | ## Proposal 7 | 8 | Description... 9 | 10 | - [] item 1... 11 | - [] item 2... 12 | -------------------------------------------------------------------------------- /src/frontend/apps/drive/src/features/explorer/constants.ts: -------------------------------------------------------------------------------- 1 | export enum WorkspaceCategory { 2 | SHARED_SPACE = "SHARED_SPACE", 3 | PUBLIC_SPACE = "PUBLIC_SPACE", 4 | } 5 | -------------------------------------------------------------------------------- /src/frontend/apps/drive/public/assets/logo-suite-numerique.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suitenumerique/drive/HEAD/src/frontend/apps/drive/public/assets/logo-suite-numerique.png -------------------------------------------------------------------------------- /docs/examples/helm/redis.values.yaml: -------------------------------------------------------------------------------- 1 | redis: 2 | enabled: true 3 | name: redis 4 | #serviceNameOverride: redis 5 | image: redis:8.2-alpine 6 | username: user 7 | password: pass -------------------------------------------------------------------------------- /src/frontend/apps/e2e/__tests__/app-drive/assets/test-image.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suitenumerique/drive/HEAD/src/frontend/apps/e2e/__tests__/app-drive/assets/test-image.heic -------------------------------------------------------------------------------- /src/frontend/packages/sdk/.env.production: -------------------------------------------------------------------------------- 1 | VITE_SDK_URL=https://fichiers.suite.anct.gouv.fr/sdk 2 | VITE_SDK_API_URL=https://fichiers.suite.anct.gouv.fr/api/v1.0 3 | VITE_SDK_DEBUG=False -------------------------------------------------------------------------------- /bin/pytest: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | source "$(dirname "${BASH_SOURCE[0]}")/_config.sh" 4 | 5 | _dc_run \ 6 | -e DJANGO_CONFIGURATION=Test \ 7 | app-dev \ 8 | pytest "$@" 9 | -------------------------------------------------------------------------------- /src/backend/MANIFEST.in: -------------------------------------------------------------------------------- 1 | include LICENSE 2 | include README.md 3 | recursive-include src/backend/drive *.html *.png *.gif *.css *.ico *.jpg *.jpeg *.po *.mo *.eot *.svg *.ttf *.woff *.woff2 4 | -------------------------------------------------------------------------------- /src/frontend/apps/drive/src/features/explorer/components/app-view/ExplorerFilters.scss: -------------------------------------------------------------------------------- 1 | .explorer__filters__item { 2 | display: flex; 3 | align-items: center; 4 | gap: 0.5em; 5 | } 6 | -------------------------------------------------------------------------------- /src/frontend/apps/sdk-consumer/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [], 3 | "references": [ 4 | { "path": "./tsconfig.app.json" }, 5 | { "path": "./tsconfig.node.json" } 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /src/frontend/packages/sdk/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # @gouvfr-lasuite/drive-sdk 2 | 3 | ## 0.0.1 4 | 5 | ### Major Changes 6 | 7 | - First version including the File Picker via `openPicker` function. 8 | -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | web: bin/scalingo_run_web 2 | worker: celery -A drive.celery_app worker --task-events --beat -l INFO -c $DJANGO_CELERY_CONCURRENCY -Q celery,default 3 | postdeploy: python manage.py migrate 4 | -------------------------------------------------------------------------------- /src/backend/drive/__init__.py: -------------------------------------------------------------------------------- 1 | """Drive package. Import the celery app early to load shared task form dependencies.""" 2 | 3 | from .celery_app import app as celery_app 4 | 5 | __all__ = ["celery_app"] 6 | -------------------------------------------------------------------------------- /src/frontend/apps/drive/src/features/ui/components/spinner/SpinnerPage.scss: -------------------------------------------------------------------------------- 1 | .drive__spinner-page { 2 | display: flex; 3 | align-items: center; 4 | justify-content: center; 5 | height: 100vh; 6 | } 7 | -------------------------------------------------------------------------------- /src/backend/core/authentication/exceptions.py: -------------------------------------------------------------------------------- 1 | """Exceptions for the authentication module.""" 2 | 3 | 4 | class UserCannotAccessApp(Exception): 5 | """Exception raised when a user cannot access the app.""" 6 | -------------------------------------------------------------------------------- /src/frontend/apps/e2e/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Playwright 3 | node_modules/ 4 | /test-results/ 5 | /playwright-report/ 6 | /blob-report/ 7 | /playwright/.cache/ 8 | /playwright/.auth/ 9 | report/ 10 | screenshots/ -------------------------------------------------------------------------------- /src/mail/html-to-text.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "wordwrap": 600, 3 | "selectors": [ 4 | { 5 | "selector": "h1", 6 | "options": { 7 | "uppercase": false 8 | } 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /src/backend/wopi/apps.py: -------------------------------------------------------------------------------- 1 | """Wopi app configuration.""" 2 | 3 | from django.apps import AppConfig 4 | 5 | 6 | class WopiConfig(AppConfig): 7 | """Configuration class for the wopi app.""" 8 | 9 | name = "wopi" 10 | -------------------------------------------------------------------------------- /src/frontend/apps/drive/src/utils/useLayout.tsx: -------------------------------------------------------------------------------- 1 | import { useRouter } from "next/router"; 2 | 3 | export const useIsMinimalLayout = () => { 4 | const router = useRouter(); 5 | return router.query.minimal === "true"; 6 | }; 7 | -------------------------------------------------------------------------------- /src/frontend/apps/sdk-consumer/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vite.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }) 8 | -------------------------------------------------------------------------------- /src/frontend/packages/sdk/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [], 3 | "references": [ 4 | { 5 | "path": "./tsconfig.app.json" 6 | }, 7 | { 8 | "path": "./tsconfig.node.json" 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /docs/examples/helm/postgresql.values.yaml: -------------------------------------------------------------------------------- 1 | postgres: 2 | enabled: true 3 | name: postgres 4 | #serviceNameOverride: postgres 5 | image: postgres:16-alpine 6 | username: dinum 7 | password: pass 8 | database: dinum 9 | size: 1Gi -------------------------------------------------------------------------------- /src/frontend/apps/drive/src/utils/entitlements.ts: -------------------------------------------------------------------------------- 1 | import { getDriver } from "@/features/config/Config"; 2 | 3 | export const getEntitlements = async () => { 4 | const driver = getDriver(); 5 | return driver.getEntitlements(); 6 | }; 7 | -------------------------------------------------------------------------------- /src/frontend/apps/e2e/__tests__/app-drive/db.setup.ts: -------------------------------------------------------------------------------- 1 | import { test as setup } from "@playwright/test"; 2 | 3 | import { clearDb } from "./utils-common"; 4 | 5 | setup("clear the database", async () => { 6 | await clearDb(); 7 | }); 8 | -------------------------------------------------------------------------------- /src/frontend/packages/sdk/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | interface ImportMetaEnv { 4 | readonly VITE_SDK_URL: string; 5 | } 6 | 7 | interface ImportMeta { 8 | readonly env: ImportMetaEnv; 9 | } 10 | -------------------------------------------------------------------------------- /src/frontend/apps/drive/src/features/items/components/ItemInfo.scss: -------------------------------------------------------------------------------- 1 | .item-info { 2 | display: flex; 3 | flex-direction: column; 4 | gap: var(--c--globals--spacings--xs, 0.5rem); 5 | padding: var(--c--globals--spacings--base, 1rem); 6 | } 7 | -------------------------------------------------------------------------------- /bin/fernetkey: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # shellcheck source=bin/_config.sh 4 | source "$(dirname "${BASH_SOURCE[0]}")/_config.sh" 5 | 6 | _dc_run app-dev python -c 'from cryptography.fernet import Fernet;import sys; sys.stdout.write("\n" + Fernet.generate_key().decode() + "\n");' 7 | -------------------------------------------------------------------------------- /src/backend/demo/defaults.py: -------------------------------------------------------------------------------- 1 | """Parameters that define how the demo site will be built.""" 2 | 3 | NB_OBJECTS = {"users": 50, "files": 50, "max_users_per_document": 50} 4 | 5 | DEV_USERS = [ 6 | {"username": "drive", "email": "drive@drive.world", "language": "en-us"}, 7 | ] 8 | -------------------------------------------------------------------------------- /src/frontend/apps/drive/next.config.ts: -------------------------------------------------------------------------------- 1 | import type { NextConfig } from "next"; 2 | 3 | const nextConfig: NextConfig = { 4 | output: "export", 5 | debug: process.env.NODE_ENV === "development", 6 | reactStrictMode: false, 7 | }; 8 | 9 | export default nextConfig; 10 | -------------------------------------------------------------------------------- /env.d/development/postgresql: -------------------------------------------------------------------------------- 1 | # Postgresql db container configuration 2 | POSTGRES_DB=drive 3 | POSTGRES_USER=dinum 4 | POSTGRES_PASSWORD=pass 5 | 6 | # App database configuration 7 | DB_HOST=postgresql 8 | DB_NAME=drive 9 | DB_USER=dinum 10 | DB_PASSWORD=pass 11 | DB_PORT=5432 12 | -------------------------------------------------------------------------------- /src/frontend/apps/drive/src/features/layouts/components/global/GlobalLayout.scss: -------------------------------------------------------------------------------- 1 | nav { 2 | width: 100%; 3 | height: 52px; 4 | background-color: #fff; 5 | border: 1px grey solid; 6 | display: flex; 7 | justify-content: space-around; 8 | align-items: center; 9 | } 10 | -------------------------------------------------------------------------------- /src/frontend/apps/drive/src/features/drivers/implementations/ResanaDriver.ts: -------------------------------------------------------------------------------- 1 | // import { Driver } from "../Driver"; 2 | // import { Item } from "../types"; 3 | 4 | // export class ResanaDriver extends Driver { 5 | // async getItems(): Promise { 6 | // return []; 7 | // } 8 | // } 9 | -------------------------------------------------------------------------------- /env.d/development/kc_postgresql: -------------------------------------------------------------------------------- 1 | # Postgresql db container configuration 2 | POSTGRES_DB=keycloak 3 | POSTGRES_USER=drive 4 | POSTGRES_PASSWORD=pass 5 | 6 | # App database configuration 7 | DB_HOST=kc_postgresql 8 | DB_NAME=keycloak 9 | DB_USER=drive 10 | DB_PASSWORD=pass 11 | DB_PORT=5433 12 | -------------------------------------------------------------------------------- /env.d/development/postgresql.e2e: -------------------------------------------------------------------------------- 1 | # Postgresql db container configuration 2 | POSTGRES_DB=drive_e2e 3 | POSTGRES_USER=dinum 4 | POSTGRES_PASSWORD=pass 5 | 6 | # App database configuration 7 | DB_HOST=postgresql 8 | DB_NAME=drive_e2e 9 | DB_USER=dinum 10 | DB_PASSWORD=pass 11 | DB_PORT=5432 12 | -------------------------------------------------------------------------------- /src/frontend/apps/drive/src/features/ui/components/spinner/SpinnerPage.tsx: -------------------------------------------------------------------------------- 1 | import { Spinner } from "@gouvfr-lasuite/ui-kit"; 2 | 3 | export const SpinnerPage = () => { 4 | return ( 5 |
6 | 7 |
8 | ); 9 | }; 10 | -------------------------------------------------------------------------------- /src/mail/bin/mjml-to-html: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Run mjml command to convert all mjml templates to html files 4 | DIR_MAILS="../backend/core/templates/mail/html/" 5 | 6 | if [ ! -d "${DIR_MAILS}" ]; then 7 | mkdir -p "${DIR_MAILS}"; 8 | fi 9 | mjml mjml/*.mjml -o "${DIR_MAILS}"; 10 | -------------------------------------------------------------------------------- /src/frontend/apps/drive/src/features/drivers/utils.tsx: -------------------------------------------------------------------------------- 1 | import { Item, ItemType } from "./types"; 2 | 3 | export const itemIsWorkspace = (item: Item) => { 4 | if (item.main_workspace) { 5 | return false; 6 | } 7 | return item.type === ItemType.FOLDER && item.path.split(".").length === 1; 8 | }; 9 | -------------------------------------------------------------------------------- /src/frontend/apps/drive/src/utils/useQueries.ts: -------------------------------------------------------------------------------- 1 | import { UseQueryOptions } from "@tanstack/react-query"; 2 | 3 | 4 | export type HookUseQueryOptions2 = { 5 | enabled?: boolean; 6 | } 7 | 8 | 9 | 10 | 11 | export type HookUseQueryOptions = Omit, "queryKey" | "queryFn">; 12 | 13 | -------------------------------------------------------------------------------- /src/frontend/apps/drive/src/assets/icons/settings.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/frontend/apps/drive/src/features/ui/components/infinite-scroll/InfiniteScroll.scss: -------------------------------------------------------------------------------- 1 | .infinite-scroll { 2 | &__loading-component { 3 | display: flex; 4 | justify-content: center; 5 | padding: 10px; 6 | } 7 | 8 | &__trigger { 9 | min-height: 20px; 10 | margin-top: 10px; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/frontend/apps/sdk-consumer/src/main.tsx: -------------------------------------------------------------------------------- 1 | import { StrictMode } from 'react' 2 | import { createRoot } from 'react-dom/client' 3 | import './index.css' 4 | import App from './App.tsx' 5 | 6 | createRoot(document.getElementById('root')!).render( 7 | 8 | 9 | , 10 | ) 11 | -------------------------------------------------------------------------------- /src/backend/wopi/tests/conftest.py: -------------------------------------------------------------------------------- 1 | """Fixtures for tests in the drive wopi application""" 2 | 3 | from django.core.cache import cache 4 | 5 | import pytest 6 | 7 | 8 | @pytest.fixture(autouse=True) 9 | def clear_cache(): 10 | """Fixture to clear the cache before each test.""" 11 | yield 12 | cache.clear() 13 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /src/frontend/apps/drive/src/features/layouts/components/global/GlobalLayout.tsx: -------------------------------------------------------------------------------- 1 | import { Auth } from "@/features/auth/Auth"; 2 | 3 | /** 4 | * This layout is used for the global contexts (auth, etc). 5 | */ 6 | export const GlobalLayout = ({ children }: { children: React.ReactNode }) => { 7 | return {children}; 8 | }; 9 | -------------------------------------------------------------------------------- /src/frontend/apps/drive/src/pages/_document.tsx: -------------------------------------------------------------------------------- 1 | import { Html, Head, Main, NextScript } from "next/document"; 2 | 3 | export default function Document() { 4 | return ( 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | ); 13 | } 14 | -------------------------------------------------------------------------------- /src/frontend/apps/drive/src/features/items/utils.ts: -------------------------------------------------------------------------------- 1 | export const downloadFile = async (url: string, title: string) => { 2 | const a = document.createElement("a"); 3 | a.style.display = "none"; 4 | a.href = url; 5 | a.download = title; 6 | document.body.appendChild(a); 7 | a.click(); 8 | document.body.removeChild(a); 9 | }; -------------------------------------------------------------------------------- /src/frontend/apps/drive/src/features/ui/components/responsive/index.scss: -------------------------------------------------------------------------------- 1 | @use "sass:map"; 2 | @use "@/styles/cunningham-tokens-sass" as *; 3 | 4 | $tablet: map.get($themes, "default", "globals", "breakpoints", "tablet"); 5 | 6 | #responsive-tablet { 7 | display: none; 8 | 9 | @media (max-width: $tablet) { 10 | display: block; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /bin/clear_db_e2e.sql: -------------------------------------------------------------------------------- 1 | DO $$ 2 | DECLARE r RECORD; 3 | BEGIN 4 | FOR r IN (SELECT tablename FROM pg_tables WHERE schemaname = 'public' AND tablename != 'django_migrations') 5 | LOOP 6 | RAISE NOTICE 'Truncating table %', r.tablename; 7 | EXECUTE 'TRUNCATE TABLE ' || quote_ident(r.tablename) || ' CASCADE'; 8 | END LOOP; 9 | END $$; 10 | -------------------------------------------------------------------------------- /src/backend/e2e/utils.py: -------------------------------------------------------------------------------- 1 | """E2E utils.""" 2 | 3 | from core import factories, models 4 | 5 | 6 | def get_or_create_e2e_user(email): 7 | """Get or create an E2E user.""" 8 | user = models.User.objects.filter(email=email).first() 9 | if not user: 10 | user = factories.UserFactory(email=email, sub=None, language="en-us") 11 | return user 12 | -------------------------------------------------------------------------------- /bin/scalingo_postcompile: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -o errexit # always exit on error 4 | set -o pipefail # don't ignore exit codes when piping output 5 | 6 | echo "-----> Running post-compile script" 7 | 8 | # Remove all the files we don't need 9 | rm -rf src docker env.d .cursor .github compose.yaml README.md .cache 10 | 11 | chmod +x bin/scalingo_run_web 12 | -------------------------------------------------------------------------------- /src/frontend/apps/drive/src/features/config/useApiConfig.ts: -------------------------------------------------------------------------------- 1 | import { useQuery } from "@tanstack/react-query"; 2 | import { getDriver } from "./Config"; 3 | 4 | export function useApiConfig() { 5 | const driver = getDriver(); 6 | return useQuery({ 7 | queryKey: ["config"], 8 | queryFn: () => driver.getConfig(), 9 | staleTime: 1000, 10 | }); 11 | } 12 | -------------------------------------------------------------------------------- /src/frontend/apps/drive/src/features/ui/preview/pdf-preview/PreviewPdf.tsx: -------------------------------------------------------------------------------- 1 | interface PreviewPdfProps { 2 | src?: string; 3 | } 4 | 5 | export const PreviewPdf = ({ src }: PreviewPdfProps) => { 6 | return ( 7 |