mirror of
https://akkoma.dev/AkkomaGang/akkoma-fe
synced 2025-04-30 19:19:29 +08:00
Hacky way of implementing a Share endpoint
This commit is contained in:
parent
2086522d64
commit
405158d280
2 changed files with 19 additions and 0 deletions
|
@ -24,6 +24,7 @@ import ListEdit from 'components/list_edit/list_edit.vue'
|
||||||
import AnnouncementsPage from 'components/announcements_page/announcements_page.vue'
|
import AnnouncementsPage from 'components/announcements_page/announcements_page.vue'
|
||||||
import RegistrationRequestSent from 'components/registration_request_sent/registration_request_sent.vue'
|
import RegistrationRequestSent from 'components/registration_request_sent/registration_request_sent.vue'
|
||||||
import AwaitingEmailConfirmation from 'components/awaiting_email_confirmation/awaiting_email_confirmation.vue'
|
import AwaitingEmailConfirmation from 'components/awaiting_email_confirmation/awaiting_email_confirmation.vue'
|
||||||
|
import Share from '../components/share/share.js'
|
||||||
|
|
||||||
export default (store) => {
|
export default (store) => {
|
||||||
const validateAuthenticatedRoute = (to, from, next) => {
|
const validateAuthenticatedRoute = (to, from, next) => {
|
||||||
|
@ -71,6 +72,7 @@ export default (store) => {
|
||||||
{ name: 'friend-requests', path: '/friend-requests', component: FollowRequests, beforeEnter: validateAuthenticatedRoute },
|
{ name: 'friend-requests', path: '/friend-requests', component: FollowRequests, beforeEnter: validateAuthenticatedRoute },
|
||||||
{ name: 'notifications', path: '/:username/notifications', component: Notifications, props: () => ({ disableTeleport: true }), beforeEnter: validateAuthenticatedRoute },
|
{ name: 'notifications', path: '/:username/notifications', component: Notifications, props: () => ({ disableTeleport: true }), beforeEnter: validateAuthenticatedRoute },
|
||||||
{ name: 'login', path: '/login', component: AuthForm },
|
{ name: 'login', path: '/login', component: AuthForm },
|
||||||
|
{ name: 'share', path: '/share', component: Share, beforeEnter: validateAuthenticatedRoute },
|
||||||
{ name: 'oauth-callback', path: '/oauth-callback', component: OAuthCallback, props: (route) => ({ code: route.query.code }) },
|
{ name: 'oauth-callback', path: '/oauth-callback', component: OAuthCallback, props: (route) => ({ code: route.query.code }) },
|
||||||
{ name: 'search', path: '/search', component: Search, props: (route) => ({ query: route.query.query }) },
|
{ name: 'search', path: '/search', component: Search, props: (route) => ({ query: route.query.query }) },
|
||||||
{ name: 'who-to-follow', path: '/who-to-follow', component: WhoToFollow, beforeEnter: validateAuthenticatedRoute },
|
{ name: 'who-to-follow', path: '/who-to-follow', component: WhoToFollow, beforeEnter: validateAuthenticatedRoute },
|
||||||
|
|
17
src/components/share/share.js
Normal file
17
src/components/share/share.js
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
// This entire file is basically a hack to make the
|
||||||
|
// "preset" functionality of post_status_form work
|
||||||
|
|
||||||
|
import { h, resolveComponent } from "vue"
|
||||||
|
import PostStatusForm from "../post_status_form/post_status_form.vue"
|
||||||
|
|
||||||
|
const Share = {
|
||||||
|
name: 'Share',
|
||||||
|
render () {
|
||||||
|
return h(resolveComponent('PostStatusForm'))
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
PostStatusForm
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Share
|
Loading…
Reference in a new issue