Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Onlyoffice #1420

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions cmd/config_init.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ override the options.`,
DisableUsedPercentage: mustGetBool(flags, "branding.DisableUsedPercentage"),
Files: mustGetString(flags, "branding.files"),
},
OnlyOffice: settings.OnlyOffice{
URL: mustGetString(flags, "onlyoffice.url"),
JWTSecret: mustGetString(flags, "onlyoffice.jwtSecret"),
},
}

ser := &settings.Server{
Expand Down
4 changes: 4 additions & 0 deletions cmd/config_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ you want to change. Other options will remain unchanged.`,
set.Branding.DisableUsedPercentage = mustGetBool(flags, flag.Name)
case "branding.files":
set.Branding.Files = mustGetString(flags, flag.Name)
case "onlyoffice.url":
set.OnlyOffice.URL = mustGetString(flags, flag.Name)
case "onlyoffice.jwtSecret":
set.OnlyOffice.JWTSecret = mustGetString(flags, flag.Name)
}
})

Expand Down
3 changes: 3 additions & 0 deletions files/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,9 @@ func (i *FileInfo) detectType(modify, saveContent, readHeader bool) error {
i.Content = string(content)
}
return nil
case strings.HasPrefix(mimetype, "application/vnd.openxmlformats-officedocument"):
i.Type = "officedocument"
return nil
default:
i.Type = "blob"
}
Expand Down
14 changes: 14 additions & 0 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"clipboard": "^2.0.4",
"core-js": "^3.9.1",
"css-vars-ponyfill": "^2.4.3",
"jose": "^4.13.1",
"js-base64": "^2.5.1",
"lodash.clonedeep": "^4.5.0",
"lodash.throttle": "^4.1.1",
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/i18n/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@
"newPassword": "كلمة المرور الجديدة",
"newPasswordConfirm": "تأكيد كلمة المرور",
"newUser": "مستخدم جديد",
"onlyOffice": "Only Office Integration",
"onlyOfficeUrl": "Only Office URL (leave blank to disable)",
"password": "كلمة المرور",
"passwordUpdated": "تم تغيير كلمة المرور",
"path": "",
Expand Down Expand Up @@ -257,4 +259,4 @@
"seconds": "ثواني",
"unit": "وحدة الوقت"
}
}
}
4 changes: 3 additions & 1 deletion frontend/src/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@
"newPassword": "Ihr neues Passwort.",
"newPasswordConfirm": "Bestätigen Sie Ihr neues Passwort",
"newUser": "Neuer Benutzer",
"onlyOffice": "Only Office Integration",
"onlyOfficeUrl": "Only Office URL (leave blank to disable)",
"password": "Passwort",
"passwordUpdated": "Passwort aktualisiert!",
"path": "Pfad",
Expand Down Expand Up @@ -268,4 +270,4 @@
"seconds": "Sekunden",
"unit": "Zeiteinheit"
}
}
}
5 changes: 4 additions & 1 deletion frontend/src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,9 @@
"newPassword": "Your new password",
"newPasswordConfirm": "Confirm your new password",
"newUser": "New User",
"onlyOffice": "Only Office Integration",
"onlyOfficeUrl": "Only Office URL (leave blank to disable)",
"onlyOfficeJwtSecret": "Only Office JWT Secret (works only with https, leave blank to disable)",
"password": "Password",
"passwordUpdated": "Password updated!",
"path": "Path",
Expand Down Expand Up @@ -271,4 +274,4 @@
"seconds": "Seconds",
"unit": "Time Unit"
}
}
}
4 changes: 3 additions & 1 deletion frontend/src/i18n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,8 @@
"newPassword": "Tu nueva contraseña",
"newPasswordConfirm": "Confirma tu contraseña",
"newUser": "Nuevo usuario",
"onlyOffice": "Only Office Integration",
"onlyOfficeUrl": "Only Office URL (leave blank to disable)",
"password": "Contraseña",
"passwordUpdated": "¡Contraseña actualizada!",
"path": "Ruta",
Expand Down Expand Up @@ -271,4 +273,4 @@
"seconds": "Segundos",
"unit": "Unidad"
}
}
}
4 changes: 3 additions & 1 deletion frontend/src/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@
"newPassword": "Votre nouveau mot de passe",
"newPasswordConfirm": "Confirmation du nouveau mot de passe",
"newUser": "Nouvel Utilisateur",
"onlyOffice": "Intégration Only Office",
"onlyOfficeUrl": "URL vers OnlyOffice (laisser vide pour désactiver)",
"password": "Mot de passe",
"passwordUpdated": "Mot de passe mis à jour !",
"path": "",
Expand Down Expand Up @@ -268,4 +270,4 @@
"seconds": "Secondes",
"unit": "Unité de temps"
}
}
}
4 changes: 3 additions & 1 deletion frontend/src/i18n/is.json
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@
"newPassword": "Nýja lykilorðið þitt",
"newPasswordConfirm": "Staðfestu nýja lykilorðið",
"newUser": "Nýr notandi",
"onlyOffice": "Only Office Integration",
"onlyOfficeUrl": "Only Office URL (leave blank to disable)",
"password": "Lykilorð",
"passwordUpdated": "Lykilorð vistað!",
"path": "",
Expand Down Expand Up @@ -257,4 +259,4 @@
"seconds": "Sekúndur",
"unit": "Tímastilling"
}
}
}
4 changes: 3 additions & 1 deletion frontend/src/i18n/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@
"newPassword": "La tua nuova password",
"newPasswordConfirm": "Conferma la password",
"newUser": "Nuovo utente",
"onlyOffice": "Only Office Integration",
"onlyOfficeUrl": "Only Office URL (leave blank to disable)",
"password": "Password",
"passwordUpdated": "Password aggiornata!",
"path": "Percorso",
Expand Down Expand Up @@ -257,4 +259,4 @@
"seconds": "Secondi",
"unit": "Unità di tempo"
}
}
}
4 changes: 3 additions & 1 deletion frontend/src/i18n/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@
"newPassword": "新しいパスワード",
"newPasswordConfirm": "新しいパスワードを確認します",
"newUser": "新しいユーザー",
"onlyOffice": "Only Office Integration",
"onlyOfficeUrl": "Only Office URL (leave blank to disable)",
"password": "パスワード",
"passwordUpdated": "パスワードは更新されました!",
"path": "",
Expand Down Expand Up @@ -257,4 +259,4 @@
"seconds": "秒",
"unit": "時間単位"
}
}
}
4 changes: 3 additions & 1 deletion frontend/src/i18n/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@
"newPassword": "새로운 비밀번호",
"newPasswordConfirm": "새로운 비밀번호 확인",
"newUser": "새로운 사용자",
"onlyOffice": "Only Office Integration",
"onlyOfficeUrl": "Only Office URL (leave blank to disable)",
"password": "비밀번호",
"passwordUpdated": "비밀번호 수정 완료!",
"path": "",
Expand Down Expand Up @@ -257,4 +259,4 @@
"seconds": "초",
"unit": "Time Unit"
}
}
}
4 changes: 3 additions & 1 deletion frontend/src/i18n/nl-be.json
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@
"newPassword": "Uw nieuw wachtwoord",
"newPasswordConfirm": "Bevestig uw nieuw wachtwoord",
"newUser": "Nieuwe gebruiker",
"onlyOffice": "Only Office Integration",
"onlyOfficeUrl": "Only Office URL (leave blank to disable)",
"password": "Wachtwoord",
"passwordUpdated": "Wachtwoord bijgewerkt!",
"path": "",
Expand Down Expand Up @@ -257,4 +259,4 @@
"seconds": "Seconden",
"unit": "Tijdseenheid"
}
}
}
4 changes: 3 additions & 1 deletion frontend/src/i18n/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,8 @@
"newPassword": "Twoje nowe hasło",
"newPasswordConfirm": "Potwierdź swoje hasło",
"newUser": "Nowy Użytkownik",
"onlyOffice": "Only Office Integration",
"onlyOfficeUrl": "Only Office URL (leave blank to disable)",
"password": "Hasło",
"passwordUpdated": "Hasło zostało zapisane!",
"path": "Ścieżka",
Expand Down Expand Up @@ -258,4 +260,4 @@
"seconds": "Sekundy",
"unit": "Jednostka czasu"
}
}
}
4 changes: 3 additions & 1 deletion frontend/src/i18n/pt-br.json
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,8 @@
"newPassword": "Nova senha",
"newPasswordConfirm": "Confirme a nova senha",
"newUser": "Novo usuário",
"onlyOffice": "Only Office Integration",
"onlyOfficeUrl": "Only Office URL (leave blank to disable)",
"password": "Senha",
"passwordUpdated": "Senha atualizada!",
"path": "",
Expand Down Expand Up @@ -271,4 +273,4 @@
"seconds": "Segundos",
"unit": "Unidades de Tempo"
}
}
}
4 changes: 3 additions & 1 deletion frontend/src/i18n/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@
"newPassword": "Nova palavra-passe",
"newPasswordConfirm": "Confirme a nova palavra-passe",
"newUser": "Novo utilizador",
"onlyOffice": "Only Office Integration",
"onlyOfficeUrl": "Only Office URL (leave blank to disable)",
"password": "Palavra-passe",
"passwordUpdated": "Palavra-passe atualizada!",
"path": "",
Expand Down Expand Up @@ -257,4 +259,4 @@
"seconds": "Segundos",
"unit": "Unidades de tempo"
}
}
}
4 changes: 3 additions & 1 deletion frontend/src/i18n/ro.json
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@
"newPassword": "Noua ta parolă",
"newPasswordConfirm": "Confirmă noua parolă",
"newUser": "Utilizator nou",
"onlyOffice": "Only Office Integration",
"onlyOfficeUrl": "Only Office URL (leave blank to disable)",
"password": "Parola",
"passwordUpdated": "Parola actualizată!",
"path": "",
Expand Down Expand Up @@ -257,4 +259,4 @@
"seconds": "Secunde",
"unit": "Unitate de timp"
}
}
}
4 changes: 3 additions & 1 deletion frontend/src/i18n/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,8 @@
"newPassword": "Новый пароль",
"newPasswordConfirm": "Повтор нового пароля",
"newUser": "Новый пользователь",
"onlyOffice": "Only Office Integration",
"onlyOfficeUrl": "Only Office URL (leave blank to disable)",
"password": "Пароль",
"passwordUpdated": "Пароль обновлен!",
"path": "Путь",
Expand Down Expand Up @@ -267,4 +269,4 @@
"seconds": "Секунды",
"unit": "Единица времени"
}
}
}
4 changes: 3 additions & 1 deletion frontend/src/i18n/sv-se.json
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@
"newPassword": "Ditt nya lösenord",
"newPasswordConfirm": "Bekräfta ditt nya lösenord",
"newUser": "Ny användare",
"onlyOffice": "Only Office Integration",
"onlyOfficeUrl": "Only Office URL (leave blank to disable)",
"password": "Lösenord",
"passwordUpdated": "Lösenord uppdaterat",
"path": "",
Expand Down Expand Up @@ -257,4 +259,4 @@
"seconds": "Sekunder",
"unit": "Tidsenhet"
}
}
}
4 changes: 3 additions & 1 deletion frontend/src/i18n/zh-cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,8 @@
"newPassword": "您的新密码",
"newPasswordConfirm": "再次输入以确认您的新密码",
"newUser": "新建用户",
"onlyOffice": "Only Office Integration",
"onlyOfficeUrl": "Only Office URL (leave blank to disable)",
"password": "密码",
"passwordUpdated": "密码已更新!",
"path": "路径",
Expand Down Expand Up @@ -267,4 +269,4 @@
"seconds": "秒",
"unit": "时间单位"
}
}
}
4 changes: 3 additions & 1 deletion frontend/src/i18n/zh-tw.json
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@
"newPassword": "您的新密碼",
"newPasswordConfirm": "重輸一遍新密碼",
"newUser": "建立使用者",
"onlyOffice": "Only Office Integration",
"onlyOfficeUrl": "Only Office URL (leave blank to disable)",
"password": "密碼",
"passwordUpdated": "密碼已更新!",
"path": "",
Expand Down Expand Up @@ -257,4 +259,4 @@
"seconds": "秒",
"unit": "時間單位"
}
}
}
2 changes: 2 additions & 0 deletions frontend/src/utils/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const theme = window.FileBrowser.Theme;
const enableThumbs = window.FileBrowser.EnableThumbs;
const resizePreview = window.FileBrowser.ResizePreview;
const enableExec = window.FileBrowser.EnableExec;
const onlyOffice = window.FileBrowser.OnlyOffice;
const origin = window.location.origin;

export {
Expand All @@ -34,5 +35,6 @@ export {
enableThumbs,
resizePreview,
enableExec,
onlyOffice,
origin,
};