mirror of
https://github.com/lxsang/antos-frontend.git
synced 2025-07-27 03:09:45 +02:00
shared file enable
This commit is contained in:
@ -131,8 +131,10 @@ class Blogger extends this.OS.GUI.BaseApplication
|
||||
className: "fa fa-file-image-o",
|
||||
action: (e) ->
|
||||
me.openDialog "FileDiaLog", (d, n) ->
|
||||
doc = me.editor.codemirror.getDoc()
|
||||
doc.replaceSelection ""
|
||||
"#{d}/#{n}".asFileHandler().publish (r) ->
|
||||
return me.error "Cannot export file for embeding to text" if r.error
|
||||
doc = me.editor.codemirror.getDoc()
|
||||
doc.replaceSelection ""
|
||||
, "Select image file", { mimes: ["image/.*"] }
|
||||
},
|
||||
"|",
|
||||
|
@ -21,6 +21,9 @@ afx-list-view[data-id = "notifylist"] li{
|
||||
border:1px solid #a6a6a6;
|
||||
border-radius: 6px;
|
||||
margin-bottom: 2px;
|
||||
-ms-word-break: break-all;
|
||||
word-break: break-all;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
afx-overlay[data-id = "feedzone"]{
|
||||
@ -42,4 +45,7 @@ afx-list-view[data-id = "notifeed"] li{
|
||||
border-radius: 6px;
|
||||
margin-bottom: 2px;
|
||||
z-index: 99999;
|
||||
-ms-word-break: break-all;
|
||||
word-break: break-all;
|
||||
word-break: break-word;
|
||||
}
|
@ -80,7 +80,7 @@ class Files extends this.OS.GUI.BaseApplication
|
||||
dir.read (d) ->
|
||||
if(d.error)
|
||||
return me.error "Resource not found #{p}"
|
||||
console.log "error"
|
||||
|
||||
me.currdir = dir
|
||||
if not dir.isRoot()
|
||||
p = dir.parent().asFileHandler()
|
||||
@ -103,6 +103,7 @@ class Files extends this.OS.GUI.BaseApplication
|
||||
{ text: "Open with", dataid: "#{@name}-open", child:@apps },
|
||||
{ text: "Upload", dataid: "#{@name}-upload" },
|
||||
{ text: "Download", dataid: "#{@name}-download" },
|
||||
{ text: "Share file", dataid: "#{@name}-share" },
|
||||
{ text: "Properties", dataid: "#{@name}-info" }
|
||||
], onmenuselect: (e) -> me.actionFile e
|
||||
}
|
||||
@ -251,6 +252,13 @@ class Files extends this.OS.GUI.BaseApplication
|
||||
@currdir.upload (r) ->
|
||||
me.error "Faile to upload to: #{d}: #{r.error}" if r.error
|
||||
|
||||
when "#{@name}-share"
|
||||
me = @
|
||||
return unless file and file.type is "file"
|
||||
file.path.asFileHandler().publish (r) ->
|
||||
return me.error "Cannot share file: #{r.error}" if r.error
|
||||
return me.notify "Shared url: #{r.result}"
|
||||
|
||||
when "#{@name}-download"
|
||||
return unless file
|
||||
file.path.asFileHandler().download ()->
|
||||
|
Reference in New Issue
Block a user