mirror of
https://github.com/lxsang/antos-frontend.git
synced 2025-07-27 11:19:47 +02:00
fix minor error
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
<afx-app-window data-id = "am-window" apptitle="" width="400" height="300">
|
||||
<afx-hbox>
|
||||
<afx-vbox>
|
||||
<afx-grid-view data-id = "mygrid"></afx-grid-view>
|
||||
<afx-button data-height="30" data-id = "btkill" text = "Kill process" iconclass="fa fa-times"></afx-button>
|
||||
</afx-hbox>
|
||||
</afx-vbox>
|
||||
</afx-app-window>
|
@ -1,5 +1,6 @@
|
||||
{
|
||||
"app":null,
|
||||
"services": [ "Calendar", "PushNotification", "Spotlight" ]
|
||||
"name":"CoreServices",
|
||||
"description":"This is the core services",
|
||||
"info":{
|
||||
|
@ -11,5 +11,5 @@
|
||||
"version":"0.1a",
|
||||
"category":"System",
|
||||
"iconclass":"fa fa-user-circle-o",
|
||||
"mimes":[".*"]
|
||||
"mimes":["none"]
|
||||
}
|
@ -1,13 +1,15 @@
|
||||
<afx-app-window apptitle="Preview" width="650" height="500">
|
||||
<afx-vbox>
|
||||
<afx-tab-container data-id="mytabs" closable = true></afx-tab-container>
|
||||
<afx-tree-view data-id="mytree"> </afx-tree-view>
|
||||
<afx-hbox>
|
||||
<afx-hbox>
|
||||
<afx-vbox>
|
||||
<afx-tab-container data-height = "50" data-id="mytabs" closable = true></afx-tab-container>
|
||||
<afx-tree-view data-id="mytree"> </afx-tree-view>
|
||||
</afx-vbox>
|
||||
<afx-vbox>
|
||||
<afx-button data-height="30" text="Read more" iconclass="fa fa-camera-retro fa-lg" id="button"></afx-button>
|
||||
<afx-switch enable= true data-height="30"></afx-switch>
|
||||
<afx-calendar-view></afx-calendar-view>
|
||||
<afx-color-picker></afx-color-picker>
|
||||
<afx-list-view data-id = "mylist" dropdown = "true" width="200" data-height = "40"></afx-list-view>
|
||||
</afx-hbox>
|
||||
</afx-vbox>
|
||||
</afx-vbox>
|
||||
</afx-hbox>
|
||||
</afx-app-window>
|
@ -81,13 +81,20 @@ class Files extends this.OS.GUI.BaseApplication
|
||||
me.view.set "data", d.result
|
||||
|
||||
mnFile:() ->
|
||||
#console.log file
|
||||
me = @
|
||||
f = () ->
|
||||
console.log "called"
|
||||
file = me.view.get "selectedFile"
|
||||
return undefined unless file
|
||||
return me._gui.appsByMime file.mime
|
||||
|
||||
{
|
||||
text: "File",
|
||||
child: [
|
||||
{ text: "New file", dataid: "#{@name}-mkf" },
|
||||
{ text: "New folder", dataid: "#{@name}-mkdir" },
|
||||
{ text: "Open", dataid: "#{@name}-open" },
|
||||
{ text: "Open with", dataid: "#{@name}-open", child: f },
|
||||
{ text: "Upload", dataid: "#{@name}-upload" },
|
||||
{ text: "Download", dataid: "#{@name}-download" },
|
||||
{ text: "Properties", dataid: "#{@name}-info" }
|
||||
|
@ -1,14 +1,14 @@
|
||||
<afx-app-window data-id = "files-app-window" apptitle="Files" width="600" height="400">
|
||||
<afx-hbox>
|
||||
<afx-vbox data-height = "30" data-id = "nav-bar">
|
||||
<afx-vbox>
|
||||
<afx-hbox data-height = "30" data-id = "nav-bar">
|
||||
<afx-button data-width = "30" data-id = "btback" iconclass = "fa fa-arrow-left"></afx-button>
|
||||
<input type = "text" data-id = "navinput"></input>
|
||||
<div data-width = "5"></div>
|
||||
</afx-vbox>
|
||||
<afx-vbox>
|
||||
</afx-hbox>
|
||||
<afx-hbox>
|
||||
<afx-list-view data-id = "favouri" data-width = "150">
|
||||
</afx-list-view>
|
||||
<afx-file-view data-id = "fileview"></afx-file-view>
|
||||
</afx-vbox>
|
||||
</afx-hbox>
|
||||
</afx-hbox>
|
||||
</afx-vbox>
|
||||
</afx-app-window>
|
@ -8,6 +8,7 @@ class MarkOn extends this.OS.GUI.BaseApplication
|
||||
@container = @find "mycontainer"
|
||||
@previewOn = false
|
||||
@currfile = if @args and @args.length > 0 then @args[0].asFileHandler() else "Untitled".asFileHandler()
|
||||
@editormux = false
|
||||
@editor = new SimpleMDE
|
||||
element: markarea
|
||||
autofocus: true
|
||||
@ -38,7 +39,10 @@ class MarkOn extends this.OS.GUI.BaseApplication
|
||||
]
|
||||
|
||||
@editor.codemirror.on "change", () ->
|
||||
console.log "thing changed"
|
||||
return if me.editormux
|
||||
if me.currfile.dirty is false
|
||||
me.currfile.dirty = true
|
||||
me.scheme.set "apptitle", "#{me.currfile.basename}*"
|
||||
@on "vboxchange", (e) -> me.resizeContent()
|
||||
@resizeContent()
|
||||
@open @currfile
|
||||
@ -53,9 +57,14 @@ class MarkOn extends this.OS.GUI.BaseApplication
|
||||
|
||||
open: (file) ->
|
||||
#find table
|
||||
return if file.path is "Untitled"
|
||||
me = @
|
||||
file.dirty = false
|
||||
file.read (d) ->
|
||||
me.editormux = true
|
||||
me.editor.value d
|
||||
me.scheme.set "apptitle", "#{me.currfile.basename}"
|
||||
me.editormux = false
|
||||
|
||||
|
||||
save: (file) ->
|
||||
@ -64,6 +73,7 @@ class MarkOn extends this.OS.GUI.BaseApplication
|
||||
return me.error "Error saving file #{file.basename}" if d.error
|
||||
file.dirty = false
|
||||
file.text = file.basename
|
||||
me.scheme.set "apptitle", "#{me.currfile.basename}"
|
||||
|
||||
menu: () ->
|
||||
me = @
|
||||
@ -97,4 +107,15 @@ class MarkOn extends this.OS.GUI.BaseApplication
|
||||
when "#{@name}-Saveas"
|
||||
@currfile.cache = @editor.value()
|
||||
saveas()
|
||||
|
||||
cleanup: (evt) ->
|
||||
return unless @currfile.dirty
|
||||
me = @
|
||||
evt.preventDefault()
|
||||
@.openDialog "YesNoDialog", (d) ->
|
||||
if d
|
||||
me.currfile.dirty = false
|
||||
me.quit()
|
||||
, "Quit", { text: "Quit without saving ?" }
|
||||
|
||||
this.OS.register "MarkOn", MarkOn
|
@ -1,7 +1,7 @@
|
||||
<afx-app-window data-id = "markon-win" apptitle="Markon" width="600" height="450">
|
||||
<afx-vbox >
|
||||
<afx-hbox >
|
||||
<div data-id = "mycontainer">
|
||||
<textarea data-id="markarea" ></textarea>
|
||||
</div>
|
||||
</afx-vbox>
|
||||
</afx-hbox>
|
||||
</afx-app-window>
|
@ -215,7 +215,17 @@ class NotePad extends this.OS.GUI.BaseApplication
|
||||
when "#{@name}-Saveas"
|
||||
@currfile.cache = @editor.getValue()
|
||||
saveas()
|
||||
|
||||
|
||||
cleanup: (evt) ->
|
||||
dirties = ( v for v in @tabarea.get "items" when v.dirty )
|
||||
return if dirties.length is 0
|
||||
me = @
|
||||
evt.preventDefault()
|
||||
@.openDialog "YesNoDialog", (d) ->
|
||||
if d
|
||||
v.dirty = false for v in dirties
|
||||
me.quit()
|
||||
, "Quit", { text: "Ignore all #{dirties.length} unsaved files ?" }
|
||||
|
||||
NotePad.singleton = false
|
||||
this.OS.register "NotePad", NotePad
|
@ -1,18 +1,18 @@
|
||||
<afx-app-window apptitle="" width="600" height="400" data-id="notepad">
|
||||
<afx-vbox>
|
||||
<afx-hbox data-width = "175" data-id = "sidebar">
|
||||
<afx-hbox>
|
||||
<afx-vbox data-width = "175" data-id = "sidebar">
|
||||
<afx-list-view data-id = "location" dropdown = "true" data-height= "30" width = "150"></afx-list-view>
|
||||
<afx-file-view data-id = "fileview" view='tree' status = false></afx-file-view>
|
||||
</afx-hbox>
|
||||
<afx-hbox>
|
||||
</afx-vbox>
|
||||
<afx-vbox>
|
||||
<afx-tab-container data-id="tabarea" data-height="26" closable = true></afx-tab-container>
|
||||
<div data-id="datarea"></div>
|
||||
<afx-vbox data-height="30" data-id="bottom-vbox">
|
||||
<afx-hbox data-height="30" data-id="bottom-vbox">
|
||||
<div ><span data-id = "editorstat"></span></div>
|
||||
<afx-list-view data-width="160" data-id = "themelist" dropdown = "true" width="135"></afx-list-view>
|
||||
<afx-list-view data-width="125" data-id = "modelist" dropdown = "true" width="100"></afx-list-view>
|
||||
|
||||
</afx-vbox>
|
||||
</afx-hbox>
|
||||
</afx-vbox>
|
||||
</afx-hbox>
|
||||
</afx-vbox>
|
||||
</afx-hbox>
|
||||
</afx-app-window>
|
@ -31,6 +31,8 @@ class wTerm extends this.OS.GUI.BaseApplication
|
||||
end = if (i + 1) * 1000 > len then len else (i + 1) * 1000
|
||||
me.term.write pastedText.substring i * 1000, end
|
||||
#self.socket.send("i"+ substr.replace(/\n/g,"\r\n"))
|
||||
# make desktop menu if not exist
|
||||
@systemsetting.desktop.menu.push { text: "Open terminal", app: "wTerm" }
|
||||
@openSession()
|
||||
@on "vboxchange", (e) -> me.resizeContent e.w, e.h
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<afx-app-window apptitle="Preview" width="600" height="400">
|
||||
<afx-vbox data-id = "mybox">
|
||||
<afx-hbox data-id = "mybox">
|
||||
<div data-id="myterm" ></div>
|
||||
</afx-vbox>
|
||||
</afx-hbox>
|
||||
</afx-app-window>
|
Reference in New Issue
Block a user