mirror of
https://github.com/antos-rde/antosdk-apps.git
synced 2024-11-16 02:18:22 +01:00
22 lines
727 B
CoffeeScript
22 lines
727 B
CoffeeScript
class About extends this.OS.application.BaseApplication
|
|
constructor: ( args ) ->
|
|
super "About", args
|
|
|
|
main: () ->
|
|
me = @
|
|
@container = @find "container"
|
|
path = "https://raw.githubusercontent.com/lxsang/antos/master/README.md"
|
|
path.asFileHandle()
|
|
.read()
|
|
.then (txt) ->
|
|
converter = new showdown.Converter()
|
|
($ me.container).html converter.makeHtml txt
|
|
.catch () =>
|
|
@notify __("Unable to read: {0}", path)
|
|
|
|
@find("btnclose").onbtclick = () =>
|
|
@quit()
|
|
|
|
About.singleton = true
|
|
About.dependencies = [ "os://scripts/showdown.min.js" ]
|
|
this.OS.register "About", About |