Modrinth/pages/settings/follows.vue
Geometrically d2b1404907
New gallery creation/editing/deleting UI (#826)
* New gallery creation/editing/deleting UI

* Finish new gallery UI

* port dp changes here

* Add ordering fix optional fields

* Fix dropping

* Fix fmt

* Fix version creation broken, edit issues, project type setting

* Update gallery in search
2022-12-31 23:47:47 -07:00

60 lines
1.6 KiB
Vue

<template>
<div v-if="$user.follows.length > 0" class="project-list display-mode--list">
<ProjectCard
v-for="project in $user.follows"
:id="project.id"
:key="project.id"
:type="project.project_type"
:categories="project.categories"
:created-at="project.published"
:updated-at="project.updated"
:description="project.description"
:downloads="project.downloads ? project.downloads.toString() : '0'"
:icon-url="project.icon_url"
:name="project.title"
:client-side="project.client_side"
:server-side="project.server_side"
:color="project.color"
>
<button
class="iconified-button"
@click="$store.dispatch('user/unfollowProject', project)"
>
<HeartIcon />
Unfollow
</button>
</ProjectCard>
</div>
<div v-else class="error">
<FollowIllustration class="icon" />
<br />
<span class="text"
>You don't have any followed projects. <br />
Why don't you <nuxt-link class="link" to="/mods">search</nuxt-link> for
new ones?</span
>
</div>
</template>
<script>
import ProjectCard from '~/components/ui/ProjectCard'
import HeartIcon from '~/assets/images/utils/heart.svg?inline'
import FollowIllustration from '~/assets/images/illustrations/follow_illustration.svg?inline'
export default {
components: {
ProjectCard,
HeartIcon,
FollowIllustration,
},
async fetch() {
await this.$store.dispatch('user/fetchFollows')
},
head: {
title: 'Followed projects - Modrinth',
},
}
</script>
<style lang="scss" scoped></style>