Improvements on GUI + API:

- Add generic key-value dialog
- Allow multiple file upload
- Add ESC and enter key handle to dialog
- Improve File application
This commit is contained in:
lxsang 2021-03-30 16:54:49 +02:00
parent f7a3373d23
commit 20840d09b0
11 changed files with 696 additions and 73 deletions

Binary file not shown.

View File

@ -238,6 +238,7 @@ namespace OS {
* @memberof BasicDialog
*/
init(): void {
//this._onenter = undefined;
if (this.markup) {
if (typeof this.markup === "string") {
return GUI.htmlToScheme(this.markup, this, this.host);
@ -263,11 +264,27 @@ namespace OS {
*/
main(): void {
const win = this.scheme as tag.WindowTag;
$(win).attr("tabindex", 0);
$(win).on('keydown', (e) => {
switch (e.which) {
case 27:
return this.quit();
case 13:
const btn = $("afx-button", win).filter(function () {
const did = $(this).attr('data-id').toLowerCase();
return did === "btnok" || did === "btnyes";
});
return $("button", btn).trigger("click");
default:
return;
}
});
if (this.data && this.data.title) {
win.apptitle = this.data.title;
}
win.resizable = false;
win.minimizable = false;
$(win).trigger("focus");
}
}
@ -339,7 +356,7 @@ namespace OS {
return this.quit();
};
$input.on("keyup",(e) => {
$input.on("keyup", (e) => {
if (e.which !== 13) {
return;
}
@ -411,7 +428,7 @@ namespace OS {
if (this.data && this.data.disable) {
$input.prop('disabled', true);
}
(this.find("btnOk") as tag.ButtonTag).onbtclick = (_e) => {
(this.find("btn-Ok") as tag.ButtonTag).onbtclick = (_e) => {
const value = $input.val();
if (!value || value === "") {
return;
@ -445,7 +462,7 @@ namespace OS {
<div data-height="10" ></div>
<afx-hbox data-height="30">
<div ></div>
<afx-button data-id = "btnOk" text = "__(Ok)" data-width = "40" ></afx-button>
<afx-button data-id = "btn-Ok" text = "__(Ok)" data-width = "40" ></afx-button>
<afx-button data-id = "btnCancel" text = "__(Cancel)" data-width = "50" ></afx-button>
</afx-hbox>
</afx-vbox>
@ -1070,7 +1087,7 @@ namespace OS {
return $(filename).val(e.data.filename);
}
};
(this.find("bt-ok") as tag.ButtonTag).onbtclick = (_e) => {
(this.find("btnOk") as tag.ButtonTag).onbtclick = (_e) => {
const f = fileview.selectedFile;
if (!f) {
return this.notify(
@ -1149,7 +1166,7 @@ namespace OS {
<input data-height = '26' type = "text" data-id = "filename" style="margin-left:5px; margin-right:5px;display:none;" ></input>
<afx-hbox data-height = '30'>
<div style=' text-align:right;'>
<afx-button data-id = "bt-ok" text = "__(Ok)"></afx-button>
<afx-button data-id = "btnOk" text = "__(Ok)"></afx-button>
<afx-button data-id = "bt-cancel" text = "__(Cancel)"></afx-button>
</div>
<div data-width="5"></div>
@ -1305,6 +1322,151 @@ namespace OS {
<div data-width="10" ></div>
</afx-hbox>
</afx-app-window>`;
/**
* Generic dynamic key-value dialog
*
* Allow user to input any data key-value based object:
*
* {
* [prop:string]: string;
* }
*
* @export
* @class KeyValueDialog
* @extends {BasicDialog}
*/
export class KeyValueDialog extends BasicDialog {
/**
* Reference to the form container
*
* @private
* @type {HTMLDivElement}
* @memberof KeyValueDialog
*/
private container: HTMLDivElement;
/**
* Creates an instance of KeyValueDialog.
* @memberof KeyValueDialog
*/
constructor() {
super("KeyValueDialog");
}
/**
* Main entry point
*
* @memberof KeyValueDialog
*/
main(): void {
super.main();
this.container = this.find("container") as HTMLDivElement;
(this.find("btnCancel") as tag.ButtonTag).onbtclick = (e) => this.quit();
(this.find("btnAdd") as tag.ButtonTag).onbtclick = (e) => this.addField("", "", true);
$(this.find("wrapper"))
$(this.container)
.css("overflow-y", "auto");
if (this.data && this.data.data) {
for (const key in this.data.data) {
const value = this.data.data[key];
this.addField(key, value, false);
}
}
else {
this.addField("key", "value", false);
}
(this.find("btnOk") as tag.ButtonTag).onbtclick = (e) => {
const inputs = $("input", this.scheme) as JQuery<HTMLInputElement>;
let cdata: GenericObject<string> = {};
for (let i = 0; i < inputs.length; i += 2) {
const key = inputs[i].value.trim();
if (key === "") {
return this.notify(__("Key cannot be empty"));
}
if (cdata[key]) {
return this.notify(__("Duplicate key: {0}", key));
}
cdata[key] = inputs[i + 1].value.trim();
}
if (this.handle)
this.handle(cdata);
this.quit();
}
}
/**
* Add new input key-value field to the dialog
*
* @private
* @memberof KeyValueDialog
*/
private addField(key: string, value: string, removable: boolean): void {
const div = $("<div>")
.css("width", "100%")
.css("display", "flex")
.css("flex-direction", "row")
.appendTo(this.container);
$("<input>")
.attr("type", "text")
.css("width", "120px")
.css("height", "23px")
.val(key)
.appendTo(div);
$("<input>")
.attr("type", "text")
.css("width", "200px")
.css("height", "23px")
.val(value)
.appendTo(div);
if (removable) {
const btn = $("<afx-button>");
btn[0].uify(undefined);
$("button", btn)
.css("width", "23px")
.css("height", "23px");
(btn[0] as tag.ButtonTag).iconclass = "fa fa-minus";
btn
.on("click", () => {
div.remove();
})
.appendTo(div);
}
else {
$("<div>")
.css("width", "23px")
.appendTo(div);
}
}
}
/**
* Scheme definition
*/
KeyValueDialog.scheme = `\
<afx-app-window width='350' height='300'>
<afx-hbox>
<div data-width="10" ></div>
<afx-vbox>
<div data-height="5" ></div>
<afx-label text="__(Enter key-value data)" data-height="30"></afx-label>
<div data-id="container"></div>
<afx-hbox data-height="30">
<afx-button data-id = "btnAdd" iconclass="fa fa-plus" data-width = "30" ></afx-button>
<div ></div>
<afx-button data-id = "btnOk" text = "__(Ok)" data-width = "40" ></afx-button>
<afx-button data-id = "btnCancel" text = "__(Cancel)" data-width = "50" ></afx-button>
</afx-hbox>
<div data-height="5" ></div>
</afx-vbox>
<div data-width="10" ></div>
</afx-hbox>
</afx-app-window>`;
}
}
}

View File

@ -239,7 +239,7 @@ namespace OS {
return range;
}
Ant.__ = function(...args: any[]): FormattedString | string {
Ant.__ = function (...args: any[]): FormattedString | string {
if (!(args.length > 0)) {
return "Undefined";
}
@ -251,7 +251,7 @@ namespace OS {
);
};
Ant.__e = function(e: Error): Error {
Ant.__e = function (e: Error): Error {
const reason = new Error(e.toString());
reason.stack += "\nCaused By:\n" + e.stack;
return reason;
@ -611,7 +611,7 @@ namespace OS {
writable: true,
});
String.prototype.hash = function(): number {
String.prototype.hash = function (): number {
let hash = 5381;
let i = this.length;
while (i) {
@ -619,10 +619,10 @@ namespace OS {
}
return hash >>> 0;
};
String.prototype.__v = function(): Version {
String.prototype.__v = function (): Version {
return new Version(this);
};
String.prototype.asBase64 = function(): string {
String.prototype.asBase64 = function (): string {
const tmp = encodeURIComponent(this);
return btoa(
tmp.replace(/%([0-9A-F]{2})/g, (match, p1) =>
@ -630,8 +630,8 @@ namespace OS {
)
);
};
String.prototype.escape = function(): string {
return this.replace(/[\0\x08\x09\x1a\n\r"'\\\%]/g, function(
String.prototype.escape = function (): string {
return this.replace(/[\0\x08\x09\x1a\n\r"'\\\%]/g, function (
c: string
) {
switch (c) {
@ -658,11 +658,11 @@ namespace OS {
}
});
};
String.prototype.unescape = function(): string {
String.prototype.unescape = function (): string {
let json = JSON.parse(`{ "text": "${this}"}`)
return json.text;
};
String.prototype.asUint8Array = function(): Uint8Array {
String.prototype.asUint8Array = function (): Uint8Array {
let bytes = [];
for (
let i = 0, end = this.length - 1, asc = 0 <= end;
@ -675,8 +675,8 @@ namespace OS {
};
if (!String.prototype.format) {
String.prototype.format = function(...args: any[]): string {
return this.replace(/{(\d+)}/g, function(
String.prototype.format = function (...args: any[]): string {
return this.replace(/{(\d+)}/g, function (
match: string,
number: number
) {
@ -689,38 +689,38 @@ namespace OS {
};
}
String.prototype.f = function(...args: any[]): FormattedString {
String.prototype.f = function (...args: any[]): FormattedString {
return new FormattedString(this, args);
};
String.prototype.__ = function(): string {
String.prototype.__ = function (): string {
const match = this.match(/^__\((.*)\)$/);
if (match) {
return match[1].l();
}
return this;
};
String.prototype.l = function(): string {
String.prototype.l = function (): string {
if (!API.lang[this]) {
API.lang[this] = this;
}
return API.lang[this];
};
String.prototype.trimFromLeft = function(charlist: string): string {
String.prototype.trimFromLeft = function (charlist: string): string {
if (charlist === undefined) charlist = "s";
return this.replace(new RegExp("^[" + charlist + "]+"), "") as string;
};
String.prototype.trimFromRight = function(charlist: string): string {
String.prototype.trimFromRight = function (charlist: string): string {
if (charlist === undefined) charlist = "s";
return this.replace(new RegExp("[" + charlist + "]+$"), "") as string;
};
String.prototype.trimBy = function(charlist: string): string {
String.prototype.trimBy = function (charlist: string): string {
return this.trimFromLeft(charlist).trimFromRight(charlist) as string;
};
Date.prototype.toString = function(): string {
Date.prototype.toString = function (): string {
let dd = this.getDate();
let mm = this.getMonth() + 1;
const yyyy = this.getFullYear();
@ -746,7 +746,7 @@ namespace OS {
return `${dd}/${mm}/${yyyy} ${hh}:${mi}:${se}`;
};
Date.prototype.timestamp = function(): number {
Date.prototype.timestamp = function (): number {
return (this.getTime() / 1000) | 0;
};
@ -825,7 +825,7 @@ namespace OS {
console.log("Booting system");
API.handle
.auth()
.then(function(d: API.RequestResult) {
.then(function (d: API.RequestResult) {
// in case someone call it more than once :)
if (d.error) {
// show login screen
@ -860,7 +860,7 @@ namespace OS {
}
API.handle
.setting()
.then(function(r: any) {
.then(function (r: any) {
cleanup();
return API.handle.logout().then((d: any) => boot());
})
@ -1059,7 +1059,7 @@ namespace OS {
* @memberof PackageMetaType
*/
version: string;
/**
* Package dependencies, each entry is in the following format
*
@ -1132,7 +1132,7 @@ namespace OS {
* @returns {Promise<any>} a promise on the result data
*/
export function post(p: string, d: any): Promise<any> {
return new Promise(function(resolve, reject) {
return new Promise(function (resolve, reject) {
const q = announcer.getMID();
API.loading(q, p);
return $.ajax({
@ -1141,7 +1141,7 @@ namespace OS {
contentType: "application/json",
data: JSON.stringify(
d,
function(k, v) {
function (k, v) {
if (k === "domel") {
return undefined;
}
@ -1152,11 +1152,11 @@ namespace OS {
dataType: "json",
success: null,
})
.done(function(data) {
.done(function (data) {
API.loaded(q, p, "OK");
return resolve(data);
})
.fail(function(j, s, e) {
.fail(function (j, s, e) {
API.loaded(q, p, "FAIL");
return reject(API.throwe(s));
});
@ -1175,12 +1175,12 @@ namespace OS {
* @returns {Promise<ArrayBuffer>} a promise on the returned binary data
*/
export function blob(p: string): Promise<ArrayBuffer> {
return new Promise(function(resolve, reject) {
return new Promise(function (resolve, reject) {
const q = announcer.getMID();
const r = new XMLHttpRequest();
r.open("GET", p, true);
r.responseType = "arraybuffer";
r.onload = function(e) {
r.onload = function (e) {
if (this.status === 200 && this.readyState === 4) {
API.loaded(q, p, "OK");
resolve(this.response);
@ -1205,36 +1205,42 @@ namespace OS {
* @returns {Promise<any>}
*/
export function upload(p: string, d: string): Promise<any> {
return new Promise(function(resolve, reject) {
return new Promise(function (resolve, reject) {
const q = announcer.getMID();
//insert a temporal file selector
const o = $("<input>")
.attr("type", "file")
.css("display", "none");
o.on("change",function() {
API.loading(q, p);
const formd = new FormData();
formd.append("path", d);
// TODO: only one file is selected at this time
formd.append("upload", (o[0] as HTMLInputElement).files[0]);
return $.ajax({
url: p,
data: formd,
type: "POST",
contentType: false,
processData: false,
})
.done(function(data) {
API.loaded(q, p, "OK");
resolve(data);
return o.remove();
const o = $("#antos_upload_files");
o.on("change", function () {
const files = (o[0] as HTMLInputElement).files;
const n_files = files.length;
const tasks = [];
if (n_files > 0)
API.loading(q, p);
Array.from(files).forEach(file => {
const formd = new FormData();
formd.append("path", d);
formd.append("upload", file);
return $.ajax({
url: p,
data: formd,
type: "POST",
contentType: false,
processData: false,
})
.fail(function(j, s, e) {
API.loaded(q, p, "FAIL");
reject(API.throwe(s));
return o.remove();
});
.done(function (data) {
tasks.push("OK");
if (tasks.length == n_files)
{
API.loaded(q, p, "OK");
resolve(data);
}
})
.fail(function (j, s, e) {
tasks.push("FAIL");
if (tasks.length == n_files)
API.loaded(q, p, "FAIL");
reject(API.throwe(s));
});
});
});
return o.trigger("click");
});
@ -1310,7 +1316,7 @@ namespace OS {
* @returns {Promise<any>} a Promise on the requested data
*/
export function get(p: string, t: string = undefined): Promise<any> {
return new Promise(function(resolve, reject) {
return new Promise(function (resolve, reject) {
const conf: any = {
type: "GET",
url: p,
@ -1321,11 +1327,11 @@ namespace OS {
const q = announcer.getMID();
API.loading(q, p);
return $.ajax(conf)
.done(function(data) {
.done(function (data) {
API.loaded(q, p, "OK");
return resolve(data);
})
.fail(function(j, s, e) {
.fail(function (j, s, e) {
API.loaded(q, p, "FAIL");
return reject(API.throwe(s));
});
@ -1382,14 +1388,14 @@ namespace OS {
* @returns {Promise<void>} a promise on the result data
*/
export function requires(l: string, force: boolean = false): Promise<void> {
return new Promise(function(resolve, reject) {
return new Promise(function (resolve, reject) {
if (!API.shared[l] || force) {
const libfp = l.asFileHandle();
switch (libfp.ext) {
case "css":
return libfp
.onready()
.then(function() {
.then(function () {
$("<link>", {
rel: "stylesheet",
type: "text/css",
@ -1403,7 +1409,7 @@ namespace OS {
.catch((e: Error) => reject(__e(e)));
case "js":
return API.script(libfp.getlink())
.then(function(data: any) {
.then(function (data: any) {
API.shared[l] = true;
console.log("Loaded :", l);
announcer.trigger("sharedlibraryloaded", l);
@ -1431,11 +1437,11 @@ namespace OS {
* @returns {Promise<void>}
*/
export function require(libs: string[]): Promise<void> {
return new Promise(function(resolve, reject) {
return new Promise(function (resolve, reject) {
if (!(libs.length > 0)) {
return resolve();
}
announcer.observable.one("sharedlibraryloaded", async function(
announcer.observable.one("sharedlibraryloaded", async function (
l
) {
libs.splice(0, 1);
@ -1606,7 +1612,7 @@ namespace OS {
* @returns {Promise<any>}
*/
export function setLocale(name: string): Promise<any> {
return new Promise(async function(resolve, reject) {
return new Promise(async function (resolve, reject) {
const path = `resources/languages/${name}.json`;
try {
const d = await API.get(path, "json");
@ -1661,7 +1667,7 @@ namespace OS {
* @returns {Promise<any>} Promise on the clipboard data
*/
export function getClipboard(): Promise<any> {
return new Promise(function(resolve, reject) {
return new Promise(function (resolve, reject) {
const $el = $("#clipboard");
if (!navigator.clipboard) {
return resolve($el.val());
@ -1705,7 +1711,7 @@ namespace OS {
enumerable: false,
value: p,
});
const fn = function(o: any, v: any) {
const fn = function (o: any, v: any) {
return Object.defineProperty(o, v, {
enumerable: true,
set(value) {

View File

@ -335,7 +335,7 @@ namespace OS {
return;
}
const list = apps.map((e) => ({
text: e.app,
text: e.name,
icon: e.icon,
iconclass: e.iconclass,
}));
@ -1221,6 +1221,7 @@ namespace OS {
<afx-menu id="contextmenu" data-id="contextmenu" context="true" style="display:none;"></afx-menu>
<afx-label id="systooltip" data-id="systooltip" style="display:none;position:absolute;"></afx-label>
<textarea id="clipboard"></textarea>\
<input type="file" id="antos_upload_files" name="files" multiple style="display: none;">\
`;
schemes.login = `\

View File

@ -214,4 +214,153 @@
"Wrong format: it should be [name] url":"Wrong format: it should be [name] url",
"Yes":"Yes",
"{0} is not a directory":"{0} is not a directory"
,
"{0}: {1}":"{0}: {1}",
"{0} is not a file":"{0} is not a file",
"{0} is not an application":"{0} is not an application",
"Add application":"Add application",
"Add mount point":"Add mount point",
"Add service":"Add service",
"All fields should be filled":"All fields should be filled",
"Appearance":"Appearance",
"Application {0} is not installed":"Application {0} is not installed",
"Application meta data isnt found":"Application meta data isnt found",
"Application not found":"Application not found",
"Applications and services setting":"Applications and services setting",
"Apps. and Services":"Apps. and Services",
"Cannot fetch system locales: {0}":"Cannot fetch system locales: {0}",
"Cannot load extension meta data":"Cannot load extension meta data",
"Cannot load scheme: {0}":"Cannot load scheme: {0}",
"Cannot read folder: {0}":"Cannot read folder: {0}",
"Change language mode":"Change language mode",
"Change theme":"Change theme",
"Command palete":"Command palete",
"Command palette":"Command palette",
"Command Palette":"Command Palette",
"Compiled successful":"Compiled successful",
"Confirm install":"Confirm install",
"ct:Logout":"ct:Logout",
"ct:Toggle fullscreen":"ct:Toggle fullscreen",
"Current folder is not found":"Current folder is not found",
"Desktop path":"Desktop path",
"Duplicate key: {0}":"Duplicate key: {0}",
"Edit mount point":"Edit mount point",
"Enter key-value data":"Enter key-value data",
"Enter URI":"Enter URI",
"Error reported":"Error reported",
"example string":"example string",
"Extension installed":"Extension installed",
"ExtensionName":"ExtensionName",
"Fail to create: {0}":"Fail to create: {0}",
"Fail to download: {0}":"Fail to download: {0}",
"Fail to publish: {0}":"Fail to publish: {0}",
"Fail to rename: {0}":"Fail to rename: {0}",
"Fail to upload: {0}":"Fail to upload: {0}",
"hello {0}":"hello {0}",
"Hide":"Hide",
"Install from zip":"Install from zip",
"Installing...":"Installing...",
"Invalid library: {0}":"Invalid library: {0}",
"Invalid package name: {0}":"Invalid package name: {0}",
"Invalid package path":"Invalid package path",
"Key cannot be empty":"Key cannot be empty",
"Languages":"Languages",
"Local packages path":"Local packages path",
"Mount points":"Mount points",
"Mount Points":"Mount Points",
"New CodePad extension at":"New CodePad extension at",
"New Project at":"New Project at",
"New window":"New window",
"No meta-data found":"No meta-data found",
"Open folder":"Open folder",
"Open Folder":"Open Folder",
"Open Recent":"Open Recent",
"Output":"Output",
"Packaged uninstalled":"Packaged uninstalled",
"Package installed: {0}":"Package installed: {0}",
"Package not found {0}":"Package not found {0}",
"Package updated":"Package updated",
"Path":"Path",
"Pinned applications":"Pinned applications",
"Please enter extension URI:":"Please enter extension URI:",
"Please enter mount point name":"Please enter mount point name",
"Please select {0} only":"Please select {0} only",
"Please select a day":"Please select a day",
"Please select a directory":"Please select a directory",
"Please select a file/fofler":"Please select a file/fofler",
"Please select an item":"Please select an item",
"Please select color":"Please select color",
"Preparing for release":"Preparing for release",
"ProjectName":"ProjectName",
"Remove: {0}?":"Remove: {0}?",
"Remove":"Remove",
"Report":"Report",
"Running {0}...":"Running {0}...",
"Select a directory":"Select a directory",
"Select build directory":"Select build directory",
"Select extension archive":"Select extension archive",
"Select package archive":"Select package archive",
"Service not found: {0}":"Service not found: {0}",
"Services":"Services",
"Show":"Show",
"Start":"Start",
"Startup applications":"Startup applications",
"Startup services":"Startup services",
"Startup":"Startup",
"System error log":"System error log",
"System locale":"System locale",
"System setting saved":"System setting saved",
"The folder is not empty: {0}":"The folder is not empty: {0}",
"Theme":"Theme",
"Toggle bottom bar":"Toggle bottom bar",
"Toggle split view":"Toggle split view",
"Unable to build extension: {0}":"Unable to build extension: {0}",
"Unable to build project: {0}":"Unable to build project: {0}",
"Unable to create archive: {0}":"Unable to create archive: {0}",
"Unable to create extension directories: {0}":"Unable to create extension directories: {0}",
"Unable to create extension template: {0}":"Unable to create extension template: {0}",
"Unable to create package archive: {0}":"Unable to create package archive: {0}",
"Unable to create project directory: {0}":"Unable to create project directory: {0}",
"Unable to create template files: {0}":"Unable to create template files: {0}",
"Unable to disable split view: Please save changes of modified files on the right panel":"Unable to disable split view: Please save changes of modified files on the right panel",
"Unable to find: {0}":"Unable to find: {0}",
"Unable to find action: {0}":"Unable to find action: {0}",
"Unable to find application meta-data: {0}":"Unable to find application meta-data: {0}",
"Unable to find dialog scheme":"Unable to find dialog scheme",
"Unable to find extension: {0}":"Unable to find extension: {0}",
"Unable to find package: {0}":"Unable to find package: {0}",
"Unable to get blob: {0}":"Unable to get blob: {0}",
"Unable to install extension: {0}":"Unable to install extension: {0}",
"Unable to install package":"Unable to install package",
"Unable to launch: {0}":"Unable to launch: {0}",
"Unable to load: {0}":"Unable to load: {0}",
"unable to load extension: {0}":"unable to load extension: {0}",
"Unable to load push notification service":"Unable to load push notification service",
"Unable to load repository: {0}: {1}":"Unable to load repository: {0}: {1}",
"Unable to move file/folder":"Unable to move file/folder",
"Unable to open: {0}":"Unable to open: {0}",
"Unable to preload extension":"Unable to preload extension",
"Unable to read: {0}":"Unable to read: {0}",
"Unable to read meta-data: {0}":"Unable to read meta-data: {0}",
"Unable to read meta-data:{0}":"Unable to read meta-data:{0}",
"Unable to read meta-data":"Unable to read meta-data",
"Unable to read package description":"Unable to read package description",
"Unable to report error: {0}":"Unable to report error: {0}",
"Unable to run extension: {0}":"Unable to run extension: {0}",
"Unable to run project: {0}":"Unable to run project: {0}",
"Unable to save file: {0}":"Unable to save file: {0}",
"Unable to uninstall package(s): {0}":"Unable to uninstall package(s): {0}",
"Uninstall successfully":"Uninstall successfully",
"Unknown extension action: {0}":"Unknown extension action: {0}",
"Unresolved dependencies on: {0}":"Unresolved dependencies on: {0}",
"Unresolved dependencies":"Unresolved dependencies",
"Update":"Update",
"Value":"Value",
"Verifying: {0}":"Verifying: {0}",
"Version string is in invalid format: {0}":"Version string is in invalid format: {0}",
"VFS unknown handle: {0}":"VFS unknown handle: {0}",
"VFS":"VFS",
"Wallpaper":"Wallpaper"
}

View File

@ -304,4 +304,116 @@
"Welcome to AntOSDK":"Welcome to AntOSDK",
"Your application version is older ({0} < {1})":"Your application version is older ({0} < {1})",
"zip file generated in release folder":"zip file generated in release folder"
,
"{0}: {1}":"{0}: {1}",
"{0} is not a file":"{0} is not a file",
"{0} is not an application":"{0} is not an application",
"All fields should be filled":"All fields should be filled",
"Application {0} is not installed":"Application {0} is not installed",
"Application meta data isnt found":"Application meta data isnt found",
"Application not found":"Application not found",
"Applications and services setting":"Applications and services setting",
"Apps. and Services":"Apps. and Services",
"Cannot load extension meta data":"Cannot load extension meta data",
"Cannot load scheme: {0}":"Cannot load scheme: {0}",
"Cannot read folder: {0}":"Cannot read folder: {0}",
"Change language mode":"Change language mode",
"Change theme":"Change theme",
"Command palete":"Command palete",
"Command palette":"Command palette",
"Command Palette":"Command Palette",
"Confirm install":"Confirm install",
"ct:Logout":"ct:Logout",
"ct:Toggle fullscreen":"ct:Toggle fullscreen",
"Current folder is not found":"Current folder is not found",
"Duplicate key: {0}":"Duplicate key: {0}",
"Enter key-value data":"Enter key-value data",
"Enter URI":"Enter URI",
"Error reported":"Error reported",
"example string":"example string",
"Extension installed":"Extension installed",
"ExtensionName":"ExtensionName",
"Fail to create: {0}":"Fail to create: {0}",
"Fail to download: {0}":"Fail to download: {0}",
"Fail to publish: {0}":"Fail to publish: {0}",
"Fail to rename: {0}":"Fail to rename: {0}",
"Fail to upload: {0}":"Fail to upload: {0}",
"hello {0}":"hello {0}",
"Install from zip":"Install from zip",
"Invalid library: {0}":"Invalid library: {0}",
"Invalid package name: {0}":"Invalid package name: {0}",
"Invalid package path":"Invalid package path",
"Key cannot be empty":"Key cannot be empty",
"Mount Points":"Mount Points",
"New CodePad extension at":"New CodePad extension at",
"New window":"New window",
"No meta-data found":"No meta-data found",
"Open folder":"Open folder",
"Open Folder":"Open Folder",
"Open Recent":"Open Recent",
"Packaged uninstalled":"Packaged uninstalled",
"Package installed: {0}":"Package installed: {0}",
"Package not found {0}":"Package not found {0}",
"Package updated":"Package updated",
"Pinned applications":"Pinned applications",
"Please enter extension URI:":"Please enter extension URI:",
"Please select a day":"Please select a day",
"Please select an item":"Please select an item",
"Please select color":"Please select color",
"Report":"Report",
"Select build directory":"Select build directory",
"Select extension archive":"Select extension archive",
"Select package archive":"Select package archive",
"Service not found: {0}":"Service not found: {0}",
"Services":"Services",
"Start":"Start",
"System error log":"System error log",
"The folder is not empty: {0}":"The folder is not empty: {0}",
"Toggle bottom bar":"Toggle bottom bar",
"Toggle split view":"Toggle split view",
"Unable to build extension: {0}":"Unable to build extension: {0}",
"Unable to build project: {0}":"Unable to build project: {0}",
"Unable to create archive: {0}":"Unable to create archive: {0}",
"Unable to create extension directories: {0}":"Unable to create extension directories: {0}",
"Unable to create extension template: {0}":"Unable to create extension template: {0}",
"Unable to create package archive: {0}":"Unable to create package archive: {0}",
"Unable to create project directory: {0}":"Unable to create project directory: {0}",
"Unable to create template files: {0}":"Unable to create template files: {0}",
"Unable to disable split view: Please save changes of modified files on the right panel":"Unable to disable split view: Please save changes of modified files on the right panel",
"Unable to find: {0}":"Unable to find: {0}",
"Unable to find action: {0}":"Unable to find action: {0}",
"Unable to find application meta-data: {0}":"Unable to find application meta-data: {0}",
"Unable to find dialog scheme":"Unable to find dialog scheme",
"Unable to find extension: {0}":"Unable to find extension: {0}",
"Unable to find package: {0}":"Unable to find package: {0}",
"Unable to get blob: {0}":"Unable to get blob: {0}",
"Unable to install extension: {0}":"Unable to install extension: {0}",
"Unable to install package":"Unable to install package",
"Unable to launch: {0}":"Unable to launch: {0}",
"Unable to load: {0}":"Unable to load: {0}",
"unable to load extension: {0}":"unable to load extension: {0}",
"Unable to load push notification service":"Unable to load push notification service",
"Unable to load repository: {0}: {1}":"Unable to load repository: {0}: {1}",
"Unable to move file/folder":"Unable to move file/folder",
"Unable to open: {0}":"Unable to open: {0}",
"Unable to preload extension":"Unable to preload extension",
"Unable to read: {0}":"Unable to read: {0}",
"Unable to read meta-data: {0}":"Unable to read meta-data: {0}",
"Unable to read meta-data:{0}":"Unable to read meta-data:{0}",
"Unable to read meta-data":"Unable to read meta-data",
"Unable to read package description":"Unable to read package description",
"Unable to report error: {0}":"Unable to report error: {0}",
"Unable to run extension: {0}":"Unable to run extension: {0}",
"Unable to run project: {0}":"Unable to run project: {0}",
"Unable to save file: {0}":"Unable to save file: {0}",
"Unable to uninstall package(s): {0}":"Unable to uninstall package(s): {0}",
"Uninstall successfully":"Uninstall successfully",
"Unknown extension action: {0}":"Unknown extension action: {0}",
"Unresolved dependencies on: {0}":"Unresolved dependencies on: {0}",
"Unresolved dependencies":"Unresolved dependencies",
"Value":"Value",
"Verifying: {0}":"Verifying: {0}",
"VFS unknown handle: {0}":"VFS unknown handle: {0}"
}

View File

@ -245,4 +245,63 @@
"Theme":"Thème",
"VFS":"VFS",
"Wallpaper":"Fond d'écran"
,
"add {0} to zip":"add {0} to zip",
"Add files to build target":"Add files to build target",
"and unsaved project":"and unsaved project",
"Build and Run":"Build and Run",
"Build":"Build",
"Build done":"Build done",
"Build Options":"Build Options",
"Build release":"Build release",
"Cannot create file: {0}":"Cannot create file: {0}",
"Cannot export: {0}":"Cannot export: {0}",
"Cannot export to {0}: {1}":"Cannot export to {0}: {1}",
"Cannot export to PNG in this browser: {0}":"Cannot export to PNG in this browser: {0}",
"Cannot save project: {0}":"Cannot save project: {0}",
"Cannot save the zip file {0} : {1}":"Cannot save the zip file {0} : {1}",
"Coffees":"Coffees",
"Compiled successful":"Compiled successful",
"Copied {0} -> {1}":"Copied {0} -> {1}",
"Copied files":"Copied files",
"Created directory: {0}":"Created directory: {0}",
"Created file: {0}":"Created file: {0}",
"Css":"Css",
"Error when create directory: {0}":"Error when create directory: {0}",
"Export as":"Export as",
"File exported":"File exported",
"Generated {0}":"Generated {0}",
"Graph editor":"Graph editor",
"Hide":"Hide",
"Ignore: {0} unsaved files {1}?":"Ignore: {0} unsaved files {1}?",
"Ignore unsaved project ?":"Ignore unsaved project ?",
"Installing...":"Installing...",
"Javascripts":"Javascripts",
"Metadata found...":"Metadata found...",
"New Project at":"New Project at",
"New project":"New project",
"Opening {0}":"Opening {0}",
"Open project":"Open project",
"Open Project":"Open Project",
"Output":"Output",
"Please select {0} only":"Please select {0} only",
"Please select a file/fofler":"Please select a file/fofler",
"Preparing for release":"Preparing for release",
"ProjectName":"ProjectName",
"Project":"Project",
"project saved":"project saved",
"Render":"Render",
"Running {0}...":"Running {0}...",
"Select a file":"Select a file",
"Show":"Show",
"Syntax error: {0}":"Syntax error: {0}",
"Uninstall: {0}?":"Uninstall: {0}?",
"Unsaved project":"Unsaved project",
"Update":"Update",
"Verifying {0}":"Verifying {0}",
"Version string is in invalid format: {0}":"Version string is in invalid format: {0}",
"Welcome to AntOSDK":"Welcome to AntOSDK",
"Your application version is older ({0} < {1})":"Your application version is older ({0} < {1})",
"zip file generated in release folder":"zip file generated in release folder"
}

View File

@ -393,4 +393,66 @@
"Value":"Value",
"Verifying: {0}":"Verifying: {0}",
"VFS unknown handle: {0}":"VFS unknown handle: {0}"
,
"{0}: {1}":"{0}: {1}",
"{0} is not an application":"{0} is not an application",
"All fields should be filled":"All fields should be filled",
"Application {0} is not installed":"Application {0} is not installed",
"Application not found":"Application not found",
"Applications and services setting":"Applications and services setting",
"Apps. and Services":"Apps. and Services",
"Confirm install":"Confirm install",
"Duplicate key: {0}":"Duplicate key: {0}",
"Enter key-value data":"Enter key-value data",
"Enter URI":"Enter URI",
"example string":"example string",
"hello {0}":"hello {0}",
"Install from zip":"Install from zip",
"Invalid package name: {0}":"Invalid package name: {0}",
"Invalid package path":"Invalid package path",
"Key cannot be empty":"Key cannot be empty",
"New window":"New window",
"Open Recent":"Open Recent",
"Packaged uninstalled":"Packaged uninstalled",
"Package installed: {0}":"Package installed: {0}",
"Package not found {0}":"Package not found {0}",
"Package updated":"Package updated",
"Pinned applications":"Pinned applications",
"Please enter extension URI:":"Please enter extension URI:",
"Select build directory":"Select build directory",
"Select package archive":"Select package archive",
"Service not found: {0}":"Service not found: {0}",
"Toggle bottom bar":"Toggle bottom bar",
"Toggle split view":"Toggle split view",
"Unable to build extension: {0}":"Unable to build extension: {0}",
"Unable to build project: {0}":"Unable to build project: {0}",
"Unable to create archive: {0}":"Unable to create archive: {0}",
"Unable to create extension directories: {0}":"Unable to create extension directories: {0}",
"Unable to create extension template: {0}":"Unable to create extension template: {0}",
"Unable to create package archive: {0}":"Unable to create package archive: {0}",
"Unable to create project directory: {0}":"Unable to create project directory: {0}",
"Unable to create template files: {0}":"Unable to create template files: {0}",
"Unable to disable split view: Please save changes of modified files on the right panel":"Unable to disable split view: Please save changes of modified files on the right panel",
"Unable to find: {0}":"Unable to find: {0}",
"Unable to find application meta-data: {0}":"Unable to find application meta-data: {0}",
"Unable to find dialog scheme":"Unable to find dialog scheme",
"Unable to find package: {0}":"Unable to find package: {0}",
"Unable to get blob: {0}":"Unable to get blob: {0}",
"Unable to install extension: {0}":"Unable to install extension: {0}",
"Unable to install package":"Unable to install package",
"Unable to launch: {0}":"Unable to launch: {0}",
"Unable to load: {0}":"Unable to load: {0}",
"Unable to load push notification service":"Unable to load push notification service",
"Unable to load repository: {0}: {1}":"Unable to load repository: {0}: {1}",
"Unable to move file/folder":"Unable to move file/folder",
"Unable to read meta-data: {0}":"Unable to read meta-data: {0}",
"Unable to read meta-data:{0}":"Unable to read meta-data:{0}",
"Unable to read package description":"Unable to read package description",
"Unable to run extension: {0}":"Unable to run extension: {0}",
"Unable to run project: {0}":"Unable to run project: {0}",
"Unable to uninstall package(s): {0}":"Unable to uninstall package(s): {0}",
"Uninstall successfully":"Uninstall successfully",
"Unknown extension action: {0}":"Unknown extension action: {0}",
"Unresolved dependencies on: {0}":"Unresolved dependencies on: {0}",
"Unresolved dependencies":"Unresolved dependencies"
}

View File

@ -327,4 +327,70 @@
"Report":"Report",
"Select extension archive":"Select extension archive",
"System error log":"System error log"
,
"[^":"[^",
"{0} is not a file":"{0} is not a file",
"Action {0} is unsupported on: {1}":"Action {0} is unsupported on: {1}",
"Application meta data isnt found":"Application meta data isnt found",
"Cannot load extension meta data":"Cannot load extension meta data",
"Cannot load scheme: {0}":"Cannot load scheme: {0}",
"Cannot read folder: {0}":"Cannot read folder: {0}",
"Change language mode":"Change language mode",
"Change theme":"Change theme",
"Command palete":"Command palete",
"Command palette":"Command palette",
"ct:Logout":"ct:Logout",
"ct:Toggle fullscreen":"ct:Toggle fullscreen",
"ct:User: {0}":"ct:User: {0}",
"Current folder is not found":"Current folder is not found",
"Error reported":"Error reported",
"Error saving file {0}: {1}":"Error saving file {0}: {1}",
"Example action":"Example action",
"Extension installed":"Extension installed",
"ExtensionName":"ExtensionName",
"Fail to create: {0}":"Fail to create: {0}",
"Fail to download: {0}":"Fail to download: {0}",
"Fail to publish: {0}":"Fail to publish: {0}",
"Fail to read: {0}":"Fail to read: {0}",
"Fail to rename: {0}":"Fail to rename: {0}",
"Fail to upload: {0}":"Fail to upload: {0}",
"Install extension":"Install extension",
"Invalid library: {0}":"Invalid library: {0}",
"New Extension":"New Extension",
"New project from current folder":"New project from current folder",
"New Project":"New Project",
"No meta-data found":"No meta-data found",
"Open folder":"Open folder",
"Open Folder":"Open Folder",
"Package is generated in release folder":"Package is generated in release folder",
"Please select a day":"Please select a day",
"Please select an item":"Please select an item",
"Please select color":"Please select color",
"Start":"Start",
"The folder is not empty: {0}":"The folder is not empty: {0}",
"Unable to build extension":"Unable to build extension",
"Unable to build project":"Unable to build project",
"Unable to create archive":"Unable to create archive",
"Unable to create extension directories":"Unable to create extension directories",
"Unable to create extension template":"Unable to create extension template",
"Unable to create package archive":"Unable to create package archive",
"Unable to create project directory":"Unable to create project directory",
"Unable to create template files":"Unable to create template files",
"Unable to find action: {0}":"Unable to find action: {0}",
"Unable to find extension: {0}":"Unable to find extension: {0}",
"Unable to install extension":"Unable to install extension",
"unable to load extension: {0}":"unable to load extension: {0}",
"Unable to load libraries":"Unable to load libraries",
"Unable to open: {0}":"Unable to open: {0}",
"Unable to preload extension":"Unable to preload extension",
"Unable to read: {0}":"Unable to read: {0}",
"Unable to read meta-data":"Unable to read meta-data",
"Unable to report error: {0}":"Unable to report error: {0}",
"Unable to run extension":"Unable to run extension",
"Unable to run project":"Unable to run project",
"Unable to save file: {0}":"Unable to save file: {0}",
"Value":"Value",
"Verifying: {0}":"Verifying: {0}",
"VFS unknown handle: {0}":"VFS unknown handle: {0}"
}

View File

@ -275,7 +275,9 @@ namespace OS {
this.bindKey("CTRL-P", () =>
this.actionEdit(`${this.name}-paste`)
);
this.bindKey("CTRL-ALT-R", ()=>{
this.view.path = this.currdir.path;
});
(this.find("btgrid") as GUI.tag.ButtonTag).onbtclick = (e) => {
this.view.view = "icon";
this.viewType.icon = true;
@ -384,6 +386,7 @@ namespace OS {
{
text: "__(Refresh)",
dataid: `${this.name}-refresh`,
shortcut: "C-A-R"
},
{
text: "__(Sidebar)",

View File

@ -1,3 +1,6 @@
afx-app-window {
outline: none;
}
afx-app-window div.afx-window-wrapper{
padding:0;
display: flex;