mirror of
https://github.com/lxsang/antos-frontend.git
synced 2025-02-22 01:42:47 +01:00
MergedMerge branch 'master' of https://github.com/lxsang/antos
This commit is contained in:
commit
05ef1a6612
@ -107,20 +107,21 @@ self.OS.GUI =
|
||||
js = path + "/main.js"
|
||||
|
||||
js.asFileHandler().read (d) ->
|
||||
#load css file
|
||||
css = "#{path}/main.css"
|
||||
css.asFileHandler().onready (d) ->
|
||||
el = $ '<link>', { rel: 'stylesheet', type: 'text/css', 'href': "#{_API.handler.get}/#{css}" }
|
||||
.appendTo 'head'
|
||||
_OS.APP[app].style = el[0] if _OS.APP[app]
|
||||
, () ->
|
||||
#launch
|
||||
# load app meta data
|
||||
"#{path}/package.json".asFileHandler().read (data) ->
|
||||
data.path = path
|
||||
_OS.APP[app].meta = data if _OS.APP[app]
|
||||
_OS.APP[v].meta = data for v in data.services if data.services
|
||||
ok app
|
||||
#load css file
|
||||
css = "#{path}/main.css"
|
||||
css.asFileHandler().onready (d) ->
|
||||
el = $ '<link>', { rel: 'stylesheet', type: 'text/css', 'href': "#{_API.handler.get}/#{css}" }
|
||||
.appendTo 'head'
|
||||
_OS.APP[app].style = el[0] if _OS.APP[app]
|
||||
ok app
|
||||
, () ->
|
||||
#launch
|
||||
ok app
|
||||
, "json"
|
||||
#ok app
|
||||
, "script"
|
||||
|
@ -15,10 +15,11 @@ self.OS.API.handler =
|
||||
path = "#{_REST}/fs/mkdir"
|
||||
_API.post path, { path: p }, c, (e, s) ->
|
||||
_courrier.osfail "Fail to create directory: #{p}", e, s
|
||||
sharefile: (p, c) ->
|
||||
sharefile: (p, pub , c) ->
|
||||
path = "#{_REST}/fs/publish"
|
||||
_API.post path, { path: p }, c, (e, s) ->
|
||||
_API.post path, { path: p , publish: pub }, c, (e, s) ->
|
||||
_courrier.osfail "Fail to publish file: #{p}", e, s
|
||||
|
||||
fileinfo: (p, c) ->
|
||||
path = "#{_REST}/fs/fileinfo"
|
||||
_API.post path, { path: p }, c, (e, s) ->
|
||||
|
@ -142,7 +142,7 @@
|
||||
}
|
||||
self.on("updated", function(){
|
||||
refreshData()
|
||||
calibre_size()
|
||||
//calibre_size()
|
||||
})
|
||||
self.on("mount", function(){
|
||||
switchView()
|
||||
|
@ -147,7 +147,7 @@ class RemoteFileHandler extends self.OS.API.VFS.BaseFileHandler
|
||||
when "remove"
|
||||
_API.handler.delete @path, f
|
||||
when "publish"
|
||||
_API.handler.sharefile @path, f
|
||||
_API.handler.sharefile @path, true , f
|
||||
when "download"
|
||||
return if @info.type is "dir"
|
||||
_API.handler.fileblob @path, (d) ->
|
||||
@ -274,7 +274,7 @@ class SharedFileHandler extends self.OS.API.VFS.BaseFileHandler
|
||||
_API.handler.write @path, p, f
|
||||
|
||||
when "remove"
|
||||
_API.handler.delete @path, f
|
||||
_API.handler.sharefile @basename, false, f
|
||||
|
||||
when "upload"
|
||||
return
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 271 KiB After Width: | Height: | Size: 92 KiB |
Loading…
x
Reference in New Issue
Block a user