add shortcut to vterm

This commit is contained in:
Xuan Sang LE 2021-03-17 21:35:42 +01:00
commit e3a22774aa
13 changed files with 93 additions and 72 deletions

View File

@ -3,21 +3,21 @@
<div data-height="5"></div> <div data-height="5"></div>
<afx-hbox data-height = "30" > <afx-hbox data-height = "30" >
<afx-label data-width= "70" text = "__(Title)"></afx-label> <afx-label data-width= "70" text = "__(Title)"></afx-label>
<input type = "text" name="title" input-class = "user-input"/> <input type = "text" name="title" input-class = "user-input"></input>
</afx-hbox> </afx-hbox>
<afx-hbox data-height = "30" > <afx-hbox data-height = "30" >
<afx-label text = "__(Subtitle)" data-width= "70"></afx-label> <afx-label text = "__(Subtitle)" data-width= "70"></afx-label>
<input type = "text" name="subtitle" input-class = "user-input"/> <input type = "text" name="subtitle" input-class = "user-input"></input>
</afx-hbox> </afx-hbox>
<afx-hbox data-height = "30" > <afx-hbox data-height = "30" >
<afx-label text = "__(Location)" data-width= "70"></afx-label> <afx-label text = "__(Location)" data-width= "70"></afx-label>
<input type = "text" name="location" input-class = "user-input"/> <input type = "text" name="location" input-class = "user-input"></input>
</afx-hbox> </afx-hbox>
<afx-hbox data-height = "30" > <afx-hbox data-height = "30" >
<afx-label text = "__(From)" data-width= "70"></afx-label> <afx-label text = "__(From)" data-width= "70"></afx-label>
<input type = "text" name="start" input-class = "user-input"/> <input type = "text" name="start" input-class = "user-input"></input>
<afx-label text = "To:" style="text-align:center;" data-width= "70"></afx-label> <afx-label text = "To:" style="text-align:center;" data-width= "70"></afx-label>
<input type = "text" name="end" input-class = "user-input"/> <input type = "text" name="end" input-class = "user-input"></input>
</afx-hbox> </afx-hbox>
<afx-label data-height = "30" text = "Content" style = "margin-left:5px;"></afx-label> <afx-label data-height = "30" text = "Content" style = "margin-left:5px;"></afx-label>
<div data-id="editor-container"> <div data-id="editor-container">

View File

@ -6,27 +6,27 @@
<afx-vbox> <afx-vbox>
<afx-hbox data-height = "30"> <afx-hbox data-height = "30">
<afx-label data-width= "70" text = "__(Full name)"></afx-label> <afx-label data-width= "70" text = "__(Full name)"></afx-label>
<input type = "text" name="fullname" input-class = "user-input"/> <input type = "text" name="fullname" input-class = "user-input"></input>
</afx-hbox> </afx-hbox>
<afx-hbox data-height = "30"> <afx-hbox data-height = "30">
<afx-label text = "__(Address)" data-width= "70"></afx-label> <afx-label text = "__(Address)" data-width= "70"></afx-label>
<input type = "text" name="address" input-class = "user-input"/> <input type = "text" name="address" input-class = "user-input"></input>
</afx-hbox> </afx-hbox>
<afx-hbox data-height = "30"> <afx-hbox data-height = "30">
<afx-label text = "__(Phone)" data-width= "70"></afx-label> <afx-label text = "__(Phone)" data-width= "70"></afx-label>
<input type = "text" name="Phone" input-class = "user-input"/> <input type = "text" name="Phone" input-class = "user-input"></input>
</afx-hbox> </afx-hbox>
<afx-hbox data-height = "30"> <afx-hbox data-height = "30">
<afx-label text = "__(Email)" data-width= "70"></afx-label> <afx-label text = "__(Email)" data-width= "70"></afx-label>
<input type = "text" name="email" input-class = "user-input"/> <input type = "text" name="email" input-class = "user-input"></input>
</afx-hbox> </afx-hbox>
<afx-hbox data-height = "30"> <afx-hbox data-height = "30">
<afx-label text = "__(Url)" data-width= "70"></afx-label> <afx-label text = "__(Url)" data-width= "70"></afx-label>
<input type = "text" name="url" input-class = "user-input"/> <input type = "text" name="url" input-class = "user-input"></input>
</afx-hbox> </afx-hbox>
<afx-hbox data-height = "30"> <afx-hbox data-height = "30">
<afx-label text = "__(Photo)" data-width= "70"></afx-label> <afx-label text = "__(Photo)" data-width= "70"></afx-label>
<input type = "text" name="photo" data-id="photo" readonly="readonly" input-class = "user-input"/> <input type = "text" name="photo" data-id="photo" readonly="readonly" input-class = "user-input"></input>
</afx-hbox> </afx-hbox>
<afx-label data-height = "30" text = "__(Short biblio)"></afx-label> <afx-label data-height = "30" text = "__(Short biblio)"></afx-label>
<textarea name="shortbiblio" input-class = "user-input"></textarea> <textarea name="shortbiblio" input-class = "user-input"></textarea>
@ -71,7 +71,7 @@
</div> </div>
<afx-label text = "__(Tags)" style="font-weight:bold;" data-height="25" ></afx-label> <afx-label text = "__(Tags)" style="font-weight:bold;" data-height="25" ></afx-label>
<afx-hbox data-height="25"> <afx-hbox data-height="25">
<input type = "text" data-id = "input-tags" /> <input type = "text" data-id = "input-tags" ></input>
<div data-width="5"></div> <div data-width="5"></div>
<afx-switch data data-id = "blog-publish" data-width="30"></afx-switch> <afx-switch data data-id = "blog-publish" data-width="30"></afx-switch>
<div data-width="5"></div> <div data-width="5"></div>

