diff options
| author | HJ <30-hj@users.noreply.git.pleroma.social> | 2019-07-24 19:35:52 +0000 |
|---|---|---|
| committer | HJ <30-hj@users.noreply.git.pleroma.social> | 2019-07-24 19:35:52 +0000 |
| commit | 4827e4d972f8ee11e606693e24ae4ca21711c6b1 (patch) | |
| tree | 53e18494681c6c5c6a6f31d27d034e9681b89029 /src/components/sticker_picker/sticker_picker.vue | |
| parent | 28f777cb8a94f7a28edb6f99a62a6b864c2aa8dc (diff) | |
| parent | fa6210872f7f22c4c8ce1a1603426ebf03bf2050 (diff) | |
Merge branch 'feature/add-sticker-picker' into 'develop'
Feature/add sticker picker
See merge request pleroma/pleroma-fe!885
Diffstat (limited to 'src/components/sticker_picker/sticker_picker.vue')
| -rw-r--r-- | src/components/sticker_picker/sticker_picker.vue | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/src/components/sticker_picker/sticker_picker.vue b/src/components/sticker_picker/sticker_picker.vue new file mode 100644 index 00000000..938204c8 --- /dev/null +++ b/src/components/sticker_picker/sticker_picker.vue @@ -0,0 +1,62 @@ +<template> + <div + class="sticker-picker" + > + <div + class="sticker-picker-panel" + > + <tab-switcher + :render-only-focused="true" + > + <div + v-for="stickerpack in pack" + :key="stickerpack.path" + :image-tooltip="stickerpack.meta.title" + :image="stickerpack.path + stickerpack.meta.tabIcon" + class="sticker-picker-content" + > + <div + v-for="sticker in stickerpack.meta.stickers" + :key="sticker" + class="sticker" + @click="pick(stickerpack.path + sticker, stickerpack.meta.title)" + > + <img + :src="stickerpack.path + sticker" + > + </div> + </div> + </tab-switcher> + </div> + </div> +</template> + +<script src="./sticker_picker.js"></script> + +<style lang="scss"> +@import '../../_variables.scss'; + +.sticker-picker { + .sticker-picker-panel { + display: inline-block; + width: 100%; + .sticker-picker-content { + max-height: 300px; + overflow-y: scroll; + overflow-x: auto; + .sticker { + display: inline-block; + width: 20%; + height: 20%; + img { + width: 100%; + &:hover { + filter: drop-shadow(0 0 5px var(--link, $fallback--link)); + } + } + } + } + } +} + +</style> |
