Use extension config

This commit is contained in:
Lukas Hirt
2020-11-24 12:47:48 +01:00
parent 0d1b2de6bf
commit 6522a41b26
2 changed files with 11 additions and 11 deletions

View File

@@ -1,5 +1,5 @@
// Code generated by fileb0x at "2020-11-15 20:52:21.021714 +0100 CET m=+0.002632274" from config file "embed.yml" DO NOT EDIT.
// modification hash(5979fa40094391f869b75d179bb1a848.8058aec596c5fb73022d09bb97af796e)
// Code generated by fileb0x at "2020-11-24 12:47:35.087873 +0100 CET m=+0.002882004" from config file "embed.yml" DO NOT EDIT.
// modification hash(52d2f5c31484b20b0aa9dc46b4829707.8058aec596c5fb73022d09bb97af796e)
package assets
@@ -36,7 +36,7 @@ type HTTPFS struct {
}
// FileOnlyofficeJs is "onlyoffice.js"
var FileOnlyofficeJs = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xd4\x91\xc1\x4a\x24\x31\x10\x86\xef\xfb\x14\x4d\x98\x43\x07\x32\x33\xf7\x0c\xb3\x7b\x58\x58\x98\xc3\xee\x8a\xe8\x49\xc4\x89\xc9\xdf\x4c\xb0\xbb\x2a\x24\x69\xbb\x25\xe4\xdd\x65\x50\x5a\xc5\x17\xd0\xe3\x07\x45\xd5\xf7\x51\x0e\x9d\x27\xb4\x6d\x37\x92\xcd\x9e\xa9\x95\x45\x8c\x09\x4d\xca\xd1\xdb\x2c\x76\x11\x79\x8c\xd4\xbc\x8e\x15\x13\xc2\x81\x3a\xd6\x85\xcc\x00\x2d\xd8\xfa\xb4\x66\xea\x9f\xb8\xeb\xbc\x85\x50\xde\x69\xf1\x81\x2d\x93\x16\xf3\xfa\x85\xd7\x8e\xed\x38\x80\xb2\x50\x98\x33\x28\x79\xa6\xa4\x6f\xca\x02\x5a\x38\xb6\xb3\x50\x27\x43\xae\x47\xd4\x8b\x15\x14\x29\x96\x65\xf2\xe4\x78\xda\x70\x00\xb5\xc7\x55\xc1\x26\x21\x3e\x22\xd6\xad\x09\x21\x6d\xdf\x0e\x6f\x57\x85\xeb\xaf\xce\xf7\xb8\x30\xf9\xb4\x5f\x15\x90\x65\x87\xeb\xcb\xc3\x6f\x1e\x02\x13\x28\xb7\x24\xeb\x51\x89\xbb\xfb\xde\xd0\x83\x90\x55\x11\xa6\x3f\xbe\xc7\x5f\xd0\xa8\xcb\x00\x1a\xaf\x7c\xee\xa1\xb1\xff\x89\x56\xfc\xc3\xd4\xfc\x5f\xd6\x37\x4b\x87\xac\x55\xbd\xd7\x9f\xfb\x39\x7d\x7d\xfd\x14\x22\x8c\x4b\x27\xe0\x73\x41\x08\xf9\x1b\x3c\x20\x44\x24\x50\x36\x67\xb7\x73\xc2\x6d\xad\xb2\x4a\xb9\xfb\xf1\x1c\x00\x00\xff\xff\x56\x2c\xf6\x8a\xd0\x02\x00\x00")
var FileOnlyofficeJs = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xcc\x90\xc1\x4a\x33\x31\x14\x46\xf7\xff\x53\x94\xd0\xc5\x0c\xa4\xed\x3e\xa5\xbf\x8b\x82\xd0\x85\x56\x44\x57\x22\x76\x4c\xbe\xd8\x60\xe6\xde\x30\xc9\x38\x53\x42\xde\x5d\x50\xda\xea\xc2\x7d\x77\x39\x10\x2e\xe7\x7c\x06\xd6\x11\xaa\xca\xf6\xa4\x93\x63\xaa\xea\x2c\xfa\x88\x49\x4c\x9d\xd3\x49\x2c\x3b\xa4\xbe\xa3\xdc\x84\xb0\x21\xcb\x2a\x53\xd3\x42\x89\x2d\xf9\xc3\xd6\x5a\xa7\x21\xa4\x33\x4a\x30\xf9\x03\x1f\x59\x33\x29\x31\xce\xbe\x79\x66\x58\xf7\x2d\x28\x09\x89\x31\x81\xa2\x63\x8a\xea\x29\x9f\x40\x09\xc3\x7a\x14\x72\xdf\x90\xf1\xe8\xd4\x49\xe4\xfc\x65\xcd\x64\xdd\x9b\x82\xb4\xce\xe3\xae\x49\x7b\x45\x5f\xcf\x8d\x51\x5c\xea\x3c\x38\x32\x3c\xcc\x39\x80\xaa\xdd\x34\x63\x1e\xd1\x7d\xa0\x2b\x8b\x26\x84\xb8\x38\xab\x2d\xa6\x99\xcb\xd5\xf1\xc6\x6a\x9a\x41\x9a\x0d\x1e\xef\x37\x6b\x6e\x03\x13\x28\x55\x54\x97\x9d\x14\x2f\xaf\xbe\xa1\x77\x51\x17\x49\x18\xae\x9d\xc7\x0d\xa8\x57\xb9\x05\xf5\x0f\x2e\x79\x28\xac\xfe\xa3\x12\xb7\x18\x26\xe7\x25\x26\xa7\xd2\xfa\xcf\x0d\x4a\x91\x3f\xcb\x47\x1f\x2f\xb5\xfc\xb7\x68\x08\xe9\x62\x45\x9f\x4b\x29\x75\xbd\xfc\xf7\x19\x00\x00\xff\xff\xf5\x4b\xd1\x2b\xca\x02\x00\x00")
func init() {
err := CTX.Err()

View File

@@ -1,37 +1,37 @@
const appInfo = {
name: 'ocis-onlyoffice',
name: 'OnlyOffice',
id: 'onlyoffice',
icon: 'x-office-document',
extensions: [
{
extension: 'docx',
handler: function(config, filePath, fileId) {
handler: function({ extensionConfig, filePath, fileId }) {
window.open(
`${config.server}/apps/onlyoffice/${fileId}?filePath=${encodeURIComponent(filePath)}`,
`${extensionConfig.server}/apps/onlyoffice/${fileId}?filePath=${encodeURIComponent(filePath)}`,
'_blank'
)
},
newFileMenu: {
menuTitle($gettext) {
return $gettext('New OnlyOFFICE document')
return $gettext('New OnlyOffice document')
},
icon: 'x-office-document'
}
},
{
extension: 'xlsx',
handler: function(config, filePath, fileId) {
handler: function({ extensionConfig, filePath, fileId }) {
window.open(
`${config.server}/apps/onlyoffice/${fileId}?filePath=${encodeURIComponent(filePath)}`,
`${extensionConfig.server}/apps/onlyoffice/${fileId}?filePath=${encodeURIComponent(filePath)}`,
'_blank'
)
}
},
{
extension: 'pptx',
handler: function(config, filePath, fileId) {
handler: function({ extensionConfig, filePath, fileId }) {
window.open(
`${config.server}/apps/onlyoffice/${fileId}?filePath=${encodeURIComponent(filePath)}`,
`${extensionConfig.server}/apps/onlyoffice/${fileId}?filePath=${encodeURIComponent(filePath)}`,
'_blank'
)
}