antosdk-apps/About/coffees/main.coffee
2022-07-22 20:42:12 +02:00

22 lines
678 B
CoffeeScript

class About extends this.OS.application.BaseApplication
constructor: ( args ) ->
super "About", args
main: () ->
me = @
@container = @find "container"
path = "os://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