Skip to content
This repository was archived by the owner on Jun 25, 2020. It is now read-only.

Commit 622e325

Browse files
committed
Merge branch 'dev'
2 parents e796aa0 + 29fdf61 commit 622e325

File tree

3 files changed

+70
-60
lines changed

3 files changed

+70
-60
lines changed

src/injected-content/scss/_emotes.scss

Lines changed: 39 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -6,42 +6,44 @@
66
bottom: calc(100% + 8px);
77
background: #29374a;
88
box-shadow: 0 6px 6px -3px rgba(0,0,0,.2), 0 10px 14px 1px rgba(0,0,0,.14), 0 4px 18px 3px rgba(0,0,0,.12);
9-
margin-bottom: 0.4em;
10-
max-height: 30vh;
11-
overflow-y: auto;
12-
padding: 0;
13-
list-style: none;
14-
li {
15-
list-style-type: none;
16-
padding: 0;
17-
margin: 0;
18-
display: inline-block;
19-
button {
20-
width: auto;
21-
display: flex;
22-
align-items: center;
23-
background: none;
24-
border: 0;
25-
outline: 0!important;
26-
text-align: left;
27-
cursor: pointer;
28-
color: #fff;
29-
line-height: 30px;
30-
padding: 4px 8px;
31-
font-size: .9em;
9+
margin-bottom: 0.4em;
10+
padding: 0;
11+
ul {
12+
list-style: none;
13+
max-height: 30vh;
14+
overflow-y: auto;
15+
li {
3216
list-style-type: none;
33-
&:hover, &.selected {
34-
background: #0065dc;
35-
}
36-
.me-emotes-preview {
37-
position: relative;
38-
display: inline-flex;
39-
}
40-
span {
41-
font-size: .8em;
42-
margin-left: .1em;
43-
}
44-
}
17+
padding: 0;
18+
margin: 0;
19+
display: inline-block;
20+
button {
21+
width: auto;
22+
display: flex;
23+
align-items: center;
24+
background: none;
25+
border: 0;
26+
outline: 0!important;
27+
text-align: left;
28+
cursor: pointer;
29+
color: #fff;
30+
line-height: 30px;
31+
padding: 4px 8px;
32+
font-size: .9em;
33+
list-style-type: none;
34+
&:hover, &.selected {
35+
background: #0065dc;
36+
}
37+
.me-emotes-preview {
38+
position: relative;
39+
display: inline-flex;
40+
}
41+
span {
42+
font-size: .8em;
43+
margin-left: .1em;
44+
}
45+
}
46+
}
4547
}
4648
.me-autocomplete-footer {
4749
height: 20px;
@@ -56,5 +58,5 @@
5658
b {
5759
font-weight: bold;
5860
}
59-
}
60-
}
61+
}
62+
}

src/injected-content/scss/_theatermode.scss

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,10 @@ b-notifications {
2121
}
2222

2323
.channel-page.theaterMode {
24-
//margin-top: 30px!important;
25-
//max-height: 100%!important;
2624
height: calc(100vh) !important;
2725
max-height: calc(100vh) !important;
2826
}
2927

30-
.channel-page > aside.theaterMode {
31-
//padding-top: 0px!important;
32-
}
33-
34-
.channel-page.theaterMode > section {
35-
//height: 100%;
36-
}
37-
3828
.channel-page.theaterMode b-host-bar {
3929
display: none !important;
4030
}
@@ -63,19 +53,22 @@ body.theaterMode b-nav-host {
6353
}
6454

6555
b-channel-info-bar.theaterMode > .info-bar {
66-
//display: none;
67-
//visibility: hidden;
6856
opacity: 0;
6957
transition: 0.3s;
7058
background: #0000006b !important;
7159
box-shadow: none !important;
7260
}
7361

74-
.channel-info-container.theaterMode .toggle-interactive,
62+
.channel-info-container.theaterMode .toggle-interactive,
63+
.channel-info-container.theaterMode .toggle-interact-menu,
7564
b-skills-button-host-component.theaterMode {
7665
z-index: 99999;
7766
}
7867

68+
.channel-info-container.theaterMode .toggle-interactive.open {
69+
background-color: #000000d6 !important;
70+
}
71+
7972
b-nav-host > div.theaterMode {
8073
display: none;
8174
}

src/injected-content/vue-apps/emote-autocomplete/emote-autocomplete.vue

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
<template>
2-
<ul v-cloak id="me-emote-autocomplete" class="me-autocomplete" v-show="showMenu" role="listbox">
3-
<li v-for="(emote, index) in filteredEmotes" v-bind:key="emote.id">
4-
<button class="me-autocomplete-emote" :class="{ selected: isSelected(index) }" style="align-items: center;display: inline-flex;" v-on:click="autocompleteEmote(emote)">
5-
<span class="elixr-custom-emote twentyfour me-emotes-preview">
6-
<img :src="emoteUrl(emote)">
7-
</span>
8-
<span class="emote-name">{{emote.name}}</span>
9-
</button>
10-
</li>
2+
<div v-cloak id="me-emote-autocomplete" class="me-autocomplete" v-show="showMenu">
3+
<ul role="listbox">
4+
<li v-for="(emote, index) in filteredEmotes" v-bind:key="emote.id" :id="getEmoteElementId(emote)">
5+
<button class="me-autocomplete-emote" :class="{ selected: isSelected(index) }" style="align-items: center;display: inline-flex;" v-on:click="autocompleteEmote(emote)">
6+
<span class="elixr-custom-emote twentyfour me-emotes-preview">
7+
<img :src="emoteUrl(emote)">
8+
</span>
9+
<span class="emote-name">{{emote.name}}</span>
10+
</button>
11+
</li>
12+
</ul>
1113
<div class="me-autocomplete-footer">
1214
<span>Press <b>tab</b> to autocomplete.</span>
1315
</div>
14-
</ul>
16+
</div>
1517
</template>
1618

1719
<script>
@@ -39,22 +41,35 @@ export default {
3941
if(this.selectedEmoteIndex > this.filteredEmotes.length - 1) {
4042
this.selectedEmoteIndex = 0;
4143
}
44+
this.scrollSelectedIntoView();
4245
}
4346
},
4447
methods: {
48+
getEmoteElementId: function(emote) {
49+
return (emote.global ? "global-" : "channel-") + emote.name
50+
},
51+
scrollSelectedIntoView: function() {
52+
let selectedEmote = this.filteredEmotes[this.selectedEmoteIndex];
53+
if(selectedEmote) {
54+
let emoteElementId = this.getEmoteElementId(selectedEmote);
55+
document.getElementById(emoteElementId).scrollIntoView(false);
56+
}
57+
},
4558
incrementSelectedEmote: function() {
4659
if(this.selectedEmoteIndex >= this.filteredEmotes.length - 1) {
4760
this.selectedEmoteIndex = 0;
4861
} else {
4962
this.selectedEmoteIndex++;
5063
}
64+
this.scrollSelectedIntoView();
5165
},
5266
decrementSelectedEmote: function() {
5367
if(this.selectedEmoteIndex <= 0) {
5468
this.selectedEmoteIndex = this.filteredEmotes.length - 1;
5569
} else {
5670
this.selectedEmoteIndex--;
5771
}
72+
this.scrollSelectedIntoView();
5873
},
5974
isSelected: function(index) {
6075
return index === this.selectedEmoteIndex;

0 commit comments

Comments
 (0)