Sync-in · Sovereign platform for file storage, sharing, synchronization, and collaboration.
TypeScript cloud-alternativecollaborationcollaborative-editingdropboxfile-serverfile-sharingfile-storagefile-syncfull-text-searchhomelabnextcloudon-premiseopen-sourceprivacy-firstprivate-cloudrealtimesecureself-hostedstorage-serverwebdav
feat(backend:files): add Euro-Office editor support
johaven9fe93bdd3898
diff --git a/backend/src/app.bootstrap.ts b/backend/src/app.bootstrap.tsindex 63b4e3c1..b612e044 100644--- a/backend/src/app.bootstrap.ts+++ b/backend/src/app.bootstrap.ts@@ -61,7 +61,10 @@ export async function appBootstrap(): Promise<NestFastifyApplication> {/* SECURITY */await app.register(fastifyHelmet, {contentSecurityPolicy: CONTENT_SECURITY_POLICY(- configuration.applications.files.editors.onlyoffice.externalServer,+ (configuration.applications.files.editors.onlyoffice.enabled+ ? configuration.applications.files.editors.onlyoffice+ : configuration.applications.files.editors.eurooffice+ ).externalServer,configuration.applications.files.editors.collabora.externalServer)})diff --git a/backend/src/applications/files/editors/file-editor-providers.interface.ts b/backend/src/applications/files/editors/file-editor-providers.interface.tsindex 6b9f407d..13a89017 100644--- a/backend/src/applications/files/editors/file-editor-providers.interface.ts+++ b/backend/src/applications/files/editors/file-editor-providers.interface.ts@@ -1,4 +1,5 @@export interface FileEditorProviders {collabora: boolean+ eurooffice: booleanonlyoffice: boolean}diff --git a/backend/src/applications/files/editors/only-office/only-office-manager.service.ts b/backend/src/applications/files/editors/only-office/only-office-manager.service.tsindex 0b6bd6d2..c7859c7e 100644--- a/backend/src/applications/files/editors/only-office/only-office-manager.service.ts+++ b/backend/src/applications/files/editors/only-office/only-office-manager.service.ts@@ -38,6 +38,7 @@ import {writeFromStream} from '../../utils/files'import {+ EURO_OFFICE_APP_LOCK,ONLY_OFFICE_APP_LOCK,ONLY_OFFICE_CACHE_KEY,ONLY_OFFICE_CONVERT_ERROR,@@ -55,8 +56,12 @@ import { ACTION } from '../../../../common/constants'@Injectable()export class OnlyOfficeManager {private logger = new Logger(OnlyOfficeManager.name)- private readonly externalOnlyOfficeServer = configuration.applications.files.editors.onlyoffice.externalServer || null- private readonly rejectUnauthorized: boolean = !configuration.applications.files.editors.onlyoffice?.verifySSL+ private readonly officeConfig = configuration.applications.files.editors.onlyoffice.enabled+ ? configuration.applications.files.editors.onlyoffice+ : configuration.applications.files.editors.eurooffice+ private readonly officeAppLock = configuration.applications.files.editors.onlyoffice.enabled ? ONLY_OFFICE_APP_LOCK : EURO_OFFICE_APP_LOCK+ private readonly externalOnlyOfficeServer = this.officeConfig.externalServer || null+ private readonly rejectUnauthorized: boolean = !this.officeConfig.verifySSLprivate readonly convertUrl = this.externalOnlyOfficeServer ? `${this.externalOnlyOfficeServer}/ConvertService.ashx` : nullprivate readonly expiration = convertHumanTimeToSeconds(configuration.auth.token.refresh.expiration)private readonly mobileRegex: RegExp = /android|webos|iphone|ipad|ipod|blackberry|windows phone|opera mini|iemobile|mobile/i@@ -87,7 +92,7 @@ export class OnlyOfficeManager {try {await this.filesLockManager.checkConflicts(space.dbFile, DEPTH.RESOURCE, {userId: user.id,- app: ONLY_OFFICE_APP_LOCK,+ app: this.officeAppLock,lockScope: LOCK_SCOPE.SHARED})} catch (e) {@@ -110,7 +115,7 @@ export class OnlyOfficeManager {}async callBack(user: UserModel, space: SpaceEnv, token: string) {- const callBackData: OnlyOfficeCallBack = await this.jwt.verifyAsync(token, { secret: configuration.applications.files.editors.onlyoffice.secret })+ const callBackData: OnlyOfficeCallBack = await this.jwt.verifyAsync(token, { secret: this.officeConfig.secret })try {switch (callBackData.status) {case 1:@@ -230,7 +235,7 @@ export class OnlyOfficeManager {}private genPayloadToken(payload: OnlyOfficeConfig | OnlyOfficeConvertForm): Promise<string> {- return this.jwt.signAsync(payload, { secret: configuration.applications.files.editors.onlyoffice.secret, expiresIn: 60 })+ return this.jwt.signAsync(payload, { secret: this.officeConfig.secret, expiresIn: 60 })}private genAuthToken(user: UserModel): Promise<string> {@@ -277,7 +282,7 @@ export class OnlyOfficeManager {const [ok, _fileLock] = await this.filesLockManager.create(user,space.dbFile,- ONLY_OFFICE_APP_LOCK,+ this.officeAppLock,DEPTH.RESOURCE,{lockRoot: null,diff --git a/backend/src/applications/files/editors/only-office/only-office.constants.ts b/backend/src/applications/files/editors/only-office/only-office.constants.tsindex 0bde9848..29d59117 100644--- a/backend/src/applications/files/editors/only-office/only-office.constants.ts+++ b/backend/src/applications/files/editors/only-office/only-office.constants.ts@@ -2,6 +2,7 @@ export const ONLY_OFFICE_INTERNAL_URI = '/onlyoffice' // used by nginx as a proxexport const ONLY_OFFICE_CONTEXT = 'OnlyOfficeEnvironment' as constexport const ONLY_OFFICE_TOKEN_QUERY_PARAM_NAME = 'token' as constexport const ONLY_OFFICE_APP_LOCK = 'OnlyOffice' as const+export const EURO_OFFICE_APP_LOCK = 'Euro-Office' as const// cache only office = `office|${fileId}` => docKeyexport const ONLY_OFFICE_CACHE_KEY = 'foffice' as constexport const ONLY_OFFICE_EXTENSIONS = new Map<string, 'word' | 'cell' | 'slide' | 'pdf' | 'diagram'>([diff --git a/backend/src/applications/files/files.config.ts b/backend/src/applications/files/files.config.tsindex d96af88c..0926974e 100644--- a/backend/src/applications/files/files.config.ts+++ b/backend/src/applications/files/files.config.ts@@ -68,6 +68,11 @@ export class FilesEditorsConfig {@Type(() => OnlyOfficeConfig)onlyoffice: OnlyOfficeConfig = new OnlyOfficeConfig()+ @IsNotEmptyObject()+ @ValidateNested()+ @Type(() => OnlyOfficeConfig)+ eurooffice: OnlyOfficeConfig = new OnlyOfficeConfig()+@IsNotEmptyObject()@ValidateNested()@Type(() => CollaboraOnlineConfig)diff --git a/backend/src/applications/files/files.module.ts b/backend/src/applications/files/files.module.tsindex 6a19eab9..6bec636b 100644--- a/backend/src/applications/files/files.module.ts+++ b/backend/src/applications/files/files.module.ts@@ -25,7 +25,9 @@ import { FilesTrashRetention } from './services/files-trash-retention.service'@Module({imports: [- ...(configuration.applications.files.editors.onlyoffice.enabled ? [OnlyOfficeModule] : []),+ ...(configuration.applications.files.editors.onlyoffice.enabled || configuration.applications.files.editors.eurooffice.enabled+ ? [OnlyOfficeModule]+ : []),...(configuration.applications.files.editors.collabora.enabled ? [CollaboraOnlineModule] : [])],controllers: [FilesController, FilesTasksController],diff --git a/backend/src/applications/files/interfaces/file-lock.interface.ts b/backend/src/applications/files/interfaces/file-lock.interface.tsindex 4793c339..df0c3726 100644--- a/backend/src/applications/files/interfaces/file-lock.interface.ts+++ b/backend/src/applications/files/interfaces/file-lock.interface.ts@@ -2,9 +2,14 @@ import { SERVER_NAME } from '../../../common/shared'import { Owner } from '../../users/interfaces/owner.interface'import { LOCK_DEPTH, LOCK_SCOPE, WEBDAV_APP_LOCK } from '../../webdav/constants/webdav'import { COLLABORA_APP_LOCK } from '../editors/collabora-online/collabora-online.constants'-import { ONLY_OFFICE_APP_LOCK } from '../editors/only-office/only-office.constants'+import { EURO_OFFICE_APP_LOCK, ONLY_OFFICE_APP_LOCK } from '../editors/only-office/only-office.constants'-export type LOCK_APP = typeof WEBDAV_APP_LOCK | typeof COLLABORA_APP_LOCK | typeof ONLY_OFFICE_APP_LOCK | typeof SERVER_NAME+export type LOCK_APP =+ | typeof WEBDAV_APP_LOCK+ | typeof COLLABORA_APP_LOCK+ | typeof ONLY_OFFICE_APP_LOCK+ | typeof EURO_OFFICE_APP_LOCK+ | typeof SERVER_NAME// Optional lock parametersexport interface FileLockOptions {diff --git a/backend/src/configuration/config.environment.ts b/backend/src/configuration/config.environment.tsindex a569153c..58065e76 100755--- a/backend/src/configuration/config.environment.ts+++ b/backend/src/configuration/config.environment.ts@@ -17,6 +17,7 @@ export const serverConfig: ServerConfig = {files: {editors: {collabora: configuration.applications.files.editors.collabora.enabled,+ eurooffice: configuration.applications.files.editors.eurooffice.enabled,onlyoffice: configuration.applications.files.editors.onlyoffice.enabled},sampleDocuments: getDocumentTypes(configuration.applications.files.sampleDocuments)diff --git a/docker/config/eurooffice/docker-compose.eurooffice.yaml b/docker/config/eurooffice/docker-compose.eurooffice.yamlnew file mode 100644index 00000000..aedba46d--- /dev/null+++ b/docker/config/eurooffice/docker-compose.eurooffice.yaml@@ -0,0 +1,16 @@+services:+ eurooffice:+ image: ghcr.io/euro-office/documentserver:v9.3.1+ container_name: eurooffice+ restart: always+ environment:+ - JWT_SECRET=euroOfficeSecret+ - JWT_IN_BODY=true+ - USE_UNAUTHORIZED_STORAGE=true+ logging:+ driver: json-file+ options:+ max-size: "25m"+ max-file: "5"+ networks:+ - sync_in_network\ No newline at end of filediff --git a/docker/config/nginx/eurooffice.conf b/docker/config/nginx/eurooffice.confnew file mode 100644index 00000000..30b412a0--- /dev/null+++ b/docker/config/nginx/eurooffice.conf@@ -0,0 +1,12 @@+location ^~ /onlyoffice/ {+ proxy_pass http://eurooffice:80/;+ proxy_set_header X-Real-IP $remote_addr;+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;+ proxy_set_header X-Forwarded-Host $host/onlyoffice;+ proxy_set_header X-Forwarded-Proto $scheme;+ proxy_set_header Host $host;+ proxy_set_header Upgrade $http_upgrade;+ proxy_set_header Connection $connection_upgrade;+ proxy_no_cache 1;+ proxy_cache_bypass 1;+}\ No newline at end of filediff --git a/docker/config/nginx/nginx.conf b/docker/config/nginx/nginx.confindex 022adf8d..13b3f432 100644--- a/docker/config/nginx/nginx.conf+++ b/docker/config/nginx/nginx.conf@@ -86,4 +86,9 @@ server {# and you are not using an external URL.# Uncomment the line below to enable it:# include onlyoffice.conf;++ # NOTE: This is only needed when the Euro-Office Docker container is running locally+ # and you are not using an external URL.+ # Uncomment the line below to enable it:+ # include eurooffice.conf;}\ No newline at end of filediff --git a/docker/config/onlyoffice/docker-compose.onlyoffice.yaml b/docker/config/onlyoffice/docker-compose.onlyoffice.yamlindex bb4419d3..03f63880 100644--- a/docker/config/onlyoffice/docker-compose.onlyoffice.yaml+++ b/docker/config/onlyoffice/docker-compose.onlyoffice.yaml@@ -1,6 +1,6 @@services:onlyoffice:- image: onlyoffice/documentserver:9.3+ image: onlyoffice/documentserver:9.3.1.2container_name: onlyofficerestart: alwaysenvironment:diff --git a/docker/docker-compose.yaml b/docker/docker-compose.yamlindex 295546a9..eaba0af4 100644--- a/docker/docker-compose.yaml+++ b/docker/docker-compose.yaml@@ -2,6 +2,7 @@# - ./config/nginx/docker-compose.nginx.yaml# - ./config/onlyoffice/docker-compose.onlyoffice.yaml# - ./config/collabora/docker-compose.collabora.yaml+# - ./config/eurooffice/docker-compose.eurooffice.yaml# - ./config/sync-in-desktop-releases/docker-compose.sync-in-desktop-releases.yamlname: sync-indiff --git a/environment/environment.dist.yaml b/environment/environment.dist.yamlindex bb84a31e..f1156719 100755--- a/environment/environment.dist.yaml+++ b/environment/environment.dist.yaml@@ -385,6 +385,20 @@ applications:# If you use https, set to `true`.# default: falseverifySSL: false+ eurooffice:+ # enable Euro-Office integration+ # default: false+ enabled: false+ # Secret used for jwt tokens, it must be the same on the Euro-Office server+ # required+ secret: 'euroOfficeSecret'+ # If an external server is configured, it will be used.+ # Note: make sure it is accessible from the client/browser.+ # default: null+ externalServer:+ # If you use https, set to `true`.+ # default: false+ verifySSL: falsecollabora:# enable collabora online integration# default: falsediff --git a/frontend/src/app/applications/files/components/dialogs/files-viewer-dialog.component.html b/frontend/src/app/applications/files/components/dialogs/files-viewer-dialog.component.htmlindex 6da12ea3..5764a813 100644--- a/frontend/src/app/applications/files/components/dialogs/files-viewer-dialog.component.html+++ b/frontend/src/app/applications/files/components/dialogs/files-viewer-dialog.component.html@@ -6,7 +6,7 @@@if (canToggleViewer) {<button (click)="toggleViewer()" class="btn btn-sm btn-primary me-2" type="button"><fa-icon [icon]="isReadonly() ? icons.faPen : icons.faEye"></fa-icon>- <span class="d-none d-sm-inline ms-2" l10nTranslate>{{ isReadonly() ? 'Edit in OnlyOffice' : 'View in PDF.js' }}</span>+ <span class="d-none d-sm-inline ms-2" l10nTranslate>{{ isReadonly() ? editOfficeEditorText : 'View in PDF.js' }}</span></button>}<button (click)="onMinimize()" aria-label="Minimize" class="btn-minimize btn-minimize-white" [class.ms-1]="canToggleViewer" type="button"></button>@@ -32,7 +32,7 @@} @else if (editorProvider.collabora) {<app-files-viewer-collabora-online [currentHeight]="currentHeight" [file]="currentFile"[(isReadonly)]="isReadonly"></app-files-viewer-collabora-online>- } @else if (editorProvider.onlyoffice) {+ } @else if (editorProvider.onlyoffice || editorProvider.eurooffice) {<app-files-viewer-only-office [currentHeight]="currentHeight" [file]="currentFile"[(isReadonly)]="isReadonly"></app-files-viewer-only-office>} @else {diff --git a/frontend/src/app/applications/files/components/dialogs/files-viewer-dialog.component.ts b/frontend/src/app/applications/files/components/dialogs/files-viewer-dialog.component.tsindex 1d05d582..edcdded7 100644--- a/frontend/src/app/applications/files/components/dialogs/files-viewer-dialog.component.ts+++ b/frontend/src/app/applications/files/components/dialogs/files-viewer-dialog.component.ts@@ -96,6 +96,14 @@ export class FilesViewerDialogComponent implements OnInit, OnDestroy {}}+ protected get officeEditorName(): string {+ return this.store.server().files.editors.onlyoffice ? 'OnlyOffice' : 'Euro-Office'+ }++ protected get editOfficeEditorText(): string {+ return `Edit in ${this.officeEditorName}`+ }+private onResize() {this.currentHeight = window.innerHeight - this.offsetTop}diff --git a/frontend/src/app/applications/files/components/dialogs/files-viewer-select-dialog.component.html b/frontend/src/app/applications/files/components/dialogs/files-viewer-select-dialog.component.htmlindex ad966a0b..127bfc36 100755--- a/frontend/src/app/applications/files/components/dialogs/files-viewer-select-dialog.component.html+++ b/frontend/src/app/applications/files/components/dialogs/files-viewer-select-dialog.component.html@@ -36,19 +36,19 @@</div></button></div>- <!-- OnlyOffice -->+ <!-- OnlyOffice-compatible --><div class="col-12 col-md-6"><buttontype="button"class="editor-choice is-onlyoffice w-100 btn p-0 border-0 text-start"- (click)="selectEditor('onlyoffice')">+ (click)="selectEditor(officeEditorProvider)"><div class="card h-100 shadow-sm editor-card"><div class="card-body d-flex align-items-center gap-3 p-3"><div class="editor-badge bg-primary-subtle text-primary"><fa-icon [icon]="icons.faFileWord"></fa-icon></div><div class="flex-grow-1">- <h3 class="text-bold mb-1">OnlyOffice</h3>+ <h3 class="text-bold mb-1">{{ officeEditorName }}</h3><div class="text-muted fs-2xs" l10nTranslate>Open-source office suite for Microsoft Office.</div>@@ -69,4 +69,4 @@Remember my choice for next time</label></div>-</div>\ No newline at end of file+</div>diff --git a/frontend/src/app/applications/files/components/dialogs/files-viewer-select-dialog.component.ts b/frontend/src/app/applications/files/components/dialogs/files-viewer-select-dialog.component.tsindex b99c74f2..50ba0c8c 100644--- a/frontend/src/app/applications/files/components/dialogs/files-viewer-select-dialog.component.ts+++ b/frontend/src/app/applications/files/components/dialogs/files-viewer-select-dialog.component.ts@@ -6,6 +6,7 @@ import { faArrowRight } from '@fortawesome/free-solid-svg-icons'import type { FileEditorProviders } from '@sync-in-server/backend/src/applications/files/editors/file-editor-providers.interface'import { L10N_LOCALE, L10nLocale, L10nTranslateDirective } from 'angular-l10n'import { LayoutService } from '../../../../layout/layout.service'+import { StoreService } from '../../../../store/store.service'import { UserService } from '../../../users/user.service'import { FileModel } from '../../models/file.model'@@ -22,8 +23,17 @@ export class FilesViewerSelectDialog {protected readonly icons = { faFile, faFileWord, faArrowRight, faFileLines }protected readonly locale = inject<L10nLocale>(L10N_LOCALE)protected layout = inject(LayoutService)+ private readonly store = inject(StoreService)private readonly userService = inject(UserService)+ protected get officeEditorProvider(): keyof FileEditorProviders {+ return this.store.server().files.editors.onlyoffice ? 'onlyoffice' : 'eurooffice'+ }++ protected get officeEditorName(): string {+ return this.officeEditorProvider === 'eurooffice' ? 'Euro-Office' : 'OnlyOffice'+ }+selectEditor(editor: keyof FileEditorProviders) {if (this.rememberChoice) {this.userService.setEditorProviderPreference(editor)diff --git a/frontend/src/app/applications/files/components/viewers/files-viewer-only-office.component.ts b/frontend/src/app/applications/files/components/viewers/files-viewer-only-office.component.tsindex fa47b3e1..58e5d32d 100644--- a/frontend/src/app/applications/files/components/viewers/files-viewer-only-office.component.ts+++ b/frontend/src/app/applications/files/components/viewers/files-viewer-only-office.component.ts@@ -1,7 +1,7 @@import { HttpClient, HttpErrorResponse } from '@angular/common/http'import { Component, inject, input, model, OnDestroy, OnInit } from '@angular/core'import { FILE_MODE } from '@sync-in-server/backend/src/applications/files/constants/operations'-import { ONLY_OFFICE_APP_LOCK } from '@sync-in-server/backend/src/applications/files/editors/only-office/only-office.constants'+import { EURO_OFFICE_APP_LOCK, ONLY_OFFICE_APP_LOCK } from '@sync-in-server/backend/src/applications/files/editors/only-office/only-office.constants'import type { OnlyOfficeReqDto } from '@sync-in-server/backend/src/applications/files/editors/only-office/only-office.dtos'import { API_ONLY_OFFICE_SETTINGS } from '@sync-in-server/backend/src/applications/files/editors/only-office/only-office.routes'import { LayoutService } from '../../../../layout/layout.service'@@ -71,7 +71,7 @@ export class FilesViewerOnlyOfficeComponent implements OnInit, OnDestroy {fullName: this.store.user.getValue().fullName,email: this.store.user.getValue().email},- app: ONLY_OFFICE_APP_LOCK,+ app: this.store.server().files.editors.onlyoffice ? ONLY_OFFICE_APP_LOCK : EURO_OFFICE_APP_LOCK,isExclusive: false})}diff --git a/frontend/src/app/applications/files/models/file.model.ts b/frontend/src/app/applications/files/models/file.model.tsindex f70db5d3..87383e7f 100644--- a/frontend/src/app/applications/files/models/file.model.ts+++ b/frontend/src/app/applications/files/models/file.model.ts@@ -182,13 +182,13 @@ export class FileModel implements File {if (extension === SHORT_MIME.PDF) {this.shortMime = SHORT_MIME.PDFthis.isViewable = true- this.isEditable = editorConfig.onlyoffice === true+ this.isEditable = editorConfig.onlyoffice === true || editorConfig.eurooffice === truereturn mime || mimeFile}if ((editorConfig.collabora === true && COLLABORA_ONLINE_EXTENSIONS.has(extension)) ||- (editorConfig.onlyoffice === true && ONLY_OFFICE_EXTENSIONS.has(extension))+ ((editorConfig.onlyoffice === true || editorConfig.eurooffice === true) && ONLY_OFFICE_EXTENSIONS.has(extension))) {this.shortMime = SHORT_MIME.DOCUMENTthis.isEditable = truediff --git a/frontend/src/app/applications/files/services/files.service.ts b/frontend/src/app/applications/files/services/files.service.tsindex 2290416d..a9871250 100644--- a/frontend/src/app/applications/files/services/files.service.ts+++ b/frontend/src/app/applications/files/services/files.service.ts@@ -335,31 +335,33 @@ export class FilesService {this.layout.sendNotification('info', 'The file is locked', fileLockPropsToString(file.lock))}- const editorProvider: FileEditorProviders = { collabora: false, onlyoffice: false }+ const editorProvider: FileEditorProviders = { collabora: false, eurooffice: false, onlyoffice: false }if (hookedShortMime === SHORT_MIME.DOCUMENT) {- if (this.store.server().files.editors.collabora && this.store.server().files.editors.onlyoffice) {+ const officeEditorProvider: keyof FileEditorProviders = this.store.server().files.editors.onlyoffice ? 'onlyoffice' : 'eurooffice'+ const officeEditorEnabled = this.store.server().files.editors[officeEditorProvider]+ if (this.store.server().files.editors.collabora && officeEditorEnabled) {// Case with multiple editorsconst collaboraHasExtension = COLLABORA_ONLINE_EXTENSIONS.has(file.getExtension())- const onlyofficeHasExtension = ONLY_OFFICE_EXTENSIONS.has(file.getExtension())- if (collaboraHasExtension && onlyofficeHasExtension) {+ const officeEditorHasExtension = ONLY_OFFICE_EXTENSIONS.has(file.getExtension())+ if (collaboraHasExtension && officeEditorHasExtension) {// Get user's saved preferenceconst userEditorPreference = this.userService.getEditorProviderPreference()- if (userEditorPreference && userEditorPreference in editorProvider) {+ if (userEditorPreference === 'collabora' || userEditorPreference === officeEditorProvider) {editorProvider[userEditorPreference] = true} else {// Both editors support this file extension, let the user chooseawait this.openSelectViewerDialog(file, editorProvider)- if (!editorProvider.onlyoffice && !editorProvider.collabora) return+ if (!editorProvider.onlyoffice && !editorProvider.eurooffice && !editorProvider.collabora) return}} else {// Based on the supported extensioneditorProvider.collabora = collaboraHasExtension- editorProvider.onlyoffice = onlyofficeHasExtension+ editorProvider[officeEditorProvider] = officeEditorHasExtension}} else {// Based on availabilityeditorProvider.collabora = this.store.server().files.editors.collabora- editorProvider.onlyoffice = this.store.server().files.editors.onlyoffice+ editorProvider[officeEditorProvider] = officeEditorEnabled}}diff --git a/frontend/src/app/applications/users/components/user-account.component.ts b/frontend/src/app/applications/users/components/user-account.component.tsindex 97838853..97069cfe 100644--- a/frontend/src/app/applications/users/components/user-account.component.ts+++ b/frontend/src/app/applications/users/components/user-account.component.ts@@ -59,10 +59,6 @@ export class UserAccountComponent implements OnInit, OnDestroy {protected readonly allOnlineStatus = USER_ONLINE_STATUS_LISTprotected readonly passwordMinLength = USER_PASSWORD_MIN_LENGTHprotected readonly icons = { faCopy, faKey }- protected readonly editors: Record<string, keyof FileEditorProviders> = {- [COLLABORA_APP_LOCK]: 'collabora',- [ONLY_OFFICE_APP_LOCK]: 'onlyoffice'- }protected user: UserTypeprotected userAvatar: string = nullprotected webdavUrl = `${window.location.origin}/${WEBDAV_BASE_PATH}`@@ -89,9 +85,20 @@ export class UserAccountComponent implements OnInit, OnDestroy {translating: true,sameLink: true})- this.showEditorPreference = this.store.server().files.editors.collabora && this.store.server().files.editors.onlyoffice+ this.showEditorPreference =+ this.store.server().files.editors.collabora && (this.store.server().files.editors.onlyoffice || this.store.server().files.editors.eurooffice)if (this.showEditorPreference) {- this.userEditorPreference = this.userService.getEditorProviderPreference()+ const preference = this.userService.getEditorProviderPreference()+ this.userEditorPreference = Object.values(this.editors).includes(preference) ? preference : null+ }+ }++ protected get editors(): Record<string, keyof FileEditorProviders> {+ return {+ [COLLABORA_APP_LOCK]: 'collabora',+ [this.store.server().files.editors.onlyoffice ? ONLY_OFFICE_APP_LOCK : 'Euro-Office']: this.store.server().files.editors.onlyoffice+ ? 'onlyoffice'+ : 'eurooffice'}}diff --git a/frontend/src/app/store/store.service.ts b/frontend/src/app/store/store.service.tsindex 642a294c..29ceba28 100644--- a/frontend/src/app/store/store.service.ts+++ b/frontend/src/app/store/store.service.ts@@ -31,7 +31,7 @@ export class StoreService {twoFaEnabled: false,mailServerEnabled: false,files: {- editors: { collabora: false, onlyoffice: false },+ editors: { collabora: false, eurooffice: false, onlyoffice: false },sampleDocuments: ALL_DOCUMENT_TYPES}})diff --git a/frontend/src/i18n/de.json b/frontend/src/i18n/de.jsonindex 3be04303..e66ff122 100644--- a/frontend/src/i18n/de.json+++ b/frontend/src/i18n/de.json@@ -709,5 +709,6 @@"size has changed since parsing": "Die Größe hat sich seit dem Parsen geändert","No synchronized folder": "Kein synchronisierter Ordner","Edit in OnlyOffice": "In OnlyOffice bearbeiten",+ "Edit in Euro-Office": "In Euro-Office bearbeiten","View in PDF.js": "In PDF.js ansehen"}diff --git a/frontend/src/i18n/es.json b/frontend/src/i18n/es.jsonindex c3dfbd85..e4b6a230 100644--- a/frontend/src/i18n/es.json+++ b/frontend/src/i18n/es.json@@ -709,5 +709,6 @@"size has changed since parsing": "El tamaño ha cambiado desde el análisis","No synchronized folder": "Ninguna carpeta sincronizada","Edit in OnlyOffice": "Editar en OnlyOffice",+ "Edit in Euro-Office": "Editar en Euro-Office","View in PDF.js": "Ver en PDF.js"}diff --git a/frontend/src/i18n/fr.json b/frontend/src/i18n/fr.jsonindex 26633a08..747e55f3 100644--- a/frontend/src/i18n/fr.json+++ b/frontend/src/i18n/fr.json@@ -709,5 +709,6 @@"size has changed since parsing": "La taille a changé depuis l'analyse","No synchronized folder": "Aucun dossier synchronisé","Edit in OnlyOffice": "Modifier dans OnlyOffice",+ "Edit in Euro-Office": "Modifier dans Euro-Office","View in PDF.js": "Voir dans PDF.js"}diff --git a/frontend/src/i18n/hi.json b/frontend/src/i18n/hi.jsonindex 0b044e54..968fe71c 100644--- a/frontend/src/i18n/hi.json+++ b/frontend/src/i18n/hi.json@@ -709,5 +709,6 @@"size has changed since parsing": "पार्सिंग के बाद से आकार बदल गया है","No synchronized folder": "कोई सिंक्रोनाइज़्ड फ़ोल्डर नहीं","Edit in OnlyOffice": "OnlyOffice में संपादित करें",+ "Edit in Euro-Office": "Euro-Office में संपादित करें","View in PDF.js": "PDF.js में देखें"}diff --git a/frontend/src/i18n/it.json b/frontend/src/i18n/it.jsonindex 7d3cc354..9ef045e6 100644--- a/frontend/src/i18n/it.json+++ b/frontend/src/i18n/it.json@@ -709,5 +709,6 @@"size has changed since parsing": "La dimensione è cambiata dall'analisi","No synchronized folder": "Nessuna cartella sincronizzata","Edit in OnlyOffice": "Modifica in OnlyOffice",+ "Edit in Euro-Office": "Modifica in Euro-Office","View in PDF.js": "Visualizza in PDF.js"}diff --git a/frontend/src/i18n/ja.json b/frontend/src/i18n/ja.jsonindex d6db7380..3636a6c4 100644--- a/frontend/src/i18n/ja.json+++ b/frontend/src/i18n/ja.json@@ -709,5 +709,6 @@"size has changed since parsing": "解析後にサイズが変更されました","No synchronized folder": "同期されたフォルダーはありません","Edit in OnlyOffice": "OnlyOfficeで編集",+ "Edit in Euro-Office": "Euro-Officeで編集","View in PDF.js": "PDF.jsで表示"}diff --git a/frontend/src/i18n/ko.json b/frontend/src/i18n/ko.jsonindex a1c39151..9500f96b 100644--- a/frontend/src/i18n/ko.json+++ b/frontend/src/i18n/ko.json@@ -709,5 +709,6 @@"size has changed since parsing": "파싱 이후 크기가 변경되었습니다","No synchronized folder": "동기화된 폴더 없음","Edit in OnlyOffice": "OnlyOffice에서 편집",+ "Edit in Euro-Office": "Euro-Office에서 편집","View in PDF.js": "PDF.js에서 보기"}diff --git a/frontend/src/i18n/nl.json b/frontend/src/i18n/nl.jsonindex 45959f49..48413794 100644--- a/frontend/src/i18n/nl.json+++ b/frontend/src/i18n/nl.json@@ -709,5 +709,6 @@"size has changed since parsing": "grootte is gewijzigd sinds verwerking","No synchronized folder": "Geen gesynchroniseerde map","Edit in OnlyOffice": "Bewerken in OnlyOffice",+ "Edit in Euro-Office": "Bewerken in Euro-Office","View in PDF.js": "Weergeven in PDF.js"}diff --git a/frontend/src/i18n/pl.json b/frontend/src/i18n/pl.jsonindex 07d9cc7e..d0c002ae 100644--- a/frontend/src/i18n/pl.json+++ b/frontend/src/i18n/pl.json@@ -709,5 +709,6 @@"size has changed since parsing": "Rozmiar zmienił się od czasu parsowania","No synchronized folder": "Brak zsynchronizowanego folderu","Edit in OnlyOffice": "Edytuj w OnlyOffice",+ "Edit in Euro-Office": "Edytuj w Euro-Office","View in PDF.js": "Wyświetl w PDF.js"}diff --git a/frontend/src/i18n/pt-BR.json b/frontend/src/i18n/pt-BR.jsonindex 92555f07..56355eb2 100644--- a/frontend/src/i18n/pt-BR.json+++ b/frontend/src/i18n/pt-BR.json@@ -709,5 +709,6 @@"size has changed since parsing": "O tamanho mudou desde a análise","No synchronized folder": "Nenhuma pasta sincronizada","Edit in OnlyOffice": "Editar no OnlyOffice",+ "Edit in Euro-Office": "Editar no Euro-Office","View in PDF.js": "Visualizar no PDF.js"}diff --git a/frontend/src/i18n/pt.json b/frontend/src/i18n/pt.jsonindex 31f72521..a6079ec2 100644--- a/frontend/src/i18n/pt.json+++ b/frontend/src/i18n/pt.json@@ -709,5 +709,6 @@"size has changed since parsing": "O tamanho mudou desde a análise","No synchronized folder": "Nenhuma pasta sincronizada","Edit in OnlyOffice": "Editar no OnlyOffice",+ "Edit in Euro-Office": "Editar no Euro-Office","View in PDF.js": "Visualizar no PDF.js"}diff --git a/frontend/src/i18n/ru.json b/frontend/src/i18n/ru.jsonindex 58f9cff6..2c9ad6ed 100644--- a/frontend/src/i18n/ru.json+++ b/frontend/src/i18n/ru.json@@ -709,5 +709,6 @@"size has changed since parsing": "Размер изменился с момента разбора","No synchronized folder": "Нет синхронизированной папки","Edit in OnlyOffice": "Редактировать в OnlyOffice",+ "Edit in Euro-Office": "Редактировать в Euro-Office","View in PDF.js": "Просмотр в PDF.js"}diff --git a/frontend/src/i18n/tr.json b/frontend/src/i18n/tr.jsonindex 17cdd882..f4b473e5 100644--- a/frontend/src/i18n/tr.json+++ b/frontend/src/i18n/tr.json@@ -709,5 +709,6 @@"size has changed since parsing": "Boyut ayrıştırmadan beri değişti","No synchronized folder": "Senkronize edilmiş klasör yok","Edit in OnlyOffice": "OnlyOffice'te Düzenle",+ "Edit in Euro-Office": "Euro-Office'te Düzenle","View in PDF.js": "PDF.js'de Görüntüle"}diff --git a/frontend/src/i18n/zh.json b/frontend/src/i18n/zh.jsonindex b7612885..999bb152 100644--- a/frontend/src/i18n/zh.json+++ b/frontend/src/i18n/zh.json@@ -709,5 +709,6 @@"size has changed since parsing": "自解析后大小已更改","No synchronized folder": "没有同步文件夹","Edit in OnlyOffice": "在OnlyOffice中编辑",+ "Edit in Euro-Office": "在Euro-Office中编辑","View in PDF.js": "在PDF.js中查看"}