mirror of
https://github.com/lxsang/antos-frontend.git
synced 2025-02-22 09:52: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 = path + "/main.js"
|
||||||
|
|
||||||
js.asFileHandler().read (d) ->
|
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
|
# load app meta data
|
||||||
"#{path}/package.json".asFileHandler().read (data) ->
|
"#{path}/package.json".asFileHandler().read (data) ->
|
||||||
data.path = path
|
data.path = path
|
||||||
_OS.APP[app].meta = data if _OS.APP[app]
|
_OS.APP[app].meta = data if _OS.APP[app]
|
||||||
_OS.APP[v].meta = data for v in data.services if data.services
|
_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"
|
, "json"
|
||||||
#ok app
|
#ok app
|
||||||
, "script"
|
, "script"
|
||||||
|
@ -15,10 +15,11 @@ self.OS.API.handler =
|
|||||||
path = "#{_REST}/fs/mkdir"
|
path = "#{_REST}/fs/mkdir"
|
||||||
_API.post path, { path: p }, c, (e, s) ->
|
_API.post path, { path: p }, c, (e, s) ->
|
||||||
_courrier.osfail "Fail to create directory: #{p}", e, s
|
_courrier.osfail "Fail to create directory: #{p}", e, s
|
||||||
sharefile: (p, c) ->
|
sharefile: (p, pub , c) ->
|
||||||
path = "#{_REST}/fs/publish"
|
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
|
_courrier.osfail "Fail to publish file: #{p}", e, s
|
||||||
|
|
||||||
fileinfo: (p, c) ->
|
fileinfo: (p, c) ->
|
||||||
path = "#{_REST}/fs/fileinfo"
|
path = "#{_REST}/fs/fileinfo"
|
||||||
_API.post path, { path: p }, c, (e, s) ->
|
_API.post path, { path: p }, c, (e, s) ->
|
||||||
|
@ -142,7 +142,7 @@
|
|||||||
}
|
}
|
||||||
self.on("updated", function(){
|
self.on("updated", function(){
|
||||||
refreshData()
|
refreshData()
|
||||||
calibre_size()
|
//calibre_size()
|
||||||
})
|
})
|
||||||
self.on("mount", function(){
|
self.on("mount", function(){
|
||||||
switchView()
|
switchView()
|
||||||
|
@ -147,7 +147,7 @@ class RemoteFileHandler extends self.OS.API.VFS.BaseFileHandler
|
|||||||
when "remove"
|
when "remove"
|
||||||
_API.handler.delete @path, f
|
_API.handler.delete @path, f
|
||||||
when "publish"
|
when "publish"
|
||||||
_API.handler.sharefile @path, f
|
_API.handler.sharefile @path, true , f
|
||||||
when "download"
|
when "download"
|
||||||
return if @info.type is "dir"
|
return if @info.type is "dir"
|
||||||
_API.handler.fileblob @path, (d) ->
|
_API.handler.fileblob @path, (d) ->
|
||||||
@ -274,7 +274,7 @@ class SharedFileHandler extends self.OS.API.VFS.BaseFileHandler
|
|||||||
_API.handler.write @path, p, f
|
_API.handler.write @path, p, f
|
||||||
|
|
||||||
when "remove"
|
when "remove"
|
||||||
_API.handler.delete @path, f
|
_API.handler.sharefile @basename, false, f
|
||||||
|
|
||||||
when "upload"
|
when "upload"
|
||||||
return
|
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