mirror of
https://github.com/moonlight-stream/moonlight-chrome.git
synced 2025-08-17 08:36:42 +00:00
added support for back button icon
- made .svg icons clickable
This commit is contained in:
parent
5acd595f63
commit
2674de45ea
@ -16,7 +16,7 @@
|
|||||||
<!-- Add spacer, to align navigation to the right -->
|
<!-- Add spacer, to align navigation to the right -->
|
||||||
<div class="mdl-layout-spacer"></div>
|
<div class="mdl-layout-spacer"></div>
|
||||||
<!-- Navigation on the right -->
|
<!-- Navigation on the right -->
|
||||||
<object type="image/svg+xml" data="static/res/ic_arrow_back_white_24px.svg" id='backIcon'></object>
|
<img src="static/res/ic_arrow_back_white_24px.svg" id='backIcon'></img>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<main id="main-content" class="mdl-layout__content">
|
<main id="main-content" class="mdl-layout__content">
|
||||||
@ -42,7 +42,7 @@
|
|||||||
<div id="hostSettings">
|
<div id="hostSettings">
|
||||||
<div class="mdl-grid" id='host-grid'>
|
<div class="mdl-grid" id='host-grid'>
|
||||||
<div class='mdl-cell mdl-cell--3-col' id='addHostCell'>
|
<div class='mdl-cell mdl-cell--3-col' id='addHostCell'>
|
||||||
<object type="image/svg+xml" data="static/res/ic_add_circle_white_24px.svg" id='addHostIcon'></object>
|
<img src="static/res/ic_add_circle_white_24px.svg" id='addHostIcon'></img>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -52,6 +52,10 @@
|
|||||||
margin:auto;
|
margin:auto;
|
||||||
display:block;
|
display:block;
|
||||||
}
|
}
|
||||||
|
#backIcon {
|
||||||
|
height: 32px;
|
||||||
|
width: 32px
|
||||||
|
}
|
||||||
#addHostCell {
|
#addHostCell {
|
||||||
padding-top:3px;
|
padding-top:3px;
|
||||||
padding-bottom:3px;
|
padding-bottom:3px;
|
||||||
|
@ -14,12 +14,12 @@ function attachListeners() {
|
|||||||
$('#bitrateSlider').on('change', saveBitrate); // change occurs once the mouse lets go.
|
$('#bitrateSlider').on('change', saveBitrate); // change occurs once the mouse lets go.
|
||||||
$('#hostChosen').on('click', hostChosen);
|
$('#hostChosen').on('click', hostChosen);
|
||||||
$('#addHostCell').on('click', addHost);
|
$('#addHostCell').on('click', addHost);
|
||||||
$('#addHostIcon').on('click', addHost); // duplicate, because clicking the icon inside the button requires a different listener
|
|
||||||
$('#cancelAddHost').on('click', cancelAddHost);
|
$('#cancelAddHost').on('click', cancelAddHost);
|
||||||
$('#continueAddHost').on('click', continueAddHost);
|
$('#continueAddHost').on('click', continueAddHost);
|
||||||
$('#forgetHost').on('click', forgetHost);
|
$('#forgetHost').on('click', forgetHost);
|
||||||
$('#cancelPairingDialog').on('click', pairingPopupCanceled);
|
$('#cancelPairingDialog').on('click', pairingPopupCanceled);
|
||||||
$('#cancelQuitApp').on('click', cancelQuitApp);
|
$('#cancelQuitApp').on('click', cancelQuitApp);
|
||||||
|
$('#backIcon').on('click', showHostsAndSettingsMode);
|
||||||
$('#continueQuitApp').on('click', continueQuitApp);
|
$('#continueQuitApp').on('click', continueQuitApp);
|
||||||
$('#quitGameButton').on('click', stopGame);
|
$('#quitGameButton').on('click', stopGame);
|
||||||
$(window).resize(fullscreenNaclModule);
|
$(window).resize(fullscreenNaclModule);
|
||||||
@ -39,7 +39,6 @@ function fullscreenChromeWindow() {
|
|||||||
|
|
||||||
function changeUiModeForNaClLoad() {
|
function changeUiModeForNaClLoad() {
|
||||||
$("#main-content").children().not("#listener, #naclSpinner").hide();
|
$("#main-content").children().not("#listener, #naclSpinner").hide();
|
||||||
|
|
||||||
$('#naclSpinnerMessage').text('Loading Moonlight plugin...');
|
$('#naclSpinnerMessage').text('Loading Moonlight plugin...');
|
||||||
$('#naclSpinner').css('display', 'inline-block');
|
$('#naclSpinner').css('display', 'inline-block');
|
||||||
}
|
}
|
||||||
@ -48,6 +47,7 @@ function restoreUiAfterNaClLoad() {
|
|||||||
$("#main-content").children().not("#listener, #naclSpinner, #gameSelection").show();
|
$("#main-content").children().not("#listener, #naclSpinner, #gameSelection").show();
|
||||||
$('#naclSpinner').hide();
|
$('#naclSpinner').hide();
|
||||||
$('#loadingSpinner').css('display', 'none');
|
$('#loadingSpinner').css('display', 'none');
|
||||||
|
showHostsAndSettingsMode();
|
||||||
}
|
}
|
||||||
|
|
||||||
function snackbarLog(givenMessage) {
|
function snackbarLog(givenMessage) {
|
||||||
@ -260,6 +260,18 @@ function showApps() {
|
|||||||
showAppsMode();
|
showAppsMode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// set the layout to the initial mode you see when you open moonlight
|
||||||
|
function showHostsAndSettingsMode() {
|
||||||
|
console.log('entering show hosts and settings mode.');
|
||||||
|
$('#backIcon').hide();
|
||||||
|
$(".mdl-layout__header").show();
|
||||||
|
$("#main-content").children().not("#listener, #loadingSpinner, #naclSpinner").show();
|
||||||
|
$("#game-grid").hide();
|
||||||
|
$("#main-content").removeClass("fullscreen");
|
||||||
|
$("#listener").removeClass("fullscreen");
|
||||||
|
$("body").css('backgroundColor', 'white');
|
||||||
|
}
|
||||||
|
|
||||||
function showAppsMode() {
|
function showAppsMode() {
|
||||||
console.log("entering show apps mode.");
|
console.log("entering show apps mode.");
|
||||||
$('#backIcon').show();
|
$('#backIcon').show();
|
||||||
@ -270,6 +282,7 @@ function showAppsMode() {
|
|||||||
$("#main-content").removeClass("fullscreen");
|
$("#main-content").removeClass("fullscreen");
|
||||||
$("#listener").removeClass("fullscreen");
|
$("#listener").removeClass("fullscreen");
|
||||||
$("body").css('backgroundColor', 'white');
|
$("body").css('backgroundColor', 'white');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -349,7 +362,6 @@ function startGame(sourceEvent) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function cancelQuitApp() {
|
function cancelQuitApp() {
|
||||||
showAppsMode();
|
|
||||||
document.querySelector('#quitAppDialog').close();
|
document.querySelector('#quitAppDialog').close();
|
||||||
console.log('closing app dialog, and returning');
|
console.log('closing app dialog, and returning');
|
||||||
}
|
}
|
||||||
@ -480,7 +492,6 @@ function updateDefaultBitrate() {
|
|||||||
function onWindowLoad(){
|
function onWindowLoad(){
|
||||||
// don't show the game selection div
|
// don't show the game selection div
|
||||||
$('#gameSelection').css('display', 'none');
|
$('#gameSelection').css('display', 'none');
|
||||||
$("#bitrateField").addClass("bitrateField");
|
|
||||||
|
|
||||||
if(chrome.storage) {
|
if(chrome.storage) {
|
||||||
// load stored resolution prefs
|
// load stored resolution prefs
|
||||||
|
Loading…
x
Reference in New Issue
Block a user