Skip to content

Commit d19f037

Browse files
committed
update layout depending on tab group support
1 parent f02998f commit d19f037

File tree

2 files changed

+27
-11
lines changed

2 files changed

+27
-11
lines changed

src/browseraction/assets/browseraction.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,16 @@ select#tabGroupSelection {
3838
padding: 4px 8px;
3939
}
4040

41+
#tabcount.tabcount-grp {
42+
display: block;
43+
margin-top: 6px;
44+
}
45+
46+
#tabcount.tabcount-nogrp {
47+
display: inline;
48+
margin-left: 6px;
49+
}
50+
4151
#tabcount abbr {
4252
cursor: default;
4353
text-decoration: none;

src/browseraction/components/ActionBar.vue

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,24 @@
1414
{{ group.title }}
1515
</option>
1616
</select>
17+
<div
18+
id="tabcount"
19+
:class="tabGroupsSupported ? 'tabcount-grp' : 'tabcount-nogrp'"
20+
v-if="tabCount !== '0'"
21+
>
22+
<abbr
23+
title="Opening too many tabs at once may lead to long wait times or crash your browser."
24+
>
25+
&#9432;
26+
<span>
27+
will open
28+
<span id="tabcount-number">{{ tabCount }}</span>
29+
new
30+
<span id="tabcount-tab-label">tab<span v-if="tabCount !== '1'">s</span></span>
31+
</span>
32+
</abbr>
33+
</div>
1734
</section>
18-
<span id="tabcount" v-if="tabCount !== '0'">
19-
<abbr title="Opening too many tabs at once may lead to long wait times or crash your browser.">
20-
&#9432;
21-
<span>
22-
will open
23-
<span id="tabcount-number">{{ tabCount }}</span>
24-
new
25-
<span id="tabcount-tab-label">tab<span v-if="tabCount !== '1'">s</span></span>
26-
</span>
27-
</abbr>
28-
</span>
2935
</template>
3036

3137
<script lang="ts">

0 commit comments

Comments
 (0)