summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2022-10-27 15:47:14 +0200
committerCarl Schwan <carl@carlschwan.eu>2022-10-27 15:47:14 +0200
commit0d6fa6dde5fc324a6504438952af398a2a76d80a (patch)
tree2f0578647251d11c6def79753224733d8e1027f9 /src
parentc75af8deed5a013048801e2e0469131401b9a46f (diff)
Port follow button to ncbutton
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'src')
-rw-r--r--src/components/FollowButton.vue21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/components/FollowButton.vue b/src/components/FollowButton.vue
index 2c7d142c..634f02de 100644
--- a/src/components/FollowButton.vue
+++ b/src/components/FollowButton.vue
@@ -23,28 +23,37 @@
<template>
<!-- Show button only if user is authenticated and she is not the same as the account viewed -->
<div v-if="!serverData.public && accountInfo && accountInfo.viewerLink!='viewer'">
- <button v-if="isCurrentUserFollowing"
+ <NcButton v-if="isCurrentUserFollowing"
:class="{'icon-loading-small': followLoading}"
@click="unfollow()"
@mouseover="followingText=t('social', 'Unfollow')"
@mouseleave="followingText=t('social', 'Following')">
- <span><span class="icon-checkmark" />{{ followingText }}</span>
- </button>
- <button v-else
+ <template #icon>
+ <Check :size="32" />
+ </template>
+ {{ followingText }}
+ </NcButton>
+ <NcButton v-else
:class="{'icon-loading-small': followLoading}"
class="primary"
@click="follow">
- <span>{{ t('social', 'Follow') }}</span>
- </button>
+ {{ t('social', 'Follow') }}
+ </NcButton>
</div>
</template>
<script>
import accountMixins from '../mixins/accountMixins.js'
import currentUser from '../mixins/currentUserMixin.js'
+import Check from 'vue-material-design-icons/Check.vue'
+import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'
export default {
name: 'FollowButton',
+ components: {
+ Check,
+ NcButton,
+ },
mixins: [
accountMixins,
currentUser,