mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Added button for generating channelname in frontpage
This commit is contained in:
@@ -466,6 +466,15 @@ li.disabled span {
|
||||
/*transition: 1s;*/
|
||||
}
|
||||
|
||||
.generate-channel-name {
|
||||
margin-left: -24px;
|
||||
padding-right: 5px;
|
||||
height: 46px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
#frontpage_player{
|
||||
position: fixed;
|
||||
bottom: 10px;
|
||||
|
||||
@@ -303,6 +303,7 @@ var Frontpage = {
|
||||
$("#main-container").css("background-color", "#2d2d2d");
|
||||
if(!Helper.mobilecheck()) {
|
||||
$("#frontpage-viewer-counter").tooltip("remove");
|
||||
$(".generate-channel-name").tooltip("remove");
|
||||
$("#offline-mode").tooltip("remove");
|
||||
}
|
||||
currently_showing_channels = 1;
|
||||
@@ -437,6 +438,11 @@ var Frontpage = {
|
||||
position: "bottom",
|
||||
tooltip: "Total Viewers"
|
||||
});
|
||||
$(".generate-channel-name").tooltip({
|
||||
delay: 5,
|
||||
position: "bottom",
|
||||
tooltip: "Generate name"
|
||||
});
|
||||
}
|
||||
Frontpage.get_frontpage_lists();
|
||||
|
||||
|
||||
@@ -1139,6 +1139,18 @@ $(document).on("click", "#player_bottom_overlay", function(e){
|
||||
Frontpage.to_channel(chan.toLowerCase(), false);
|
||||
});
|
||||
|
||||
$(document).on("click", ".generate-channel-name", function(e) {
|
||||
e.preventDefault();
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "/api/generate_name",
|
||||
success: function(response) {
|
||||
$(".room_namer").val("");
|
||||
$(".room-namer").val(response);
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
$(document).keydown(function(event) {
|
||||
if(window.location.pathname != "/"){
|
||||
if(event.keyCode == 91 || event.keyCode == 17){
|
||||
|
||||
@@ -17,6 +17,9 @@
|
||||
spellcheck="false"
|
||||
maxlength="18"
|
||||
/>
|
||||
<a href="#" class="generate-channel-name white-text">
|
||||
<i class="material-icons">autorenew</i>
|
||||
</a>
|
||||
<label for="autocomplete-input" class="noselect label-for-mobile-frontpage">Find or create radio channel</label>
|
||||
<button class="listen-button btn waves-effect waves-light white-text col s2">Listen</button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user