2020-06-05 17:45:07 +02:00
|
|
|
class About extends this.OS.application.BaseApplication
|
2018-04-14 17:52:19 +02:00
|
|
|
constructor: ( args ) ->
|
|
|
|
super "About", args
|
|
|
|
|
|
|
|
main: () ->
|
|
|
|
me = @
|
|
|
|
@container = @find "container"
|
2022-07-22 20:42:12 +02:00
|
|
|
path = "os://README.md"
|
2020-05-20 23:13:28 +02:00
|
|
|
path.asFileHandle()
|
|
|
|
.read()
|
|
|
|
.then (txt) ->
|
|
|
|
converter = new showdown.Converter()
|
|
|
|
($ me.container).html converter.makeHtml txt
|
|
|
|
.catch () =>
|
|
|
|
@notify __("Unable to read: {0}", path)
|
|
|
|
|
2020-06-05 17:45:07 +02:00
|
|
|
@find("btnclose").onbtclick = () =>
|
2020-05-20 23:13:28 +02:00
|
|
|
@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
|