mirror of
https://github.com/antos-rde/antosdk-apps.git
synced 2024-11-15 18:08:21 +01:00
22 lines
678 B
CoffeeScript
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 |