Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
flatsiedatsie authored Jun 2, 2022
1 parent e8eb0b8 commit 7a92555
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 33 deletions.
73 changes: 55 additions & 18 deletions css/extension.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
height: 100%; /*calc(100% - 7.6rem);*/
box-sizing: border-box;
overflow: auto;
position: absolute;
top: 7.6rem;
/*position: absolute;
top: 7.6rem;*/
left: 0;
padding: 2rem;
/*padding: 2rem;*/
padding:2rem;
}


#extension-internet-radio-content {
display:flex;
flex-direction: column;
/*display:flex;
flex-direction: column;
overflow: auto;
position: relative;
overflow: auto;*/
/*position: relative;*/
text-align: left;
font-size: 1.6rem;
color: #fff;
Expand Down Expand Up @@ -63,6 +63,8 @@
display:none;
justify-content:center;
align-items: center;
margin:0 auto;
width:calc(100% - 14rem);
margin-top:2rem;
}
.extension-internet-radio-playing #extension-internet-radio-now-playing-container{
Expand Down Expand Up @@ -172,7 +174,7 @@
padding:1rem;
border-radius:.5rem;
margin-right:2rem;
width:100%;
width:75%;
}

#extension-internet-radio-countries-dropdown,
Expand Down Expand Up @@ -407,10 +409,16 @@
top: 0rem;
left: 0rem;
position: fixed;
padding: 2rem 0 0 2rem;
/*padding: 2rem 0 0 2rem;*/
width: 7.6rem;
height: 7.6rem;
z-index: 1000;
/*z-index: 10001;*/
/*-webkit-transform: translate3d(0,0,1px);
transform: translate3d(0,0,1px);*/
/*z-index:10001;
-webkit-transform: translate3d(0,0,1px);
transform: translate3d(0,0,1px);
pointer-events: none;*/
}
#extension-internet-radio-back-button{
border-radius: 2.8rem;
Expand All @@ -423,13 +431,19 @@
-ms-user-select: none;
user-select: none;
outline: 0;
cursor: default;
cursor: pointer;
overflow:hidden;
opacity:1;
cursor:pointer;

background: #5d9bc7 no-repeat center/100% url(/images/back.png);
background-size:5.6rem;
box-shadow: 0 1px 3px rgb(0 0 0 / 6%), 0 1px 2px rgb(0 0 0 / 12%);

/*
position: fixed;
z-index:10002;
-webkit-transform: translate3d(0,0,2px);
transform: translate3d(0,0,2px);*/
}
#extension-internet-radio-back-button:hover{
background-color: #6dabd7;
Expand Down Expand Up @@ -739,7 +753,8 @@ body:not(.extension-internet-radio-playing) #extension-internet-radio-toggle-but
}

body:not(.extension-internet-radio-playing) #extension-internet-radio-volume-up-button,
body:not(.extension-internet-radio-playing) #extension-internet-radio-volume-down-button{
body:not(.extension-internet-radio-playing) #extension-internet-radio-volume-down-button,
body:not(.extension-internet-radio-playing) #extension-internet-radio-volume-indicator-container{
display:none;
}

Expand Down Expand Up @@ -906,14 +921,21 @@ body:not(.extension-internet-radio-playing) #extension-internet-radio-volume-dow


@media screen and (max-width: 640px) {
#extension-internet-radio-volume-up-button{display:none;}
#extension-internet-radio-volume-down-button{display:none;}
/*
.extension-internet-radio-playing #extension-internet-radio-volume-up-button,
#extension-internet-radio-volume-up-button,
.extension-internet-radio-playing #extension-internet-radio-volume-up-button,
#extension-internet-radio-volume-down-button,
.extension-internet-radio-playing #extension-internet-radio-volume-indicator-container,
#extension-internet-radio-volume-indicator-container{display:none;}
body:not(.extension-internet-radio-playing) #extension-internet-radio-toggle-button{display:none;}

*/
/*
#extension-internet-radio-now-playing:not(:empty)::before{
display:block;
text-align:center;
}
}*/

#extension-internet-radio-text-input-container{
flex-wrap:wrap;
Expand All @@ -940,6 +962,21 @@ body:not(.extension-internet-radio-playing) #extension-internet-radio-volume-dow
#extension-internet-radio-search-page .extension-internet-radio-item-left{
align-self:center;
}

#extension-internet-radio-stations-list > .extension-internet-radio-item{
margin: 2rem 2rem 2rem 4rem;
min-width:24rem;
}

