Skip to content
This repository has been archived by the owner on Jan 1, 2025. It is now read-only.

Install slideshow #43

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions src/fsolauncher_ui/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,36 @@ var setCurrentPage;
}, 3000 );
}

/**
* Logic for full installer background slideshow.
*/

const slideImageArray = [ "slide1.png", "slide2.png", "slide3.jpg" ]; // Array of slideshow images to be shown.
const slideBasePath = "fsolauncher_images/slideshow/"; // Slideshow image location.
const slideTransitionSecs = 6; // Transition speed in seconds. Should be longer than the transition time in fsolauncher.css to avoid skipping.
const slideElement = document.getElementById( "full-install" );

const slideSequence = () => {
var k = 0;
for ( i = 0; i < slideImageArray.length; i++ ) {
setTimeout(() => {
slideElement.style.background = "url(" + slideBasePath + slideImageArray[k] + ") no-repeat";
slideElement.style.backgroundSize = "cover";
if ( ( k + 1 ) === slideImageArray.length ) {
if ( slideElement.style.display != 'none' ) { // Restart the slideshow only if the full-install page is visible.
setTimeout( () => {
slideSequence();
}, ( slideTransitionSecs * 1000 ) );
}

} else {
k++;
}
}, ( slideTransitionSecs * 1000 ) * i );
}
}


/**
* Show hints of `pageId`.
* @param {string} pageId The page id.
Expand Down Expand Up @@ -479,6 +509,7 @@ var setCurrentPage;
} else {
$fullInstall.style.display = 'none';
}
slideSequence(); // Start the background slideshow.
}

/**
Expand Down Expand Up @@ -836,4 +867,5 @@ var setCurrentPage;
sendToMain( 'INSTALL', a.currentTarget.getAttribute( 'install' ) ) );

init(); // Init client code.

} )();
2 changes: 2 additions & 0 deletions src/fsolauncher_ui/fsolauncher.css
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,8 @@ div.page p {
background-size: cover;
z-index: 10;
display: none;
background-blend-mode: darken;
transition: 2s;
}

#launcher #content #full-install .bottom {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.