2018-04-14 17:52:19 +02:00
|
|
|
(function() {
|
2020-05-20 23:13:28 +02:00
|
|
|
void 0;
|
2018-04-14 17:52:19 +02:00
|
|
|
var About;
|
|
|
|
|
|
|
|
About = class About extends this.OS.GUI.BaseApplication {
|
|
|
|
constructor(args) {
|
|
|
|
super("About", args);
|
|
|
|
}
|
|
|
|
|
|
|
|
main() {
|
2020-05-20 23:13:28 +02:00
|
|
|
var me, path;
|
2018-04-14 17:52:19 +02:00
|
|
|
me = this;
|
|
|
|
this.container = this.find("container");
|
2020-05-20 23:13:28 +02:00
|
|
|
path = "os://README.md";
|
|
|
|
path.asFileHandle().read().then(function(txt) {
|
2018-04-14 17:52:19 +02:00
|
|
|
var converter;
|
|
|
|
converter = new showdown.Converter();
|
|
|
|
return ($(me.container)).html(converter.makeHtml(txt));
|
2020-05-20 23:13:28 +02:00
|
|
|
}).catch(() => {
|
|
|
|
return this.notify(__("Unable to read: {0}", path));
|
|
|
|
});
|
|
|
|
return this.find("btnclose").set("onbtclick", () => {
|
|
|
|
return this.quit();
|
2018-04-14 17:52:19 +02:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
About.singleton = true;
|
|
|
|
|
2020-05-20 23:13:28 +02:00
|
|
|
About.dependencies = ["os://scripts/showdown.min.js"];
|
2018-04-14 17:52:19 +02:00
|
|
|
|
|
|
|
this.OS.register("About", About);
|
|
|
|
|
|
|
|
}).call(this);
|