No tap-target in client-mode

- some minor restructuring of if/unless
This commit is contained in:
Kasper Rynning-Tønnesen
2018-04-03 16:09:16 +02:00
parent c710fb56e2
commit 20922fb494
7 changed files with 50 additions and 50 deletions

View File

@@ -167,7 +167,7 @@ var Channel = {
emit_list(); emit_list();
} }
if((!localStorage.getItem("_jSeen") || localStorage.getItem("_jSeen") != "seen") && !Helper.mobilecheck()) { if(((!localStorage.getItem("_jSeen") || localStorage.getItem("_jSeen") != "seen") && !Helper.mobilecheck()) && !client) {
$('.tap-target-join').tapTarget('open'); $('.tap-target-join').tapTarget('open');
tap_target_timeout = setTimeout(function() { tap_target_timeout = setTimeout(function() {
$('.tap-target-join').tapTarget('close'); $('.tap-target-join').tapTarget('close');

View File

@@ -315,7 +315,7 @@ initializeCastApi = function() {
$(".volume-container").addClass("volume-container-cast"); $(".volume-container").addClass("volume-container-cast");
} }
cast_ready_connect = true; cast_ready_connect = true;
if(!localStorage.getItem("_chSeen") || localStorage.getItem("_chSeen") != "seen") { if((!localStorage.getItem("_chSeen") || localStorage.getItem("_chSeen") != "seen") && !client) {
$(".castButton").css("display", "block"); $(".castButton").css("display", "block");
showDiscovery = true; showDiscovery = true;
$('.tap-target').tapTarget('open'); $('.tap-target').tapTarget('open');

View File

@@ -53,16 +53,18 @@
<body class="noselect"> <body class="noselect">
{{{body}}} {{{body}}}
{{#unless embed}} {{#unless embed}}
<div class="tap-target" data-activates="castButton"> {{#unless client}}
<div class="tap-target-content"> <div class="tap-target" data-activates="castButton">
<h5>Chromecast</h5> <div class="tap-target-content">
<p>This site supports chromecasting!</p> <h5>Chromecast</h5>
<p>This site supports chromecasting!</p>
</div>
</div> </div>
</div> <div class="tap-target-join" data-activates="chan">
<div class="tap-target-join" data-activates="chan"> <div class="tap-target-content">
<div class="tap-target-content"> </div>
</div> </div>
</div> {{/unless}}
{{> contact}} {{> contact}}
{{> donate}} {{> donate}}
{{> footer}} {{> footer}}

View File

@@ -1,35 +1,34 @@
{{#if client}} {{#unless client}}
{{else}} <div id="embed" class="modal">
<div id="embed" class="modal"> <div class="modal-content">
<div class="modal-content"> <h4>Embed</h4>
<h4>Embed</h4> <p>Copy the code in the textarea, and paste on your website.</p>
<p>Copy the code in the textarea, and paste on your website.</p> <p>
<p> <input type="checkbox" id="autoplay" checked="checked" />
<input type="checkbox" id="autoplay" checked="checked" /> <label for="autoplay" class="padding_right_26">Autoplay</label>
<label for="autoplay" class="padding_right_26">Autoplay</label> <label for="width_embed" class="embed-label">Width</label>
<label for="width_embed" class="embed-label">Width</label> <input type="number" value="600" id="width_embed" class="settings_embed" min="1" />
<input type="number" value="600" id="width_embed" class="settings_embed" min="1" /> <label for="height_embed" class="padding_left_6 embed-label">Height</label>
<label for="height_embed" class="padding_left_6 embed-label">Height</label> <input type="number" value="300" id="height_embed" class="settings_embed" min="1" />
<input type="number" value="300" id="height_embed" class="settings_embed" min="1" /> <label for="color_embed" class="padding_left_6 embed-label">Color</label>
<label for="color_embed" class="padding_left_6 embed-label">Color</label> <input type="text" id="color_embed" class="settings_embed" value="#808080" />
<input type="text" id="color_embed" class="settings_embed" value="#808080" /> <input type="checkbox" id="videoonly" />
<input type="checkbox" id="videoonly" /> <label for="videoonly" class="padding_right_26">Video-only</label>
<label for="videoonly" class="padding_right_26">Video-only</label> </p>
</p> <textarea id="embed-area"></textarea>
<textarea id="embed-area"></textarea> </div>
<div class="modal-footer">
<a href="#!" class=" modal-action modal-close waves-effect waves-green btn-flat">Close</a>
</div>
</div> </div>
<div class="modal-footer"> <div id="channel-share-modal" class="modal">
<a href="#!" class=" modal-action modal-close waves-effect waves-green btn-flat">Close</a> <div class="modal-content">
<p>To join this channel, go to</p>
<p><span id="channel-name-join"></span></p>
<img id="share-join-qr" alt="QR code for joining" title="Link to join this Zoff channel" src="https://chart.googleapis.com/chart?chs=221x221&amp;cht=qr&amp;choe=UTF-8&amp;chld=L%7C1&amp;chl=http://zoff.me" />
</div>
</div> </div>
</div> {{/unless}}
<div id="channel-share-modal" class="modal">
<div class="modal-content">
<p>To join this channel, go to</p>
<p><span id="channel-name-join"></span></p>
<img id="share-join-qr" alt="QR code for joining" title="Link to join this Zoff channel" src="https://chart.googleapis.com/chart?chs=221x221&amp;cht=qr&amp;choe=UTF-8&amp;chld=L%7C1&amp;chl=http://zoff.me" />
</div>
</div>
{{/if}}
<div id="help" class="modal modal-fixed-footer"> <div id="help" class="modal modal-fixed-footer">
<div class="modal-content"> <div class="modal-content">
<h4>Help</h4> <h4>Help</h4>

View File

@@ -179,8 +179,7 @@
</li> </li>
</ul> </ul>
</li> </li>
{{#if client}} {{#unless client}}
{{else}}
<li class="no-padding remote-panel hide-on-small-only"> <li class="no-padding remote-panel hide-on-small-only">
<ul class="collapsible collapsible-accordion"> <ul class="collapsible collapsible-accordion">
<li> <li>
@@ -424,4 +423,4 @@
</li> </li>
</ul> </ul>
</li> </li>
{{/if}} {{/unless}}

View File

@@ -1,5 +1,7 @@
<div id="video-container" class="col s12 m9 video-container no-opacity click-through"> <div id="video-container" class="col s12 m9 video-container no-opacity click-through">
<div id="fireplace_player" class="ytplayer"></div> {{#unless embed}}
<div id="fireplace_player" class="ytplayer"></div>
{{/unless}}
<div id="player" class="ytplayer"></div> <div id="player" class="ytplayer"></div>
<div id="main_components"> <div id="main_components">
<div id="player_overlay" class="hide valign-wrapper"> <div id="player_overlay" class="hide valign-wrapper">

View File

@@ -1,12 +1,11 @@
<div id="playlist" class="col s12 m3"> <div id="playlist" class="col s12 m3">
{{#if client}} {{#unless client}}
{{else}}
<ul class="tabs playlist-tabs-loggedIn tabs-fixed-width" style="width: 96%;"> <ul class="tabs playlist-tabs-loggedIn tabs-fixed-width" style="width: 96%;">
<li class="tab col s3"><a class="playlist-tab-links playlist-link active truncate" href="#wrapper">Playlist</a></li> <li class="tab col s3"><a class="playlist-tab-links playlist-link active truncate" href="#wrapper">Playlist</a></li>
<li class="tab col s3"><a class="playlist-tab-links suggested-link truncate" href="#suggestions">Suggested<span class="new badge white hide suggested-badge"></span></a></li> <li class="tab col s3"><a class="playlist-tab-links suggested-link truncate" href="#suggestions">Suggested<span class="new badge white hide suggested-badge"></span></a></li>
<li class="tab col s3"><a class="playlist-tab-links chat-link truncate" href="#chat">Chat<span class="new badge white hide"></span></a></li> <li class="tab col s3"><a class="playlist-tab-links chat-link truncate" href="#chat">Chat<span class="new badge white hide"></span></a></li>
</ul> </ul>
{{/if}} {{/unless}}
<div id="find_div" class="hide"> <div id="find_div" class="hide">
<form id="find_form"> <form id="find_form">
<input type="text" name="find_value" placeholder="Find.." id="find_input" autocomplete="off" /> <input type="text" name="find_value" placeholder="Find.." id="find_input" autocomplete="off" />
@@ -17,9 +16,8 @@
</form> </form>
</div> </div>
{{> channel/playlist}} {{> channel/playlist}}
{{#if client}} {{#unless client}}
{{else}}
{{> channel/suggestions}} {{> channel/suggestions}}
{{> channel/chat}} {{> channel/chat}}
{{/if}} {{/unless}}
</div> </div>