Skip to content

Commit

Permalink
fixed footer can not hidden error
Browse files Browse the repository at this point in the history
  • Loading branch information
lixinyang123 committed Apr 2, 2024
1 parent 41718da commit 32d5a13
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
6 changes: 2 additions & 4 deletions js/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
let scripts = [];
let client_id = "68fd42deb929a87fc8b9";
let redirect_uri = "https://oauth.conchbrain.club/redirect";
let userInfo = undefined;
let isDarkMode = false;
let currentView = 'index'
let onNavigation = undefined

function login() {
let href = `https://github.com/login/oauth/authorize?client_id=${client_id}&redirect_uri=${redirect_uri}`;
Expand Down Expand Up @@ -68,7 +67,7 @@ function guid() {
}

function navigation(name, isBack = false) {
if (window.onNavigation) window.onNavigation(name, isBack)
if (onNavigation) onNavigation(name, isBack)

window.scrollTo(0, 0);
loadingState(true);
Expand All @@ -88,7 +87,6 @@ function navigation(name, isBack = false) {
navigation("notfound");
loadingState(false);
}
currentView = name;
});
}

Expand Down
5 changes: 3 additions & 2 deletions view/cloudshell.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
<script>
document.querySelector('footer').setAttribute('hidden', 'hidden')

window.onNavigation = (name, isBack) => {
onNavigation = (name, isBack) => {
console.log('leave')
document.querySelector('footer').removeAttribute('hidden')
window.onNavigation = undefined
onNavigation = undefined
}
</script>

0 comments on commit 32d5a13

Please sign in to comment.