🐛 Fix antivirus status for shared view (#745)
🐛 Fix antivirus status for shared view
This commit is contained in:
@@ -8,7 +8,7 @@ import Login from '@views/login/login';
|
|||||||
import Logout from '@views/login/logout';
|
import Logout from '@views/login/logout';
|
||||||
import Error from '@views/error';
|
import Error from '@views/error';
|
||||||
import Join from '@views/join';
|
import Join from '@views/join';
|
||||||
import PublicMainView from '@views/client/body/drive/shared';
|
import PublicMainView from '@views/client/body/drive/shared-view';
|
||||||
import Observable from '../../../deprecated/Observable/Observable';
|
import Observable from '../../../deprecated/Observable/Observable';
|
||||||
import { getWorkspacesByCompany } from '@features/workspaces/state/workspace-list';
|
import { getWorkspacesByCompany } from '@features/workspaces/state/workspace-list';
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
import { lazy, Suspense } from 'react';
|
||||||
|
const Shared = lazy(() => import('@views/client/body/drive/shared'));
|
||||||
|
|
||||||
|
export default () => {
|
||||||
|
return (
|
||||||
|
<Suspense fallback={<></>}>
|
||||||
|
<Shared />
|
||||||
|
</Suspense>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -3,6 +3,7 @@ import { useEffect, useState } from 'react';
|
|||||||
import MenusBodyLayer from '@components/menus/menus-body-layer';
|
import MenusBodyLayer from '@components/menus/menus-body-layer';
|
||||||
import Api from '@features/global/framework/api-service';
|
import Api from '@features/global/framework/api-service';
|
||||||
import Languages from '@features/global/services/languages-service';
|
import Languages from '@features/global/services/languages-service';
|
||||||
|
import { useFeatureToggles } from '@components/locked-features-components/feature-toggles-hooks';
|
||||||
import { addApiUrlIfNeeded } from '@features/global/utils/URLUtils';
|
import { addApiUrlIfNeeded } from '@features/global/utils/URLUtils';
|
||||||
import RouterService from '@features/router/services/router-service';
|
import RouterService from '@features/router/services/router-service';
|
||||||
import Drive from '@views/client/body/drive';
|
import Drive from '@views/client/body/drive';
|
||||||
@@ -28,6 +29,7 @@ import LocalStorage from 'app/features/global/framework/local-storage-service';
|
|||||||
|
|
||||||
export default () => {
|
export default () => {
|
||||||
const companyId = useRouterCompany();
|
const companyId = useRouterCompany();
|
||||||
|
const { FeatureToggles, activeFeatureNames } = useFeatureToggles();
|
||||||
|
|
||||||
//Create a different local storage for shared view
|
//Create a different local storage for shared view
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -61,34 +63,38 @@ export default () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col h-full w-full dark:bg-zinc-900">
|
<FeatureToggles features={activeFeatureNames}>
|
||||||
<div className="flex flex-row items-center justify-center bg-blue-500 px-4 py-2">
|
<>
|
||||||
<div className="grow flex flex-row items-center">
|
<div className="flex flex-col h-full w-full dark:bg-zinc-900">
|
||||||
{group.logo && (
|
<div className="flex flex-row items-center justify-center bg-blue-500 px-4 py-2">
|
||||||
<Avatar avatar={group.logo} className="inline-block mr-3" size="sm" type="square" />
|
<div className="grow flex flex-row items-center">
|
||||||
)}
|
{group.logo && (
|
||||||
<span className="text-white font-semibold" style={{ lineHeight: '32px' }}>
|
<Avatar avatar={group.logo} className="inline-block mr-3" size="sm" type="square" />
|
||||||
Twake Drive
|
)}
|
||||||
</span>
|
<span className="text-white font-semibold" style={{ lineHeight: '32px' }}>
|
||||||
|
Twake Drive
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div className="shrink-0">
|
||||||
|
<a href="https://twake.app" target="_BLANK" rel="noreferrer" className="!text-white">
|
||||||
|
<span className="nomobile text-white">
|
||||||
|
{Languages.t('scenes.app.mainview.create_account')}
|
||||||
|
</span>
|
||||||
|
Twake Workplace 👉
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="h-full main-view public p-4 pb-16">
|
||||||
|
<AccessChecker folderId={documentId} token={token}>
|
||||||
|
<Drive initialParentId={documentId} inPublicSharing={true} />
|
||||||
|
</AccessChecker>
|
||||||
|
</div>
|
||||||
|
<MenusBodyLayer />
|
||||||
|
<UploadsViewer />
|
||||||
|
<CreateModalWithUploadZones initialParentId={documentId} />
|
||||||
</div>
|
</div>
|
||||||
<div className="shrink-0">
|
</>
|
||||||
<a href="https://twake.app" target="_BLANK" rel="noreferrer" className="!text-white">
|
</FeatureToggles>
|
||||||
<span className="nomobile text-white">
|
|
||||||
{Languages.t('scenes.app.mainview.create_account')}
|
|
||||||
</span>
|
|
||||||
Twake Workplace 👉
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className="h-full main-view public p-4 pb-16">
|
|
||||||
<AccessChecker folderId={documentId} token={token}>
|
|
||||||
<Drive initialParentId={documentId} inPublicSharing={true} />
|
|
||||||
</AccessChecker>
|
|
||||||
</div>
|
|
||||||
<MenusBodyLayer />
|
|
||||||
<UploadsViewer />
|
|
||||||
<CreateModalWithUploadZones initialParentId={documentId} />
|
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user