Skip to content

Commit

Permalink
qr-scanner for subscriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
strukturart committed Dec 8, 2021
1 parent 65be97c commit ec0c74b
Show file tree
Hide file tree
Showing 6 changed files with 10,946 additions and 30 deletions.
9 changes: 6 additions & 3 deletions application/assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -322,10 +322,13 @@ div#list-view article h2 {

div#options {
display: none;
background: white;
position: fixed;
position: absolute;
z-index: 4;
top: 0;
z-index: 5;
display: none;
padding: 5px;
height: 92vh;
overflow: hidden;
padding: 10px 0 0 0;
}

Expand Down
12 changes: 6 additions & 6 deletions application/assets/js/eximport.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ const eximport = (() => {
finder.on("fileFound", function (file, fileinfo, storageName) {
if (fileinfo.name != "greg.ics") {
document
.querySelector("div#options")
.querySelector("div#options div#import-text")
.insertAdjacentHTML(
"beforeend",
'<button class="item" data-function="import" data-filename="' +
"afterend",
'<button class="item dynamic" data-function="import" data-filename="' +
fileinfo.name +
'">' +
fileinfo.name +
Expand Down Expand Up @@ -209,7 +209,6 @@ const eximport = (() => {
last_uid = imp.UID;
last_date = imp.date;
events.push(imp);
console.log(imp);
});

callback(last_uid, last_date);
Expand All @@ -232,12 +231,13 @@ const eximport = (() => {
xhttp.onload = function () {
if (xhttp.readyState === xhttp.DONE && xhttp.status === 200) {
let data = xhttp.response;
console.log(cb);
parse_ics(data, cb, false);
}
};

xhttp.onerror = function () {};
xhttp.onerror = function () {
helper.toaster("subscription could not be loaded", 2000);
};

xhttp.send(null);
};
Expand Down
Loading

0 comments on commit ec0c74b

Please sign in to comment.