mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Commmunity page, new tabsystem with hashes
This commit is contained in:
parent
3a5de83f67
commit
734826a8b5
@ -0,0 +1,53 @@
|
|||||||
|
<template>
|
||||||
|
<div class="contribution-list-info">
|
||||||
|
<b-alert v-if="list === 'my'" show dismissible fade variant="secondary" class="text-dark">
|
||||||
|
<h4 class="alert-heading">{{ $t('community.myContributions') }}</h4>
|
||||||
|
<p>
|
||||||
|
{{ $t('contribution.alert.myContributionNoteList') }}
|
||||||
|
</p>
|
||||||
|
<ul class="h2">
|
||||||
|
<li>
|
||||||
|
<b-icon icon="bell-fill" variant="primary"></b-icon>
|
||||||
|
{{ $t('contribution.alert.pending') }}
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<b-icon icon="question-square" variant="warning"></b-icon>
|
||||||
|
{{ $t('contribution.alert.in_progress') }}
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<b-icon icon="check" variant="success"></b-icon>
|
||||||
|
{{ $t('contribution.alert.confirm') }}
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<b-icon icon="x-circle" variant="danger"></b-icon>
|
||||||
|
{{ $t('contribution.alert.rejected') }}
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<hr />
|
||||||
|
</b-alert>
|
||||||
|
<b-alert v-if="list === 'all'" show dismissible fade variant="secondary" class="text-dark">
|
||||||
|
<h4 class="alert-heading">{{ $t('navigation.community') }}</h4>
|
||||||
|
<p>
|
||||||
|
{{ $t('contribution.alert.communityNoteList') }}
|
||||||
|
</p>
|
||||||
|
<ul class="h2">
|
||||||
|
<li>
|
||||||
|
<b-icon icon="bell-fill" variant="primary"></b-icon>
|
||||||
|
{{ $t('contribution.alert.pending') }}
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<b-icon icon="check" variant="success"></b-icon>
|
||||||
|
{{ $t('contribution.alert.confirm') }}
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</b-alert>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'ContributionListInfo',
|
||||||
|
props: {
|
||||||
|
list: { type: String, required: true },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@ -16,9 +16,9 @@
|
|||||||
<b-icon icon="card-heading" aria-hidden="true"></b-icon>
|
<b-icon icon="card-heading" aria-hidden="true"></b-icon>
|
||||||
<span class="d-none d-lg-inline ml-2">{{ $t('navigation.topStories') }}</span>
|
<span class="d-none d-lg-inline ml-2">{{ $t('navigation.topStories') }}</span>
|
||||||
</b-nav-item>
|
</b-nav-item>
|
||||||
<b-nav-item to="/favourites" class="mb-3">
|
<b-nav-item to="/addresses" class="mb-3">
|
||||||
<b-icon icon="bookmark" aria-hidden="true"></b-icon>
|
<b-icon icon="bookmark" aria-hidden="true"></b-icon>
|
||||||
<span class="d-none d-lg-inline ml-2">{{ $t('navigation.favourites') }}</span>
|
<span class="d-none d-lg-inline ml-2">{{ $t('navigation.adresses') }}</span>
|
||||||
</b-nav-item>
|
</b-nav-item>
|
||||||
|
|
||||||
<b-nav-item to="/send" class="mb-3">
|
<b-nav-item to="/send" class="mb-3">
|
||||||
|
|||||||
@ -0,0 +1,20 @@
|
|||||||
|
<template>
|
||||||
|
<div class="my-community">
|
||||||
|
<div class="d-flex">
|
||||||
|
<div>
|
||||||
|
<b-button block variant="gradido" class="rounded-right" to="#edit">schreiben</b-button>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<b-button block variant="gradido" class="rounded-0" to="#my">Meine Beiträge</b-button>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<b-button block variant="gradido" class="rounded-left" to="#all">Community</b-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'MyCommunity',
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
<template>
|
||||||
|
<div class="last-contributions">
|
||||||
|
<b-row class="mb-5">
|
||||||
|
<b-col class="h3">Letzte Beiträge</b-col>
|
||||||
|
<b-col cols="1" class="text-right">
|
||||||
|
<b-icon icon="three-dots-vertical"></b-icon>
|
||||||
|
</b-col>
|
||||||
|
</b-row>
|
||||||
|
<b-card class="mb-4">letzter Beitrag</b-card>
|
||||||
|
<b-card class="mb-4">vorletzter Beitrag</b-card>
|
||||||
|
<b-card class="mb-4">vor vorletzter Beitrag</b-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'LastContributions',
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@ -16,7 +16,7 @@
|
|||||||
</b-row>
|
</b-row>
|
||||||
</b-container>
|
</b-container>
|
||||||
<b-container v-if="path === '/storys'"><h2>Deine Community im Überblick</h2></b-container>
|
<b-container v-if="path === '/storys'"><h2>Deine Community im Überblick</h2></b-container>
|
||||||
<b-container v-if="path === '/favourites'">Deine Favoriten im Überblick</b-container>
|
<b-container v-if="path === '/addresses'">Deine Favoriten im Überblick</b-container>
|
||||||
<b-container v-if="path === '/send'">
|
<b-container v-if="path === '/send'">
|
||||||
<b-row>
|
<b-row>
|
||||||
<b-col cols="6">
|
<b-col cols="6">
|
||||||
@ -61,7 +61,7 @@
|
|||||||
</b-col>
|
</b-col>
|
||||||
</b-row>
|
</b-row>
|
||||||
</b-container>
|
</b-container>
|
||||||
<b-container v-if="path === '/community'">community content header</b-container>
|
<b-container v-if="path === '/community'"><my-community /></b-container>
|
||||||
<b-container v-if="path === '/settings'">settings content header</b-container>
|
<b-container v-if="path === '/settings'">settings content header</b-container>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -71,12 +71,14 @@
|
|||||||
import GddAmount from '@/components/Template/ContentHeader/GddAmount.vue'
|
import GddAmount from '@/components/Template/ContentHeader/GddAmount.vue'
|
||||||
import GdtAmount from '@/components/Template/ContentHeader/GdtAmount.vue'
|
import GdtAmount from '@/components/Template/ContentHeader/GdtAmount.vue'
|
||||||
import CommunityMember from '@/components/Template/ContentHeader/CommunityMember.vue'
|
import CommunityMember from '@/components/Template/ContentHeader/CommunityMember.vue'
|
||||||
|
import MyCommunity from '@/components/Template/ContentHeader/MyCommunity.vue'
|
||||||
export default {
|
export default {
|
||||||
name: 'ContentHeader',
|
name: 'ContentHeader',
|
||||||
components: {
|
components: {
|
||||||
GddAmount,
|
GddAmount,
|
||||||
GdtAmount,
|
GdtAmount,
|
||||||
CommunityMember,
|
CommunityMember,
|
||||||
|
MyCommunity,
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
balance: { type: Number, required: true },
|
balance: { type: Number, required: true },
|
||||||
|
|||||||
@ -36,7 +36,7 @@
|
|||||||
</b-col>
|
</b-col>
|
||||||
</b-row>
|
</b-row>
|
||||||
</b-container>
|
</b-container>
|
||||||
<b-container v-if="path === '/favourites'">favourites ride side</b-container>
|
<b-container v-if="path === '/addresses'">favourites ride side</b-container>
|
||||||
<b-container v-if="path === '/send'">
|
<b-container v-if="path === '/send'">
|
||||||
<b-row>
|
<b-row>
|
||||||
<b-col>
|
<b-col>
|
||||||
@ -85,7 +85,9 @@
|
|||||||
</b-col>
|
</b-col>
|
||||||
</b-row>
|
</b-row>
|
||||||
</b-container>
|
</b-container>
|
||||||
<b-container v-if="path === '/community'">community ride side</b-container>
|
<b-container v-if="path === '/community'">
|
||||||
|
<last-contributions />
|
||||||
|
</b-container>
|
||||||
<b-container v-if="path === '/settings'">settings ride side</b-container>
|
<b-container v-if="path === '/settings'">settings ride side</b-container>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -93,6 +95,7 @@
|
|||||||
import LastTransactions from '@/components/Template/RightSide/LastTransactions.vue'
|
import LastTransactions from '@/components/Template/RightSide/LastTransactions.vue'
|
||||||
import Favourites from '@/components/Template/RightSide/Favourites.vue'
|
import Favourites from '@/components/Template/RightSide/Favourites.vue'
|
||||||
import TopStorysByMonth from '@/components/Template/RightSide/TopStorysByMonth.vue'
|
import TopStorysByMonth from '@/components/Template/RightSide/TopStorysByMonth.vue'
|
||||||
|
import LastContributions from '@/components/Template/RightSide/LastContributions.vue'
|
||||||
import YourOverview from '@/components/Template/RightSide/YourOverview.vue'
|
import YourOverview from '@/components/Template/RightSide/YourOverview.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -101,6 +104,7 @@ export default {
|
|||||||
LastTransactions,
|
LastTransactions,
|
||||||
Favourites,
|
Favourites,
|
||||||
TopStorysByMonth,
|
TopStorysByMonth,
|
||||||
|
LastContributions,
|
||||||
YourOverview,
|
YourOverview,
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
|||||||
@ -229,6 +229,7 @@
|
|||||||
},
|
},
|
||||||
"navigation": {
|
"navigation": {
|
||||||
"admin_area": "Adminbereich",
|
"admin_area": "Adminbereich",
|
||||||
|
"adresses": "Addressen",
|
||||||
"community": "Gemeinschaft",
|
"community": "Gemeinschaft",
|
||||||
"favourites": "Favoriten",
|
"favourites": "Favoriten",
|
||||||
"info": "Information",
|
"info": "Information",
|
||||||
|
|||||||
@ -229,6 +229,7 @@
|
|||||||
},
|
},
|
||||||
"navigation": {
|
"navigation": {
|
||||||
"admin_area": "Admin Area",
|
"admin_area": "Admin Area",
|
||||||
|
"adresses": "Addresses",
|
||||||
"community": "Community",
|
"community": "Community",
|
||||||
"favourites": "Favourites",
|
"favourites": "Favourites",
|
||||||
"info": "Information",
|
"info": "Information",
|
||||||
|
|||||||
@ -1,19 +1,19 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<b-card v-if="skeleton">
|
<b-card v-if="skeleton">
|
||||||
{{ $t('favourites') }}
|
{{ $t('addresses') }}
|
||||||
<b-skeleton animation="wave" width="85%"></b-skeleton>
|
<b-skeleton animation="wave" width="85%"></b-skeleton>
|
||||||
<b-skeleton animation="wave" width="55%"></b-skeleton>
|
<b-skeleton animation="wave" width="55%"></b-skeleton>
|
||||||
<b-skeleton animation="wave" width="70%"></b-skeleton>
|
<b-skeleton animation="wave" width="70%"></b-skeleton>
|
||||||
</b-card>
|
</b-card>
|
||||||
<b-card v-else>
|
<b-card v-else>
|
||||||
{{ $t('favourites') }}
|
{{ $t('addresses') }}
|
||||||
</b-card>
|
</b-card>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'Favourites',
|
name: 'Addresses',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
skeleton: true,
|
skeleton: true,
|
||||||
@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="community-page">
|
<div class="community-page">
|
||||||
<div>
|
<div>
|
||||||
<b-tabs v-model="tabIndex" content-class="mt-3" align="center">
|
<b-tabs no-nav-style v-model="tabIndex" content-class="mt-3" align="center">
|
||||||
<b-tab :title="$t('community.submitContribution')">
|
<b-tab>
|
||||||
<contribution-form
|
<contribution-form
|
||||||
@set-contribution="setContribution"
|
@set-contribution="setContribution"
|
||||||
@update-contribution="updateContribution"
|
@update-contribution="updateContribution"
|
||||||
@ -10,34 +10,8 @@
|
|||||||
:updateAmount="updateAmount"
|
:updateAmount="updateAmount"
|
||||||
/>
|
/>
|
||||||
</b-tab>
|
</b-tab>
|
||||||
<b-tab :title="$t('community.myContributions')">
|
<b-tab>
|
||||||
<div>
|
<contribution-list-info list="my" />
|
||||||
<b-alert show dismissible fade variant="secondary" class="text-dark">
|
|
||||||
<h4 class="alert-heading">{{ $t('community.myContributions') }}</h4>
|
|
||||||
<p>
|
|
||||||
{{ $t('contribution.alert.myContributionNoteList') }}
|
|
||||||
</p>
|
|
||||||
<ul class="h2">
|
|
||||||
<li>
|
|
||||||
<b-icon icon="bell-fill" variant="primary"></b-icon>
|
|
||||||
{{ $t('contribution.alert.pending') }}
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<b-icon icon="question-square" variant="warning"></b-icon>
|
|
||||||
{{ $t('contribution.alert.in_progress') }}
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<b-icon icon="check" variant="success"></b-icon>
|
|
||||||
{{ $t('contribution.alert.confirm') }}
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<b-icon icon="x-circle" variant="danger"></b-icon>
|
|
||||||
{{ $t('contribution.alert.rejected') }}
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<hr />
|
|
||||||
</b-alert>
|
|
||||||
</div>
|
|
||||||
<contribution-list
|
<contribution-list
|
||||||
:items="items"
|
:items="items"
|
||||||
@update-list-contributions="updateListContributions"
|
@update-list-contributions="updateListContributions"
|
||||||
@ -49,23 +23,8 @@
|
|||||||
:pageSize="pageSize"
|
:pageSize="pageSize"
|
||||||
/>
|
/>
|
||||||
</b-tab>
|
</b-tab>
|
||||||
<b-tab :title="$t('navigation.community')">
|
<b-tab>
|
||||||
<b-alert show dismissible fade variant="secondary" class="text-dark">
|
<contribution-list-info list="all" />
|
||||||
<h4 class="alert-heading">{{ $t('navigation.community') }}</h4>
|
|
||||||
<p>
|
|
||||||
{{ $t('contribution.alert.communityNoteList') }}
|
|
||||||
</p>
|
|
||||||
<ul class="h2">
|
|
||||||
<li>
|
|
||||||
<b-icon icon="bell-fill" variant="primary"></b-icon>
|
|
||||||
{{ $t('contribution.alert.pending') }}
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<b-icon icon="check" variant="success"></b-icon>
|
|
||||||
{{ $t('contribution.alert.confirm') }}
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</b-alert>
|
|
||||||
<contribution-list
|
<contribution-list
|
||||||
:items="itemsAll"
|
:items="itemsAll"
|
||||||
@update-list-contributions="updateListAllContributions"
|
@update-list-contributions="updateListAllContributions"
|
||||||
@ -83,17 +42,20 @@
|
|||||||
<script>
|
<script>
|
||||||
import ContributionForm from '@/components/Contributions/ContributionForm.vue'
|
import ContributionForm from '@/components/Contributions/ContributionForm.vue'
|
||||||
import ContributionList from '@/components/Contributions/ContributionList.vue'
|
import ContributionList from '@/components/Contributions/ContributionList.vue'
|
||||||
|
import ContributionListInfo from '@/components/Contributions/ContributionListInfo.vue'
|
||||||
import { createContribution, updateContribution, deleteContribution } from '@/graphql/mutations'
|
import { createContribution, updateContribution, deleteContribution } from '@/graphql/mutations'
|
||||||
import { listContributions, listAllContributions, verifyLogin } from '@/graphql/queries'
|
import { listContributions, listAllContributions, verifyLogin } from '@/graphql/queries'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Community',
|
name: 'Community',
|
||||||
components: {
|
components: {
|
||||||
|
ContributionListInfo,
|
||||||
ContributionForm,
|
ContributionForm,
|
||||||
ContributionList,
|
ContributionList,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
tabLinkHashes: ['#edit', '#my', '#all'],
|
||||||
tabIndex: 0,
|
tabIndex: 0,
|
||||||
items: [],
|
items: [],
|
||||||
itemsAll: [],
|
itemsAll: [],
|
||||||
@ -111,6 +73,21 @@ export default {
|
|||||||
updateAmount: '',
|
updateAmount: '',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
hashLink() {
|
||||||
|
return this.$root.hash
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.tabIndex = this.tabLinkHashes.findIndex((hashLink) => hashLink === this.$route.hash)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
$route(to, from) {
|
||||||
|
this.tabIndex = this.tabLinkHashes.findIndex((hashLink) => hashLink === to.hash)
|
||||||
|
},
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
setContribution(data) {
|
setContribution(data) {
|
||||||
this.$apollo
|
this.$apollo
|
||||||
@ -268,6 +245,7 @@ export default {
|
|||||||
this.items.find((item) => item.id === id).state = 'PENDING'
|
this.items.find((item) => item.id === id).state = 'PENDING'
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
created() {
|
created() {
|
||||||
// verifyLogin is important at this point so that creation is updated on reload if they are deleted in a session in the admin area.
|
// verifyLogin is important at this point so that creation is updated on reload if they are deleted in a session in the admin area.
|
||||||
this.verifyLogin()
|
this.verifyLogin()
|
||||||
|
|||||||
@ -69,8 +69,8 @@ const routes = [
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/favourites',
|
path: '/addresses',
|
||||||
component: () => import('@/pages/Favourites.vue'),
|
component: () => import('@/pages/Addresses.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
requiresAuth: true,
|
requiresAuth: true,
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user