Removed temp fix
This commit is contained in:
+1
-1
@@ -54,7 +54,7 @@ export class CompanyApplicationController
|
||||
|
||||
return {
|
||||
resources: resources.getEntities().map(ca => ca.application),
|
||||
next_page_token: resources.nextPage.page_token,
|
||||
next_page_token: resources.nextPage?.page_token,
|
||||
websockets:
|
||||
gr.platformServices.realtime.sign(
|
||||
getCompanyApplicationRooms(request.params.company_id),
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
import { Application } from '../types/application';
|
||||
|
||||
export const replaceOnlyOfficeForCanary = (applications: Application[]) => {
|
||||
return applications.map(application => {
|
||||
if (
|
||||
application?.identity?.code === 'only_office' &&
|
||||
!application.display?.tdrive?.files?.editor?.preview_url?.includes('plugins.tdrive.app')
|
||||
) {
|
||||
return {
|
||||
...application,
|
||||
display: {
|
||||
tdrive: {
|
||||
version: 1,
|
||||
files: {
|
||||
editor: {
|
||||
preview_url: 'https://plugins.tdrive.app/plugins/onlyoffice/?preview=1',
|
||||
edition_url: 'https://plugins.tdrive.app/plugins/onlyoffice/',
|
||||
empty_files: [
|
||||
{
|
||||
url: 'https://plugins.tdrive.app/plugins/onlyoffice/assets/empty.docx',
|
||||
filename: 'Untitled.docx',
|
||||
name: 'ONLYOFFICE Word Document',
|
||||
},
|
||||
{
|
||||
url: 'https://plugins.tdrive.app/plugins/onlyoffice/assets/empty.xlsx',
|
||||
filename: 'Untitled.xlsx',
|
||||
name: 'ONLYOFFICE Excel Document',
|
||||
},
|
||||
{
|
||||
url: 'https://plugins.tdrive.app/plugins/onlyoffice/assets/empty.pptx',
|
||||
filename: 'Untitled.pptx',
|
||||
name: 'ONLYOFFICE PowerPoint Document',
|
||||
},
|
||||
],
|
||||
extensions: [
|
||||
'xlsx',
|
||||
'pptx',
|
||||
'docx',
|
||||
'xls',
|
||||
'ppt',
|
||||
'doc',
|
||||
'odt',
|
||||
'ods',
|
||||
'odp',
|
||||
'txt',
|
||||
'html',
|
||||
'csv',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
return application;
|
||||
});
|
||||
};
|
||||
@@ -1,7 +1,6 @@
|
||||
import { useEffect, useRef, useState } from 'react';
|
||||
import { Application } from 'app/features/applications/types/application';
|
||||
import ApplicationsAPIClient from '../api/applications-api-client';
|
||||
import { replaceOnlyOfficeForCanary } from './temp-fix';
|
||||
|
||||
export function useApplications() {
|
||||
const [loading, setLoading] = useState<boolean>(true);
|
||||
@@ -21,7 +20,7 @@ export function useApplications() {
|
||||
}, []);
|
||||
|
||||
return {
|
||||
applications: applications && replaceOnlyOfficeForCanary(applications),
|
||||
applications: applications,
|
||||
loading,
|
||||
search,
|
||||
};
|
||||
|
||||
@@ -15,7 +15,6 @@ import { LoadingState } from 'app/features/global/state/atoms/Loading';
|
||||
import useRouterWorkspace from 'app/features/router/hooks/use-router-workspace';
|
||||
import { useGlobalEffect } from 'app/features/global/hooks/use-global-effect';
|
||||
import useRouterCompany from 'app/features/router/hooks/use-router-company';
|
||||
import { replaceOnlyOfficeForCanary } from './temp-fix';
|
||||
|
||||
const logger = Logger.getLogger('useApplications');
|
||||
/**
|
||||
@@ -93,7 +92,7 @@ export function useCompanyApplications(companyId = '') {
|
||||
const isInstalled = (applicationId: string) => (get(applicationId) ? true : false);
|
||||
|
||||
return {
|
||||
applications: replaceOnlyOfficeForCanary(applications),
|
||||
applications: applications,
|
||||
get,
|
||||
loading,
|
||||
add,
|
||||
|
||||
Reference in New Issue
Block a user