Merge branch 'optimize' into shigusegubu-themes3
This commit is contained in:
commit
ae30e572d3
25 changed files with 1486 additions and 232 deletions
|
|
@ -141,7 +141,7 @@ export const buildSwPlugin = ({ swSrc, swDest }) => {
|
||||||
name: 'sw_pleroma',
|
name: 'sw_pleroma',
|
||||||
},
|
},
|
||||||
emptyOutDir: false,
|
emptyOutDir: false,
|
||||||
rollupOptions: {
|
rolldownOptions: {
|
||||||
output: {
|
output: {
|
||||||
entryFileNames: swDest,
|
entryFileNames: swDest,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
11
package.json
11
package.json
|
|
@ -65,8 +65,9 @@
|
||||||
"@biomejs/biome": "2.3.11",
|
"@biomejs/biome": "2.3.11",
|
||||||
"@pinia/testing": "1.0.3",
|
"@pinia/testing": "1.0.3",
|
||||||
"@ungap/event-target": "0.2.4",
|
"@ungap/event-target": "0.2.4",
|
||||||
"@vitejs/plugin-vue": "^5.2.1",
|
"@vitejs/devtools": "^0.3.1",
|
||||||
"@vitejs/plugin-vue-jsx": "^4.1.1",
|
"@vitejs/plugin-vue": "^6.0.7",
|
||||||
|
"@vitejs/plugin-vue-jsx": "^5.1.5",
|
||||||
"@vitest/browser": "^3.0.7",
|
"@vitest/browser": "^3.0.7",
|
||||||
"@vitest/ui": "^3.0.7",
|
"@vitest/ui": "^3.0.7",
|
||||||
"@vue/babel-helper-vue-jsx-merge-props": "1.4.0",
|
"@vue/babel-helper-vue-jsx-merge-props": "1.4.0",
|
||||||
|
|
@ -113,9 +114,9 @@
|
||||||
"stylelint-config-recommended-scss": "^14.0.0",
|
"stylelint-config-recommended-scss": "^14.0.0",
|
||||||
"stylelint-config-recommended-vue": "^1.6.0",
|
"stylelint-config-recommended-vue": "^1.6.0",
|
||||||
"stylelint-config-standard": "38.0.0",
|
"stylelint-config-standard": "38.0.0",
|
||||||
"vite": "^6.1.0",
|
"vite": "^8.0.0",
|
||||||
"vite-plugin-eslint2": "^5.0.3",
|
"vite-plugin-eslint2": "^5.1.0",
|
||||||
"vite-plugin-stylelint": "^6.0.0",
|
"vite-plugin-stylelint": "^6.1.0",
|
||||||
"vitest": "^3.0.7",
|
"vitest": "^3.0.7",
|
||||||
"vue-eslint-parser": "10.2.0"
|
"vue-eslint-parser": "10.2.0"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
15
src/App.js
15
src/App.js
|
|
@ -3,7 +3,6 @@ import { mapState } from 'pinia'
|
||||||
import { defineAsyncComponent } from 'vue'
|
import { defineAsyncComponent } from 'vue'
|
||||||
|
|
||||||
import DesktopNav from './components/desktop_nav/desktop_nav.vue'
|
import DesktopNav from './components/desktop_nav/desktop_nav.vue'
|
||||||
import EditStatusModal from './components/edit_status_modal/edit_status_modal.vue'
|
|
||||||
import FeaturesPanel from './components/features_panel/features_panel.vue'
|
import FeaturesPanel from './components/features_panel/features_panel.vue'
|
||||||
import GlobalNoticeList from './components/global_notice_list/global_notice_list.vue'
|
import GlobalNoticeList from './components/global_notice_list/global_notice_list.vue'
|
||||||
import InstanceSpecificPanel from './components/instance_specific_panel/instance_specific_panel.vue'
|
import InstanceSpecificPanel from './components/instance_specific_panel/instance_specific_panel.vue'
|
||||||
|
|
@ -12,9 +11,7 @@ import MobileNav from './components/mobile_nav/mobile_nav.vue'
|
||||||
import MobilePostStatusButton from './components/mobile_post_status_button/mobile_post_status_button.vue'
|
import MobilePostStatusButton from './components/mobile_post_status_button/mobile_post_status_button.vue'
|
||||||
import NavPanel from './components/nav_panel/nav_panel.vue'
|
import NavPanel from './components/nav_panel/nav_panel.vue'
|
||||||
import PostStatusModal from './components/post_status_modal/post_status_modal.vue'
|
import PostStatusModal from './components/post_status_modal/post_status_modal.vue'
|
||||||
import ShoutPanel from './components/shout_panel/shout_panel.vue'
|
|
||||||
import SideDrawer from './components/side_drawer/side_drawer.vue'
|
import SideDrawer from './components/side_drawer/side_drawer.vue'
|
||||||
import StatusHistoryModal from './components/status_history_modal/status_history_modal.vue'
|
|
||||||
import UserPanel from './components/user_panel/user_panel.vue'
|
import UserPanel from './components/user_panel/user_panel.vue'
|
||||||
import UserReportingModal from './components/user_reporting_modal/user_reporting_modal.vue'
|
import UserReportingModal from './components/user_reporting_modal/user_reporting_modal.vue'
|
||||||
import WhoToFollowPanel from './components/who_to_follow_panel/who_to_follow_panel.vue'
|
import WhoToFollowPanel from './components/who_to_follow_panel/who_to_follow_panel.vue'
|
||||||
|
|
@ -46,7 +43,9 @@ export default {
|
||||||
InstanceSpecificPanel,
|
InstanceSpecificPanel,
|
||||||
FeaturesPanel,
|
FeaturesPanel,
|
||||||
WhoToFollowPanel,
|
WhoToFollowPanel,
|
||||||
ShoutPanel,
|
ShoutPanel: defineAsyncComponent(
|
||||||
|
() => import('src/components/shout_panel/shout_panel.vue'),
|
||||||
|
),
|
||||||
MediaModal,
|
MediaModal,
|
||||||
SideDrawer,
|
SideDrawer,
|
||||||
MobilePostStatusButton,
|
MobilePostStatusButton,
|
||||||
|
|
@ -60,8 +59,12 @@ export default {
|
||||||
),
|
),
|
||||||
UserReportingModal,
|
UserReportingModal,
|
||||||
PostStatusModal,
|
PostStatusModal,
|
||||||
EditStatusModal,
|
EditStatusModal: defineAsyncComponent(
|
||||||
StatusHistoryModal,
|
() => import( './components/edit_status_modal/edit_status_modal.vue'),
|
||||||
|
),
|
||||||
|
StatusHistoryModal: defineAsyncComponent(
|
||||||
|
() => import( './components/status_history_modal/status_history_modal.vue'),
|
||||||
|
),
|
||||||
GlobalNoticeList,
|
GlobalNoticeList,
|
||||||
},
|
},
|
||||||
data: () => ({
|
data: () => ({
|
||||||
|
|
|
||||||
|
|
@ -1,36 +1,17 @@
|
||||||
import About from 'components/about/about.vue'
|
import { defineAsyncComponent } from 'vue'
|
||||||
import AnnouncementsPage from 'components/announcements_page/announcements_page.vue'
|
|
||||||
import AuthForm from 'components/auth_form/auth_form.js'
|
|
||||||
import BookmarkTimeline from 'components/bookmark_timeline/bookmark_timeline.vue'
|
|
||||||
import BubbleTimeline from 'components/bubble_timeline/bubble_timeline.vue'
|
|
||||||
import Chat from 'components/chat/chat.vue'
|
|
||||||
import ChatList from 'components/chat_list/chat_list.vue'
|
|
||||||
import ConversationPage from 'components/conversation-page/conversation-page.vue'
|
|
||||||
import DMs from 'components/dm_timeline/dm_timeline.vue'
|
|
||||||
import Drafts from 'components/drafts/drafts.vue'
|
|
||||||
import FollowRequests from 'components/follow_requests/follow_requests.vue'
|
|
||||||
import FriendsTimeline from 'components/friends_timeline/friends_timeline.vue'
|
|
||||||
import Interactions from 'components/interactions/interactions.vue'
|
|
||||||
import Lists from 'components/lists/lists.vue'
|
|
||||||
import ListsEdit from 'components/lists_edit/lists_edit.vue'
|
|
||||||
import ListsTimeline from 'components/lists_timeline/lists_timeline.vue'
|
|
||||||
import Notifications from 'components/notifications/notifications.vue'
|
|
||||||
import OAuthCallback from 'components/oauth_callback/oauth_callback.vue'
|
|
||||||
import PasswordReset from 'components/password_reset/password_reset.vue'
|
|
||||||
import PublicAndExternalTimeline from 'components/public_and_external_timeline/public_and_external_timeline.vue'
|
|
||||||
import PublicTimeline from 'components/public_timeline/public_timeline.vue'
|
|
||||||
import Registration from 'components/registration/registration.vue'
|
|
||||||
import RemoteUserResolver from 'components/remote_user_resolver/remote_user_resolver.vue'
|
|
||||||
import Search from 'components/search/search.vue'
|
|
||||||
import ShoutPanel from 'components/shout_panel/shout_panel.vue'
|
|
||||||
import TagTimeline from 'components/tag_timeline/tag_timeline.vue'
|
|
||||||
import UserProfile from 'components/user_profile/user_profile.vue'
|
|
||||||
import WhoToFollow from 'components/who_to_follow/who_to_follow.vue'
|
|
||||||
|
|
||||||
|
import About from 'src/components/about/about.vue'
|
||||||
|
import BookmarkTimeline from 'src/components/bookmark_timeline/bookmark_timeline.vue'
|
||||||
|
import BubbleTimeline from 'src/components/bubble_timeline/bubble_timeline.vue'
|
||||||
|
import ConversationPage from 'src/components/conversation-page/conversation-page.vue'
|
||||||
|
import DMs from 'src/components/dm_timeline/dm_timeline.vue'
|
||||||
|
import FriendsTimeline from 'src/components/friends_timeline/friends_timeline.vue'
|
||||||
import NavPanel from 'src/components/nav_panel/nav_panel.vue'
|
import NavPanel from 'src/components/nav_panel/nav_panel.vue'
|
||||||
import BookmarkFolderEdit from '../components/bookmark_folder_edit/bookmark_folder_edit.vue'
|
import PublicAndExternalTimeline from 'src/components/public_and_external_timeline/public_and_external_timeline.vue'
|
||||||
import BookmarkFolders from '../components/bookmark_folders/bookmark_folders.vue'
|
import PublicTimeline from 'src/components/public_timeline/public_timeline.vue'
|
||||||
import QuotesTimeline from '../components/quotes_timeline/quotes_timeline.vue'
|
import QuotesTimeline from 'src/components/quotes_timeline/quotes_timeline.vue'
|
||||||
|
import RemoteUserResolver from 'src/components/remote_user_resolver/remote_user_resolver.vue'
|
||||||
|
import TagTimeline from 'src/components/tag_timeline/tag_timeline.vue'
|
||||||
|
|
||||||
import { useInstanceStore } from 'src/stores/instance.js'
|
import { useInstanceStore } from 'src/stores/instance.js'
|
||||||
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
|
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
|
||||||
|
|
@ -100,12 +81,16 @@ export default (store) => {
|
||||||
{
|
{
|
||||||
name: 'external-user-profile',
|
name: 'external-user-profile',
|
||||||
path: '/users/$:id',
|
path: '/users/$:id',
|
||||||
component: UserProfile,
|
component: defineAsyncComponent(
|
||||||
|
() => import('src/components/user_profile/user_profile.vue'),
|
||||||
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'interactions',
|
name: 'interactions',
|
||||||
path: '/users/:username/interactions',
|
path: '/users/:username/interactions',
|
||||||
component: Interactions,
|
component: defineAsyncComponent(
|
||||||
|
() => import('src/components/interactions/interactions.vue'),
|
||||||
|
),
|
||||||
beforeEnter: validateAuthenticatedRoute,
|
beforeEnter: validateAuthenticatedRoute,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -114,69 +99,142 @@ export default (store) => {
|
||||||
component: DMs,
|
component: DMs,
|
||||||
beforeEnter: validateAuthenticatedRoute,
|
beforeEnter: validateAuthenticatedRoute,
|
||||||
},
|
},
|
||||||
{ name: 'registration', path: '/registration', component: Registration },
|
{
|
||||||
|
name: 'registration',
|
||||||
|
path: '/registration',
|
||||||
|
component: defineAsyncComponent(
|
||||||
|
() => import('src/components/registration/registration.vue'),
|
||||||
|
),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'password-reset',
|
name: 'password-reset',
|
||||||
path: '/password-reset',
|
path: '/password-reset',
|
||||||
component: PasswordReset,
|
component: defineAsyncComponent(
|
||||||
|
() => import('src/components/password_reset/password_reset.vue'),
|
||||||
|
),
|
||||||
props: true,
|
props: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'registration-token',
|
name: 'registration-token',
|
||||||
path: '/registration/:token',
|
path: '/registration/:token',
|
||||||
component: Registration,
|
component: defineAsyncComponent(
|
||||||
|
() => import('src/components/registration/registration.vue'),
|
||||||
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'friend-requests',
|
name: 'friend-requests',
|
||||||
path: '/friend-requests',
|
path: '/friend-requests',
|
||||||
component: FollowRequests,
|
component: defineAsyncComponent(
|
||||||
|
() => import('src/components/follow_requests/follow_requests.vue'),
|
||||||
|
),
|
||||||
beforeEnter: validateAuthenticatedRoute,
|
beforeEnter: validateAuthenticatedRoute,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'notifications',
|
name: 'notifications',
|
||||||
path: '/:username/notifications',
|
path: '/:username/notifications',
|
||||||
component: Notifications,
|
component: defineAsyncComponent(
|
||||||
|
() => import('src/components/notifications/notifications.vue'),
|
||||||
|
),
|
||||||
props: () => ({ disableTeleport: true }),
|
props: () => ({ disableTeleport: true }),
|
||||||
beforeEnter: validateAuthenticatedRoute,
|
beforeEnter: validateAuthenticatedRoute,
|
||||||
},
|
},
|
||||||
{ name: 'login', path: '/login', component: AuthForm },
|
{
|
||||||
|
name: 'login',
|
||||||
|
path: '/login',
|
||||||
|
component: defineAsyncComponent(
|
||||||
|
() => import('src/components/auth_form/auth_form.js'),
|
||||||
|
),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'shout-panel',
|
name: 'shout-panel',
|
||||||
path: '/shout-panel',
|
path: '/shout-panel',
|
||||||
component: ShoutPanel,
|
component: defineAsyncComponent(
|
||||||
|
() => import('src/components/shout_panel/shout_panel.vue'),
|
||||||
|
),
|
||||||
props: () => ({ floating: false }),
|
props: () => ({ floating: false }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'oauth-callback',
|
name: 'oauth-callback',
|
||||||
path: '/oauth-callback',
|
path: '/oauth-callback',
|
||||||
component: OAuthCallback,
|
component: defineAsyncComponent(
|
||||||
|
() => import('src/components/oauth_callback/oauth_callback.vue'),
|
||||||
|
),
|
||||||
props: (route) => ({ code: route.query.code }),
|
props: (route) => ({ code: route.query.code }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'search',
|
name: 'search',
|
||||||
path: '/search',
|
path: '/search',
|
||||||
component: Search,
|
component: defineAsyncComponent(
|
||||||
|
() => import('src/components/search/search.vue'),
|
||||||
|
),
|
||||||
props: (route) => ({ query: route.query.query }),
|
props: (route) => ({ query: route.query.query }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'who-to-follow',
|
name: 'who-to-follow',
|
||||||
path: '/who-to-follow',
|
path: '/who-to-follow',
|
||||||
component: WhoToFollow,
|
component: defineAsyncComponent(
|
||||||
|
() => import('src/components/who_to_follow/who_to_follow.vue'),
|
||||||
|
),
|
||||||
beforeEnter: validateAuthenticatedRoute,
|
beforeEnter: validateAuthenticatedRoute,
|
||||||
},
|
},
|
||||||
{ name: 'about', path: '/about', component: About },
|
{ name: 'about', path: '/about', component: About },
|
||||||
{
|
{
|
||||||
name: 'announcements',
|
name: 'announcements',
|
||||||
path: '/announcements',
|
path: '/announcements',
|
||||||
component: AnnouncementsPage,
|
component: defineAsyncComponent(
|
||||||
|
() =>
|
||||||
|
import('src/components/announcements_page/announcements_page.vue'),
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'drafts',
|
||||||
|
path: '/drafts',
|
||||||
|
component: defineAsyncComponent(
|
||||||
|
() => import('src/components/drafts/drafts.vue'),
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'user-profile',
|
||||||
|
path: '/users/:name',
|
||||||
|
component: defineAsyncComponent(
|
||||||
|
() => import('src/components/user_profile/user_profile.vue'),
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'legacy-user-profile',
|
||||||
|
path: '/:name',
|
||||||
|
component: defineAsyncComponent(
|
||||||
|
() => import('src/components/user_profile/user_profile.vue'),
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'lists',
|
||||||
|
path: '/lists',
|
||||||
|
component: defineAsyncComponent(
|
||||||
|
() => import('src/components/lists/lists.vue'),
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'lists-timeline',
|
||||||
|
path: '/lists/:id',
|
||||||
|
component: defineAsyncComponent(
|
||||||
|
() => import('src/components/lists_timeline/lists_timeline.vue'),
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'lists-edit',
|
||||||
|
path: '/lists/:id/edit',
|
||||||
|
component: defineAsyncComponent(
|
||||||
|
() => import('src/components/lists_edit/lists_edit.vue'),
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'lists-new',
|
||||||
|
path: '/lists/new',
|
||||||
|
component: defineAsyncComponent(
|
||||||
|
() => import('src/components/lists_edit/lists_edit.vue'),
|
||||||
|
),
|
||||||
},
|
},
|
||||||
{ name: 'drafts', path: '/drafts', component: Drafts },
|
|
||||||
{ name: 'user-profile', path: '/users/:name', component: UserProfile },
|
|
||||||
{ name: 'legacy-user-profile', path: '/:name', component: UserProfile },
|
|
||||||
{ name: 'lists', path: '/lists', component: Lists },
|
|
||||||
{ name: 'lists-timeline', path: '/lists/:id', component: ListsTimeline },
|
|
||||||
{ name: 'lists-edit', path: '/lists/:id/edit', component: ListsEdit },
|
|
||||||
{ name: 'lists-new', path: '/lists/new', component: ListsEdit },
|
|
||||||
{
|
{
|
||||||
name: 'edit-navigation',
|
name: 'edit-navigation',
|
||||||
path: '/nav-edit',
|
path: '/nav-edit',
|
||||||
|
|
@ -187,12 +245,19 @@ export default (store) => {
|
||||||
{
|
{
|
||||||
name: 'bookmark-folders',
|
name: 'bookmark-folders',
|
||||||
path: '/bookmark_folders',
|
path: '/bookmark_folders',
|
||||||
component: BookmarkFolders,
|
component: defineAsyncComponent(
|
||||||
|
() => import('src/components/bookmark_folders/bookmark_folders.vue'),
|
||||||
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'bookmark-folder-new',
|
name: 'bookmark-folder-new',
|
||||||
path: '/bookmarks/new-folder',
|
path: '/bookmarks/new-folder',
|
||||||
component: BookmarkFolderEdit,
|
component: defineAsyncComponent(
|
||||||
|
() =>
|
||||||
|
import(
|
||||||
|
'src/components/bookmark_folder_edit/bookmark_folder_edit.vue'
|
||||||
|
),
|
||||||
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'bookmark-folder',
|
name: 'bookmark-folder',
|
||||||
|
|
@ -202,7 +267,12 @@ export default (store) => {
|
||||||
{
|
{
|
||||||
name: 'bookmark-folder-edit',
|
name: 'bookmark-folder-edit',
|
||||||
path: '/bookmarks/:id/edit',
|
path: '/bookmarks/:id/edit',
|
||||||
component: BookmarkFolderEdit,
|
component: defineAsyncComponent(
|
||||||
|
() =>
|
||||||
|
import(
|
||||||
|
'src/components/bookmark_folder_edit/bookmark_folder_edit.vue'
|
||||||
|
),
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
@ -211,14 +281,18 @@ export default (store) => {
|
||||||
{
|
{
|
||||||
name: 'chat',
|
name: 'chat',
|
||||||
path: '/users/:username/chats/:recipient_id',
|
path: '/users/:username/chats/:recipient_id',
|
||||||
component: Chat,
|
component: defineAsyncComponent(
|
||||||
|
() => import('src/components/chat/chat.vue'),
|
||||||
|
),
|
||||||
meta: { dontScroll: false },
|
meta: { dontScroll: false },
|
||||||
beforeEnter: validateAuthenticatedRoute,
|
beforeEnter: validateAuthenticatedRoute,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'chats',
|
name: 'chats',
|
||||||
path: '/users/:username/chats',
|
path: '/users/:username/chats',
|
||||||
component: ChatList,
|
component: defineAsyncComponent(
|
||||||
|
() => import('src/components/chat_list/chat_list.vue'),
|
||||||
|
),
|
||||||
meta: { dontScroll: false },
|
meta: { dontScroll: false },
|
||||||
beforeEnter: validateAuthenticatedRoute,
|
beforeEnter: validateAuthenticatedRoute,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { mapState } from 'pinia'
|
import { mapState } from 'pinia'
|
||||||
|
import { defineAsyncComponent } from 'vue'
|
||||||
|
|
||||||
import nsfwImage from '../../assets/nsfw.png'
|
import nsfwImage from '../../assets/nsfw.png'
|
||||||
import Flash from '../flash/flash.vue'
|
|
||||||
import Popover from '../popover/popover.vue'
|
import Popover from '../popover/popover.vue'
|
||||||
import StillImage from '../still-image/still-image.vue'
|
import StillImage from '../still-image/still-image.vue'
|
||||||
import VideoAttachment from '../video_attachment/video_attachment.vue'
|
import VideoAttachment from '../video_attachment/video_attachment.vue'
|
||||||
|
|
@ -69,9 +69,13 @@ const Attachment = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
Flash,
|
Flash: defineAsyncComponent(
|
||||||
|
() => import( 'src/components/flash/flash.vue'),
|
||||||
|
),
|
||||||
StillImage,
|
StillImage,
|
||||||
VideoAttachment,
|
VideoAttachment: defineAsyncComponent(
|
||||||
|
() => import( 'src/components/video_attachment/video_attachment.vue'),
|
||||||
|
),
|
||||||
Popover,
|
Popover,
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,14 @@
|
||||||
import { mapState as mapPiniaState } from 'pinia'
|
import { mapState as mapPiniaState } from 'pinia'
|
||||||
import { defineAsyncComponent } from 'vue'
|
|
||||||
import { mapGetters, mapState } from 'vuex'
|
import { mapGetters, mapState } from 'vuex'
|
||||||
|
|
||||||
import Attachment from '../attachment/attachment.vue'
|
import Attachment from 'src/components/attachment/attachment.vue'
|
||||||
import ChatMessageDate from '../chat_message_date/chat_message_date.vue'
|
import ChatMessageDate from 'src/components/chat_message_date/chat_message_date.vue'
|
||||||
import Gallery from '../gallery/gallery.vue'
|
import Gallery from 'src/components/gallery/gallery.vue'
|
||||||
import LinkPreview from '../link-preview/link-preview.vue'
|
import LinkPreview from 'src/components/link-preview/link-preview.vue'
|
||||||
import Popover from '../popover/popover.vue'
|
import Popover from 'src/components/popover/popover.vue'
|
||||||
import StatusContent from '../status_content/status_content.vue'
|
import StatusContent from 'src/components/status_content/status_content.vue'
|
||||||
import UserAvatar from '../user_avatar/user_avatar.vue'
|
import UserAvatar from 'src/components/user_avatar/user_avatar.vue'
|
||||||
|
import UserPopover from 'src/components/user_popover/user_popover.vue'
|
||||||
|
|
||||||
import { useInstanceStore } from 'src/stores/instance.js'
|
import { useInstanceStore } from 'src/stores/instance.js'
|
||||||
import { useInterfaceStore } from 'src/stores/interface'
|
import { useInterfaceStore } from 'src/stores/interface'
|
||||||
|
|
@ -37,9 +37,7 @@ const ChatMessage = {
|
||||||
Gallery,
|
Gallery,
|
||||||
LinkPreview,
|
LinkPreview,
|
||||||
ChatMessageDate,
|
ChatMessageDate,
|
||||||
UserPopover: defineAsyncComponent(
|
UserPopover,
|
||||||
() => import('../user_popover/user_popover.vue'),
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
// Returns HH:MM (hours and minutes) in local time.
|
// Returns HH:MM (hours and minutes) in local time.
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
import { defineAsyncComponent } from 'vue'
|
import { defineAsyncComponent } from 'vue'
|
||||||
|
|
||||||
import RichContent from 'src/components/rich_content/rich_content.jsx'
|
import RichContent from 'src/components/rich_content/rich_content.jsx'
|
||||||
import UserAvatar from '../user_avatar/user_avatar.vue'
|
import UserAvatar from 'src/components/user_avatar/user_avatar.vue'
|
||||||
|
import UserPopover from 'src/components/user_popover/user_popover.vue'
|
||||||
|
|
||||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||||
|
|
||||||
|
|
@ -10,9 +11,7 @@ export default {
|
||||||
components: {
|
components: {
|
||||||
UserAvatar,
|
UserAvatar,
|
||||||
RichContent,
|
RichContent,
|
||||||
UserPopover: defineAsyncComponent(
|
UserPopover,
|
||||||
() => import('../user_popover/user_popover.vue'),
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
props: ['user', 'withAvatar'],
|
props: ['user', 'withAvatar'],
|
||||||
computed: {
|
computed: {
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,8 @@
|
||||||
import { cloneDeep } from 'lodash'
|
import { cloneDeep } from 'lodash'
|
||||||
|
import { defineAsyncComponent } from 'vue'
|
||||||
|
|
||||||
import ConfirmModal from 'src/components/confirm_modal/confirm_modal.vue'
|
import ConfirmModal from 'src/components/confirm_modal/confirm_modal.vue'
|
||||||
import EditStatusForm from 'src/components/edit_status_form/edit_status_form.vue'
|
|
||||||
import Gallery from 'src/components/gallery/gallery.vue'
|
import Gallery from 'src/components/gallery/gallery.vue'
|
||||||
import PostStatusForm from 'src/components/post_status_form/post_status_form.vue'
|
|
||||||
import StatusContent from 'src/components/status_content/status_content.vue'
|
import StatusContent from 'src/components/status_content/status_content.vue'
|
||||||
|
|
||||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||||
|
|
@ -15,8 +14,12 @@ library.add(faPollH)
|
||||||
|
|
||||||
const Draft = {
|
const Draft = {
|
||||||
components: {
|
components: {
|
||||||
PostStatusForm,
|
PostStatusForm: defineAsyncComponent(
|
||||||
EditStatusForm,
|
() => import('src/components/post_status_form/post_status_form.vue'),
|
||||||
|
),
|
||||||
|
EditStatusForm: defineAsyncComponent(
|
||||||
|
() => import('src/components/edit_status_form/edit_status_form.vue'),
|
||||||
|
),
|
||||||
ConfirmModal,
|
ConfirmModal,
|
||||||
StatusContent,
|
StatusContent,
|
||||||
Gallery,
|
Gallery,
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,15 @@
|
||||||
import get from 'lodash/get'
|
import get from 'lodash/get'
|
||||||
|
import { defineAsyncComponent } from 'vue'
|
||||||
|
|
||||||
import EditStatusForm from '../edit_status_form/edit_status_form.vue'
|
|
||||||
import Modal from '../modal/modal.vue'
|
import Modal from '../modal/modal.vue'
|
||||||
|
|
||||||
import { useEditStatusStore } from 'src/stores/editStatus.js'
|
import { useEditStatusStore } from 'src/stores/editStatus.js'
|
||||||
|
|
||||||
const EditStatusModal = {
|
const EditStatusModal = {
|
||||||
components: {
|
components: {
|
||||||
EditStatusForm,
|
EditStatusForm: defineAsyncComponent(
|
||||||
|
() => import('src/components/edit_status_form/edit_status_form.vue'),
|
||||||
|
),
|
||||||
Modal,
|
Modal,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,10 @@
|
||||||
import Flash from 'src/components/flash/flash.vue'
|
|
||||||
import GestureService from '../../services/gesture_service/gesture_service'
|
import GestureService from '../../services/gesture_service/gesture_service'
|
||||||
import Modal from '../modal/modal.vue'
|
|
||||||
import PinchZoom from '../pinch_zoom/pinch_zoom.vue'
|
|
||||||
import StillImage from '../still-image/still-image.vue'
|
|
||||||
import SwipeClick from '../swipe_click/swipe_click.vue'
|
|
||||||
import VideoAttachment from '../video_attachment/video_attachment.vue'
|
|
||||||
|
|
||||||
import { useMediaViewerStore } from 'src/stores/media_viewer.js'
|
import { useMediaViewerStore } from 'src/stores/media_viewer.js'
|
||||||
|
import { defineAsyncComponent } from 'vue'
|
||||||
|
|
||||||
|
import Modal from 'src/components/modal/modal.vue'
|
||||||
|
import StillImage from 'src/components/still-image/still-image.vue'
|
||||||
|
|
||||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||||
import {
|
import {
|
||||||
|
|
@ -21,11 +19,19 @@ library.add(faChevronLeft, faChevronRight, faCircleNotch, faTimes)
|
||||||
const MediaModal = {
|
const MediaModal = {
|
||||||
components: {
|
components: {
|
||||||
StillImage,
|
StillImage,
|
||||||
VideoAttachment,
|
VideoAttachment: defineAsyncComponent(
|
||||||
PinchZoom,
|
() => import( 'src/components/video_attachment/video_attachment.vue'),
|
||||||
SwipeClick,
|
),
|
||||||
|
PinchZoom: defineAsyncComponent(
|
||||||
|
() => import( 'src/components/pinch_zoom/pinch_zoom.vue'),
|
||||||
|
),
|
||||||
|
SwipeClick: defineAsyncComponent(
|
||||||
|
() => import( 'src/components/swipe_click/swipe_click.vue'),
|
||||||
|
),
|
||||||
Modal,
|
Modal,
|
||||||
Flash,
|
Flash: defineAsyncComponent(
|
||||||
|
() => import( 'src/components/flash/flash.vue'),
|
||||||
|
),
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
|
|
@ -2,12 +2,13 @@ import { mapState as mapPiniaState } from 'pinia'
|
||||||
import { defineAsyncComponent } from 'vue'
|
import { defineAsyncComponent } from 'vue'
|
||||||
import { mapGetters, mapState } from 'vuex'
|
import { mapGetters, mapState } from 'vuex'
|
||||||
|
|
||||||
|
import UnicodeDomainIndicator from 'src/components/unicode_domain_indicator/unicode_domain_indicator.vue'
|
||||||
|
import UserAvatar from 'src/components/user_avatar/user_avatar.vue'
|
||||||
|
import UserPopover from 'src/components/user_popover/user_popover.vue'
|
||||||
import {
|
import {
|
||||||
highlightClass,
|
highlightClass,
|
||||||
highlightStyle,
|
highlightStyle,
|
||||||
} from '../../services/user_highlighter/user_highlighter.js'
|
} from '../../services/user_highlighter/user_highlighter.js'
|
||||||
import UnicodeDomainIndicator from '../unicode_domain_indicator/unicode_domain_indicator.vue'
|
|
||||||
import UserAvatar from '../user_avatar/user_avatar.vue'
|
|
||||||
|
|
||||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||||
import { useUserHighlightStore } from 'src/stores/user_highlight.js'
|
import { useUserHighlightStore } from 'src/stores/user_highlight.js'
|
||||||
|
|
@ -24,9 +25,7 @@ const MentionLink = {
|
||||||
components: {
|
components: {
|
||||||
UserAvatar,
|
UserAvatar,
|
||||||
UnicodeDomainIndicator,
|
UnicodeDomainIndicator,
|
||||||
UserPopover: defineAsyncComponent(
|
UserPopover,
|
||||||
() => import('../user_popover/user_popover.vue'),
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
url: {
|
url: {
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,15 @@
|
||||||
import { mapState } from 'pinia'
|
import { mapState } from 'pinia'
|
||||||
|
import { defineAsyncComponent } from 'vue'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
|
|
||||||
|
import ConfirmModal from 'src/components/confirm_modal/confirm_modal.vue'
|
||||||
import NavigationPins from 'src/components/navigation/navigation_pins.vue'
|
import NavigationPins from 'src/components/navigation/navigation_pins.vue'
|
||||||
|
import SideDrawer from 'src/components/side_drawer/side_drawer.vue'
|
||||||
import GestureService from '../../services/gesture_service/gesture_service'
|
import GestureService from '../../services/gesture_service/gesture_service'
|
||||||
import {
|
import {
|
||||||
countExtraNotifications,
|
countExtraNotifications,
|
||||||
unseenNotificationsFromStore,
|
unseenNotificationsFromStore,
|
||||||
} from '../../services/notification_utils/notification_utils'
|
} from '../../services/notification_utils/notification_utils'
|
||||||
import ConfirmModal from '../confirm_modal/confirm_modal.vue'
|
|
||||||
import Notifications from '../notifications/notifications.vue'
|
|
||||||
import SideDrawer from '../side_drawer/side_drawer.vue'
|
|
||||||
|
|
||||||
import { useAnnouncementsStore } from 'src/stores/announcements.js'
|
import { useAnnouncementsStore } from 'src/stores/announcements.js'
|
||||||
import { useInstanceStore } from 'src/stores/instance.js'
|
import { useInstanceStore } from 'src/stores/instance.js'
|
||||||
|
|
@ -30,7 +30,9 @@ library.add(faTimes, faBell, faBars, faArrowUp, faMinus, faCheckDouble)
|
||||||
const MobileNav = {
|
const MobileNav = {
|
||||||
components: {
|
components: {
|
||||||
SideDrawer,
|
SideDrawer,
|
||||||
Notifications,
|
Notifications: defineAsyncComponent(
|
||||||
|
() => import('src/components/notifications/notifications.vue'),
|
||||||
|
),
|
||||||
NavigationPins,
|
NavigationPins,
|
||||||
ConfirmModal,
|
ConfirmModal,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ import Status from '../status/status.vue'
|
||||||
import StatusContent from '../status_content/status_content.vue'
|
import StatusContent from '../status_content/status_content.vue'
|
||||||
import Timeago from '../timeago/timeago.vue'
|
import Timeago from '../timeago/timeago.vue'
|
||||||
import UserAvatar from '../user_avatar/user_avatar.vue'
|
import UserAvatar from '../user_avatar/user_avatar.vue'
|
||||||
import UserCard from '../user_card/user_card.vue'
|
|
||||||
import UserLink from '../user_link/user_link.vue'
|
import UserLink from '../user_link/user_link.vue'
|
||||||
import UserPopover from '../user_popover/user_popover.vue'
|
import UserPopover from '../user_popover/user_popover.vue'
|
||||||
|
|
||||||
|
|
@ -64,7 +63,6 @@ const Notification = {
|
||||||
components: {
|
components: {
|
||||||
StatusContent,
|
StatusContent,
|
||||||
UserAvatar,
|
UserAvatar,
|
||||||
UserCard,
|
|
||||||
Timeago,
|
Timeago,
|
||||||
Status,
|
Status,
|
||||||
Report,
|
Report,
|
||||||
|
|
|
||||||
|
|
@ -2,23 +2,23 @@ import { debounce, map, reject, uniqBy } from 'lodash'
|
||||||
import { mapActions, mapState } from 'pinia'
|
import { mapActions, mapState } from 'pinia'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
|
|
||||||
|
import Attachment from 'src/components/attachment/attachment.vue'
|
||||||
|
import Checkbox from 'src/components/checkbox/checkbox.vue'
|
||||||
import DraftCloser from 'src/components/draft_closer/draft_closer.vue'
|
import DraftCloser from 'src/components/draft_closer/draft_closer.vue'
|
||||||
|
import EmojiInput from 'src/components/emoji_input/emoji_input.vue'
|
||||||
|
import suggestor from 'src/components/emoji_input/suggestor.js'
|
||||||
import Gallery from 'src/components/gallery/gallery.vue'
|
import Gallery from 'src/components/gallery/gallery.vue'
|
||||||
|
import MediaUpload from 'src/components/media_upload/media_upload.vue'
|
||||||
|
import PollForm from 'src/components/poll/poll_form.vue'
|
||||||
import Popover from 'src/components/popover/popover.vue'
|
import Popover from 'src/components/popover/popover.vue'
|
||||||
|
import QuoteForm from 'src/components/quote/quote_form.vue'
|
||||||
|
import ScopeSelector from 'src/components/scope_selector/scope_selector.vue'
|
||||||
|
import Select from 'src/components/select/select.vue'
|
||||||
|
import StatusContent from 'src/components/status_content/status_content.vue'
|
||||||
import { propsToNative } from '../../services/attributes_helper/attributes_helper.service.js'
|
import { propsToNative } from '../../services/attributes_helper/attributes_helper.service.js'
|
||||||
import { findOffset } from '../../services/offset_finder/offset_finder.service.js'
|
import { findOffset } from '../../services/offset_finder/offset_finder.service.js'
|
||||||
import genRandomSeed from '../../services/random_seed/random_seed.service.js'
|
import genRandomSeed from '../../services/random_seed/random_seed.service.js'
|
||||||
import statusPoster from '../../services/status_poster/status_poster.service.js'
|
import statusPoster from '../../services/status_poster/status_poster.service.js'
|
||||||
import Attachment from '../attachment/attachment.vue'
|
|
||||||
import Checkbox from '../checkbox/checkbox.vue'
|
|
||||||
import EmojiInput from '../emoji_input/emoji_input.vue'
|
|
||||||
import suggestor from '../emoji_input/suggestor.js'
|
|
||||||
import MediaUpload from '../media_upload/media_upload.vue'
|
|
||||||
import PollForm from '../poll/poll_form.vue'
|
|
||||||
import QuoteForm from '../quote/quote_form.vue'
|
|
||||||
import ScopeSelector from '../scope_selector/scope_selector.vue'
|
|
||||||
import Select from '../select/select.vue'
|
|
||||||
import StatusContent from '../status_content/status_content.vue'
|
|
||||||
|
|
||||||
import { useEmojiStore } from 'src/stores/emoji.js'
|
import { useEmojiStore } from 'src/stores/emoji.js'
|
||||||
import { useInstanceStore } from 'src/stores/instance.js'
|
import { useInstanceStore } from 'src/stores/instance.js'
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,15 @@
|
||||||
import get from 'lodash/get'
|
import get from 'lodash/get'
|
||||||
|
import { defineAsyncComponent } from 'vue'
|
||||||
|
|
||||||
import Modal from '../modal/modal.vue'
|
import Modal from '../modal/modal.vue'
|
||||||
import PostStatusForm from '../post_status_form/post_status_form.vue'
|
|
||||||
|
|
||||||
import { usePostStatusStore } from 'src/stores/post_status.js'
|
import { usePostStatusStore } from 'src/stores/post_status.js'
|
||||||
|
|
||||||
const PostStatusModal = {
|
const PostStatusModal = {
|
||||||
components: {
|
components: {
|
||||||
PostStatusForm,
|
PostStatusForm: defineAsyncComponent(
|
||||||
|
() => import('src/components/post_status_form/post_status_form.vue'),
|
||||||
|
),
|
||||||
Modal,
|
Modal,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,10 @@ library.add(faCircleNotch)
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
Status: defineAsyncComponent(() => import('../status/status.vue')),
|
// Quote and Status depend on each other, dynamic import to break this circular dependency
|
||||||
|
Status: defineAsyncComponent(
|
||||||
|
() => import('src/components/status/status.vue'),
|
||||||
|
),
|
||||||
},
|
},
|
||||||
name: 'Quote',
|
name: 'Quote',
|
||||||
props: {
|
props: {
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
import { mapActions, mapState } from 'pinia'
|
import { mapActions, mapState } from 'pinia'
|
||||||
|
import { defineAsyncComponent } from 'vue'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
|
|
||||||
import { USERNAME_ROUTES } from 'src/components/navigation/navigation.js'
|
import { USERNAME_ROUTES } from 'src/components/navigation/navigation.js'
|
||||||
import GestureService from '../../services/gesture_service/gesture_service'
|
import GestureService from '../../services/gesture_service/gesture_service'
|
||||||
import { unseenNotificationsFromStore } from '../../services/notification_utils/notification_utils'
|
import { unseenNotificationsFromStore } from '../../services/notification_utils/notification_utils'
|
||||||
import UserCard from '../user_card/user_card.vue'
|
|
||||||
|
|
||||||
import { useAnnouncementsStore } from 'src/stores/announcements'
|
import { useAnnouncementsStore } from 'src/stores/announcements'
|
||||||
import { useInstanceStore } from 'src/stores/instance.js'
|
import { useInstanceStore } from 'src/stores/instance.js'
|
||||||
|
|
@ -64,7 +64,11 @@ const SideDrawer = {
|
||||||
this.$store.dispatch('startFetchingFollowRequests')
|
this.$store.dispatch('startFetchingFollowRequests')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: { UserCard },
|
components: {
|
||||||
|
UserCard: defineAsyncComponent(
|
||||||
|
() => import('src/components/user_card/user_card.vue'),
|
||||||
|
),
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
currentUser() {
|
currentUser() {
|
||||||
return this.$store.state.users.currentUser
|
return this.$store.state.users.currentUser
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import { unescape as ldUnescape, uniqBy } from 'lodash'
|
import { unescape as ldUnescape, uniqBy } from 'lodash'
|
||||||
|
import { defineAsyncComponent } from 'vue'
|
||||||
|
|
||||||
import MentionLink from 'src/components/mention_link/mention_link.vue'
|
import MentionLink from 'src/components/mention_link/mention_link.vue'
|
||||||
import MentionsLine from 'src/components/mentions_line/mentions_line.vue'
|
import MentionsLine from 'src/components/mentions_line/mentions_line.vue'
|
||||||
|
|
@ -11,7 +12,6 @@ import {
|
||||||
} from '../../services/user_highlighter/user_highlighter.js'
|
} from '../../services/user_highlighter/user_highlighter.js'
|
||||||
import AvatarList from '../avatar_list/avatar_list.vue'
|
import AvatarList from '../avatar_list/avatar_list.vue'
|
||||||
import EmojiReactions from '../emoji_reactions/emoji_reactions.vue'
|
import EmojiReactions from '../emoji_reactions/emoji_reactions.vue'
|
||||||
import PostStatusForm from '../post_status_form/post_status_form.vue'
|
|
||||||
import Quote from '../quote/quote.vue'
|
import Quote from '../quote/quote.vue'
|
||||||
import StatusContent from '../status_content/status_content.vue'
|
import StatusContent from '../status_content/status_content.vue'
|
||||||
import StatusPopover from '../status_popover/status_popover.vue'
|
import StatusPopover from '../status_popover/status_popover.vue'
|
||||||
|
|
@ -117,7 +117,9 @@ const controlledOrUncontrolledSet = (obj, name, val) => {
|
||||||
const Status = {
|
const Status = {
|
||||||
name: 'Status',
|
name: 'Status',
|
||||||
components: {
|
components: {
|
||||||
PostStatusForm,
|
PostStatusForm: defineAsyncComponent(
|
||||||
|
() => import('src/components/post_status_form/post_status_form.vue'),
|
||||||
|
),
|
||||||
UserAvatar,
|
UserAvatar,
|
||||||
AvatarList,
|
AvatarList,
|
||||||
Timeago,
|
Timeago,
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
import { find } from 'lodash'
|
import { find } from 'lodash'
|
||||||
import { defineAsyncComponent } from 'vue'
|
import { defineAsyncComponent } from 'vue'
|
||||||
|
|
||||||
|
import Popover from 'src/components/popover/popover.vue'
|
||||||
|
|
||||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||||
import { faCircleNotch } from '@fortawesome/free-solid-svg-icons'
|
import { faCircleNotch } from '@fortawesome/free-solid-svg-icons'
|
||||||
|
|
||||||
|
|
@ -20,8 +22,10 @@ const StatusPopover = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
Status: defineAsyncComponent(() => import('../status/status.vue')),
|
Status: defineAsyncComponent(
|
||||||
Popover: defineAsyncComponent(() => import('../popover/popover.vue')),
|
() => import('src/components/status/status.vue'),
|
||||||
|
),
|
||||||
|
Popover,
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
enter() {
|
enter() {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
import { defineAsyncComponent } from 'vue'
|
import { defineAsyncComponent } from 'vue'
|
||||||
|
|
||||||
|
import Popover from 'src/components/popover/popover.vue'
|
||||||
import RichContent from 'src/components/rich_content/rich_content.jsx'
|
import RichContent from 'src/components/rich_content/rich_content.jsx'
|
||||||
|
import UserAvatar from 'src/components/user_avatar/user_avatar.vue'
|
||||||
import UnicodeDomainIndicator from '../unicode_domain_indicator/unicode_domain_indicator.vue'
|
import UnicodeDomainIndicator from '../unicode_domain_indicator/unicode_domain_indicator.vue'
|
||||||
|
|
||||||
import { useInstanceStore } from 'src/stores/instance.js'
|
import { useInstanceStore } from 'src/stores/instance.js'
|
||||||
|
|
@ -19,10 +21,8 @@ const UserListPopover = {
|
||||||
components: {
|
components: {
|
||||||
RichContent,
|
RichContent,
|
||||||
UnicodeDomainIndicator,
|
UnicodeDomainIndicator,
|
||||||
Popover: defineAsyncComponent(() => import('../popover/popover.vue')),
|
Popover,
|
||||||
UserAvatar: defineAsyncComponent(
|
UserAvatar,
|
||||||
() => import('../user_avatar/user_avatar.vue'),
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
usersCapped() {
|
usersCapped() {
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,6 @@
|
||||||
|
import { defineAsyncComponent } from 'vue'
|
||||||
import { mapState } from 'vuex'
|
import { mapState } from 'vuex'
|
||||||
|
|
||||||
import AuthForm from '../auth_form/auth_form.js'
|
|
||||||
import PostStatusForm from '../post_status_form/post_status_form.vue'
|
|
||||||
import UserCard from '../user_card/user_card.vue'
|
|
||||||
|
|
||||||
const UserPanel = {
|
const UserPanel = {
|
||||||
computed: {
|
computed: {
|
||||||
signedIn() {
|
signedIn() {
|
||||||
|
|
@ -12,9 +9,15 @@ const UserPanel = {
|
||||||
...mapState({ user: (state) => state.users.currentUser }),
|
...mapState({ user: (state) => state.users.currentUser }),
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
AuthForm,
|
AuthForm: defineAsyncComponent(
|
||||||
PostStatusForm,
|
() => import('src/components/auth_form/auth_form.js'),
|
||||||
UserCard,
|
),
|
||||||
|
PostStatusForm: defineAsyncComponent(
|
||||||
|
() => import('src/components/post_status_form/post_status_form.vue'),
|
||||||
|
),
|
||||||
|
UserCard: defineAsyncComponent(
|
||||||
|
() => import('src/components/user_card/user_card.vue'),
|
||||||
|
),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { mapState } from 'pinia'
|
import { mapState } from 'pinia'
|
||||||
import { defineAsyncComponent } from 'vue'
|
import { defineAsyncComponent } from 'vue'
|
||||||
|
|
||||||
import UserCard from '../user_card/user_card.vue'
|
import Popover from 'src/components/popover/popover.vue'
|
||||||
|
|
||||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||||
|
|
||||||
|
|
@ -9,8 +9,10 @@ const UserPopover = {
|
||||||
name: 'UserPopover',
|
name: 'UserPopover',
|
||||||
props: ['userId', 'overlayCenters', 'disabled', 'overlayCentersSelector'],
|
props: ['userId', 'overlayCenters', 'disabled', 'overlayCentersSelector'],
|
||||||
components: {
|
components: {
|
||||||
UserCard,
|
UserCard: defineAsyncComponent(
|
||||||
Popover: defineAsyncComponent(() => import('../popover/popover.vue')),
|
() => import('src/components/user_card/user_card.vue'),
|
||||||
|
),
|
||||||
|
Popover,
|
||||||
},
|
},
|
||||||
computed: mapState(useMergedConfigStore, {
|
computed: mapState(useMergedConfigStore, {
|
||||||
userPopoverAvatarAction: (state) =>
|
userPopoverAvatarAction: (state) =>
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ const ULTIMATE_FALLBACK_LOCALE = 'en'
|
||||||
|
|
||||||
const hasLanguageFile = (code) => languages.includes(code)
|
const hasLanguageFile = (code) => languages.includes(code)
|
||||||
|
|
||||||
const languageFileMap = import.meta.glob('./*.json')
|
const languageFileMap = import.meta.glob(['./*.json', '!./en.json'])
|
||||||
|
|
||||||
const loadLanguageFile = (code) => {
|
const loadLanguageFile = (code) => {
|
||||||
const jsonName = langCodeToJsonName(code)
|
const jsonName = langCodeToJsonName(code)
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ import { fileURLToPath } from 'node:url'
|
||||||
import vue from '@vitejs/plugin-vue'
|
import vue from '@vitejs/plugin-vue'
|
||||||
import vueJsx from '@vitejs/plugin-vue-jsx'
|
import vueJsx from '@vitejs/plugin-vue-jsx'
|
||||||
import { defineConfig } from 'vite'
|
import { defineConfig } from 'vite'
|
||||||
|
import { DevTools } from '@vitejs/devtools'
|
||||||
import eslint from 'vite-plugin-eslint2'
|
import eslint from 'vite-plugin-eslint2'
|
||||||
import stylelint from 'vite-plugin-stylelint'
|
import stylelint from 'vite-plugin-stylelint'
|
||||||
import { configDefaults } from 'vitest/config'
|
import { configDefaults } from 'vitest/config'
|
||||||
|
|
@ -135,6 +136,12 @@ export default defineConfig(async ({ mode, command }) => {
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
vueJsx(),
|
vueJsx(),
|
||||||
|
DevTools({
|
||||||
|
build: {
|
||||||
|
withApp: true, // generate DevTools output during `vite build`
|
||||||
|
// outDir: 'custom-dir', // optional, defaults to Vite's build.outDir
|
||||||
|
},
|
||||||
|
}),
|
||||||
devSwPlugin({ swSrc, swDest, transformSW, alias }),
|
devSwPlugin({ swSrc, swDest, transformSW, alias }),
|
||||||
buildSwPlugin({ swSrc, swDest }),
|
buildSwPlugin({ swSrc, swDest }),
|
||||||
swMessagesPlugin(),
|
swMessagesPlugin(),
|
||||||
|
|
@ -197,12 +204,12 @@ export default defineConfig(async ({ mode, command }) => {
|
||||||
},
|
},
|
||||||
build: {
|
build: {
|
||||||
sourcemap: true,
|
sourcemap: true,
|
||||||
rollupOptions: {
|
rolldownOptions: {
|
||||||
|
devtools: {}, // enable devtools mode
|
||||||
input: {
|
input: {
|
||||||
main: 'index.html',
|
main: 'index.html',
|
||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
inlineDynamicImports: false,
|
|
||||||
entryFileNames(chunkInfo) {
|
entryFileNames(chunkInfo) {
|
||||||
const id = chunkInfo.facadeModuleId
|
const id = chunkInfo.facadeModuleId
|
||||||
if (id.endsWith(swSrc)) {
|
if (id.endsWith(swSrc)) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue