antosdk-apps/About/build/debug/main.js

36 lines
814 B
JavaScript
Raw Normal View History

2018-04-14 17:52:19 +02:00
(function() {
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() {
var me, path;
2018-04-14 17:52:19 +02:00
me = this;
this.container = this.find("container");
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));
}).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;
About.dependencies = ["os://scripts/showdown.min.js"];
2018-04-14 17:52:19 +02:00
this.OS.register("About", About);
}).call(this);