app launcher

This commit is contained in:
Xuan Sang LE 2018-01-26 18:57:28 +01:00
parent ec09e07eb7
commit 91a0d0a6b6
17 changed files with 416 additions and 49 deletions

View File

@ -191,6 +191,31 @@ class YesNoDialog extends BasicDialog
} }
this.OS.register "YesNoDialog", YesNoDialog this.OS.register "YesNoDialog", YesNoDialog
class SelectionDialog extends BasicDialog
constructor: () ->
super "SelectionDialog", {
tag: "afx-list-view",
att: "",
width: 250,
height: 300,
resizable: false,
buttons: [
{
label: "Ok", onclick: (d) ->
el = d.find "content"
it = el.get "selected"
return unless it
d.handler it if d.handler
d.quit()
},
{ label: "Cancel", onclick: (d) -> d.quit() }
],
filldata: (d) ->
return unless d.data
(d.find "content").set "items", d.data
}
this.OS.register "SelectionDialog", SelectionDialog
class AboutDialog extends BaseDialog class AboutDialog extends BaseDialog
constructor: () -> constructor: () ->
super "AboutDialog" super "AboutDialog"

View File

@ -2,9 +2,10 @@ class BaseModel
constructor: (@name, @args) -> constructor: (@name, @args) ->
@observable = riot.observable() @observable = riot.observable()
@_api = self.OS.API @_api = self.OS.API
@_gui = self.OS.GUI
me = @ me = @
@on "exit", () -> me.quit() @on "exit", () -> me.quit()
@host = "#desktop" @host = "#workingenv"
@dialog = undefined @dialog = undefined
render: (p) -> render: (p) ->
@ -35,10 +36,10 @@ class BaseModel
if @dialog if @dialog
@dialog.show() @dialog.show()
return return
if not _GUI.dialog[d] if not _GUI.dialogs[d]
@error "Dialog #{d} not found" @error "Dialog #{d} not found"
return return
@dialog = new _GUI.dialog[d]() @dialog = new _GUI.dialogs[d]()
@dialog.parent = @ @dialog.parent = @
@dialog.handler = f @dialog.handler = f
@dialog.pid = @pid @dialog.pid = @pid

View File

@ -117,5 +117,5 @@ self.OS.API =
catch e catch e
err = e err = e
return "" if not err return "" if not err
return err.stack return err

View File

@ -8,6 +8,7 @@ self.OS or=
setting: setting:
user: {} user: {}
applications: {} applications: {}
desktop: {}
appearance: {} appearance: {}
courrier: courrier:
observable: riot.observable() observable: riot.observable()
@ -22,6 +23,8 @@ self.OS or=
_courrier.ostrigger "fail", { m: m, e: e, s: s } _courrier.ostrigger "fail", { m: m, e: e, s: s }
oserror: (m, e, s) -> oserror: (m, e, s) ->
_courrier.ostrigger "error", { m: m, e: e, s: s } _courrier.ostrigger "error", { m: m, e: e, s: s }
osinfo: (m) ->
_courrier.ostrigger "info", { m: m, e: null, s: null }
ostrigger: (e, d) -> ostrigger: (e, d) ->
_courrier.trigger e, { id: 0, data: d, name: "OS" } _courrier.trigger e, { id: 0, data: d, name: "OS" }
unregister: (app) -> unregister: (app) ->
@ -33,7 +36,7 @@ self.OS or=
_courrier.quota += 1 _courrier.quota += 1
_courrier.quota _courrier.quota
register: (name, x) -> register: (name, x) ->
if x.type is 3 then self.OS.GUI.dialog[name] = x else _OS.APP[name] = x if x.type is 3 then self.OS.GUI.dialogs[name] = x else _OS.APP[name] = x
PM: PM:
pidalloc: 0 pidalloc: 0

View File

