mirror of
https://github.com/wallabag/wallabag.git
synced 2024-11-26 19:11:07 +00:00
Added QRCode and link to configure android application
This commit is contained in:
parent
5feef9f7a4
commit
e61ee56031
8 changed files with 59 additions and 39 deletions
|
@ -1,5 +1,7 @@
|
|||
const $ = require('jquery');
|
||||
|
||||
var jrQrcode = require('jr-qrcode');
|
||||
|
||||
function supportsLocalStorage() {
|
||||
try {
|
||||
return 'localStorage' in window && window.localStorage !== null;
|
||||
|
|
|
@ -99,5 +99,8 @@
|
|||
"stylelint": "^7.3.1",
|
||||
"stylelint-config-standard": "^13.0.2",
|
||||
"through": "^2.3.8"
|
||||
},
|
||||
"dependencies": {
|
||||
"jr-qrcode": "^1.0.5"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -149,6 +149,7 @@ class ConfigController extends Controller
|
|||
'token' => $config->getRssToken(),
|
||||
],
|
||||
'twofactor_auth' => $this->getParameter('twofactor_auth'),
|
||||
'wallabag_url' => $this->get('craue_config')->get('wallabag_url'),
|
||||
'enabled_users' => $this->getDoctrine()
|
||||
->getRepository('WallabagUserBundle:User')
|
||||
->getSumEnabledUsers(),
|
||||
|
|
|
@ -71,6 +71,18 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="input-field col s12">
|
||||
<h5>Configure your Android application</h5>
|
||||
<a href="wallabag://{{ app.user.username }}@{{ wallabag_url }}" class="waves-effect waves-light btn hide-on-large-only">Touch here to prefill your Android application</a>
|
||||
<img id="androidQrcode" class="hide-on-med-and-down" />
|
||||
</div>
|
||||
<script>
|
||||
var imgBase64 = jrQrcode.getQrBase64('wallabag://{{ app.user.username }}@{{ wallabag_url }}');
|
||||
document.getElementById('androidQrcode').src=imgBase64;
|
||||
</script>
|
||||
</div>
|
||||
|
||||
{{ form_widget(form.config.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }}
|
||||
{{ form_rest(form.config) }}
|
||||
</form>
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue