daily puzzle slack app landing page

pull/6129/head
Niklas Fiekas 2020-03-06 22:07:16 +01:00
parent cb1ed1cc19
commit 7660a89237
3 changed files with 81 additions and 0 deletions

View File

@ -71,6 +71,13 @@ final class Main(
}
}
def dailyPuzzleSlackApp = Open { implicit ctx =>
pageHit
fuccess {
html.site.dailyPuzzleSlackApp()
}
}
def jslog(id: String) = Open { ctx =>
env.round.selfReport(
userId = ctx.userId,

View File

@ -0,0 +1,73 @@
package views.html.site
import lila.api.Context
import lila.app.templating.Environment._
import lila.app.ui.ScalatagsTemplate._
import controllers.routes
object dailyPuzzleSlackApp {
def apply()(implicit ctx: Context) =
views.html.base.layout(
title = "Daily Chess Puzzle by Lichess (Slack App)",
moreCss = cssTag("page")
) {
main(cls := "page page-small box box-pad")(
div(cls := "body")(
h1("Daily Chess Puzzle by Lichess (Slack App)"),
p(
"Spice up your Slack workspace with a daily chess puzzle from ",
a(href := "/")("lichess.org"),
"."
),
a(
href := "https://slack.com/oauth/v2/authorize?client_id=17688987239.964622027363&scope=commands,incoming-webhook"
)(
img(
alt := "Add to Slack",
height := 40,
width := 139,
src := staticUrl("images/add-to-slack.png")
)
),
h2("Summary"),
p(
"By default, the app will post the ",
a(href := routes.Puzzle.daily)("daily chess puzzle"),
" from Lichess to the channel in which it was installed every day (at the same time of day it was installed). Use the ",
code("/puzzletime"),
" command to change this setting, e.g. ",
code("/puzzletime 14:45"),
". To post the daily puzzle on demand, use the ",
code("/puzzle"),
" command."
),
h2("Commands"),
ul(
li(code("/puzzlehelp"), " - Displays helpful instructions"),
li(
code("/puzzletime HH:MM"),
" - Sets the time of day the daily puzzle should be posted (per channel)"
),
li(code("/puzzle"), " - Posts the daily puzzle")
),
h2("Privacy Policy"),
p(
"The app only collects and stores information necessary to deliver the service, which is limited to OAuth authentication information, Slack workspace/channel identifiers and app configuration settings. No personal information is processed expect for the username of users invoking slash commands. No personal information is stored."
),
h2("Support and feedback"),
p(
// Contact email, because Slack requires a support channel without
// mandatory registration.
"Give us feedback or ask questions ",
a(href := routes.ForumCateg.show("lichess-feedback"))(
"in the forum"
),
". Alternatively, use ",
contactEmailLink,
" to get in touch with us."
)
)
)
}
}

View File

@ -612,6 +612,7 @@ GET /get-fishnet controllers.Main.getFishnet
GET /costs controllers.Main.costs
GET /verify-title controllers.Main.verifyTitle
GET /InstantChess.com controllers.Main.instantChess
GET /daily-puzzle-slack controllers.Main.dailyPuzzleSlackApp
# Dev
GET /dev/cli controllers.Dev.cli