@ -1,5 +1,6 @@
self.OS.GUI = self.OS.GUI =
dialog: new Object() dialogs: new Object()
dialog: undefined
htmlToScheme: (html, app, parent) -> htmlToScheme: (html, app, parent) ->
scheme = $.parseHTML html scheme = $.parseHTML html
($ parent).append scheme ($ parent).append scheme
@ -19,7 +20,8 @@ self.OS.GUI =
$ "head link#ostheme" $ "head link#ostheme"
.attr "href", "" .attr "href", ""
loadTheme: (name) -> loadTheme: (name, force) ->
_GUI.clearTheme() if force
path = "resources/themes/#{name}/#{name}.css" path = "resources/themes/#{name}/#{name}.css"
$ "head link#ostheme" $ "head link#ostheme"
.attr "href", path .attr "href", path
@ -31,6 +33,21 @@ self.OS.GUI =
srvs.splice 0, 1 srvs.splice 0, 1
f i for i in srvs f i for i in srvs
openDialog: (d, f, title, data) ->
if _GUI.dialog
_GUI.dialog.show()
return
if not _GUI.dialogs[d]
ex = _API.throwe "Dialog"
return _courrier.oserror "Dialog #{d} not found", ex, null
_GUI.dialog = new _GUI.dialogs[d]()
_GUI.dialog.parent = _GUI
_GUI.dialog.handler = f
_GUI.dialog.pid = -1
_GUI.dialog.data = data
_GUI.dialog.title = title
_GUI.dialog.init()
pushService: (ph) -> pushService: (ph) ->
arr = ph.split "/" arr = ph.split "/"
srv = arr[1] srv = arr[1]
@ -43,6 +60,32 @@ self.OS.GUI =
_courrier.trigger "srvroutineready", srv _courrier.trigger "srvroutineready", srv
_courrier.osfail "Cannot read service script: #{srv} ", e, s _courrier.osfail "Cannot read service script: #{srv} ", e, s
appsByMime: (mime) ->
metas = ( a.meta for k, a of _OS.APP when a.type is 1)
mimes = ( m.mimes for m in metas )
apps = []
# search app by mimes
f = ( arr, idx ) ->
arr.filter (m, i) ->
if mime.match (new RegExp m, "g")
apps.push metas[idx]
return false
return false
f m, i for m, i in mimes
return apps
openWith: (it) ->
return unless it
console.log "open #{it.path}"
apps = _GUI.appsByMime ( if it.type is "dir" then "dir" else it.mime )
return OS.info "No application available to open #{it.filename}" if apps.length is 0
return _GUI.launch apps[0].app, [it.path] if apps.length is 1
list = ( { text: e.app, icon: e.icon, iconclass: e.iconclass } for e in apps )
_GUI.openDialog "SelectionDialog", ( d ) ->
_GUI.launch d.text, [it.path]
, "Open width", list
forceLaunch: (app, args) -> forceLaunch: (app, args) ->
console.log "This method is used for developing only, please use the launch method instead" console.log "This method is used for developing only, please use the launch method instead"
_PM.killAll app _PM.killAll app
@ -129,19 +172,71 @@ self.OS.GUI =
return null unless x return null unless x
scheme = $.parseHTML x scheme = $.parseHTML x
($ "#wrapper").append scheme ($ "#wrapper").append scheme
# system menu and dock
riot.mount ($ "#syspanel", $ "#wrapper")
riot.mount ($ "#sysdock", $ "#wrapper"), { items: [] }
# context menu # context menu
riot.mount ($ "#contextmenu") riot.mount ($ "#contextmenu")
($ "#workspace").contextmenu (e) -> _GUI.bindContextMenu e ($ "#workspace").contextmenu (e) -> _GUI.bindContextMenu e
#desktop
desktop = ($ "#desktop") # desktop default file manager
desktop.on "click", (e) -> desktop = $ "#desktop"
return if e.target isnt desktop.get(0) desktop[0].fetch = () ->
($ "#sysdock").get(0).set "selectedApp", null fp = _OS.setting.desktop.path.asFileHandler()
desktop.get(0).contextmenuHandler = (e, m) -> fn = () ->
console.log "context menu handler for desktop" fp.read (d) ->
# system menu return _courrier.osfail d.error, (_API.throwe "OS.VFS"), d.error if d.error
riot.mount ($ "#syspanel", $ "#wrapper") items = []
riot.mount ($ "#sysdock", $ "#wrapper"), { items: [] } $.each d.result, (i, v) ->
return if v.filename[0] is '.' and not _OS.setting.desktop.showhidden
v.text = v.filename
#v.text = v.text.substring(0,9) + "..." ifv.text.length > 10
v.iconclass = v.type
items.push(v)
desktop[0].set "items", items
desktop[0].refresh()
fp.onready () ->
fn()
, ( e ) -> # try to create the path
console.log "#{fp.path} not found"
name = fp.basename
fp.parent().asFileHandler().mk name, (r) ->
ex = _API.throwe "OS.VFS"
if r.error then _courrier.osfail d.error, ex, d.error else fn()
desktop[0].ready = (e) ->
e.observable = _courrier
window.onresize = () ->
_courrier.trigger "desktopresize"
e.refresh()
desktop[0].set "onlistselect", (d) ->
($ "#sysdock").get(0).set "selectedApp", null
desktop[0].set "onlistdbclick", ( d ) ->
($ "#sysdock").get(0).set "selectedApp", null
it = desktop[0].get "selected"
_GUI.openWith it
($ "#workingenv").on "click", (e) ->
desktop[0].set "selected", -1
desktop.on "click", (e) ->
($ "#sysdock").get(0).set "selectedApp", null
desktop[0].set "selected", -1 if e.target is desktop[0]
console.log "desktop clicked"
desktop[0].contextmenuHandler = (e, m) ->
desktop[0].set "selected", -1 if e.target is desktop[0]
console.log "context menu handler for desktop"
desktop[0].fetch()
_courrier.trigger "desktoploaded"
# mount it
riot.mount desktop
, (e, s) -> , (e, s) ->
alert "System fall: Cannot init desktop manager" alert "System fall: Cannot init desktop manager"
@ -161,16 +256,25 @@ self.OS.GUI =
alert "System fall: Cannot init login screen" alert "System fall: Cannot init login screen"
startAntOS: (conf) -> startAntOS: (conf) ->
# clean up things
_OS.cleanup() _OS.cleanup()
# get setting from conf
_OS.setting.desktop = conf.desktop if conf.desktop
_OS.setting.applications = conf.applications if conf.applications _OS.setting.applications = conf.applications if conf.applications
_OS.setting.appearance = conf.appearance if conf.appearance _OS.setting.appearance = conf.appearance if conf.appearance
_OS.setting.user = conf.user _OS.setting.user = conf.user
# get setting from conf _OS.setting.desktop.path = "home:///.desktop" unless _OS.setting.desktop.path
# load packages list
# load theme # load theme
# initDM
_GUI.loadTheme "antos" _GUI.loadTheme "antos"
# initDM
_GUI.initDM() _GUI.initDM()
_courrier.observable.one "syspanelloaded", () -> _courrier.observable.one "syspanelloaded", () ->
#_GUI.loadApp "CoreServices", (a) -> # TODO load packages list then build system menu
_GUI.pushServices ["CoreServices/PushNotification", "CoreServices/Spotlight", "CoreServices/Calendar"] # push startup services
# TODO: get services list from user setting
_GUI.pushServices ["CoreServices/PushNotification", "CoreServices/Spotlight", "CoreServices/Calendar"]
# startup application here
_courrier.observable.one "desktoploaded", () ->
_GUI.launch "Files"
_GUI.launch "NotePad"

