chore: add custom office viewer
This commit is contained in:
parent
2b04cf4ac3
commit
6f48a0a82a
@ -83,7 +83,13 @@ func initialSettings() {
|
|||||||
{Key: conf.ImageTypes, Value: "jpg,tiff,jpeg,png,gif,bmp,svg,ico,swf,webp", Type: conf.TypeText, Group: model.PREVIEW, Flag: model.PRIVATE},
|
{Key: conf.ImageTypes, Value: "jpg,tiff,jpeg,png,gif,bmp,svg,ico,swf,webp", Type: conf.TypeText, Group: model.PREVIEW, Flag: model.PRIVATE},
|
||||||
{Key: conf.OfficeTypes, Value: "doc,docx,xls,xlsx,ppt,pptx,pdf", Type: conf.TypeText, Group: model.PREVIEW, Flag: model.PRIVATE},
|
{Key: conf.OfficeTypes, Value: "doc,docx,xls,xlsx,ppt,pptx,pdf", Type: conf.TypeText, Group: model.PREVIEW, Flag: model.PRIVATE},
|
||||||
{Key: conf.ProxyTypes, Value: "m3u8", Type: conf.TypeText, Group: model.PREVIEW, Flag: model.PRIVATE},
|
{Key: conf.ProxyTypes, Value: "m3u8", Type: conf.TypeText, Group: model.PREVIEW, Flag: model.PRIVATE},
|
||||||
{Key: conf.PdfViewerUrl, Value: "https://alist-org.github.io/pdf.js/web/viewer.html?file=$url", Type: conf.TypeString, Group: model.PREVIEW},
|
{Key: conf.OfficeViewers, Value: `{
|
||||||
|
"Microsoft":"https://view.officeapps.live.com/op/view.aspx?src=$url",
|
||||||
|
"Google":"https://docs.google.com/gview?url=$url&embedded=true",
|
||||||
|
}`, Type: conf.TypeText, Group: model.PREVIEW},
|
||||||
|
{Key: conf.PdfViewers, Value: `{
|
||||||
|
"pdf.js":"https://alist-org.github.io/pdf.js/web/viewer.html?file=$url"
|
||||||
|
}`, Type: conf.TypeText, Group: model.PREVIEW},
|
||||||
{Key: conf.AudioAutoplay, Value: "true", Type: conf.TypeBool, Group: model.PREVIEW},
|
{Key: conf.AudioAutoplay, Value: "true", Type: conf.TypeBool, Group: model.PREVIEW},
|
||||||
{Key: conf.VideoAutoplay, Value: "true", Type: conf.TypeBool, Group: model.PREVIEW},
|
{Key: conf.VideoAutoplay, Value: "true", Type: conf.TypeBool, Group: model.PREVIEW},
|
||||||
// global settings
|
// global settings
|
||||||
|
@ -26,7 +26,8 @@ const (
|
|||||||
ImageTypes = "image_types"
|
ImageTypes = "image_types"
|
||||||
OfficeTypes = "office_types"
|
OfficeTypes = "office_types"
|
||||||
ProxyTypes = "proxy_types"
|
ProxyTypes = "proxy_types"
|
||||||
PdfViewerUrl = "pdf_viewer_url"
|
OfficeViewers = "office_viewers"
|
||||||
|
PdfViewers = "pdf_viewers"
|
||||||
AudioAutoplay = "audio_autoplay"
|
AudioAutoplay = "audio_autoplay"
|
||||||
VideoAutoplay = "video_autoplay"
|
VideoAutoplay = "video_autoplay"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user