mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-12 23:35:58 +00:00
Cleanup
- Reduce tooltip delay to 750ms.
This commit is contained in:
parent
7b11122bea
commit
0d44d8ae04
@ -42,7 +42,7 @@ export default {
|
||||
props: {
|
||||
placement: { type: String, default: 'bottom-end' },
|
||||
resource: { type: Object, required: true },
|
||||
isOwner: { type: String, default: null },
|
||||
group: { type: Object, required: true },
|
||||
resourceType: {
|
||||
type: String,
|
||||
required: true,
|
||||
@ -56,40 +56,19 @@ export default {
|
||||
const routes = []
|
||||
|
||||
if (this.resourceType === 'group') {
|
||||
if (this.isOwner === 'owner') {
|
||||
routes.push({
|
||||
label: this.$t('group.contentMenu.visitGroupPage'),
|
||||
icon: 'home',
|
||||
name: 'group-id-slug',
|
||||
params: { id: this.group.id, slug: this.group.slug },
|
||||
})
|
||||
if (this.group.myRole === 'owner') {
|
||||
routes.push({
|
||||
label: this.$t('admin.settings.name'),
|
||||
path: `/group/edit/${this.resource.id}`,
|
||||
icon: 'edit',
|
||||
})
|
||||
}
|
||||
if (this.isOwner === 'usual') {
|
||||
routes.push({
|
||||
label: this.$t('group.unfollowing'),
|
||||
callback: () => {
|
||||
// this.$emit('join-group', this.resource)
|
||||
},
|
||||
icon: 'minus',
|
||||
})
|
||||
}
|
||||
if (this.isOwner === 'pending') {
|
||||
routes.push({
|
||||
label: this.$t('group.unfollowing'),
|
||||
callback: () => {
|
||||
// this.removePending(this.resource)
|
||||
},
|
||||
icon: 'minus',
|
||||
})
|
||||
}
|
||||
if (this.isOwner === null) {
|
||||
routes.push({
|
||||
label: this.$t('group.follow'),
|
||||
callback: () => {
|
||||
this.$emit('joinGroup', this.resource)
|
||||
},
|
||||
icon: 'plus',
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
return routes
|
||||
|
||||
@ -46,11 +46,18 @@
|
||||
{{ $t(`group.types.${groupType}`) }}
|
||||
</option>
|
||||
</select>
|
||||
<!-- goal -->
|
||||
<ds-input
|
||||
:label="$t('group.goal')"
|
||||
v-model="formData.about"
|
||||
:placeholder="$t('group.goal') + ' …'"
|
||||
rows="3"
|
||||
></ds-input>
|
||||
<!-- description -->
|
||||
<ds-input v-model="formData.about" :label="$t('group.goal')" rows="3"></ds-input>
|
||||
<ds-input
|
||||
:label="$t('group.description')"
|
||||
v-model="formData.description"
|
||||
:placeholder="$t('group.description') + ' …'"
|
||||
type="textarea"
|
||||
rows="3"
|
||||
></ds-input>
|
||||
@ -120,10 +127,6 @@
|
||||
</ds-button>
|
||||
</ds-space>
|
||||
</ds-form>
|
||||
<!-- Wolle: <ds-space centered v-show="!update">
|
||||
<nuxt-link to="/my-groups">{{ $t('group.back') }}</nuxt-link>
|
||||
</ds-space> -->
|
||||
<!-- Wolle: </ds-container> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@ -58,13 +58,7 @@
|
||||
<div v-else class="categories-placeholder"></div>
|
||||
<!-- group context menu -->
|
||||
<client-only>
|
||||
<group-content-menu
|
||||
v-if="group.myRole === 'owner'"
|
||||
resource-type="group"
|
||||
:resource="group"
|
||||
:isOwner="group.myRole"
|
||||
@joinGroup="joinGroup"
|
||||
/>
|
||||
<group-content-menu resource-type="group" :resource="group" :group="group" />
|
||||
</client-only>
|
||||
</footer>
|
||||
<footer class="footer">
|
||||
@ -85,7 +79,6 @@
|
||||
<script>
|
||||
import Category from '~/components/Category'
|
||||
import GroupContentMenu from '~/components/Group/GroupContentMenu'
|
||||
import { joinGroupMutation } from '~/graphql/groups.js'
|
||||
|
||||
export default {
|
||||
name: 'GroupTeaser',
|
||||
@ -113,24 +106,6 @@ export default {
|
||||
return this.$filters.removeLinks(this.group.descriptionExcerpt)
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
editGroup(group) {
|
||||
this.$router.push({ path: `/group/edit/${group.id}` })
|
||||
},
|
||||
async joinGroup(value) {
|
||||
const { id } = value
|
||||
const variables = { groupId: id, userId: this.$store.getters['auth/user'].id }
|
||||
try {
|
||||
await this.$apollo.mutate({
|
||||
mutation: joinGroupMutation(),
|
||||
variables,
|
||||
})
|
||||
this.$toast.success(this.$t('group.groupCreated'))
|
||||
} catch (error) {
|
||||
this.$toast.error(error.message)
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@ -404,9 +404,11 @@
|
||||
"regional": "Regionale Gruppe"
|
||||
},
|
||||
"actionRadius": "Aktionsradius",
|
||||
"back": "zurück",
|
||||
"categories": "Thema ::: Themen",
|
||||
"changeMemberRole": "Die Rolle wurde auf „{role}“ geändert!",
|
||||
"contentMenu": {
|
||||
"visitGroupPage": "Gruppe anzeigen"
|
||||
},
|
||||
"createNewGroup": {
|
||||
"title": "Erstelle eine neue Gruppe",
|
||||
"tooltip": "Erstelle eine neue Gruppe"
|
||||
@ -420,7 +422,6 @@
|
||||
"foundation": "Gründung",
|
||||
"general": "Allgemein",
|
||||
"goal": "Ziel der Gruppe",
|
||||
"group-updated": "Die Gruppendaten wurden geändert!",
|
||||
"groupCreated": "Die Gruppe wurde angelegt!",
|
||||
"joinLeaveButton": {
|
||||
"iAmMember": "Bin Mitglied",
|
||||
@ -455,17 +456,14 @@
|
||||
"usual": "Einfaches Mitglied"
|
||||
},
|
||||
"save": "Neue Gruppe anlegen",
|
||||
"showAllMyGroups": "Alle meine Gruppen anzeigen",
|
||||
"showMyCreatedGroups": "Meine angelegten Gruppen anzeigen",
|
||||
"type": "Gruppentyp",
|
||||
"types": {
|
||||
"closed": "Geschlossene Gruppe",
|
||||
"hidden": "Versteckte Gruppe",
|
||||
"public": "Öffentliche Gruppe"
|
||||
},
|
||||
"unfollowing": "Nicht mehr folgen",
|
||||
"update": "Änderung speichern",
|
||||
"visibility": "Sichtbarkeit"
|
||||
"updatedGroup": "Die Gruppendaten wurden geändert!"
|
||||
},
|
||||
"hashtags-filter": {
|
||||
"clearSearch": "Suche löschen",
|
||||
|
||||
@ -404,9 +404,11 @@
|
||||
"regional": "Regional Group"
|
||||
},
|
||||
"actionRadius": "Action radius",
|
||||
"back": "back",
|
||||
"categories": "Topic ::: Topics",
|
||||
"changeMemberRole": "The role has been changed to “{role}”!",
|
||||
"contentMenu": {
|
||||
"visitGroupPage": "Show group"
|
||||
},
|
||||
"createNewGroup": {
|
||||
"title": "Create A New Group",
|
||||
"tooltip": "Create a new group"
|
||||
@ -420,7 +422,6 @@
|
||||
"foundation": "Foundation",
|
||||
"general": "General",
|
||||
"goal": "Goal of group",
|
||||
"group-updated": "The group data has been changed.",
|
||||
"groupCreated": "The group was created!",
|
||||
"joinLeaveButton": {
|
||||
"iAmMember": "I'm a member",
|
||||
@ -455,17 +456,14 @@
|
||||
"usual": "Simple Member"
|
||||
},
|
||||
"save": "Create new group",
|
||||
"showAllMyGroups": "show all groups",
|
||||
"showMyCreatedGroups": "show only my groups",
|
||||
"type": "Group type",
|
||||
"types": {
|
||||
"closed": "Closed Group",
|
||||
"hidden": "Hidden Group",
|
||||
"public": "Public Group"
|
||||
},
|
||||
"unfollowing": "unfollowing",
|
||||
"update": "Save change",
|
||||
"visibility": "Visibility"
|
||||
"updatedGroup": "The group data has been changed."
|
||||
},
|
||||
"hashtags-filter": {
|
||||
"clearSearch": "Clear search",
|
||||
|
||||
@ -17,10 +17,6 @@
|
||||
</transition>
|
||||
</ds-flex-item>
|
||||
</ds-flex>
|
||||
<!-- Wolle: </ds-space> -->
|
||||
<!-- Wolle: <ds-space centered>
|
||||
<nuxt-link to="/my-groups">{{ $t('group.back') }}</nuxt-link>
|
||||
</ds-space> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@ export default {
|
||||
responseSlug = groupSlug
|
||||
},
|
||||
})
|
||||
this.$toast.success(this.$t('group.group-updated'))
|
||||
this.$toast.success(this.$t('group.updatedGroup'))
|
||||
this.$router.history.push({
|
||||
name: 'group-id-slug',
|
||||
params: { id: responseId, slug: responseSlug },
|
||||
|
||||
@ -42,10 +42,6 @@ export default {
|
||||
name: this.$t('settings.social-media.name'),
|
||||
path: `/settings/my-social-media`,
|
||||
},
|
||||
// Wolle: {
|
||||
// name: this.$t('settings.myGroups'),
|
||||
// path: `/my-groups`,
|
||||
// },
|
||||
{
|
||||
name: this.$t('settings.muted-users.name'),
|
||||
path: `/settings/muted-users`,
|
||||
|
||||
@ -3,7 +3,7 @@ import VTooltip from 'v-tooltip'
|
||||
|
||||
Vue.use(VTooltip, {
|
||||
defaultDelay: {
|
||||
show: 1500,
|
||||
show: 750,
|
||||
hide: 50,
|
||||
},
|
||||
defaultOffset: 2,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user