View File

@ -3,7 +3,7 @@
<!--div class = "afx-clear"></div--> <!--div class = "afx-clear"></div-->
<div id = "workspace"> <div id = "workspace">
<afx-apps-dock id="sysdock"></afx-apps-dock> <afx-apps-dock id="sysdock"></afx-apps-dock>
<div id = "desktop"> <afx-float-list id = "desktop" ></afx-float-list>
</div> <div id = "workingenv"></div>
</div> </div>
<afx-menu id="contextmenu" context="true" style="display:none;"></afx-menu> <afx-menu id="contextmenu" context="true" style="display:none;"></afx-menu>

View File

@ -50,8 +50,10 @@
} }
this.on('mount', function() { this.on('mount', function() {
var left,top var left,top
left = 20 + Math.floor(Math.random() * ($("#desktop").width() - width)) //left = 20 + Math.floor(Math.random() * ($("#desktop").width() - width))
top = 20 + Math.floor(Math.random() * ($("#desktop").height() - height)) //top = 20 + Math.floor(Math.random() * ($("#desktop").height() - height))
left = ($("#desktop").width() - width)/2
top = ($("#desktop").height() - height)/2
$(self.refs.window) $(self.refs.window)
.css("position",'absolute') .css("position",'absolute')
.css("left",left + "px") .css("left",left + "px")

View File

@ -1,8 +1,176 @@
<afx-float-list> <afx-float-list ref = "container">
<div> <div each={item,i in items } class={float_list_item:true, float_list_item_selected: parent._autoselect(item,i)} ondblclick = {parent._dbclick} onmousedown = {parent._select} oncontextmenu = {parent._select}>
<afx-label color = {item.color} iconclass = {item.iconclass} icon = {item.icon} text = {item.text}></afx-label>
</div> </div>
<script>
<script>
this.items = opts.items || []
var self = this
self.selidx = -1
self.onlistselect = opts.onlistselect
self.onlistdbclick = opts.onlistdbclick
self.fetch = undefined
this.root.observable = opts.observable || riot.observable()
this.rid = $(self.root).attr("data-id") || Math.floor(Math.random() * 100000) + 1
self.dir = opts.dir || "horizontal"
self.root.set = function(k,v)
{
if(k == "selected")
{
if(self.selidx != -1)
self.items[self.selidx].selected =false
if(self.items[v]) self.items[v].selected = true
}
else if(k == "*")
for(var i in v)
self[i] = v[i]
else
self[k] = v
self.update()
}
self.root.get = function(k)
{
if(k == "selected")
if(self.selidx == -1)
return undefined
else
return self.items[self.selidx]
return self[k]
}
self.root.push = function(e,u)
{
self.items.push(e)
if(u) self.update()
}
self.root.unshift = function(e,u)
{
self.items.unshift(e)
if(u) self.update()
}
self.root.remove = function(e,u)
{
var i = self.items.indexOf(e)
if(i >= 0)
{
if(self.selidx != -1)
{
self.items[self.selidx].selected =false
self.selidx = -1
}
self.items.splice(i, 1)
if(u)
self.update()
}
}
self.root.refresh = function()
{
_refresh()
}
this.on("mount", function(){
if(self.root.ready)
self.root.ready(self.root)
// now refresh the list
_refresh()
})
var _refresh = function()
{
var ctop = 20
var cleft = 20
var gw = $(self.refs.container).width()
var gh = $(self.refs.container).height()
$(self.refs.container)
.children()
.each(function(e)
{
$(this).unbind("mousedown")
_enable_drag($(this))
var w = $(this).width()
var h = $(this).height()
$(this).css("top", ctop + "px").css("left", cleft + "px")
if(self.dir == "horizontal")
{
ctop += h + 20
if(ctop > gh)
{
ctop = 20
cleft += w + 20
}
}
else
{
cleft += w + 20
if(cleft > gw )
{
cleft = 20
ctop += h + 20
}
}
})
}
var _enable_drag = function(el)
{
var globalof = $(self.refs.container).offset()
el
.css("user-select","none")
.css("cursor","default")
.css("position",'absolute')
.on("mousedown", function(e){
e.preventDefault()
offset = el.offset()
offset.top = e.clientY - offset.top
offset.left = e.clientX - offset.left
$(window).on("mousemove", function(e){
var top,left
top = e.clientY - offset.top - globalof.top
left = e.clientX - globalof.top - offset.left
left = left < 0?0:left
top = top < 0?0:top
el.css("top", top +"px").css("left",left + "px")
})
$(window).on("mouseup", function(e){
//console.log("unbind mouse up")
$(window).unbind("mousemove", null)
})
})
}
_autoselect(it,i)
{
if(!it.selected || it.selected == false) return false
var data = {
id:self.rid,
data:it,
idx:i}
//if(self.selidx != -1)
// self.items[self.selidx].selected =false
self.selidx = i
if(self.onlistselect)
self.onlistselect(data)
this.root.observable.trigger('listselect',data)
return true
}
_select(event)
{
if(self.selidx != -1 && self.selidx < self.items.length)
self.items[self.selidx].selected =false
event.item.item.selected = true
//self.update()
}
_dbclick(event)
{
data = {
id:self.rid,
data:event.item.item,
idx: event.item.i}
if(self.onlistdbclick)
self.onlistdbclick(data)
self.root.observable.trigger('listdbclick', data)
}
</script> </script>
</afx-float-list> </afx-float-list>

View File

@ -35,7 +35,10 @@
self.root.get = function(k) self.root.get = function(k)
{ {
if(k == "selected") if(k == "selected")
return self.items[self.selidx] if(self.selidx != -1)
return self.items[self.selidx]
else
return undefined
return self[k] return self[k]
} }
self.root.push = function(e,u) self.root.push = function(e,u)

View File

@ -39,12 +39,13 @@ class BasicFileHandler
return @ if @isRoot() return @ if @isRoot()
return (@protocol + ":///" + (@genealogy.slice 0 , @genealogy.length - 1).join "/") return (@protocol + ":///" + (@genealogy.slice 0 , @genealogy.length - 1).join "/")
onready: (f) -> onready: (f, err) ->
# read meta data # read meta data
return f() if @ready return f() if @ready
me = @ me = @
me.meta (d) -> me.meta (d) ->
return _courrier.osfail d.error, (_API.throwe "OS.VFS"), d.error if d.error if d.error
return if err then err d else _courrier.osfail d.error, (_API.throwe "OS.VFS"), d.error
me.meta = d.result me.meta = d.result
me.ready = true me.ready = true
f() f()

View File

@ -27,11 +27,12 @@ class PushNotification extends this.OS.GUI.BaseService
@nzone = @find "notifyzone" @nzone = @find "notifyzone"
@fzone = @find "feedzone" @fzone = @find "feedzone"
(@find "btclear").set "onbtclick", (e) -> me.mlist.set "items", [] (@find "btclear").set "onbtclick", (e) -> me.mlist.set "items", []
#mlist.set "onlistselect", (e) -> console.log e @subscribe "fail", (e) -> console.log e
@subscribe "notification", (o) -> me.pushout 'INFO', o @subscribe "notification", (o) -> me.pushout 'INFO', o
@subscribe "fail", (o) -> me.pushout 'FAIL', o @subscribe "fail", (o) -> me.pushout 'FAIL', o
@subscribe "error", (o) -> me.pushout 'ERROR', o @subscribe "error", (o) -> me.pushout 'ERROR', o
@subscribe "info", (o) -> me.pushout 'INFO', o
@subscribe "loading", (o) -> @subscribe "loading", (o) ->
me.pending.push o.id me.pending.push o.id
me.spin true me.spin true
@ -59,6 +60,8 @@ class PushNotification extends this.OS.GUI.BaseService
icon: o.data.icon, icon: o.data.icon,
iconclass: o.data.iconclass, iconclass: o.data.iconclass,
closable: true } closable: true }
console.log o.data.s
console.log o.data.e
@mlist.unshift d, true @mlist.unshift d, true
@notifeed d @notifeed d

View File

@ -8,7 +8,7 @@ class Files extends this.OS.GUI.BaseApplication
@view = @find "fileview" @view = @find "fileview"
@navinput = @find "navinput" @navinput = @find "navinput"
@navbar = @find "nav-bar" @navbar = @find "nav-bar"
@currdir = undefined @currdir = if @args and @args.length > 0 then @args[0].asFileHandler() else "home:///".asFileHandler()
@favo = @find "favouri" @favo = @find "favouri"
@clipboard = undefined @clipboard = undefined
@ -17,7 +17,9 @@ class Files extends this.OS.GUI.BaseApplication
m.show(e) m.show(e)
#@on "fileselect", (d) -> console.log d #@on "fileselect", (d) -> console.log d
@on "filedbclick", (e) -> @on "filedbclick", (e) ->
#if e.data.type is 'dir' then me.chdir e.data.path, true return unless e.data
return if e.data.type is "dir"
me._gui.openWith e.data
@favo.set "onlistselect", (e) -> me.chdir e.data.path @favo.set "onlistselect", (e) -> me.chdir e.data.path
($ @find "btback").click () -> ($ @find "btback").click () ->
@ -38,15 +40,17 @@ class Files extends this.OS.GUI.BaseApplication
@setting.favorite = [ @setting.favorite = [
{ text: "Applications", path: 'app:///', iconclass: "fa fa-adn" }, { text: "Applications", path: 'app:///', iconclass: "fa fa-adn" },
{ text: "Home", path: 'home:///', iconclass: "fa fa-home", selected: true }, { text: "Home", path: 'home:///', iconclass: "fa fa-home" },
{ text: "OS", path: 'os:///', iconclass: "fa fa-inbox" }, { text: "OS", path: 'os:///', iconclass: "fa fa-inbox" },
{ text: "Desktop", path: 'home:///.desktop', iconclass: "fa fa-desktop" }, { text: "Desktop", path: 'home:///.desktop', iconclass: "fa fa-desktop" },
] if not @setting.favorite ] if not @setting.favorite
@setting.sidebar = true if @setting.sidebar is undefined @setting.sidebar = true if @setting.sidebar is undefined
@setting.nav = true if @setting.nav is undefined @setting.nav = true if @setting.nav is undefined
@setting.showhidden = false if @setting.showhidden is undefined @setting.showhidden = false if @setting.showhidden is undefined
@favo.set "items", @setting.favorite
@favo.set "items", $.extend true, {}, @setting.favorite
@applySetting() @applySetting()
@chdir null
applySetting: (k) -> applySetting: (k) ->
# view setting # view setting

View File

@ -9,5 +9,5 @@
"version":"0.1a", "version":"0.1a",
"category":"System", "category":"System",
"iconclass":"fa fa-hdd-o", "iconclass":"fa fa-hdd-o",
"mimes":["*"] "mimes":["dir"]
} }