.extension-internet-radio-item-action-button{
margin-left:auto;
}

#extension-internet-radio-now-playing-container{
margin:2rem 0 0 8rem;
width:calc(100% - 8rem);
}

}

@media screen and (min-width: 641px) {
Expand Down
38 changes: 28 additions & 10 deletions js/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@
// Search input button press
document.getElementById('extension-internet-radio-search-button').addEventListener('click', (event) => {
//console.log("send button clicked");
this.send_search();
this.send_search();

});


Expand Down Expand Up @@ -218,6 +219,9 @@
document.getElementById('extension-internet-radio-add-button').addEventListener('click', (event) => {
document.getElementById('extension-internet-radio-search-page').style.display = 'block';
document.getElementById('extension-internet-radio-stations-page').style.display = 'none';

document.getElementById('extension-internet-radio-back-button-container').classList.remove('extension-internet-radio-hidden');

this.searching = true;
// Only query the distribution server once
if(!this.entered_search_page){
Expand All @@ -234,7 +238,10 @@
}
catch(e){
//console.log("internet radio: could not stop audio in browser? " + e);
}
}

// get a z-index above the main menu button while overlay with back button is active
document.getElementById('extension-internet-radio-view').style.zIndex = '101';

});

Expand All @@ -243,9 +250,14 @@
document.getElementById('extension-internet-radio-search-page').style.display = 'none';
document.getElementById('extension-internet-radio-stations-page').style.display = 'block';
document.getElementById('extension-internet-radio-input-popup').classList.add('extension-internet-radio-hidden');
document.getElementById('extension-internet-radio-back-button-container').classList.add('extension-internet-radio-hidden');

this.get_init_data();
this.searching = false;

// drop down to normal z-index
document.getElementById('extension-internet-radio-view').style.zIndex = 'auto';

try{
this.stop_audio_in_browser();
}
Expand Down Expand Up @@ -507,9 +519,9 @@
if(document.getElementById('extension-internet-radio-volume-indicator-container') == null){
var indicator_el = document.createElement('div');
indicator_el.setAttribute("id","extension-internet-radio-volume-indicator-container");
if(this.playing == false){
indicator_el.classList.add('extension-internet-radio-hidden');
}
//if(this.playing == false){
// indicator_el.classList.add('extension-internet-radio-hidden');
//}
var indicator2_el = document.createElement('div');
indicator2_el.setAttribute("id","extension-internet-radio-volume-indicator-line");
indicator2_el.style.width = this.previous_volume + "%";
Expand Down Expand Up @@ -937,12 +949,18 @@
//console.log("event: ", event);
//console.log(event.path[2]);

const playing_items = document.querySelectorAll('.extension-internet-radio-item-playing');
for (var i = 0; i < playing_items.length; ++i) {
playing_items[i].classList.remove('extension-internet-radio-item-playing');
try{
const playing_items = document.querySelectorAll('.extension-internet-radio-item-playing');
for (var i = 0; i < playing_items.length; ++i) {
playing_items[i].classList.remove('extension-internet-radio-item-playing');
}
event.path[2].classList.add('extension-internet-radio-item-playing');
document.getElementById('extension-internet-radio-now-playing').innerText = "";
}
catch (e){
console.log('Error with play button: ', e);
}
event.path[2].classList.add('extension-internet-radio-item-playing');
document.getElementById('extension-internet-radio-now-playing').innerText = "";


//console.log("play");
const play_url = event.target.dataset.stream_url;
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
}
},
"short_name": "Radio",
"version": "2.1.27",
"version": "2.1.28",
"web_accessible_resources": [
"css/*.css",
"images/*.svg",
Expand Down
8 changes: 4 additions & 4 deletions views/content.html
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,7 @@ <h3>Please provide a name for the station</h3>
</div>
</div>

<div id="extension-internet-radio-back-button-container">
<button id="extension-internet-radio-back-button" class="back-button icon-button" data-l10n-id="back-button" aria-label="Back"></button>
</div>

<!--
<div class="extension-internet-radio-buttons-container">
<button id="extension-internet-radio-search-done-button" type="button">Done</button>
Expand Down Expand Up @@ -377,7 +375,9 @@ <h2>Debugging is enabled</h2>
</div>

</div>

<div id="extension-internet-radio-back-button-container" class="extension-internet-radio-hidden">
<button id="extension-internet-radio-back-button" class="back-button icon-button" data-l10n-id="back-button" aria-label="Back"></button>
</div>



Expand Down

0 comments on commit 7a92555

Please sign in to comment.