-
-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for persistent superchats #79
Merged
Merged
Changes from 10 commits
Commits
Show all changes
47 commits
Select commit
Hold shift + click to select a range
2a69054
rework css for pinned message to allow sticky
KentoNishi 90b978d
add a sticky bar with chips
KentoNishi 3260a63
parse ticker actions instead
KentoNishi fa4a341
progress so far
KentoNishi 547b5bf
timed superchat appearance
KentoNishi bfcce23
superchat ticking progress
KentoNishi b1bce68
expand tickers
KentoNishi 419622e
changes to types
KentoNishi 5ecec4c
disallow duplicates
KentoNishi 9db9f09
removed some extra css
KentoNishi 703a4bf
fix: use smelte dark instead of location dark for stickybar
r2dev2 c2b5799
start showing supas immediately on load
KentoNishi 1e8fc0e
Merge branch 'sticky-superchats' of github.com:LiveTL/HyperChat into …
KentoNishi add3ef2
use fullDurationSec
KentoNishi 1fb0181
add touch and horizontal scrollwheel support
KentoNishi 43dc929
clearer close button
KentoNishi ea164e3
only update stickySuperchats if items in discard
KentoNishi 7fa40f3
Merge branch 'master' into sticky-superchats
KentoNishi 8a2a0f0
fix small forceTLColor bug
KentoNishi 7f4ee1b
fix disappearing bar
KentoNishi 45503b7
safeguard possibly null runs prop
KentoNishi a1d6d62
remove messageId prop
KentoNishi 3834d2d
truncate long names
KentoNishi 9757f74
enableStickySuperchatBar setting
KentoNishi fc8c551
WIP liveChatTickerSponsorItemRenderer
KentoNishi a2d8b90
parse membership items in parseTickerAction
KentoNishi e8c1b35
partially implemented sticky bar for members
KentoNishi f354919
display member items on the bar
KentoNishi e870f44
expand membership chips on click
KentoNishi 95137bd
thin scrollbars everywhere
KentoNishi 7297a34
5-second leniency for sticky bar
KentoNishi 7b6a084
pixel-perfect vertical centering cuz im a nerd
KentoNishi adad8e8
evenly padded superchat dialog
KentoNishi e0759c2
fixed some padding
KentoNishi 1d863b1
fixed bugs + overlapped absolute items
KentoNishi 7759590
workaround for ff
KentoNishi b6d7852
run superchat bar on 500ms tick
KentoNishi 45efba1
some visual stuff
KentoNishi 1d4a4fc
take ur uncustomizable scrollbar, ff users
KentoNishi 9780564
w-full
KentoNishi 5687d21
remove transition
KentoNishi 77ff141
open, dispatch('resize')
KentoNishi cd9d63d
changelog
KentoNishi bae8f36
slightly shorter changelog
KentoNishi 7048db6
forgot to SET stickySuperchats
KentoNishi ba7bc8d
Un-absolute sticky bar
ChrRubin ddfeacf
update changelog
KentoNishi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<script lang="ts"> | ||
import { isDark, stickySuperchats, currentProgress } from '../ts/storage'; | ||
import PaidMessage from './PaidMessage.svelte'; | ||
let scrollableElem: HTMLDivElement; | ||
$: if (scrollableElem) { | ||
scrollableElem.addEventListener('wheel', (e) => { | ||
e.preventDefault(); | ||
e.stopPropagation(); | ||
scrollableElem.scrollBy(e.deltaY, 0); | ||
}); | ||
} | ||
$: $stickySuperchats = $stickySuperchats.filter(sc => { | ||
return (sc.showtime / 1000 <= $currentProgress) && (sc.showtime / 1000 + sc.tickerDuration) >= $currentProgress; | ||
}); | ||
</script> | ||
|
||
{#if $stickySuperchats.length} | ||
<div class="w-full overflow-y-hidden" style="overflow-x: overlay;" bind:this={scrollableElem}> | ||
<div | ||
class="flex items-center" | ||
style=" | ||
height: calc(2.5rem + 4px); | ||
width: fit-content; | ||
min-width: 100%; | ||
background-color: #{$isDark ? '202020' : 'ffffff'} | ||
" | ||
> | ||
{#each $stickySuperchats as sc} | ||
<span class="mx-0.5"> | ||
<PaidMessage message={sc} chip fillPortion={($currentProgress - sc.showtime / 1000) / sc.tickerDuration} /> | ||
</span> | ||
{/each} | ||
</div> | ||
</div> | ||
{/if} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<script lang="ts"> | ||
import { | ||
focusedSuperchat | ||
} from '../ts/storage'; | ||
import Dialog from './common/Dialog.svelte'; | ||
import PaidMessage from './PaidMessage.svelte'; | ||
import Button from 'smelte/src/components/Button'; | ||
$: sc = $focusedSuperchat as Ytc.ParsedTimedItem; | ||
</script> | ||
|
||
<Dialog active={Boolean(sc)} noCloseButton> | ||
<PaidMessage message={sc} /> | ||
<div slot="actions"> | ||
<Button on:click={() => { | ||
$focusedSuperchat = null; | ||
}} color="primary">Close</Button> | ||
</div> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The close button feels unnecessary. |
||
</Dialog> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
webkit-scrollbar-track
probably isn't needed if thin scrollbars are removed. Also if we're removing thin scrollbars here on Chrome, we should also remove it on Firefox.