Some fixes

This commit is contained in:
Noah 2023-08-12 23:09:46 -07:00
parent 29cb7c5cc9
commit bb8fa33493
2 changed files with 33 additions and 2 deletions

View File

@ -1689,7 +1689,27 @@ const app = Vue.createApp({
return false; return false;
}, },
// Boot someone off yourn video. // Show who watches our video.
showViewers() {
// TODO: for now, ChatClient is our bro.
let users = Object.keys(this.webcam.watching);
if (users.length === 0) {
this.ChatClient("There is currently nobody viewing your camera.");
} else {
this.ChatClient("Your current webcam viewers are:<br><br>" + users.join(", "));
}
// Also focus the Watching list.
this.whoTab = 'watching';
// TODO: if mobile, show the panel - this width matches
// the media query in chat.css
if (screen.width < 1024) {
this.openWhoPanel();
}
},
// Boot someone off your video.
bootUser(username) { bootUser(username) {
if (!window.confirm( if (!window.confirm(
`Kick ${username} off your camera? This will also prevent them `+ `Kick ${username} off your camera? This will also prevent them `+

View File

@ -592,6 +592,15 @@
Unmute Unmute
</button> </button>
<!-- Watchers button -->
<button type="button"
v-if="webcam.active"
class="button is-small is-info is-outlined ml-1 px-1"
@click="showViewers()">
<i class="fa fa-eye mr-2"></i>
[[Object.keys(webcam.watching).length]]
</button>
<!-- NSFW toggle button --> <!-- NSFW toggle button -->
<button type="button" <button type="button"
v-if="webcam.active && config.permitNSFW" v-if="webcam.active && config.permitNSFW"
@ -1173,9 +1182,10 @@
<option value="hidden" v-if="jwt.claims != undefined && jwt.claims.op">🕵️ Hidden</option> <option value="hidden" v-if="jwt.claims != undefined && jwt.claims.op">🕵️ Hidden</option>
</optgroup> </optgroup>
<optgroup label="Mood"> <optgroup label="Mood">
<option value="chatty">🗫 Chatty and sociable</option> <option value="chatty">🗨️ Chatty and sociable</option>
<option value="introverted">🥄 Introverted and quiet</option> <option value="introverted">🥄 Introverted and quiet</option>
<option value="horny" v-if="config.permitNSFW">🔥 Horny</option> <option value="horny" v-if="config.permitNSFW">🔥 Horny</option>
<option value="exhibitionist" v-if="config.permitNSFW">👀 Watch me</option>
</optgroup> </optgroup>
</select> </select>
</div> </div>
@ -1246,6 +1256,7 @@
<i v-else-if="u.status === 'horny'" class="fa fa-fire has-text-light" title="Status: Horny"></i> <i v-else-if="u.status === 'horny'" class="fa fa-fire has-text-light" title="Status: Horny"></i>
<i v-else-if="u.status === 'chatty'" class="fa fa-comment has-text-light" title="Status: Chatty and sociable"></i> <i v-else-if="u.status === 'chatty'" class="fa fa-comment has-text-light" title="Status: Chatty and sociable"></i>
<i v-else-if="u.status === 'introverted'" class="fa fa-spoon has-text-light" title="Status: Introverted and quiet"></i> <i v-else-if="u.status === 'introverted'" class="fa fa-spoon has-text-light" title="Status: Introverted and quiet"></i>
<i v-else-if="u.status === 'exhibitionist'" class="fa-normal fa-eye has-text-light" title="Status: Watch me"></i>
<i v-else class="fa fa-clock has-text-light" :title="'Status: '+u.status"></i> <i v-else class="fa fa-clock has-text-light" :title="'Status: '+u.status"></i>
</div> </div>
</a> </a>