View File

@ -6,7 +6,7 @@
<afx-vbox > <afx-vbox >
<div data-height="5"></div> <div data-height="5"></div>
<afx-label data-height="20" text = "__(Title)"></afx-label> <afx-label data-height="20" text = "__(Title)"></afx-label>
<input type = "text" data-height="20" name="title" data-id = "mail-title"/> <input type = "text" data-height="20" name="title" data-id = "mail-title"></input>
<afx-label data-height = "20" text = "Content" ></afx-label> <afx-label data-height = "20" text = "Content" ></afx-label>
<textarea name="content" data-id = "contentarea" ></textarea> <textarea name="content" data-id = "contentarea" ></textarea>
<div data-height="5"></div> <div data-height="5"></div>

View File

@ -296,29 +296,29 @@ PrintDialog.scheme = """
<afx-app-window width='300' height='300' data-id="DocifyPrintDialog" apptitle = "__(Print)"> <afx-app-window width='300' height='300' data-id="DocifyPrintDialog" apptitle = "__(Print)">
<afx-vbox> <afx-vbox>
<afx-label text = "__(Printer name)" data-height="22"></afx-label> <afx-label text = "__(Printer name)" data-height="22"></afx-label>
<input type="text" data-id="printerName" data-height="25"/> <input type="text" data-id="printerName" data-height="25"></input>
<afx-label text = "__(Range)" data-height="22"></afx-label> <afx-label text = "__(Range)" data-height="22"></afx-label>
<div> <div>
<input type="radio" name="range" value="0" checked /> <input type="radio" name="range" value="0" checked ></input>
<label for="0">All</label><br> <label for="0">All</label><br>
<input type="radio" name="range" value="1" /> <input type="radio" name="range" value="1" ></input>
<label for="1">Pages: </label> <label for="1">Pages: </label>
<input type="text" data-id="txtPageRange" /> <input type="text" data-id="txtPageRange" ></input>
</div> </div>
<afx-label text = "__(Orientation)" data-height="22"></afx-label> <afx-label text = "__(Orientation)" data-height="22"></afx-label>
<div> <div>
<input type="radio" name="orientation" value="0" checked /> <input type="radio" name="orientation" value="0" checked ></input>
<label for="0">Portrait</label><br> <label for="0">Portrait</label><br>
<input type="radio" name="orientation" value="1" /> <input type="radio" name="orientation" value="1" ></input>
<label for="1">Landscape</label> <label for="1">Landscape</label>
</div> </div>
<afx-label text = "__(Side)" data-height="22"></afx-label> <afx-label text = "__(Side)" data-height="22"></afx-label>
<div> <div>
<input type="radio" name="side" value="0" /> <input type="radio" name="side" value="0" ></input>
<label for="0">One side</label><br> <label for="0">One side</label><br>
<input type="radio" name="side" value="1" checked /> <input type="radio" name="side" value="1" checked ></input>
<label for="1">Double side long edge</label><br> <label for="1">Double side long edge</label><br>
<input type="radio" name="side" value="2" /> <input type="radio" name="side" value="2" ></input>
<label for="2">Double side short edge</label> <label for="2">Double side short edge</label>
</div> </div>
<div data-height="30" style="text-align:right;"> <div data-height="30" style="text-align:right;">

View File

@ -29,10 +29,10 @@ ClientDialog.scheme = """
<afx-vbox> <afx-vbox>
<div data-height="5"></div> <div data-height="5"></div>
<afx-label data-height="25" text = "__(Client name)"></afx-label> <afx-label data-height="25" text = "__(Client name)"></afx-label>
<input type="text" name="text" data-height="25" /> <input type="text" name="text" data-height="25" ></input>
<div data-height="5"></div> <div data-height="5"></div>
<afx-label data-height="25" text = "__(URL)"></afx-label> <afx-label data-height="25" text = "__(URL)"></afx-label>
<input type="text" name="url" data-height="25" /> <input type="text" name="url" data-height="25" ></input>
<div data-height="30" style="text-align: right;"> <div data-height="30" style="text-align: right;">
<afx-button data-id="btnok" text="__(Ok)"></afx-button> <afx-button data-id="btnok" text="__(Ok)"></afx-button>
<afx-button data-id="btncancel" text="__(Cancel)"></afx-button> <afx-button data-id="btncancel" text="__(Cancel)"></afx-button>

