Skip to content

Commit

Permalink
Add Telegram widget to the Lock page
Browse files Browse the repository at this point in the history
  • Loading branch information
bouncepaw committed Jul 15, 2021
1 parent 49b0a35 commit ae03dbc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions static/default.css
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,9 @@ kbd {
display: flex;
justify-content: center;
}
.locked-notice .telegram-notice {
display: none;
}

.locked-notice__message {
max-width: 30rem;
Expand Down
3 changes: 2 additions & 1 deletion views/auth.qtpl
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
Telegram auth widget was requested by Yogurt. As you can see, we don't offer user administrators control over it. Of course we don't.
{% func telegramWidgetHTML() %}
{% if cfg.TelegramEnabled %}
<p>You can log in using Telegram. It only works if you have set your @username in Telegram and this username is free on this wiki.</p>
<p class="telegram-notice">You can log in using Telegram. It only works if you have set your @username in Telegram and this username is free on this wiki.</p>
<script async src="https://telegram.org/js/telegram-widget.js?15" data-telegram-login="{%s cfg.TelegramBotName %}" data-size="medium" data-userpic="false" data-auth-url="{%s cfg.URL %}/telegram-login"></script>
{% endif %}
{% endfunc %}
Expand Down Expand Up @@ -137,6 +137,7 @@ Telegram auth widget was requested by Yogurt. As you can see, we don't offer use
<input class="btn" type="submit" value="Log in">
</form>
</section>
{%= telegramWidgetHTML() %}
</main>
</body>
</html>
Expand Down

0 comments on commit ae03dbc

Please sign in to comment.