summaryrefslogtreecommitdiff
path: root/src/client/components
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2021-04-24 23:04:59 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2021-04-24 23:04:59 +0900
commit8043409d386d5e08c85d27c720ecca2b3f8030ab (patch)
tree584bc43b126dbdc9ba592758aa9c17f8e122f344 /src/client/components
parentMerge branch 'develop' (diff)
parent12.79.0 (diff)
downloadmisskey-8043409d386d5e08c85d27c720ecca2b3f8030ab.tar.gz
misskey-8043409d386d5e08c85d27c720ecca2b3f8030ab.tar.bz2
misskey-8043409d386d5e08c85d27c720ecca2b3f8030ab.zip
Merge branch 'develop'
Diffstat (limited to 'src/client/components')
-rw-r--r--src/client/components/gallery-post-preview.vue126
-rw-r--r--src/client/components/launch-pad.vue4
-rw-r--r--src/client/components/tab.vue6
-rw-r--r--src/client/components/ui/button.vue7
-rw-r--r--src/client/components/ui/container.vue1
-rw-r--r--src/client/components/ui/pagination.vue10
6 files changed, 143 insertions, 11 deletions
diff --git a/src/client/components/gallery-post-preview.vue b/src/client/components/gallery-post-preview.vue
new file mode 100644
index 0000000000..5c3bdb1349
--- /dev/null
+++ b/src/client/components/gallery-post-preview.vue
@@ -0,0 +1,126 @@
+<template>
+<MkA :to="`/gallery/${post.id}`" class="ttasepnz _panel" tabindex="-1">
+ <div class="thumbnail">
+ <ImgWithBlurhash class="img" :src="post.files[0].thumbnailUrl" :hash="post.files[0].blurhash"/>
+ </div>
+ <article>
+ <header>
+ <MkAvatar :user="post.user" class="avatar"/>
+ </header>
+ <footer>
+ <span class="title">{{ post.title }}</span>
+ </footer>
+ </article>
+</MkA>
+</template>
+
+<script lang="ts">
+import { defineComponent } from 'vue';
+import { userName } from '@client/filters/user';
+import ImgWithBlurhash from '@client/components/img-with-blurhash.vue';
+import * as os from '@client/os';
+
+export default defineComponent({
+ components: {
+ ImgWithBlurhash
+ },
+ props: {
+ post: {
+ type: Object,
+ required: true
+ },
+ },
+ methods: {
+ userName
+ }
+});
+</script>
+
+<style lang="scss" scoped>
+.ttasepnz {
+ display: block;
+ position: relative;
+ height: 200px;
+
+ &:hover {
+ text-decoration: none;
+ color: var(--accent);
+
+ > .thumbnail {
+ transform: scale(1.1);
+ }
+
+ > article {
+ > footer {
+ &:before {
+ opacity: 1;
+ }
+ }
+ }
+ }
+
+ > .thumbnail {
+ width: 100%;
+ height: 100%;
+ position: absolute;
+ transition: all 0.5s ease;
+
+ > .img {
+ width: 100%;
+ height: 100%;
+ object-fit: cover;
+ }
+ }
+
+ > article {
+ position: absolute;
+ z-index: 1;
+ width: 100%;
+ height: 100%;
+
+ > header {
+ position: absolute;
+ top: 0;
+ width: 100%;
+ padding: 12px;
+ box-sizing: border-box;
+ display: flex;
+
+ > .avatar {
+ margin-left: auto;
+ width: 32px;
+ height: 32px;
+ }
+ }
+
+ > footer {
+ position: absolute;
+ bottom: 0;
+ width: 100%;
+ padding: 16px;
+ box-sizing: border-box;
+ color: #fff;
+ text-shadow: 0 0 8px #000;
+ background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
+
+ &:before {
+ content: "";
+ display: block;
+ position: absolute;
+ z-index: -1;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background: linear-gradient(rgba(0, 0, 0, 0.4), transparent);
+ opacity: 0;
+ transition: opacity 0.5s ease;
+ }
+
+ > .title {
+ font-weight: bold;
+ }
+ }
+ }
+}
+</style>
diff --git a/src/client/components/launch-pad.vue b/src/client/components/launch-pad.vue
index e3d24c70f2..e66bbd73e4 100644
--- a/src/client/components/launch-pad.vue
+++ b/src/client/components/launch-pad.vue
@@ -3,12 +3,12 @@
<div class="szkkfdyq _popup">
<div class="main">
<template v-for="item in items">
- <button v-if="item.action" class="_button" @click="$event => { item.action($event); close(); }">
+ <button v-if="item.action" class="_button" @click="$event => { item.action($event); close(); }" v-click-anime>
<i class="icon" :class="item.icon"></i>
<div class="text">{{ item.text }}</div>
<span v-if="item.indicate" class="indicator"><i class="fas fa-circle"></i></span>
</button>
- <MkA v-else :to="item.to" @click.passive="close()">
+ <MkA v-else :to="item.to" @click.passive="close()" v-click-anime>
<i class="icon" :class="item.icon"></i>
<div class="text">{{ item.text }}</div>
<span v-if="item.indicate" class="indicator"><i class="fas fa-circle"></i></span>
diff --git a/src/client/components/tab.vue b/src/client/components/tab.vue
index 96cbe50fb1..5e54fc968e 100644
--- a/src/client/components/tab.vue
+++ b/src/client/components/tab.vue
@@ -12,14 +12,16 @@ export default defineComponent({
return withDirectives(h('div', {
class: 'pxhvhrfw',
- }, options.map(option => h('button', {
+ }, options.map(option => withDirectives(h('button', {
class: ['_button', { active: this.value === option.props.value }],
key: option.props.value,
disabled: this.value === option.props.value,
onClick: () => {
this.$emit('update:value', option.props.value);
}
- }, option.children))), [
+ }, option.children), [
+ [resolveDirective('click-anime')]
+ ]))), [
[resolveDirective('size'), { max: [500] }]
]);
}
diff --git a/src/client/components/ui/button.vue b/src/client/components/ui/button.vue
index 3901e8ae44..c92f30db97 100644
--- a/src/client/components/ui/button.vue
+++ b/src/client/components/ui/button.vue
@@ -139,7 +139,8 @@ export default defineComponent({
}
&.primary {
- color: #fff;
+ font-weight: bold;
+ color: #fff !important;
background: var(--accent);
&:not(:disabled):hover {
@@ -200,10 +201,6 @@ export default defineComponent({
min-width: 100px;
}
- &.primary {
- font-weight: bold;
- }
-
> .ripples {
position: absolute;
z-index: 0;
diff --git a/src/client/components/ui/container.vue b/src/client/components/ui/container.vue
index cfd928518e..2e8eea7132 100644
--- a/src/client/components/ui/container.vue
+++ b/src/client/components/ui/container.vue
@@ -199,6 +199,7 @@ export default defineComponent({
> .fade {
display: block;
position: absolute;
+ z-index: 10;
bottom: 0;
left: 0;
width: 100%;
diff --git a/src/client/components/ui/pagination.vue b/src/client/components/ui/pagination.vue
index ac8ed01e12..1bd77447b7 100644
--- a/src/client/components/ui/pagination.vue
+++ b/src/client/components/ui/pagination.vue
@@ -10,8 +10,8 @@
<div v-else class="cxiknjgy">
<slot :items="items"></slot>
- <div class="more" v-show="more" key="_more_">
- <MkButton class="button" v-appear="$store.state.enableInfiniteScroll ? fetchMore : null" @click="fetchMore" :disabled="moreFetching" :style="{ cursor: moreFetching ? 'wait' : 'pointer' }" primary>
+ <div class="more _gap" v-show="more" key="_more_">
+ <MkButton class="button" v-appear="($store.state.enableInfiniteScroll && !disableAutoLoad) ? fetchMore : null" @click="fetchMore" :disabled="moreFetching" :style="{ cursor: moreFetching ? 'wait' : 'pointer' }" primary>
<template v-if="!moreFetching">{{ $ts.loadMore }}</template>
<template v-if="moreFetching"><MkLoading inline/></template>
</MkButton>
@@ -38,6 +38,12 @@ export default defineComponent({
pagination: {
required: true
},
+
+ disableAutoLoad: {
+ type: Boolean,
+ required: false,
+ default: false,
+ }
},
});
</script>