View File

@ -1,5 +1,5 @@
class NotePad extends this.OS.GUI.BaseApplication class NotePad extends this.OS.GUI.BaseApplication
constructor: (args) -> constructor: ( args ) ->
super "NotePad", args super "NotePad", args
main: () -> main: () ->
me = @ me = @
@ -9,6 +9,7 @@ class NotePad extends this.OS.GUI.BaseApplication
@fileview = @find "fileview" @fileview = @find "fileview"
div = @find "datarea" div = @find "datarea"
ace.require "ace/ext/language_tools" ace.require "ace/ext/language_tools"
@currfile = if @args and @args.length > 0 then @args[0].asFileHandler() else undefined
@.editor = ace.edit div @.editor = ace.edit div
@.editor.setOptions { @.editor.setOptions {
enableBasicAutocompletion: true, enableBasicAutocompletion: true,
@ -16,7 +17,7 @@ class NotePad extends this.OS.GUI.BaseApplication
enableLiveAutocompletion: true, enableLiveAutocompletion: true,
fontSize: "9pt" fontSize: "9pt"
} }
@.editor.completers.push {getCompletions:(editor, session, pos, prefix, callback)->} @.editor.completers.push { getCompletions: ( editor, session, pos, prefix, callback ) -> }
@.editor.getSession().setUseWrapMode true @.editor.getSession().setUseWrapMode true
list = @find "modelist" list = @find "modelist"
@ -64,11 +65,20 @@ class NotePad extends this.OS.GUI.BaseApplication
@location.set "onlistselect", (e) -> me.chdir e.data.path @location.set "onlistselect", (e) -> me.chdir e.data.path
@location.set "items", [ @location.set "items", [
{ text: "Home", path: 'home:///', iconclass:"fa fa-home", selected:true}, { text: "Home", path: 'home:///', iconclass: "fa fa-home", selected: true },
{ text: "OS", path: 'os:///', iconclass:"fa fa-inbox" }, { text: "OS", path: 'os:///', iconclass: "fa fa-inbox" },
{ text: "Desktop", path: 'home:///.desktop', iconclass: "fa fa-desktop" }, { text: "Desktop", path: 'home:///.desktop', iconclass: "fa fa-desktop" },
] ]
@open @currfile if @currfile
open: (file) ->
me = @
file.read (d) ->
return unless d
me.scheme.set "apptitle", file.basename
me.editor.setValue d, -1
chdir: (p) -> chdir: (p) ->
me = @ me = @
me._api.handler.scandir p, me._api.handler.scandir p,
@ -82,10 +92,10 @@ class NotePad extends this.OS.GUI.BaseApplication
menu: ()-> menu: ()->
menu = [{ menu = [{
text:"File", text: "File",
child:[ child: [
{text:"Open", dataid:"#{@name}-Open"}, { text: "Open", dataid: "#{@name}-Open" },
{text:"Close", dataid:"#{@name}-Close"} { text: "Close", dataid: "#{@name}-Close" }
] ]
}] }]
menu menu

