Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions src/renderer/components/WatchVideoLiveChat/WatchVideoLiveChat.css
Original file line number Diff line number Diff line change
Expand Up @@ -232,3 +232,38 @@
position: relative;
inset-block-start: 0.45rem;
}

.popoutChatButton {
border-radius: 50%;
border-style: none;
background-color: transparent;
line-height: 1em;
color: var(--primary-text-color);
cursor: pointer;
font-size: 20px;
transition: background 0.2s ease-out;

&:hover {
background-color: var(--side-nav-hover-color);
color: var(--side-nav-hover-text-color);
transition: background 0.2s ease-in;
}

&:active {
background-color: var(--tertiary-text-color);
color: var(--side-nav-active-text-color);
transition: background 0.2s ease-in;
}
}

.titleContainer {
display: flex;
justify-content: space-between;
margin-block: 1em;

.title,
.popoutChatButton {
padding: 10px;
}
}

34 changes: 28 additions & 6 deletions src/renderer/components/WatchVideoLiveChat/WatchVideoLiveChat.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,31 @@
v-else
class="relative"
>
<h4>
{{ t("Video.Live Chat") }}
<div
class="titleContainer"
>
<span
v-if="!hideVideoViews && watchingCount !== null"
class="watchingCount"
class="title"
>
{{ t('Global.Counts.Watching Count', { count: formattedWatchingCount }, watchingCount) }}
{{ t("Video.Live Chat") }}
<span
v-if="!hideVideoViews && watchingCount !== null"
class="watchingCount"
>
{{ t('Global.Counts.Watching Count', { count: formattedWatchingCount }, watchingCount) }}
</span>
</span>
</h4>
<button
class="popoutChatButton"
:title="$t('Video.Popout Live Chat')"
@click="popoutChat"
>
<FontAwesomeIcon
class="popoutChatIcon"
:icon="['fas', 'fa-arrow-up-right-from-square']"
/>
</button>
</div>
<div
v-if="superChatComments.length > 0"
class="superChatComments"
Expand Down Expand Up @@ -571,6 +587,12 @@ function scrollToBottom() {
stayAtBottom = true
showScrollToBottom.value = false
}

function popoutChat() {
const url = `https://www.youtube.com/live_chat?is_popout=1&v=${props.videoId}`
window.open(url, '_blank', 'noreferrer')
}

</script>

<style scoped src="./WatchVideoLiveChat.css" />
2 changes: 2 additions & 0 deletions src/renderer/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {
faArrowLeft,
faArrowRight,
faArrowUp,
faArrowUpRightFromSquare,
faBars,
faBarsProgress,
faBorderAll,
Expand Down Expand Up @@ -146,6 +147,7 @@ library.add(
faArrowLeft,
faArrowRight,
faArrowUp,
faArrowUpRightFromSquare,
faBars,
faBarsProgress,
faBorderAll,
Expand Down
1 change: 1 addition & 0 deletions static/locales/en-US.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -880,6 +880,7 @@ Video:
Live Now: Live Now
Live Chat: Live Chat
Enable Live Chat: Enable Live Chat
Popout Live Chat: Popout Chat
Live Chat is currently not supported in this build.: Live Chat is currently not
supported in this build.
Live chat is enabled. Chat messages will appear here once sent.: Live chat is enabled. Chat
Expand Down