add setting package

This commit is contained in:
Xuan Sang LE
2018-03-11 21:31:40 +01:00
parent 10015d99b0
commit 8fef0c5e96
23 changed files with 231 additions and 24 deletions

View File

@ -80,7 +80,7 @@ class CodeBlock extends this.OS.GUI.BaseApplication
@socket.onopen = () ->
console.log "socket open"
enc = new TextEncoder "utf-8"
me.socket.send enc.encode me.blen + "os:///packages/packages.json"
me.socket.send enc.encode me.blen + "os://packages/packages.json"
@socket.onmessage = (e) ->
console.log e.data

View File

@ -8,7 +8,7 @@ class Files extends this.OS.GUI.BaseApplication
@view = @find "fileview"
@navinput = @find "navinput"
@navbar = @find "nav-bar"
@currdir = if @args and @args.length > 0 then @args[0].asFileHandler() else "home:///".asFileHandler()
@currdir = if @args and @args.length > 0 then @args[0].asFileHandler() else "home://".asFileHandler()
@favo = @find "favouri"
@clipboard = undefined

View File

@ -0,0 +1,11 @@
coffee_files = main.coffee
jsfiles =
cssfiles = main.css
copyfiles = scheme.html package.json schemes
PKG_NAME=Setting
include ../pkg.mk

View File

@ -0,0 +1,25 @@
class Setting extends this.OS.GUI.BaseApplication
constructor: (args) ->
super "Setting", args
main: () ->
me = @
@container = @find "container"
@container.setTabs [
{
text: "Appearance",
iconclass: "fa fa-paint-brush",
url: "#{@path()}/schemes/appearance.html",
f: () ->
console.log "finish init appearance"
},
{
text: "VFS",
iconclass: "fa fa-inbox" ,
url: "#{@path()}/schemes/vfs.html" ,
f: () ->
console.log "finish init VFS"
}
]
Setting.singleton = true
this.OS.register "Setting", Setting

View File

@ -0,0 +1,11 @@
afx-app-window[data-id = "setting-window"] afx-tab-container afx-tab-bar afx-list-view > div > ul > li{
float:none;
border-radius: 0;
font-weight: bold;
padding-top:3px;
padding-bottom: 3px;
border:0;
}
afx-app-window[data-id = "setting-window"] afx-tab-container div[data-ref="container"]{
border-left: 1px solid #cbcbcb;
}

View File

@ -0,0 +1,13 @@
{
"app":"Setting",
"name":"System setting",
"description":"System setting",
"info":{
"author": "Xuan Sang LE",
"email": "xsang.le@gmail.com"
},
"version":"0.1a",
"category":"System",
"iconclass":"fa fa-wrench",
"mimes":["none"]
}

View File

@ -0,0 +1,5 @@
<afx-app-window data-id = "setting-window" apptitle="Setting" width="600" height="400">
<afx-vbox>
<afx-tab-container data-id = "container" barwidth="120" bar="left"></afx-tab-container>
</afx-vbox>
</afx-app-window>

View File

@ -0,0 +1,14 @@
<afx-vbox>
<afx-label text = "__(Wallpaper)" class = "header" data-height="30"></afx-label>
<afx-hbox>
<afx-list-view data-width="120"></afx-list-view>
<div>
</div>
</afx-hbox>
<afx-label text = "__(Theme)" class = "header" data-height="30"></afx-label>
<afx-list-view data-height="50" dropdown="true"></afx-list-view>
<afx-hbox data-height="30" >
<div></div>
<afx-button text="__(Save)" iconclass="fa fa-save" data-width="50"></afx-button>
</afx-hbox>
</afx-vbox>

View File

@ -0,0 +1 @@
<afx-label text = "example2" ></afx-label>