update docify

This commit is contained in:
lxsang
2020-11-24 20:07:46 +00:00
parent 6ee45214af
commit 8523c7fbb6
11 changed files with 19 additions and 39 deletions

View File

@ -251,7 +251,7 @@ class FilePreviewDialog extends this.OS.GUI.BasicDialog
.then (d) =>
return @error d.error if d.error
v.text = v.filename for v in d.result
@flist.data = d.result
@flist.data = (v for v in d.result when v.filename[0] isnt '.')
.catch (e) =>
@error __("Unable to fetch unclassified file list: {0}", e.toString()), e

View File

@ -193,6 +193,8 @@ class Docify extends this.OS.application.BaseApplication
@error e.toString(), e
cat_refresh: () ->
@docview.data = []
@clear_preview()
@exec("fetch", "categories")
.then (d) =>
v.text = v.name for v in d.result
@ -239,8 +241,9 @@ class Docify extends this.OS.application.BaseApplication
{
text: "__(View)",
nodes: [
{ text: "__(Owners)", id:"owners", shortcut: "A-O"},
{ text: "__(Preview)", id:"preview", shortcut: "A-P"}
{ text: "__(Owners)", id:"owners"},
{ text: "__(Preview)", id:"preview"},
{ text: "__(Change doc path)", id:"setdocp"}
],
onchildselect: (e) => @fileMenuHandle e.data.item.data.id
}
@ -254,5 +257,8 @@ class Docify extends this.OS.application.BaseApplication
@openDialog(new FilePreviewDialog())
.then (d) =>
@notify d.path
when "setdocp"
@setting.docpath = undefined
@initialize()
this.OS.register "Docify", Docify