- Reduce tooltip delay to 750ms.
This commit is contained in:
Wolfgang Huß 2022-09-26 11:39:14 +02:00
parent 7b11122bea
commit 0d44d8ae04
9 changed files with 27 additions and 82 deletions

View File

@ -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

View File

@ -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>

View File

@ -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>

View File

@ -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",

View File

@ -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",

View File

@ -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>

View File

@ -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 },

View File

@ -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`,

View File

@ -3,7 +3,7 @@ import VTooltip from 'v-tooltip'
Vue.use(VTooltip, {
defaultDelay: {
show: 1500,
show: 750,
hide: 50,
},
defaultOffset: 2,