mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Rename profile-id to profile-id-slug route
This commit is contained in:
parent
16e60e540f
commit
51cbc65f4b
@ -71,7 +71,7 @@ When('I click on the author', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
When('I report the author', () => {
|
When('I report the author', () => {
|
||||||
cy.get('.page-name-profile-slug').then(() => {
|
cy.get('.page-name-profile-id-slug').then(() => {
|
||||||
invokeReportOnElement('.ds-card').then(() => {
|
invokeReportOnElement('.ds-card').then(() => {
|
||||||
cy.get('button')
|
cy.get('button')
|
||||||
.contains('Send')
|
.contains('Send')
|
||||||
|
|||||||
@ -153,9 +153,9 @@ export default {
|
|||||||
return count
|
return count
|
||||||
},
|
},
|
||||||
userLink() {
|
userLink() {
|
||||||
const { slug } = this.user
|
const { id, slug } = this.user
|
||||||
if (!slug) return ''
|
if (!(id && slug)) return ''
|
||||||
return { name: 'profile-slug', params: { slug } }
|
return { name: 'profile-id-slug', params: { slug, id } }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -39,7 +39,7 @@
|
|||||||
>
|
>
|
||||||
<a
|
<a
|
||||||
class="avatar-menu-trigger"
|
class="avatar-menu-trigger"
|
||||||
:href="$router.resolve({name: 'profile-slug', params: {slug: user.slug}}).href"
|
:href="$router.resolve({name: 'profile-id-slug', params: {id: user.id, slug: user.slug}}).href"
|
||||||
@click.prevent="toggleMenu"
|
@click.prevent="toggleMenu"
|
||||||
>
|
>
|
||||||
<ds-avatar
|
<ds-avatar
|
||||||
|
|||||||
@ -36,7 +36,7 @@
|
|||||||
</ds-text>
|
</ds-text>
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<nuxt-link :to="{ name: 'profile-slug', params: { slug: scope.row.user.slug } }">
|
<nuxt-link :to="{ name: 'profile-id-slug', params: { id: scope.row.user.id, slug: scope.row.user.slug } }">
|
||||||
<b>{{ scope.row.user.name | truncate(50) }}</b>
|
<b>{{ scope.row.user.name | truncate(50) }}</b>
|
||||||
</nuxt-link>
|
</nuxt-link>
|
||||||
</div>
|
</div>
|
||||||
@ -69,7 +69,7 @@
|
|||||||
slot="submitter"
|
slot="submitter"
|
||||||
slot-scope="scope"
|
slot-scope="scope"
|
||||||
>
|
>
|
||||||
<nuxt-link :to="{ name: 'profile-slug', params: { slug: scope.row.submitter.slug } }">
|
<nuxt-link :to="{ name: 'profile-id-slug', params: { id: scope.row.submitter.id, slug: scope.row.submitter.slug } }">
|
||||||
{{ scope.row.submitter.name }}
|
{{ scope.row.submitter.name }}
|
||||||
</nuxt-link>
|
</nuxt-link>
|
||||||
</template>
|
</template>
|
||||||
@ -79,19 +79,19 @@
|
|||||||
>
|
>
|
||||||
<nuxt-link
|
<nuxt-link
|
||||||
v-if="scope.row.type === 'Post' && scope.row.post.disabledBy"
|
v-if="scope.row.type === 'Post' && scope.row.post.disabledBy"
|
||||||
:to="{ name: 'profile-slug', params: { slug: scope.row.post.disabledBy.slug } }"
|
:to="{ name: 'profile-id-slug', params: { id: scope.row.post.disabledBy.id, slug: scope.row.post.disabledBy.slug } }"
|
||||||
>
|
>
|
||||||
<b>{{ scope.row.post.disabledBy.name | truncate(50) }}</b>
|
<b>{{ scope.row.post.disabledBy.name | truncate(50) }}</b>
|
||||||
</nuxt-link>
|
</nuxt-link>
|
||||||
<nuxt-link
|
<nuxt-link
|
||||||
v-else-if="scope.row.type === 'Comment' && scope.row.comment.disabledBy"
|
v-else-if="scope.row.type === 'Comment' && scope.row.comment.disabledBy"
|
||||||
:to="{ name: 'profile-slug', params: { slug: scope.row.comment.disabledBy.slug } }"
|
:to="{ name: 'profile-id-slug', params: { id: scope.row.comment.disabledBy.id, slug: scope.row.comment.disabledBy.slug } }"
|
||||||
>
|
>
|
||||||
<b>{{ scope.row.comment.disabledBy.name | truncate(50) }}</b>
|
<b>{{ scope.row.comment.disabledBy.name | truncate(50) }}</b>
|
||||||
</nuxt-link>
|
</nuxt-link>
|
||||||
<nuxt-link
|
<nuxt-link
|
||||||
v-else-if="scope.row.type === 'User' && scope.row.user.disabledBy"
|
v-else-if="scope.row.type === 'User' && scope.row.user.disabledBy"
|
||||||
:to="{ name: 'profile-slug', params: { slug: scope.row.user.disabledBy.slug } }"
|
:to="{ name: 'profile-id-slug', params: { id: scope.row.user.disabledBy.id, slug: scope.row.user.disabledBy.slug } }"
|
||||||
>
|
>
|
||||||
<b>{{ scope.row.user.disabledBy.name | truncate(50) }}</b>
|
<b>{{ scope.row.user.disabledBy.name | truncate(50) }}</b>
|
||||||
</nuxt-link>
|
</nuxt-link>
|
||||||
|
|||||||
@ -423,7 +423,7 @@ export default {
|
|||||||
border: #fff 5px solid;
|
border: #fff 5px solid;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page-name-profile-slug {
|
.page-name-profile-id-slug {
|
||||||
.ds-flex-item:first-child .content-menu {
|
.ds-flex-item:first-child .content-menu {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: $space-x-small;
|
top: $space-x-small;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user