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");
}
}
@ -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

@ -1208,16 +1208,17 @@ namespace OS {
return new Promise(function (resolve, reject) {
const q = announcer.getMID();
//insert a temporal file selector
const o = $("<input>")
.attr("type", "file")
.css("display", "none");
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);
// TODO: only one file is selected at this time
formd.append("upload", (o[0] as HTMLInputElement).files[0]);
formd.append("upload", file);
return $.ajax({
url: p,
data: formd,
@ -1226,14 +1227,19 @@ namespace OS {
processData: false,
})
.done(function (data) {
tasks.push("OK");
if (tasks.length == n_files)
{
API.loaded(q, p, "OK");
resolve(data);
return o.remove();
}
})
.fail(function (j, s, e) {
tasks.push("FAIL");
if (tasks.length == n_files)
API.loaded(q, p, "FAIL");
reject(API.throwe(s));
return o.remove();
});
});
});
return o.trigger("click");

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;