2019-07-24 12:35:52 -07:00
|
|
|
<template>
|
|
|
|
<div
|
|
|
|
class="sticker-picker"
|
|
|
|
>
|
2019-08-12 10:01:38 -07:00
|
|
|
<tab-switcher
|
|
|
|
class="tab-switcher"
|
|
|
|
:render-only-focused="true"
|
|
|
|
scrollable-tabs
|
2019-07-24 12:35:52 -07:00
|
|
|
>
|
2019-08-12 10:01:38 -07:00
|
|
|
<div
|
|
|
|
v-for="stickerpack in pack"
|
|
|
|
:key="stickerpack.path"
|
|
|
|
:image-tooltip="stickerpack.meta.title"
|
|
|
|
:image="stickerpack.path + stickerpack.meta.tabIcon"
|
|
|
|
class="sticker-picker-content"
|
2019-07-24 12:35:52 -07:00
|
|
|
>
|
|
|
|
<div
|
2019-08-12 10:01:38 -07:00
|
|
|
v-for="sticker in stickerpack.meta.stickers"
|
|
|
|
:key="sticker"
|
|
|
|
class="sticker"
|
|
|
|
@click.stop.prevent="pick(stickerpack.path + sticker, stickerpack.meta.title)"
|
2019-07-24 12:35:52 -07:00
|
|
|
>
|
2019-08-12 10:01:38 -07:00
|
|
|
<img
|
|
|
|
:src="stickerpack.path + sticker"
|
2019-07-24 12:35:52 -07:00
|
|
|
>
|
|
|
|
</div>
|
2019-08-12 10:01:38 -07:00
|
|
|
</div>
|
|
|
|
</tab-switcher>
|
2019-07-24 12:35:52 -07:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script src="./sticker_picker.js"></script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
@import '../../_variables.scss';
|
|
|
|
|
|
|
|
.sticker-picker {
|
2019-08-12 10:01:38 -07:00
|
|
|
width: 100%;
|
2019-12-09 13:16:51 -08:00
|
|
|
.contents {
|
|
|
|
min-height: 250px;
|
|
|
|
.sticker-picker-content {
|
2019-12-15 08:58:37 -08:00
|
|
|
display: flex;
|
|
|
|
flex-wrap: wrap;
|
|
|
|
padding: 0 4px;
|
2019-12-09 13:16:51 -08:00
|
|
|
.sticker {
|
2019-12-15 08:58:37 -08:00
|
|
|
display: flex;
|
|
|
|
flex: 1 1 auto;
|
|
|
|
margin: 4px;
|
|
|
|
width: 56px;
|
|
|
|
height: 56px;
|
2019-12-09 13:16:51 -08:00
|
|
|
img {
|
2019-12-15 08:58:37 -08:00
|
|
|
height: 100%;
|
2019-12-09 13:16:51 -08:00
|
|
|
&:hover {
|
|
|
|
filter: drop-shadow(0 0 5px var(--link, $fallback--link));
|
|
|
|
}
|
2019-07-24 12:35:52 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
</style>
|