summaryrefslogtreecommitdiff
path: root/src/client/components/ui
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2021-04-22 22:29:33 +0900
committerGitHub <noreply@github.com>2021-04-22 22:29:33 +0900
commit246693b8484b72048cb515b76aa5f094f5fdeb56 (patch)
tree703f7636c363b480b20690495353691e09c98a27 /src/client/components/ui
parentfix style (diff)
downloadsharkey-246693b8484b72048cb515b76aa5f094f5fdeb56.tar.gz
sharkey-246693b8484b72048cb515b76aa5f094f5fdeb56.tar.bz2
sharkey-246693b8484b72048cb515b76aa5f094f5fdeb56.zip
インスタンス管理画面作り直し (#7473)
* wip * wip * wip * wip
Diffstat (limited to 'src/client/components/ui')
-rw-r--r--src/client/components/ui/pagination.vue34
1 files changed, 25 insertions, 9 deletions
diff --git a/src/client/components/ui/pagination.vue b/src/client/components/ui/pagination.vue
index 13181d39e2..ac8ed01e12 100644
--- a/src/client/components/ui/pagination.vue
+++ b/src/client/components/ui/pagination.vue
@@ -1,16 +1,23 @@
<template>
-<div class="cxiknjgy">
- <slot :items="items"></slot>
- <div class="empty" v-if="empty" key="_empty_">
+<transition name="fade" mode="out-in">
+ <MkLoading v-if="fetching"/>
+
+ <MkError v-else-if="error" @retry="init()"/>
+
+ <div class="empty" v-else-if="empty" key="_empty_">
<slot name="empty"></slot>
</div>
- <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>
- <template v-if="!moreFetching">{{ $ts.loadMore }}</template>
- <template v-if="moreFetching"><MkLoading inline/></template>
- </MkButton>
+
+ <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>
+ <template v-if="!moreFetching">{{ $ts.loadMore }}</template>
+ <template v-if="moreFetching"><MkLoading inline/></template>
+ </MkButton>
+ </div>
</div>
-</div>
+</transition>
</template>
<script lang="ts">
@@ -36,6 +43,15 @@ export default defineComponent({
</script>
<style lang="scss" scoped>
+.fade-enter-active,
+.fade-leave-active {
+ transition: opacity 0.125s ease;
+}
+.fade-enter-from,
+.fade-leave-to {
+ opacity: 0;
+}
+
.cxiknjgy {
> .more > .button {
margin-left: auto;