View File

@ -9,5 +9,5 @@
"version":"0.1a", "version":"0.1a",
"category":"System", "category":"System",
"iconclass":"fa fa-pencil-square-o", "iconclass":"fa fa-pencil-square-o",
"mimes":["*"] "mimes":[".*"]
} }

View File

@ -64,6 +64,7 @@ class wTerm extends this.OS.GUI.BaseApplication
@socket.onmessage = (e) -> me.term.write e.data if me.term and e.data @socket.onmessage = (e) -> me.term.write e.data if me.term and e.data
@socket.onclose = () -> @socket.onclose = () ->
me.socket = null me.socket = null
me.quit()
console.log "socket closed" console.log "socket closed"
#el.style.display = "block" #el.style.display = "block"
cleanup: (e)-> cleanup: (e)->

View File

@ -42,6 +42,48 @@ html,body{
cursor: default; cursor: default;
padding:0px; padding:0px;
} }
#desktop > div.float_list_item {
display:block;
background-color:transparent;
text-align: center;
width: 70px;
color: white;
padding:3px;
}
#desktop > div.float_list_item_selected {
display:block;
background-color: #116cd6;
color:white;
border-radius: 6px;
text-align: center;
width: 70px;
color: white;
padding:3px;
}
#desktop > div.float_list_item i.file:before{
content: "\f15b\a";
font-family: "FontAwesome";
font-size: 32px;
display: block;
color: white;
font-style: normal;
font-weight: normal;
}
#desktop > div.float_list_item span{
width: 100%;
word-wrap: break-word;
}
#desktop > div.float_list_item i.dir:before{
display: block;
content: "\f07b\a";
font-family: "FontAwesome";
font-size: 32px;
color: #76D2F9;
font-weight: normal;
font-style: normal;
}
input { input {
outline: none; outline: none;
padding: 2px; padding: 2px;