Merge branch 'optimize' into shigusegubu-themes3
This commit is contained in:
commit
5e68d7b00d
16 changed files with 1544 additions and 252 deletions
|
|
@ -1,17 +1,16 @@
|
|||
import { defineAsyncComponent } from '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 PublicAndExternalTimeline from 'src/components/public_and_external_timeline/public_and_external_timeline.vue'
|
||||
import PublicTimeline from 'src/components/public_timeline/public_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 { defineAsyncComponent } from 'vue'
|
||||
|
||||
import NavPanel from 'src/components/nav_panel/nav_panel.vue'
|
||||
import QuotesTimeline from 'src/components/quotes_timeline/quotes_timeline.vue'
|
||||
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
|
||||
|
|
@ -142,14 +141,14 @@ export default (store) => {
|
|||
name: 'login',
|
||||
path: '/login',
|
||||
component: defineAsyncComponent(
|
||||
() => import('src/components/auth_form/auth_form.js'),
|
||||
() => import( 'src/components/auth_form/auth_form.js'),
|
||||
),
|
||||
},
|
||||
{
|
||||
name: 'shout-panel',
|
||||
path: '/shout-panel',
|
||||
component: defineAsyncComponent(
|
||||
() => import('src/components/shout_panel/shout_panel.vue'),
|
||||
() => import( 'src/components/shout_panel/shout_panel.vue'),
|
||||
),
|
||||
props: () => ({ floating: false }),
|
||||
},
|
||||
|
|
@ -165,7 +164,7 @@ export default (store) => {
|
|||
name: 'search',
|
||||
path: '/search',
|
||||
component: defineAsyncComponent(
|
||||
() => import('src/components/search/search.vue'),
|
||||
() => import( 'src/components/search/search.vue'),
|
||||
),
|
||||
props: (route) => ({ query: route.query.query }),
|
||||
},
|
||||
|
|
@ -173,24 +172,29 @@ export default (store) => {
|
|||
name: 'who-to-follow',
|
||||
path: '/who-to-follow',
|
||||
component: defineAsyncComponent(
|
||||
() => import('src/components/who_to_follow/who_to_follow.vue'),
|
||||
() => import( 'src/components/who_to_follow/who_to_follow.vue'),
|
||||
),
|
||||
beforeEnter: validateAuthenticatedRoute,
|
||||
},
|
||||
{ name: 'about', path: '/about', component: About },
|
||||
{
|
||||
name: 'about',
|
||||
path: '/about',
|
||||
component: defineAsyncComponent(
|
||||
() => import( 'src/components/about/about.vue'),
|
||||
),
|
||||
},
|
||||
{
|
||||
name: 'announcements',
|
||||
path: '/announcements',
|
||||
component: defineAsyncComponent(
|
||||
() =>
|
||||
import('src/components/announcements_page/announcements_page.vue'),
|
||||
() => import( 'src/components/announcements_page/announcements_page.vue'),
|
||||
),
|
||||
},
|
||||
{
|
||||
name: 'drafts',
|
||||
path: '/drafts',
|
||||
component: defineAsyncComponent(
|
||||
() => import('src/components/drafts/drafts.vue'),
|
||||
() => import( 'src/components/drafts/drafts.vue'),
|
||||
),
|
||||
},
|
||||
{
|
||||
|
|
@ -211,28 +215,28 @@ export default (store) => {
|
|||
name: 'lists',
|
||||
path: '/lists',
|
||||
component: defineAsyncComponent(
|
||||
() => import('src/components/lists/lists.vue'),
|
||||
() => import( 'src/components/lists/lists.vue'),
|
||||
),
|
||||
},
|
||||
{
|
||||
name: 'lists-timeline',
|
||||
path: '/lists/:id',
|
||||
component: defineAsyncComponent(
|
||||
() => import('src/components/lists_timeline/lists_timeline.vue'),
|
||||
() => 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'),
|
||||
() => import( 'src/components/lists_edit/lists_edit.vue'),
|
||||
),
|
||||
},
|
||||
{
|
||||
name: 'lists-new',
|
||||
path: '/lists/new',
|
||||
component: defineAsyncComponent(
|
||||
() => import('src/components/lists_edit/lists_edit.vue'),
|
||||
() => import( 'src/components/lists_edit/lists_edit.vue'),
|
||||
),
|
||||
},
|
||||
{
|
||||
|
|
@ -246,17 +250,14 @@ export default (store) => {
|
|||
name: 'bookmark-folders',
|
||||
path: '/bookmark_folders',
|
||||
component: defineAsyncComponent(
|
||||
() => import('src/components/bookmark_folders/bookmark_folders.vue'),
|
||||
() => import( 'src/components/bookmark_folders/bookmark_folders.vue'),
|
||||
),
|
||||
},
|
||||
{
|
||||
name: 'bookmark-folder-new',
|
||||
path: '/bookmarks/new-folder',
|
||||
component: defineAsyncComponent(
|
||||
() =>
|
||||
import(
|
||||
'src/components/bookmark_folder_edit/bookmark_folder_edit.vue'
|
||||
),
|
||||
() => import( 'src/components/bookmark_folder_edit/bookmark_folder_edit.vue'),
|
||||
),
|
||||
},
|
||||
{
|
||||
|
|
@ -268,10 +269,7 @@ export default (store) => {
|
|||
name: 'bookmark-folder-edit',
|
||||
path: '/bookmarks/:id/edit',
|
||||
component: defineAsyncComponent(
|
||||
() =>
|
||||
import(
|
||||
'src/components/bookmark_folder_edit/bookmark_folder_edit.vue'
|
||||
),
|
||||
() => import( 'src/components/bookmark_folder_edit/bookmark_folder_edit.vue'),
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
@ -282,7 +280,7 @@ export default (store) => {
|
|||
name: 'chat',
|
||||
path: '/users/:username/chats/:recipient_id',
|
||||
component: defineAsyncComponent(
|
||||
() => import('src/components/chat/chat.vue'),
|
||||
() => import( 'src/components/chat/chat.vue'),
|
||||
),
|
||||
meta: { dontScroll: false },
|
||||
beforeEnter: validateAuthenticatedRoute,
|
||||
|
|
@ -291,7 +289,7 @@ export default (store) => {
|
|||
name: 'chats',
|
||||
path: '/users/:username/chats',
|
||||
component: defineAsyncComponent(
|
||||
() => import('src/components/chat_list/chat_list.vue'),
|
||||
() => import( 'src/components/chat_list/chat_list.vue'),
|
||||
),
|
||||
meta: { dontScroll: false },
|
||||
beforeEnter: validateAuthenticatedRoute,
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
:title="$t('emoji.add_emoji')"
|
||||
@click.prevent="togglePicker"
|
||||
>
|
||||
<FAIcon :icon="['far', 'smile-beam']" />
|
||||
<FAIcon :icon="['far', 'face-smile-beam']" />
|
||||
</button>
|
||||
<EmojiPicker
|
||||
v-if="enableEmojiPicker"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import { defineAsyncComponent } from 'vue'
|
||||
|
||||
import Status from '../status/status.vue'
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
import { faCircleNotch } from '@fortawesome/free-solid-svg-icons'
|
||||
|
||||
|
|
@ -7,10 +8,7 @@ library.add(faCircleNotch)
|
|||
|
||||
export default {
|
||||
components: {
|
||||
// Quote and Status depend on each other, dynamic import to break this circular dependency
|
||||
Status: defineAsyncComponent(
|
||||
() => import('src/components/status/status.vue'),
|
||||
),
|
||||
Status,
|
||||
},
|
||||
name: 'Quote',
|
||||
props: {
|
||||
|
|
|
|||
|
|
@ -10,16 +10,14 @@ import {
|
|||
highlightClass,
|
||||
highlightStyle,
|
||||
} from '../../services/user_highlighter/user_highlighter.js'
|
||||
import AvatarList from '../avatar_list/avatar_list.vue'
|
||||
import EmojiReactions from '../emoji_reactions/emoji_reactions.vue'
|
||||
import Quote from '../quote/quote.vue'
|
||||
import StatusContent from '../status_content/status_content.vue'
|
||||
import StatusPopover from '../status_popover/status_popover.vue'
|
||||
import Timeago from '../timeago/timeago.vue'
|
||||
import UserAvatar from '../user_avatar/user_avatar.vue'
|
||||
import UserLink from '../user_link/user_link.vue'
|
||||
import UserListPopover from '../user_list_popover/user_list_popover.vue'
|
||||
import UserPopover from '../user_popover/user_popover.vue'
|
||||
import AvatarList from 'src/components/avatar_list/avatar_list.vue'
|
||||
import EmojiReactions from 'src/components/emoji_reactions/emoji_reactions.vue'
|
||||
import StatusContent from 'src/components/status_content/status_content.vue'
|
||||
import Timeago from 'src/components/timeago/timeago.vue'
|
||||
import UserAvatar from 'src/components/user_avatar/user_avatar.vue'
|
||||
import UserLink from 'src/components/user_link/user_link.vue'
|
||||
import UserListPopover from 'src/components/user_list_popover/user_list_popover.vue'
|
||||
import UserPopover from 'src/components/user_popover/user_popover.vue'
|
||||
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
|
||||
|
|
@ -123,7 +121,9 @@ const Status = {
|
|||
UserAvatar,
|
||||
AvatarList,
|
||||
Timeago,
|
||||
StatusPopover,
|
||||
StatusPopover: defineAsyncComponent(
|
||||
() => import( 'src/components/status_popover/status_popover.vue')
|
||||
),
|
||||
UserListPopover,
|
||||
EmojiReactions,
|
||||
StatusContent,
|
||||
|
|
@ -132,7 +132,9 @@ const Status = {
|
|||
MentionsLine,
|
||||
UserPopover,
|
||||
UserLink,
|
||||
Quote,
|
||||
Quote: defineAsyncComponent(
|
||||
() => import('src/components/quote/quote.vue')
|
||||
),
|
||||
StatusActionButtons,
|
||||
},
|
||||
props: [
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
import EmojiPicker from 'src/components/emoji_picker/emoji_picker.vue'
|
||||
import Popover from 'src/components/popover/popover.vue'
|
||||
import StatusBookmarkFolderMenu from 'src/components/status_bookmark_folder_menu/status_bookmark_folder_menu.vue'
|
||||
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
import {
|
||||
faBookmark as faBookmarkRegular,
|
||||
faStar as faStarRegular,
|
||||
faFaceSmileBeam,
|
||||
} from '@fortawesome/free-regular-svg-icons'
|
||||
import {
|
||||
faBookmark,
|
||||
|
|
@ -24,7 +24,6 @@ import {
|
|||
faReply,
|
||||
faRetweet,
|
||||
faShareAlt,
|
||||
faSmileBeam,
|
||||
faStar,
|
||||
faThumbtack,
|
||||
faTimes,
|
||||
|
|
@ -45,7 +44,7 @@ library.add(
|
|||
faRetweet,
|
||||
faStar,
|
||||
faStarRegular,
|
||||
faSmileBeam,
|
||||
faFaceSmileBeam,
|
||||
|
||||
faBookmark,
|
||||
faBookmarkRegular,
|
||||
|
|
@ -69,8 +68,12 @@ export default {
|
|||
'outerClose',
|
||||
],
|
||||
components: {
|
||||
StatusBookmarkFolderMenu,
|
||||
EmojiPicker,
|
||||
StatusBookmarkFolderMenu: defineAsyncComponent(
|
||||
() => import( 'src/components/status_bookmark_folder_menu/status_bookmark_folder_menu.vue'),
|
||||
),
|
||||
EmojiPicker: defineAsyncComponent(
|
||||
() => import( 'src/components/emoji_picker/emoji_picker.vue'),
|
||||
),
|
||||
Popover,
|
||||
},
|
||||
data: () => ({
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@
|
|||
:button="button"
|
||||
:status="status"
|
||||
v-bind="$attrs"
|
||||
@emojiPickerShown="e => $emit('emojiPickerShown', e)"
|
||||
@emoji-picker-shown="e => $emit('emojiPickerShown', e)"
|
||||
/>
|
||||
<teleport to="#modal">
|
||||
<MuteConfirm
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ export const BUTTONS = [
|
|||
// =========
|
||||
name: 'emoji',
|
||||
label: 'tool_tip.add_reaction',
|
||||
icon: ['far', 'smile-beam'],
|
||||
icon: ['far', 'face-smile-beam'],
|
||||
interactive: () => true,
|
||||
active: ({ emojiPickerShown }) => emojiPickerShown,
|
||||
toggleable: true,
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
:get-component="getComponent"
|
||||
:close="() => { /* no-op */ }"
|
||||
:do-action="doAction"
|
||||
@emojiPickerShown="onEmojiPickerShown"
|
||||
@emoji-picker-shown="onEmojiPickerShown"
|
||||
/>
|
||||
<button
|
||||
v-if="showPin && currentUser"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { find } from 'lodash'
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
|
||||
import Popover from 'src/components/popover/popover.vue'
|
||||
import Status from '../status/status.vue'
|
||||
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
import { faCircleNotch } from '@fortawesome/free-solid-svg-icons'
|
||||
|
|
@ -22,9 +22,7 @@ const StatusPopover = {
|
|||
},
|
||||
},
|
||||
components: {
|
||||
Status: defineAsyncComponent(
|
||||
() => import('src/components/status/status.vue'),
|
||||
),
|
||||
Status,
|
||||
Popover,
|
||||
},
|
||||
methods: {
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ const languageFileMap = import.meta.glob(['./*.json', '!./en.json'])
|
|||
|
||||
const loadLanguageFile = (code) => {
|
||||
const jsonName = langCodeToJsonName(code)
|
||||
if (jsonName === 'en') return Promise.resolve({ default: enMessages })
|
||||
return languageFileMap[`./${jsonName}.json`]()
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,8 @@ function isPushSupported() {
|
|||
function getOrCreateServiceWorker() {
|
||||
if (!isSWSupported()) return
|
||||
const swType = process.env.HAS_MODULE_SERVICE_WORKER ? 'module' : 'classic'
|
||||
return navigator.serviceWorker
|
||||
return navigator
|
||||
.serviceWorker
|
||||
.register('/sw-pleroma.js', { type: swType })
|
||||
.catch((err) =>
|
||||
console.error('Unable to get or create a service worker.', err),
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
/* eslint-env serviceworker */
|
||||
|
||||
import 'virtual:pleroma-fe/service_worker_env'
|
||||
|
||||
import { createI18n } from 'vue-i18n'
|
||||
|
||||
import { storage } from 'src/lib/storage.js'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue