Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
akurilov committed Nov 24, 2023
1 parent 3f0f95e commit ca29ea0
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions web/evts.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ const timeout = setTimeout(() => {
Events.toggleAudio = function () {
if (Events.audioEnabled) {
Events.audioEnabled = false;
document.getElementById("img_toggle_audio").src = "//notifications-off.svg";
document.getElementById("img_toggle_audio").src = "notifications-off.svg";
} else {
Events.audioEnabled = true;
document.getElementById("img_toggle_audio").src = "//notifications-on.svg";
document.getElementById("img_toggle_audio").src = "notifications-on.svg";
Events.audioCtx = new (window.AudioContext || window.webkitAudioContext)();
Events.audioSnd = new Audio("//inbox-notification.wav");
Events.audioSnd = new Audio("inbox-notification.wav");
Events.audioSrc = Events.audioCtx.createMediaElementSource(Events.audioSnd);
Events.audioSrc.connect(Events.audioCtx.destination);
}
Expand Down
2 changes: 1 addition & 1 deletion web/inbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const templateInboxNav = subId => `
<p class="text-lg"><b>Inbox</b></p>
<span class="flex space-x-2" style="margin-left: auto; margin-right: 0">
<button title="Toggle Notification Sound" onclick="Events.toggleAudio()" class="h-8 w-8 rounded-md border border-indigo-700 shadow-2xl hover:bg-indigo-200 text-indigo-700 items-center">
<img id="img_toggle_audio" src=${Events.audioEnabled ? "//notifications-on.svg" : "//notifications-off.svg"} alt="Toggle Notification Sound" class="px-1"/>
<img id="img_toggle_audio" src=${Events.audioEnabled ? "notifications-on.svg" : "notifications-off.svg"} alt="Toggle Notification Sound" class="px-1"/>
</button>
<button title="Edit Subscription" onclick="window.location.assign('//sub-edit.html?id=${subId}')" class="h-8 w-8 rounded-md border border-blue-700 shadow-2xl hover:bg-blue-200 text-blue-700 items-center">
<img src="sub-edit.svg" alt="Edit Subscription" class="px-1"/>
Expand Down
4 changes: 2 additions & 2 deletions web/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ function handleAuthGoogle(response) {
const userEmail = decodedToken.email;
sessionStorage.setItem("userEmail", userEmail)
// go to subscriptions list
window.location.assign("//subs.html")
window.location.assign("subs.html")
}

function logout() {
if (confirm("Confirm exit?")) {
sessionStorage.removeItem("userEmail")
window.location.assign("//index.html")
window.location.assign("index.html")
}
}
2 changes: 1 addition & 1 deletion web/sub-edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ function updateSub(subId) {
})
.then(_ => {
alert(`Updated subscription: ${subId}`)
window.location.assign("//subs.html")
window.location.assign("subs.html")
})
.catch(err => {
alert(err)
Expand Down
2 changes: 1 addition & 1 deletion web/sub-new.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ function createSub() {
})
.then(data => {
alert("Created subscription: " + data.id)
window.location.assign("//subs.html")
window.location.assign("subs.html")
})
.catch(err => {
alert(err)
Expand Down
2 changes: 1 addition & 1 deletion web/subs.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function deleteSubscription(id) {
})
.then(_ => {
alert(`Deleted subscription ${id}`);
window.location.assign("//subs.html");
window.location.assign("subs.html");
})
.catch(err => {
alert(err);
Expand Down

0 comments on commit ca29ea0

Please sign in to comment.