mirror of
https://github.com/wallabag/wallabag.git
synced 2025-02-28 08:26:29 +00:00
Fix jrQrcode
This commit is contained in:
parent
5112a3c445
commit
fc51c940bc
4 changed files with 11 additions and 11 deletions
|
@ -10,6 +10,9 @@ import annotator from 'annotator';
|
||||||
import ClipboardJS from 'clipboard';
|
import ClipboardJS from 'clipboard';
|
||||||
import 'mathjax/es5/tex-svg';
|
import 'mathjax/es5/tex-svg';
|
||||||
|
|
||||||
|
/* jrQrcode */
|
||||||
|
import jrQrcode from 'jr-qrcode';
|
||||||
|
|
||||||
/* Fonts */
|
/* Fonts */
|
||||||
import 'material-design-icons-iconfont/dist/material-design-icons.css';
|
import 'material-design-icons-iconfont/dist/material-design-icons.css';
|
||||||
import 'lato-font/css/lato-font.css';
|
import 'lato-font/css/lato-font.css';
|
||||||
|
@ -372,4 +375,10 @@ $(document).ready(() => {
|
||||||
$('form[name="form_mass_action"] button[name="tag"]').trigger('click');
|
$('form[name="form_mass_action"] button[name="tag"]').trigger('click');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
document.querySelectorAll('img.jr-qrcode').forEach((qrcode) => {
|
||||||
|
const src = jrQrcode.getQrBase64(qrcode.getAttribute('data-url'));
|
||||||
|
|
||||||
|
qrcode.setAttribute('src', src);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
|
|
||||||
/* Allows inline call qr-code call */
|
|
||||||
import jrQrcode from 'jr-qrcode'; // eslint-disable-line
|
|
||||||
|
|
||||||
function supportsLocalStorage() {
|
function supportsLocalStorage() {
|
||||||
try {
|
try {
|
||||||
return 'localStorage' in window && window.localStorage !== null;
|
return 'localStorage' in window && window.localStorage !== null;
|
||||||
|
|
|
@ -110,11 +110,8 @@
|
||||||
<div class="input-field col s12">
|
<div class="input-field col s12">
|
||||||
<h5>{{ 'config.form_settings.android_configuration'|trans }}</h5>
|
<h5>{{ 'config.form_settings.android_configuration'|trans }}</h5>
|
||||||
<a href="wallabag://{{ app.user.username }}@{{ wallabag_url }}" class="waves-effect waves-light btn hide-on-large-only">{{ 'config.form_settings.android_instruction'|trans }}</a>
|
<a href="wallabag://{{ app.user.username }}@{{ wallabag_url }}" class="waves-effect waves-light btn hide-on-large-only">{{ 'config.form_settings.android_instruction'|trans }}</a>
|
||||||
<img id="androidQrcode" class="hide-on-med-and-down" alt="{{ 'config.otp.app.qrcode_label'|trans }}" />
|
<img class="hide-on-med-and-down jr-qrcode" alt="{{ 'config.otp.app.qrcode_label'|trans }}" data-url="wallabag://{{ app.user.username }}@{{ wallabag_url }}" />
|
||||||
</div>
|
</div>
|
||||||
<script>
|
|
||||||
document.getElementById('androidQrcode').src = jrQrcode.getQrBase64('wallabag://{{ app.user.username }}@{{ wallabag_url }}');
|
|
||||||
</script>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h5>{{ 'config.tab_menu.article_display'|trans }}</h5>
|
<h5>{{ 'config.tab_menu.article_display'|trans }}</h5>
|
||||||
|
|
|
@ -15,10 +15,7 @@
|
||||||
<p>{{ 'config.otp.app.two_factor_code_description_2'|trans }}</p>
|
<p>{{ 'config.otp.app.two_factor_code_description_2'|trans }}</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<img id="2faQrcode" class="hide-on-med-and-down" />
|
<img class="hide-on-med-and-down jr-qrcode" data-url="{{ qr_code|raw }}" />
|
||||||
<script>
|
|
||||||
document.getElementById('2faQrcode').src = jrQrcode.getQrBase64('{{ qr_code|raw }}');
|
|
||||||
</script>
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
|
Loading…
Reference in a new issue