2019-07-24 19:35:52 +00:00
|
|
|
<template>
|
|
|
|
<div
|
|
|
|
class="sticker-picker"
|
|
|
|
>
|
2019-08-12 17:01:38 +00:00
|
|
|
<tab-switcher
|
|
|
|
class="tab-switcher"
|
|
|
|
:render-only-focused="true"
|
|
|
|
scrollable-tabs
|
2019-07-24 19:35:52 +00:00
|
|
|
>
|
2019-08-12 17:01:38 +00: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 19:35:52 +00:00
|
|
|
>
|
|
|
|
<div
|
2019-08-12 17:01:38 +00: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 19:35:52 +00:00
|
|
|
>
|
2019-08-12 17:01:38 +00:00
|
|
|
<img
|
|
|
|
:src="stickerpack.path + sticker"
|
2019-07-24 19:35:52 +00:00
|
|
|
>
|
|
|
|
</div>
|
2019-08-12 17:01:38 +00:00
|
|
|
</div>
|
|
|
|
</tab-switcher>
|
2019-07-24 19:35:52 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script src="./sticker_picker.js"></script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
@import '../../_variables.scss';
|
|
|
|
|
|
|
|
.sticker-picker {
|
2019-08-12 17:01:38 +00:00
|
|
|
width: 100%;
|
2019-12-09 21:16:51 +00:00
|
|
|
.contents {
|
|
|
|
min-height: 250px;
|
|
|
|
.sticker-picker-content {
|
2019-12-15 16:58:37 +00:00
|
|
|
display: flex;
|
|
|
|
flex-wrap: wrap;
|
|
|
|
padding: 0 4px;
|
2019-12-09 21:16:51 +00:00
|
|
|
.sticker {
|
2019-12-15 16:58:37 +00:00
|
|
|
display: flex;
|
|
|
|
flex: 1 1 auto;
|
|
|
|
margin: 4px;
|
|
|
|
width: 56px;
|
|
|
|
height: 56px;
|
2019-12-09 21:16:51 +00:00
|
|
|
img {
|
2019-12-15 16:58:37 +00:00
|
|
|
height: 100%;
|
2019-12-09 21:16:51 +00:00
|
|
|
&:hover {
|
2019-12-28 13:55:42 +00:00
|
|
|
filter: drop-shadow(0 0 5px var(--accent, $fallback--link));
|
2019-12-09 21:16:51 +00:00
|
|
|
}
|
2019-07-24 19:35:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
</style>
|