mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-24 12:07:10 -04:00
Replace jQuery.qrcode with kjua 0.1.1.
This commit is contained in:
parent
1fc72d8473
commit
8ef9575e51
6 changed files with 16 additions and 11 deletions
|
@ -190,7 +190,8 @@
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"show": false,
|
"show": false,
|
||||||
"qrcode": true,
|
"qrcode": true,
|
||||||
"qrColor": "#999"
|
"qrFill": "#999",
|
||||||
|
"qrBack": "#fff"
|
||||||
},
|
},
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
width: 200px;
|
width: 200px;
|
||||||
|
|
||||||
canvas {
|
img {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
const {win, jq, lo} = require('../globals');
|
const {win, jq, lo, kjua} = require('../globals');
|
||||||
const event = require('../core/event');
|
const event = require('../core/event');
|
||||||
const format = require('../core/format');
|
const format = require('../core/format');
|
||||||
const resource = require('../core/resource');
|
const resource = require('../core/resource');
|
||||||
|
@ -94,13 +94,16 @@ function update(item) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (settings.qrcode) {
|
if (settings.qrcode) {
|
||||||
$qrcode.empty().qrcode({
|
const loc = win.location;
|
||||||
render: 'canvas',
|
$qrcode.empty().append(kjua({
|
||||||
|
render: 'image',
|
||||||
size: 200,
|
size: 200,
|
||||||
fill: settings.qrColor,
|
fill: settings.qrFill,
|
||||||
background: null,
|
back: settings.qrBack,
|
||||||
text: win.location.protocol + '//' + win.location.host + item.absHref
|
text: loc.protocol + '//' + loc.host + item.absHref,
|
||||||
});
|
crisp: true,
|
||||||
|
quiet: 1
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,5 +10,6 @@ const publish = (id, name) => {
|
||||||
publish('window', 'win');
|
publish('window', 'win');
|
||||||
publish('_', 'lo');
|
publish('_', 'lo');
|
||||||
publish('jQuery', 'jq');
|
publish('jQuery', 'jq');
|
||||||
|
publish('kjua', 'kjua');
|
||||||
publish('marked', 'marked');
|
publish('marked', 'marked');
|
||||||
publish('Prism', 'prism');
|
publish('Prism', 'prism');
|
||||||
|
|
File diff suppressed because one or more lines are too long
2
src/_h5ai/public/js/vendor/kjua-0.1.1.min.js
vendored
Normal file
2
src/_h5ai/public/js/vendor/kjua-0.1.1.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue