Skip to content

Commit

Permalink
[FIX] Broken link fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Rishabhg71 committed Sep 18, 2023
1 parent 37933f9 commit 6550aa4
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions www/js/lib/uiUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,8 @@ function tabTransitionToSection (toSection, isAnimationRequired = false) {
const about = document.getElementById('about');
const home = document.getElementById('articleContent');

const isZimLoaded = true // get from settings or something

// references of extra elements that are in UI but not tabs
// prefix with extra to avoid confusion and easy identification
const extraNavBtns = document.getElementById('navigationButtons');
Expand All @@ -593,7 +595,7 @@ function tabTransitionToSection (toSection, isAnimationRequired = false) {
if (toSection === 'home') {
if (from === 'config') slideToRight(home, config);
if (from === 'about') slideToRight(home, about);
showElements(extraNavBtns, extraArticleSearch, extraWelcomeText, extraSearchingArticles, extraKiwixAlert);
showElements(extraNavBtns, extraArticleSearch, isZimLoaded ? null : extraWelcomeText, extraKiwixAlert);
} else if (toSection === 'config') {
if (from === 'about') slideToRight(config, about);
if (from === 'home') slideToLeft(config, home);
Expand Down Expand Up @@ -710,15 +712,8 @@ function showReturnLink () {
e.preventDefault();
document.getElementById('liConfigureNav').classList.remove('active');
document.getElementById('liHomeNav').classList.add('active');
removeAnimationClasses();
if (params.showUIAnimations) {
tabTransitionToSection('home');
} else {
document.getElementById('configuration').style.display = 'none';
document.getElementById('articleContent').style.display = 'block';
}
document.getElementById('navigationButtons').style.display = 'inline-flex';
document.getElementById('formArticleSearch').style.display = 'block';
tabTransitionToSection('home', params.showUIAnimations);

viewArticle.style.display = 'none';
});
}
Expand Down

0 comments on commit 6550aa4

Please sign in to comment.