View File

@ -28,22 +28,22 @@ HyperLinkDialog.scheme = """
<afx-app-window width='350' height='150' apptitle = "Hyperlink"> <afx-app-window width='350' height='150' apptitle = "Hyperlink">
<afx-vbox> <afx-vbox>
<afx-hbox> <afx-hbox>
<div data-width = "10" /> <div data-width = "10" ></div>
<afx-vbox> <afx-vbox>
<div data-height="10" /> <div data-height="10" ></div>
<afx-label class="header" text = "__(Text)" data-height="23" /> <afx-label class="header" text = "__(Text)" data-height="23" ></afx-label>
<input data-height = "30" data-id = "txtText" /> <input data-height = "30" data-id = "txtText" ></input>
<afx-label class="header" text = "__(Link)" data-height="23" /> <afx-label class="header" text = "__(Link)" data-height="23" ></afx-label>
<input data-height = "30" data-id = "txtLink" /> <input data-height = "30" data-id = "txtLink" ></input>
<div data-height="10" /> <div data-height="10" ></div>
<afx-hbox data-height="30"> <afx-hbox data-height="30">
<div /> <div ></div>
<afx-button data-id = "btnOk" text = "__(Ok)" data-width = "40" /> <afx-button data-id = "btnOk" text = "__(Ok)" data-width = "40" ></afx-button>
<afx-button data-id = "btnCancel" text = "__(Cancel)" data-width = "40" /> <afx-button data-id = "btnCancel" text = "__(Cancel)" data-width = "40" ></afx-button>
<div data-width = "10" /> <div data-width = "10" ></div>
</afx-hbox> </afx-hbox>
</afx-vbox> </afx-vbox>
<div data-width = "10" /> <div data-width = "10" ></div>
</afx-hbox> </afx-hbox>
</afx-vbox> </afx-vbox>
</afx-app-window> </afx-app-window>

View File

@ -1,47 +1,47 @@
<afx-app-window data-id="example-show-case" apptitle="AntOS GUI widgets" width="650" height="500"> <afx-app-window data-id="example-show-case" apptitle="AntOS GUI widgets" width="650" height="500">
<afx-vbox> <afx-vbox>
<afx-menu data-height="30" data-id="menu" /> <afx-menu data-height="30" data-id="menu" ></afx-menu>
<afx-tab-container data-id="tabctn" dir = "column" tabbarheight= "30"> <afx-tab-container data-id="tabctn" dir = "column" tabbarheight= "30">
<afx-hbox tabname="Widgets"> <afx-hbox tabname="Widgets">
<afx-vbox data-width="150"> <afx-vbox data-width="150">
<afx-tree-view data-id="tree" dragndrop="true" /> <afx-tree-view data-id="tree" dragndrop="true" ></afx-tree-view>
<afx-slider data-id="slider" data-height="30" value="50"/> <afx-slider data-id="slider" data-height="30" value="50"></afx-slider>
</afx-vbox> </afx-vbox>
<afx-resizer data-width="5" /> <afx-resizer data-width="5" ></afx-resizer>
<afx-vbox data-width="grow"> <afx-vbox data-width="grow">
<afx-hbox min-height="50"> <afx-hbox min-height="50">
<afx-switch data-id="switch" /> <afx-switch data-id="switch" ></afx-switch>
<afx-button text="__(This is the label)" <afx-button text="__(This is the label)"
data-id="bttest" data-id="bttest"
iconclass="fa fa-camera-retro fa-lg" iconclass="fa fa-camera-retro fa-lg"
icon="os://packages/DummyApp/icon.png"/> icon="os://packages/DummyApp/icon.png"></afx-button>
<afx-nspinner data-id="spin" value="10" step="2" /> <afx-nspinner data-id="spin" value="10" step="2" ></afx-nspinner>
</afx-hbox> </afx-hbox>
<afx-resizer data-height="5" /> <afx-resizer data-height="5" ></afx-resizer>
<afx-hbox> <afx-hbox>
<afx-list-view data-id="list" dropdown="false" multiselect="true" /> <afx-list-view data-id="list" dropdown="false" multiselect="true" ></afx-list-view>
</afx-hbox> </afx-hbox>
<afx-hbox data-height="150"> <afx-hbox data-height="150">
<afx-grid-view data-id="grid" multiselect="false" /> <afx-grid-view data-id="grid" multiselect="false" ></afx-grid-view>
</afx-hbox> </afx-hbox>
</afx-vbox> </afx-vbox>
</afx-hbox> </afx-hbox>
<afx-hbox tabname="Calendar & color picker"> <afx-hbox tabname="Calendar & color picker">
<afx-calendar-view data-id = "cal"/> <afx-calendar-view data-id = "cal"></afx-calendar-view>
<afx-color-picker data-id = "cpk"/> <afx-color-picker data-id = "cpk"></afx-color-picker>
</afx-hbox> </afx-hbox>
<afx-hbox tabname="File view"> <afx-hbox tabname="File view">
<afx-vbox> <afx-vbox>
<afx-file-view data-id = "fileview" view="icon" /> <afx-file-view data-id = "fileview" view="icon" ></afx-file-view>
<afx-list-view data-id = "viewoption" data-height="30" dropdown="true" /> <afx-list-view data-id = "viewoption" data-height="30" dropdown="true" ></afx-list-view>
</afx-vbox> </afx-vbox>
</afx-hbox> </afx-hbox>
<afx-hbox tabname="Dialogs"> <afx-hbox tabname="Dialogs">
<afx-vbox> <afx-vbox>
<afx-list-view data-id = "dialoglist"/> <afx-list-view data-id = "dialoglist"></afx-list-view>
<afx-button data-id = "btrundia" text="Run dialog" data-height="30"/> <afx-button data-id = "btrundia" text="Run dialog" data-height="30"></afx-button>
</afx-vbox> </afx-vbox>
</afx-hbox> </afx-hbox>

View File

@ -1,3 +1,4 @@
<<<<<<< HEAD
(function() { (function() {
var Ant, ShowCase; var Ant, ShowCase;

View File

@ -7,7 +7,7 @@
"email": "xsang.le@gmail.com", "email": "xsang.le@gmail.com",
"licences": "GPLv3" "licences": "GPLv3"
}, },
"version":"0.0.4-a", "version":"0.0.5-a",
"category":"Other", "category":"Other",
"mimes":["none"], "mimes":["none"],
"iconclass": "fa fa-delicious", "iconclass": "fa fa-delicious",

View File

@ -1,47 +1,47 @@
<afx-app-window data-id="example-show-case" apptitle="AntOS GUI widgets" width="650" height="500"> <afx-app-window data-id="example-show-case" apptitle="AntOS GUI widgets" width="650" height="500">
<afx-vbox> <afx-vbox>
<afx-menu data-height="30" data-id="menu" /> <afx-menu data-height="30" data-id="menu" ></afx-menu>
<afx-tab-container data-id="tabctn" dir = "column" tabbarheight= "30"> <afx-tab-container data-id="tabctn" dir = "column" tabbarheight= "30">
<afx-hbox tabname="Widgets"> <afx-hbox tabname="Widgets">
<afx-vbox data-width="150"> <afx-vbox data-width="150">
<afx-tree-view data-id="tree" dragndrop="true" /> <afx-tree-view data-id="tree" dragndrop="true" ></afx-tree-view>
<afx-slider data-id="slider" data-height="30" value="50"/> <afx-slider data-id="slider" data-height="30" value="50"></afx-slider>
</afx-vbox> </afx-vbox>
<afx-resizer data-width="5" /> <afx-resizer data-width="5" ></afx-resizer>
<afx-vbox data-width="grow"> <afx-vbox data-width="grow">
<afx-hbox min-height="50"> <afx-hbox min-height="50">
<afx-switch data-id="switch" /> <afx-switch data-id="switch" ></afx-switch>
<afx-button text="__(This is the label)" <afx-button text="__(This is the label)"
data-id="bttest" data-id="bttest"
iconclass="fa fa-camera-retro fa-lg" iconclass="fa fa-camera-retro fa-lg"
icon="os://packages/DummyApp/icon.png"/> icon="os://packages/DummyApp/icon.png" ></afx-button>
<afx-nspinner data-id="spin" value="10" step="2" /> <afx-nspinner data-id="spin" value="10" step="2" ></afx-nspinner>
</afx-hbox> </afx-hbox>
<afx-resizer data-height="5" /> <afx-resizer data-height="5" ></afx-resizer>
<afx-hbox> <afx-hbox>
<afx-list-view data-id="list" dropdown="false" multiselect="true" /> <afx-list-view data-id="list" dropdown="false" multiselect="true" ></afx-list-view>
</afx-hbox> </afx-hbox>
<afx-hbox data-height="150"> <afx-hbox data-height="150">
<afx-grid-view data-id="grid" multiselect="false" /> <afx-grid-view data-id="grid" multiselect="false" ></afx-grid-view>
</afx-hbox> </afx-hbox>
</afx-vbox> </afx-vbox>
</afx-hbox> </afx-hbox>
<afx-hbox tabname="Calendar & color picker"> <afx-hbox tabname="Calendar & color picker">
<afx-calendar-view data-id = "cal"/> <afx-calendar-view data-id = "cal"></afx-calendar-view>
<afx-color-picker data-id = "cpk"/> <afx-color-picker data-id = "cpk"></afx-color-picker>
</afx-hbox> </afx-hbox>
<afx-hbox tabname="File view"> <afx-hbox tabname="File view">
<afx-vbox> <afx-vbox>
<afx-file-view data-id = "fileview" view="icon" /> <afx-file-view data-id = "fileview" view="icon" ></afx-file-view>
<afx-list-view data-id = "viewoption" data-height="30" dropdown="true" /> <afx-list-view data-id = "viewoption" data-height="30" dropdown="true" ></afx-list-view>
</afx-vbox> </afx-vbox>
</afx-hbox> </afx-hbox>
<afx-hbox tabname="Dialogs"> <afx-hbox tabname="Dialogs">
<afx-vbox> <afx-vbox>
<afx-list-view data-id = "dialoglist"/> <afx-list-view data-id = "dialoglist"></afx-list-view>
<afx-button data-id = "btrundia" text="Run dialog" data-height="30"/> <afx-button data-id = "btrundia" text="Run dialog" data-height="30"></afx-button>
</afx-vbox> </afx-vbox>
</afx-hbox> </afx-hbox>

Binary file not shown.

View File

@ -10,6 +10,8 @@ class ShowCase extends this.OS.application.BaseApplication
@observable.on "btclick", (e) => @observable.on "btclick", (e) =>
@notify "button clicked" @notify "button clicked"
@bindKey("CTRL-SHIFT-P", (e) => @notify("CTRL-SHIFT-P shortcut executed"))
list = @find 'list' list = @find 'list'
list.data = [ list.data = [
@ -137,7 +139,8 @@ class ShowCase extends this.OS.application.BaseApplication
{ text: "Selection dialog", id: "selection" }, { text: "Selection dialog", id: "selection" },
{ text: "About dialog", id: "about" }, { text: "About dialog", id: "about" },
{ text: "File dialog", id: "file" }, { text: "File dialog", id: "file" },
{ text: "Text dialog", id: "text" } { text: "Text dialog", id: "text" },
{ text: "Multi-input dialog", id: "minputs" }
] ]
btrun.onbtclick = (e) => btrun.onbtclick = (e) =>
@ -208,6 +211,23 @@ class ShowCase extends this.OS.application.BaseApplication
}) })
.then (d) => .then (d) =>
@notify d @notify d
when "minputs"
@openDialog("MultiInputDialog", {
title: "Multi-inputs",
model: {
name: "Your name",
email: "Your email",
where: "Your address"
},
allow_empty: false,
data: {
name: "John Doe",
email: "jd@mail.com",
where: "Anywhere on Earth"
}
})
.then (d) =>
@notify JSON.stringify(d)
else return else return

View File

@ -7,7 +7,7 @@
"email": "xsang.le@gmail.com", "email": "xsang.le@gmail.com",
"licences": "GPLv3" "licences": "GPLv3"
}, },
"version":"0.0.4-a", "version":"0.0.5-a",
"category":"Other", "category":"Other",
"mimes":["none"], "mimes":["none"],
"iconclass": "fa fa-delicious", "iconclass": "fa fa-delicious",