From 4e2792244cc10fe6125e2b89ba66e8059fe39870 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 17 Oct 2020 20:12:00 +0900 Subject: [PATCH] Migrate to Vue3 (#6587) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update reaction.vue * fix bug * wip * wip * wjio * wip * Revert "wip" This reverts commit e427f2160adf4e8a4147006e25a89854edab0033. * wip * wip * wip * Update init.ts * Update drive-window.vue * wip * wip * Use PascalCase for components * Use PascalCase for components * update dep * wip * wip * wip * Update init.ts * wip * Update paging.ts * Update test.vue * watch deep * wip * lint * wip * wip * wip * wip * wiop * wip * Update webpack.config.ts * alllow null poll * wip * wip * wip * wiop * UI redesign & refactor (#6714) * wip * wip * wip * wip * wip * Update drive.vue * Update word-mute.vue * wip * wip * wip * clean up * wip * Update default.vue * wip * Update notes.vue * Update mfm.ts * Update index.home.vue * Update post-form.vue * Update post-form-attaches.vue * wip * Update post-form.vue * Update sidebar.vue * wip * wip * Update index.vue * wip * Update default.vue * Update index.vue * Update index.vue * wip * Update post-form-attaches.vue * Update note.vue * wip * clean up * Update notes.vue * wip * wip * Update ja-JP.yml * wip * wip * Update index.vue * wip * wip * wip * wip * wip * wip * wip * wip * Update default.vue * wip * Update _dark.json5 * wip * wip * wip * clean up * wip * wip * Update index.vue * Update test.vue * wip * wip * fix * wip * wip * wip * wip * clena yop * wip * wip * Update store.ts * Update messaging-room.vue * Update default.widgets.vue * fix * wip * wip * Update modal.vue * wip * Update os.ts * Update os.ts * Update deck.vue * Update init.ts * wip * Update ja-JP.yml * v-sizeは単にwindowのresizeを監視するだけで良いかもしれない * Update modal.vue * wip * Update tooltip.ts * wip * wip * wip * wip * wip * Update image-viewer.vue * wip * wip * Update style.scss * Update style.scss * Update visitor.vue * wip * Update init.ts * Update init.ts * wip * wip * Update visitor.vue * Update visitor.vue * Update visitor.vue * Update visitor.vue * wip * wip * Update modal.vue * Update header.vue * Update menu.vue * Update about.vue * Update about-misskey.vue * wip * wip * Update visitor.vue * Update tooltip.ts * wip * Update drive.vue * wip * Update style.scss * Update header.vue * wip * wip * Update users.user.vue * Update announcements.vue * wip * wip * wip * Update emojis.vue * wip * Update emojis.vue * Update style.scss * Update users.vue * wip * Update style.scss * wip * Update welcome.entrance.vue * Update radio.vue * Update size.ts * Update emoji-edit-dialog.vue * wip * Update emojis.vue * wip * Update emojis.vue * Update emojis.vue * Update emojis.vue * wip * wip * wip * wip * Update file-dialog.vue * wip * wip * Update token-generate-window.vue * Update notification-setting-window.vue * wip * wip * Update _error_.vue * Update ja-JP.yml * wip * wip * Update store.ts * Update emojis.vue * Update emojis.vue * Update emojis.vue * Update announcements.vue * Update store.ts * wip * Update page-editor.vue * wip * wip * Update modal.vue * wip * Update select-file.ts * Update timeline.vue * Update emojis.vue * Update os.ts * wip * Update user-select.vue * Update mfm.ts * Update get-file-info.ts * Update drive.vue * Update init.ts * Update mfm.ts * wip * wip * Update window.vue * Update note.vue * wip * wip * Update user-info.vue * wip * wip * wip * wip * wip * Update header.vue * Update header.vue * wip * Update explore.vue * wip * wip * wip * Update webpack.config.ts * wip * wip * wip * wip * wip * wip * Update autocomplete.ts * wip * wip * wip * Update toast.vue * wip * Update post-form-dialog.vue * wip * wip * wip * wip * wip * Update users.vue * wip * Update explore.vue * wip * wip * wip * Update package.json * wip * Update icon-dialog.vue * wip * wip * Update user-preview.ts * wip * wip * wip * wip * wip * Update instance.vue * Update user-name.vue * Update federation.vue * Update instance.vue * wip * wip * Update tag.vue * wip * wip * wip * wip * wip * Update instance.vue * wip * Update os.ts * Update os.ts * wip * wip * wip * Update router.ts * wip * Update init.ts * Update note.vue * Update messages.vue * wip * wip * wip * wip * wip * google * wip * wip * wip * wip * Update theme-editor.vue * wip * wip * Update room.vue * Update channel-editor.vue * wip * Update window.vue * Update window.vue * wip * Update window.vue * Update window.vue * wip * Update menu.vue * wip * wip * wip * wip * Update messaging-room.vue * wip * Update post-form.vue * Update default.widgets.vue * Update window.vue * wip --- gulpfile.ts | 11 - locales/ja-JP.yml | 24 +- package.json | 106 +- src/client/.eslintrc | 12 + src/client/@types/global.d.ts | 8 + src/client/{v.d.ts => @types/vue.d.ts} | 0 src/client/@types/vuex-shim.d.ts | 11 + src/client/app.vue | 788 -------- src/client/components/acct.vue | 6 +- src/client/components/analog-clock.vue | 7 +- src/client/components/autocomplete.vue | 62 +- src/client/components/avatar.vue | 33 +- src/client/components/avatars.vue | 9 +- src/client/components/captcha.vue | 11 +- .../components/channel-follow-button.vue | 15 +- src/client/components/channel-preview.vue | 29 +- src/client/components/code-core.vue | 9 +- src/client/components/code.vue | 9 +- src/client/components/cw-button.vue | 14 +- src/client/components/date-separated-list.vue | 16 +- src/client/components/deck/antenna-column.vue | 19 +- src/client/components/deck/column-core.vue | 20 +- src/client/components/deck/column.vue | 68 +- src/client/components/deck/direct-column.vue | 15 +- src/client/components/deck/list-column.vue | 19 +- .../components/deck/mentions-column.vue | 15 +- .../components/deck/notifications-column.vue | 28 +- src/client/components/deck/tl-column.vue | 25 +- src/client/components/deck/widgets-column.vue | 38 +- src/client/components/dialog.vue | 263 +-- .../components/drive-file-thumbnail.vue | 24 +- src/client/components/drive-window.vue | 43 +- src/client/components/drive.file.vue | 114 +- src/client/components/drive.folder.vue | 45 +- src/client/components/drive.nav-folder.vue | 23 +- src/client/components/drive.vue | 146 +- src/client/components/emoji-picker.vue | 43 +- src/client/components/emoji.vue | 7 +- src/client/components/error.vue | 10 +- src/client/components/file-type-icon.vue | 7 +- src/client/components/follow-button.vue | 33 +- .../{form-window.vue => form-dialog.vue} | 61 +- src/client/components/formula-core.vue | 7 +- src/client/components/formula.vue | 9 +- src/client/components/google.vue | 9 +- src/client/components/header-clock.vue | 9 +- src/client/components/icon-dialog.vue | 73 + src/client/components/image-viewer.vue | 80 +- src/client/components/img-with-blurhash.vue | 26 +- src/client/components/index.ts | 26 +- src/client/components/instance-stats.vue | 80 +- src/client/components/link.vue | 45 +- src/client/components/loading.vue | 5 +- src/client/components/media-banner.vue | 9 +- src/client/components/media-image.vue | 33 +- src/client/components/media-list.vue | 15 +- src/client/components/media-video.vue | 11 +- src/client/components/mention.vue | 7 +- src/client/components/menu.vue | 191 -- src/client/components/mfm.ts | 189 +- src/client/components/mini-chart.vue | 7 +- .../components/misskey-flavored-markdown.vue | 12 +- src/client/components/modal.vue | 90 - src/client/components/note-header.vue | 36 +- src/client/components/note-preview.vue | 13 +- src/client/components/note.sub.vue | 21 +- src/client/components/note.vue | 397 ++-- src/client/components/notes.vue | 34 +- .../notification-setting-window.vue | 61 +- src/client/components/notification.vue | 99 +- src/client/components/notifications.vue | 51 +- src/client/components/page-preview.vue | 11 +- src/client/components/page-window.vue | 86 + src/client/components/page/page.block.vue | 4 +- src/client/components/page/page.button.vue | 13 +- src/client/components/page/page.canvas.vue | 5 +- src/client/components/page/page.counter.vue | 7 +- src/client/components/page/page.if.vue | 7 +- src/client/components/page/page.image.vue | 5 +- .../components/page/page.number-input.vue | 7 +- src/client/components/page/page.post.vue | 19 +- .../components/page/page.radio-button.vue | 7 +- src/client/components/page/page.section.vue | 7 +- src/client/components/page/page.switch.vue | 7 +- .../components/page/page.text-input.vue | 7 +- src/client/components/page/page.text.vue | 11 +- .../components/page/page.textarea-input.vue | 7 +- src/client/components/page/page.textarea.vue | 7 +- src/client/components/page/page.vue | 19 +- src/client/components/particle.vue | 72 +- src/client/components/poll-editor.vue | 127 +- src/client/components/poll.vue | 15 +- src/client/components/popup.vue | 148 -- src/client/components/post-form-attaches.vue | 71 +- src/client/components/post-form-dialog.vue | 157 +- src/client/components/post-form.vue | 384 ++-- src/client/components/reaction-icon.vue | 7 +- src/client/components/reaction-picker.vue | 49 +- .../components/reactions-viewer.details.vue | 71 +- .../components/reactions-viewer.reaction.vue | 43 +- src/client/components/reactions-viewer.vue | 16 +- src/client/components/remote-caution.vue | 7 +- src/client/components/sidebar.vue | 272 ++- src/client/components/signin-dialog.vue | 28 +- src/client/components/signin.vue | 79 +- src/client/components/signup-dialog.vue | 28 +- src/client/components/signup.vue | 113 +- src/client/components/stream-indicator.vue | 13 +- src/client/components/sub-note-content.vue | 13 +- src/client/components/tab.vue | 14 +- src/client/components/time.vue | 12 +- src/client/components/timeline.vue | 47 +- src/client/components/toast.vue | 19 +- .../components/token-generate-window.vue | 64 +- src/client/components/ui/button.vue | 44 +- src/client/components/ui/container.vue | 30 +- src/client/components/ui/context-menu.vue | 63 + src/client/components/ui/folder.vue | 32 +- src/client/components/ui/hr.vue | 5 +- src/client/components/ui/info.vue | 9 +- src/client/components/ui/input.vue | 284 ++- src/client/components/ui/menu.vue | 237 +++ src/client/components/ui/modal-menu.vue | 47 + .../{window.vue => ui/modal-window.vue} | 71 +- src/client/components/ui/modal.vue | 232 +++ src/client/components/ui/pagination.vue | 12 +- src/client/components/ui/radio.vue | 17 +- src/client/components/ui/range.vue | 7 +- src/client/components/ui/select.vue | 10 +- src/client/components/ui/switch.vue | 11 +- src/client/components/ui/textarea.vue | 7 +- src/client/components/ui/tooltip.vue | 74 +- src/client/components/ui/window.vue | 481 +++++ .../components/{uploader.vue => upload.vue} | 90 +- src/client/components/url-preview-popup.vue | 18 +- src/client/components/url-preview.vue | 15 +- src/client/components/url.vue | 39 +- src/client/components/user-info.vue | 144 ++ src/client/components/user-list.vue | 104 +- src/client/components/user-menu.vue | 258 --- src/client/components/user-name.vue | 6 +- src/client/components/user-preview.vue | 211 +- ...user-select.vue => user-select-dialog.vue} | 66 +- src/client/components/users-dialog.vue | 64 +- ...lity-chooser.vue => visibility-picker.vue} | 53 +- src/client/config.ts | 5 - src/client/directives/appear.ts | 22 + src/client/{scripts => directives}/hotkey.ts | 77 +- src/client/directives/index.ts | 20 +- src/client/directives/particle.ts | 16 +- src/client/directives/size.ts | 48 +- src/client/directives/tooltip.ts | 49 +- src/client/directives/user-preview.ts | 157 +- src/client/filters/bytes.ts | 6 +- src/client/filters/index.ts | 4 - src/client/filters/note.ts | 6 +- src/client/filters/number.ts | 4 +- src/client/filters/user.ts | 17 +- src/client/i18n.ts | 36 + src/client/init.ts | 649 +++--- src/client/mios.ts | 236 --- src/client/os.ts | 364 ++++ src/client/pages/_error_.vue | 55 + src/client/pages/_loading_.vue | 10 + src/client/pages/about-misskey.vue | 126 +- src/client/pages/about.vue | 34 +- src/client/pages/announcements.vue | 42 +- src/client/pages/apps.vue | 34 +- src/client/pages/auth.form.vue | 21 +- src/client/pages/auth.vue | 29 +- src/client/pages/channel-editor.vue | 59 +- src/client/pages/channel.vue | 46 +- src/client/pages/channels.vue | 57 +- src/client/pages/doc.vue | 58 +- src/client/pages/docs.vue | 22 +- src/client/pages/drive.vue | 83 +- src/client/pages/explore.vue | 155 +- src/client/pages/favorites.vue | 28 +- src/client/pages/featured.vue | 26 +- src/client/pages/follow-requests.vue | 47 +- src/client/pages/follow.vue | 28 +- src/client/pages/index.vue | 31 - src/client/pages/index.welcome.entrance.vue | 95 - src/client/pages/index.welcome.vue | 33 - src/client/pages/instance/announcements.vue | 97 +- .../pages/instance/emoji-edit-dialog.vue | 116 ++ src/client/pages/instance/emojis.vue | 317 ++- src/client/pages/instance/federation.vue | 143 +- src/client/pages/instance/file-dialog.vue | 136 ++ src/client/pages/instance/files.vue | 186 +- src/client/pages/instance/index.metrics.vue | 576 ++++++ .../pages/instance/index.queue-chart.vue | 198 -- src/client/pages/instance/index.vue | 774 +------ src/client/pages/instance/instance.vue | 164 +- src/client/pages/instance/logs.vue | 95 + src/client/pages/instance/queue.chart.vue | 24 +- src/client/pages/instance/queue.vue | 51 +- src/client/pages/instance/relays.vue | 50 +- src/client/pages/instance/settings.vue | 284 ++- src/client/pages/instance/user-dialog.vue | 233 +++ src/client/pages/instance/users.user.vue | 206 -- src/client/pages/instance/users.vue | 169 +- src/client/pages/mentions.vue | 26 +- src/client/pages/messages.vue | 24 +- src/client/pages/messaging/index.vue | 148 +- .../pages/messaging/messaging-room.form.vue | 53 +- .../messaging/messaging-room.message.vue | 43 +- src/client/pages/messaging/messaging-room.vue | 150 +- src/client/pages/miauth.vue | 33 +- .../pages/my-antennas/index.antenna.vue | 82 +- src/client/pages/my-antennas/index.vue | 41 +- src/client/pages/my-groups/group.vue | 99 +- src/client/pages/my-groups/index.vue | 114 +- src/client/pages/my-lists/index.vue | 45 +- src/client/pages/my-lists/list.vue | 83 +- src/client/pages/my-settings/api.vue | 58 - src/client/pages/my-settings/index.vue | 137 -- src/client/pages/my-settings/mute-block.vue | 73 - src/client/pages/my-settings/privacy.vue | 73 - src/client/pages/my-settings/reaction.vue | 84 - src/client/pages/my-settings/security.vue | 84 - src/client/pages/my-settings/word-mute.vue | 81 - src/client/pages/not-found.vue | 21 +- src/client/pages/note.vue | 81 +- src/client/pages/notifications.vue | 28 +- .../page-editor/els/page-editor.el.button.vue | 53 +- .../page-editor/els/page-editor.el.canvas.vue | 25 +- .../els/page-editor.el.counter.vue | 21 +- .../page-editor/els/page-editor.el.if.vue | 27 +- .../page-editor/els/page-editor.el.image.vue | 26 +- .../els/page-editor.el.number-input.vue | 21 +- .../page-editor/els/page-editor.el.post.vue | 29 +- .../els/page-editor.el.radio-button.vue | 36 +- .../els/page-editor.el.section.vue | 25 +- .../page-editor/els/page-editor.el.switch.vue | 23 +- .../els/page-editor.el.text-input.vue | 21 +- .../page-editor/els/page-editor.el.text.vue | 13 +- .../els/page-editor.el.textarea-input.vue | 23 +- .../els/page-editor.el.textarea.vue | 13 +- .../pages/page-editor/page-editor.blocks.vue | 19 +- .../page-editor/page-editor.container.vue | 15 +- .../page-editor/page-editor.script-block.vue | 61 +- src/client/pages/page-editor/page-editor.vue | 219 +- src/client/pages/page.vue | 98 +- src/client/pages/pages.vue | 41 +- src/client/pages/preferences/index.vue | 360 ---- src/client/pages/preferences/sidebar.vue | 95 - src/client/pages/room/preview.vue | 5 +- src/client/pages/room/room.vue | 80 +- src/client/pages/scratchpad.vue | 46 +- src/client/pages/search.vue | 29 +- src/client/pages/settings/api.vue | 59 + .../pages/{my-settings => settings}/drive.vue | 25 +- src/client/pages/settings/general.vue | 219 ++ .../import-export.vue | 39 +- src/client/pages/settings/index.vue | 154 ++ .../{my-settings => settings}/integration.vue | 41 +- src/client/pages/settings/mute-block.vue | 93 + src/client/pages/settings/notifications.vue | 93 + src/client/pages/settings/other.vue | 51 + .../{preferences => settings}/plugins.vue | 82 +- src/client/pages/settings/privacy.vue | 86 + .../{my-settings => settings}/profile.vue | 150 +- src/client/pages/settings/reaction.vue | 95 + .../2fa.vue => settings/security.2fa.vue} | 111 +- src/client/pages/settings/security.vue | 102 + src/client/pages/settings/sidebar.vue | 110 + src/client/pages/settings/sounds.vue | 152 ++ .../pages/{preferences => settings}/theme.vue | 184 +- src/client/pages/settings/word-mute.vue | 101 + src/client/pages/share.vue | 61 +- src/client/pages/tag.vue | 27 +- src/client/pages/test.vue | 232 +++ src/client/pages/theme-editor.vue | 195 +- ...ome.tutorial.vue => timeline.tutorial.vue} | 38 +- .../pages/{index.home.vue => timeline.vue} | 163 +- src/client/pages/user/follow-list.vue | 112 +- src/client/pages/user/index.activity.vue | 7 +- src/client/pages/user/index.photos.vue | 19 +- src/client/pages/user/index.timeline.vue | 9 +- src/client/pages/user/index.vue | 603 +++--- src/client/pages/welcome.entrance.vue | 89 + ...ex.welcome.setup.vue => welcome.setup.vue} | 30 +- src/client/pages/welcome.vue | 37 + src/client/plugin.ts | 124 ++ src/client/root.vue | 75 + src/client/router.ts | 52 +- src/client/scripts/aiscript/api.ts | 60 +- .../{directives => scripts}/autocomplete.ts | 77 +- .../extract-avg-color-from-blurhash.ts | 9 + src/client/scripts/focus.ts | 12 +- src/client/scripts/gen-search-query.ts | 4 +- src/client/scripts/get-static-image-url.ts | 2 +- src/client/scripts/get-user-menu.ts | 194 ++ src/client/scripts/hpml/evaluator.ts | 9 +- src/client/scripts/loading.ts | 16 +- src/client/scripts/paging.ts | 74 +- src/client/scripts/please-login.ts | 14 +- src/client/scripts/popout.ts | 22 + src/client/scripts/search.ts | 38 +- src/client/scripts/select-drive-file.ts | 13 - src/client/scripts/select-drive-folder.ts | 13 - src/client/scripts/select-file.ts | 99 +- src/client/scripts/set-i18n-contexts.ts | 6 +- src/client/scripts/stream.ts | 14 +- src/client/scripts/theme-editor.ts | 17 +- src/client/scripts/theme.ts | 2 +- src/client/sidebar.ts | 139 ++ src/client/store.ts | 267 +-- src/client/style.scss | 305 +-- src/client/sw.ts | 2 +- src/client/themes/_dark.json5 | 5 +- src/client/themes/_light.json5 | 7 +- src/client/themes/black.json5 | 3 +- src/client/themes/white.json5 | 3 +- src/client/tsconfig.json | 71 +- src/client/ui/_common_/header.vue | 149 ++ src/client/{ => ui}/deck.vue | 133 +- src/client/ui/default.vue | 415 ++++ src/client/ui/default.widgets.vue | 158 ++ src/client/ui/visitor.vue | 199 ++ src/client/ui/zen.vue | 154 ++ src/client/widgets/activity.calendar.vue | 5 +- src/client/widgets/activity.chart.vue | 5 +- src/client/widgets/activity.vue | 27 +- src/client/widgets/calendar.vue | 15 +- src/client/widgets/clock.vue | 19 +- src/client/widgets/define.ts | 37 +- src/client/widgets/digital-clock.vue | 13 +- src/client/widgets/federation.vue | 29 +- src/client/widgets/index.ts | 29 +- src/client/widgets/memo.vue | 19 +- src/client/widgets/notifications.vue | 37 +- src/client/widgets/photos.vue | 27 +- src/client/widgets/post-form.vue | 23 + src/client/widgets/rss.vue | 25 +- src/client/widgets/timeline.vue | 75 +- src/client/widgets/trends.vue | 27 +- src/client/widgets/welcome.vue | 87 - src/mfm/to-html.ts | 2 +- src/misc/get-file-info.ts | 11 +- src/models/repositories/drive-file.ts | 2 + src/server/api/endpoints/admin/drive/files.ts | 64 +- .../api/endpoints/admin/drive/show-file.ts | 16 +- .../api/endpoints/admin/emoji/list-remote.ts | 12 +- src/server/api/endpoints/admin/emoji/list.ts | 30 +- .../api/endpoints/admin/get-table-stats.ts | 1 + src/server/api/endpoints/admin/server-info.ts | 1 + src/server/api/endpoints/drive/files.ts | 2 +- src/server/api/endpoints/drive/files/show.ts | 1 + .../endpoints/drive/files/upload-from-url.ts | 20 +- src/server/api/endpoints/notes/create.ts | 2 +- src/server/api/endpoints/users/search.ts | 35 +- src/server/web/views/base.pug | 44 +- src/services/drive/upload-from-url.ts | 5 +- webpack.config.ts | 26 +- yarn.lock | 1775 ++++++++++------- 357 files changed, 15053 insertions(+), 12496 deletions(-) create mode 100644 src/client/.eslintrc create mode 100644 src/client/@types/global.d.ts rename src/client/{v.d.ts => @types/vue.d.ts} (100%) create mode 100644 src/client/@types/vuex-shim.d.ts delete mode 100644 src/client/app.vue rename src/client/components/{form-window.vue => form-dialog.vue} (51%) create mode 100644 src/client/components/icon-dialog.vue delete mode 100644 src/client/components/menu.vue delete mode 100644 src/client/components/modal.vue create mode 100644 src/client/components/page-window.vue delete mode 100644 src/client/components/popup.vue create mode 100644 src/client/components/ui/context-menu.vue create mode 100644 src/client/components/ui/menu.vue create mode 100644 src/client/components/ui/modal-menu.vue rename src/client/components/{window.vue => ui/modal-window.vue} (55%) create mode 100644 src/client/components/ui/modal.vue create mode 100644 src/client/components/ui/window.vue rename src/client/components/{uploader.vue => upload.vue} (57%) create mode 100644 src/client/components/user-info.vue delete mode 100644 src/client/components/user-menu.vue rename src/client/components/{user-select.vue => user-select-dialog.vue} (56%) rename src/client/components/{visibility-chooser.vue => visibility-picker.vue} (80%) create mode 100644 src/client/directives/appear.ts rename src/client/{scripts => directives}/hotkey.ts (50%) delete mode 100644 src/client/filters/index.ts create mode 100644 src/client/i18n.ts delete mode 100644 src/client/mios.ts create mode 100644 src/client/os.ts create mode 100644 src/client/pages/_error_.vue create mode 100644 src/client/pages/_loading_.vue delete mode 100644 src/client/pages/index.vue delete mode 100644 src/client/pages/index.welcome.entrance.vue delete mode 100644 src/client/pages/index.welcome.vue create mode 100644 src/client/pages/instance/emoji-edit-dialog.vue create mode 100644 src/client/pages/instance/file-dialog.vue create mode 100644 src/client/pages/instance/index.metrics.vue delete mode 100644 src/client/pages/instance/index.queue-chart.vue create mode 100644 src/client/pages/instance/logs.vue create mode 100644 src/client/pages/instance/user-dialog.vue delete mode 100644 src/client/pages/instance/users.user.vue delete mode 100644 src/client/pages/my-settings/api.vue delete mode 100644 src/client/pages/my-settings/index.vue delete mode 100644 src/client/pages/my-settings/mute-block.vue delete mode 100644 src/client/pages/my-settings/privacy.vue delete mode 100644 src/client/pages/my-settings/reaction.vue delete mode 100644 src/client/pages/my-settings/security.vue delete mode 100644 src/client/pages/my-settings/word-mute.vue delete mode 100644 src/client/pages/preferences/index.vue delete mode 100644 src/client/pages/preferences/sidebar.vue create mode 100644 src/client/pages/settings/api.vue rename src/client/pages/{my-settings => settings}/drive.vue (59%) create mode 100644 src/client/pages/settings/general.vue rename src/client/pages/{my-settings => settings}/import-export.vue (74%) create mode 100644 src/client/pages/settings/index.vue rename src/client/pages/{my-settings => settings}/integration.vue (73%) create mode 100644 src/client/pages/settings/mute-block.vue create mode 100644 src/client/pages/settings/notifications.vue create mode 100644 src/client/pages/settings/other.vue rename src/client/pages/{preferences => settings}/plugins.vue (66%) create mode 100644 src/client/pages/settings/privacy.vue rename src/client/pages/{my-settings => settings}/profile.vue (54%) create mode 100644 src/client/pages/settings/reaction.vue rename src/client/pages/{my-settings/2fa.vue => settings/security.2fa.vue} (60%) create mode 100644 src/client/pages/settings/security.vue create mode 100644 src/client/pages/settings/sidebar.vue create mode 100644 src/client/pages/settings/sounds.vue rename src/client/pages/{preferences => settings}/theme.vue (67%) create mode 100644 src/client/pages/settings/word-mute.vue create mode 100644 src/client/pages/test.vue rename src/client/pages/{index.home.tutorial.vue => timeline.tutorial.vue} (70%) rename src/client/pages/{index.home.vue => timeline.vue} (50%) create mode 100644 src/client/pages/welcome.entrance.vue rename src/client/pages/{index.welcome.setup.vue => welcome.setup.vue} (65%) create mode 100644 src/client/pages/welcome.vue create mode 100644 src/client/plugin.ts create mode 100644 src/client/root.vue rename src/client/{directives => scripts}/autocomplete.ts (83%) create mode 100644 src/client/scripts/extract-avg-color-from-blurhash.ts create mode 100644 src/client/scripts/get-user-menu.ts create mode 100644 src/client/scripts/popout.ts delete mode 100644 src/client/scripts/select-drive-file.ts delete mode 100644 src/client/scripts/select-drive-folder.ts create mode 100644 src/client/sidebar.ts create mode 100644 src/client/ui/_common_/header.vue rename src/client/{ => ui}/deck.vue (63%) create mode 100644 src/client/ui/default.vue create mode 100644 src/client/ui/default.widgets.vue create mode 100644 src/client/ui/visitor.vue create mode 100644 src/client/ui/zen.vue create mode 100644 src/client/widgets/post-form.vue delete mode 100644 src/client/widgets/welcome.vue diff --git a/gulpfile.ts b/gulpfile.ts index 880adb51d..a64947441 100644 --- a/gulpfile.ts +++ b/gulpfile.ts @@ -7,9 +7,6 @@ import * as gulp from 'gulp'; import * as ts from 'gulp-typescript'; import * as rimraf from 'rimraf'; import * as rename from 'gulp-rename'; -const cleanCSS = require('gulp-clean-css'); -const sass = require('gulp-dart-sass'); -const fiber = require('fibers'); const locales: { [x: string]: any } = require('./locales'); const meta = require('./package.json'); @@ -61,13 +58,6 @@ gulp.task('cleanall', gulp.parallel('clean', cb => rimraf('./node_modules', cb) )); -gulp.task('build:client:styles', () => - gulp.src('./src/client/style.scss') - .pipe(sass({ fiber })) - .pipe(cleanCSS()) - .pipe(gulp.dest('./built/client/assets/')) -); - gulp.task('copy:client', () => gulp.src([ './assets/**/*', @@ -87,7 +77,6 @@ gulp.task('copy:docs', () => ); gulp.task('build:client', gulp.parallel( - 'build:client:styles', 'copy:client', 'copy:docs' )); diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 0812bd8e5..002b9f56e 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -16,6 +16,9 @@ noNotes: "ノートはありません" noNotifications: "通知はありません" instance: "インスタンス" settings: "設定" +basicSettings: "基本設定" +otherSettings: "その他の設定" +openInWindow: "ウィンドウで開く" profile: "プロフィール" timeline: "タイムライン" noAccountDescription: "自己紹介はありません" @@ -40,6 +43,7 @@ deleteAndEditConfirm: "このノートを削除してもう一度編集します addToList: "リストに追加" sendMessage: "メッセージを送信" copyUsername: "ユーザー名をコピー" +searchUser: "ユーザーを検索" reply: "返信" loadMore: "もっと見る" youGotNewFollower: "フォローされました" @@ -66,8 +70,11 @@ followers: "フォロワー" followsYou: "フォローされています" createList: "リスト作成" manageLists: "リストの管理" -error: "問題が発生しました" +error: "エラー" +somethingHappened: "問題が発生しました" retry: "再試行" +pageLoadError: "ページの読み込みに失敗しました。" +pageLoadErrorDescription: "これは通常、ネットワークまたはブラウザキャッシュが原因です。キャッシュをクリアするか、しばらく待ってから再度試してください。" enterListName: "リスト名を入力" privacy: "プライバシー" makeFollowManuallyApprove: "フォローを承認制にする" @@ -106,6 +113,8 @@ unsuspendConfirm: "解凍しますか?" selectList: "リストを選択" selectAntenna: "アンテナを選択" selectWidget: "ウィジェットを選択" +editWidgets: "ウィジェットを編集" +editWidgetsExit: "編集を終了" customEmojis: "カスタム絵文字" emoji: "絵文字" emojiName: "絵文字名" @@ -177,7 +186,6 @@ processing: "処理中" preview: "プレビュー" default: "デフォルト" noCustomEmojis: "絵文字はありません" -customEmojisOfRemote: "リモートの絵文字" noJobs: "ジョブはありません" federating: "連合中" blocked: "ブロック中" @@ -445,7 +453,7 @@ total: "合計" weekOverWeekChanges: "前週比" dayOverDayChanges: "前日比" appearance: "アピアランス" -clinetSettings: "クライアント設定" +clientSettings: "クライアント設定" accountSettings: "アカウント設定" promotion: "プロモーション" promote: "プロモート" @@ -476,6 +484,8 @@ newNoteRecived: "新しいノートがあります" sounds: "サウンド" listen: "聴く" none: "なし" +showInPage: "ページで表示" +popout: "ポップアウト" volume: "音量" details: "詳細" chooseEmoji: "絵文字を選択" @@ -518,7 +528,6 @@ enableInfiniteScroll: "自動でもっと見る" visibility: "公開範囲" poll: "アンケート" useCw: "内容を隠す" -fixedWidgetsPosition: "ウィジェットの位置を固定する" enablePlayer: "プレイヤーを開く" disablePlayer: "プレイヤーを閉じる" expandTweet: "ツイートを展開する" @@ -570,6 +579,12 @@ notificationSetting: "通知設定" notificationSettingDesc: "表示する通知の種別を選択してください。" useGlobalSetting: "グローバル設定を使う" useGlobalSettingDesc: "オンにすると、アカウントの通知設定が使用されます。オフにすると、個別に設定できるようになります。" +other: "その他" +regenerateLoginToken: "ログイントークンを再生成" +regenerateLoginTokenDescription: "ログインに使用される内部トークンを再生成します。通常この操作を行う必要はありません。再生成すると、全てのデバイスでログアウトされます。" +setMultipleBySeparatingWithSpace: "スペースで区切って複数設定できます。" +fileIdOrUrl: "ファイルIDまたはURL" +chatOpenBehavior: "チャットを開くときの動作" _serverDisconnectedBehavior: reload: "自動でリロード" @@ -802,6 +817,7 @@ _widgets: photos: "フォト" digitalClock: "デジタル時計" federation: "連合" + postForm: "投稿フォーム" _cw: hide: "隠す" diff --git a/package.json b/package.json index 14665cf91..a90f7c8df 100644 --- a/package.json +++ b/package.json @@ -37,11 +37,11 @@ "dependencies": { "@babel/plugin-transform-runtime": "7.11.0", "@elastic/elasticsearch": "7.8.0", - "@fortawesome/fontawesome-svg-core": "1.2.30", - "@fortawesome/free-brands-svg-icons": "5.14.0", - "@fortawesome/free-regular-svg-icons": "5.14.0", - "@fortawesome/free-solid-svg-icons": "5.14.0", - "@fortawesome/vue-fontawesome": "0.1.10", + "@fortawesome/fontawesome-svg-core": "1.2.32", + "@fortawesome/free-brands-svg-icons": "5.15.1", + "@fortawesome/free-regular-svg-icons": "5.15.1", + "@fortawesome/free-solid-svg-icons": "5.15.1", + "@fortawesome/vue-fontawesome": "3.0.0-2", "@koa/cors": "3.1.0", "@koa/multer": "3.0.0", "@koa/router": "9.0.1", @@ -97,19 +97,20 @@ "@types/speakeasy": "2.0.5", "@types/tinycolor2": "1.4.2", "@types/tmp": "0.2.0", - "@types/uuid": "8.0.0", + "@types/uuid": "8.3.0", "@types/web-push": "3.3.0", - "@types/webpack": "4.41.18", + "@types/webpack": "4.41.22", "@types/webpack-stream": "3.2.11", "@types/websocket": "1.0.1", - "@types/ws": "7.2.6", - "@typescript-eslint/parser": "3.6.0", + "@types/ws": "7.2.7", + "@typescript-eslint/parser": "4.4.0", + "@vue/compiler-sfc": "3.0.0", "abort-controller": "3.0.0", - "apexcharts": "3.20.0", + "apexcharts": "3.22.0", "autobind-decorator": "2.4.0", "autosize": "4.0.2", "autwh": "0.1.0", - "aws-sdk": "2.724.0", + "aws-sdk": "2.770.0", "bcryptjs": "2.4.3", "blurhash": "1.1.3", "bull": "3.18.0", @@ -122,35 +123,33 @@ "content-disposition": "0.5.3", "core-js": "3.6.5", "crc-32": "1.2.0", - "css-loader": "4.2.1", + "css-loader": "4.3.0", "cssnano": "4.1.10", "dateformat": "3.0.3", "deep-entries": "3.1.0", "diskusage": "1.1.3", "double-ended-queue": "2.1.0-0", "escape-regexp": "0.0.1", - "eslint": "7.4.0", - "eslint-plugin-vue": "6.2.2", - "eventemitter3": "4.0.4", + "eslint": "7.10.0", + "eslint-plugin-vue": "7.0.1", + "eventemitter3": "4.0.7", "feed": "4.2.1", "fibers": "5.0.0", - "file-type": "14.7.1", + "file-type": "15.0.1", "fluent-ffmpeg": "2.1.2", "glob": "7.1.6", "gulp": "4.0.2", - "gulp-clean-css": "4.3.0", - "gulp-dart-sass": "1.0.2", "gulp-rename": "2.0.0", "gulp-replace": "1.0.0", "gulp-sourcemaps": "2.6.5", - "gulp-terser": "1.3.2", + "gulp-terser": "1.4.0", "gulp-tslint": "8.1.4", "gulp-typescript": "6.0.0-alpha.1", "hard-source-webpack-plugin": "0.13.1", "hcaptcha": "0.0.2", "html-minifier": "4.0.0", "http-proxy-agent": "4.0.1", - "http-signature": "1.3.4", + "http-signature": "1.3.5", "https-proxy-agent": "5.0.0", "idb-keyval": "3.2.0", "insert-text-at-cursor": "0.3.0", @@ -171,27 +170,27 @@ "koa-mount": "4.0.0", "koa-send": "5.0.1", "koa-slow": "2.1.0", - "koa-views": "6.3.0", + "koa-views": "6.3.1", "langmap": "0.0.16", "lookup-dns-cache": "2.1.0", - "markdown-it": "11.0.0", - "markdown-it-anchor": "5.3.0", - "mocha": "8.1.1", + "markdown-it": "11.0.1", + "markdown-it-anchor": "6.0.0", + "mocha": "8.1.3", "moji": "0.5.1", "ms": "2.1.2", "multer": "1.4.2", "nested-property": "4.0.0", - "node-fetch": "2.6.0", - "nodemailer": "6.4.11", - "nprogress": "0.2.0", + "node-fetch": "2.6.1", + "nodemailer": "6.4.13", "object-assign-deep": "0.4.0", "os-utils": "0.0.14", + "p-cancelable": "2.0.0", "parse5": "6.0.1", - "parsimmon": "1.15.0", - "pg": "8.3.2", - "portal-vue": "2.1.7", + "parsimmon": "1.16.0", + "pg": "8.4.1", "portscanner": "2.2.0", - "postcss-loader": "3.0.0", + "postcss": "8.1.1", + "postcss-loader": "4.0.3", "prismjs": "1.21.0", "probe-image-size": "5.0.0", "promise-limit": "2.7.0", @@ -202,7 +201,7 @@ "qrcode": "1.4.4", "random-seed": "0.3.0", "ratelimiter": "3.4.1", - "re2": "1.15.4", + "re2": "1.15.5", "recaptcha-promise": "0.1.3", "reconnecting-websocket": "4.4.0", "redis": "3.0.2", @@ -215,54 +214,49 @@ "rimraf": "3.0.2", "rndstr": "1.0.0", "s-age": "1.1.2", - "sass": "1.26.10", - "sass-loader": "9.0.3", + "sass": "1.27.0", + "sass-loader": "10.0.2", "seedrandom": "3.0.5", - "sharp": "0.25.4", + "sharp": "0.26.1", "speakeasy": "2.0.0", "stringz": "2.1.0", - "style-loader": "1.2.1", + "style-loader": "1.3.0", "summaly": "2.4.0", "syslog-pro": "1.0.0", - "systeminformation": "4.26.12", + "systeminformation": "4.27.8", "syuilo-password-strength": "0.0.1", "textarea-caret": "3.1.0", "three": "0.117.1", - "tinycolor2": "1.4.1", + "tinycolor2": "1.4.2", "tmp": "0.2.1", - "ts-loader": "8.0.2", + "ts-loader": "8.0.4", "ts-node": "9.0.0", "tslint": "6.1.3", "tslint-sonarts": "1.9.0", - "typeorm": "0.2.25", - "typescript": "4.0.2", + "typeorm": "0.2.28", + "typescript": "4.0.3", "ulid": "2.3.0", "url-loader": "4.1.0", - "uuid": "8.3.0", - "v-animate-css": "0.0.3", + "uuid": "8.3.1", "v-debounce": "0.1.2", - "vue": "2.6.12", + "vue": "3.0.1", "vue-color": "2.7.1", - "vue-content-loading": "1.6.0", - "vue-cropperjs": "4.1.0", - "vue-i18n": "8.21.0", - "vue-json-pretty": "1.6.7", - "vue-loader": "15.9.3", - "vue-marquee-text-component": "1.1.1", - "vue-meta": "2.4.0", + "vue-draggable-next": "1.0.8", + "vue-i18n": "9.0.0-beta.4", + "vue-json-pretty": "1.7.0", + "vue-loader": "16.0.0-beta.7", "vue-prism-component": "1.2.0", "vue-prism-editor": "1.2.2", - "vue-router": "3.4.3", + "vue-router": "4.0.0-beta.13", "vue-style-loader": "4.1.2", "vue-svg-inline-loader-corejs3": "1.5.0", "vue-template-compiler": "2.6.12", - "vuedraggable": "2.24.1", - "vuex": "3.5.1", + "vuex": "4.0.0-beta.4", "vuex-persistedstate": "3.1.0", "web-push": "3.4.4", - "webpack": "5.0.0-beta.28", + "webpack": "5.1.3", "webpack-cli": "3.3.12", - "websocket": "1.0.31", + "websocket": "1.0.32", "ws": "7.3.1", "xev": "2.0.1" }, diff --git a/src/client/.eslintrc b/src/client/.eslintrc new file mode 100644 index 000000000..8829472b4 --- /dev/null +++ b/src/client/.eslintrc @@ -0,0 +1,12 @@ +{ + "globals": { + "_DEV_": false, + "_LANGS_": false, + "_VERSION_": false, + "_ENV_": false, + "_PERF_PREFIX_": false, + "_DATA_TRANSFER_DRIVE_FILE_": false, + "_DATA_TRANSFER_DRIVE_FOLDER_": false, + "_DATA_TRANSFER_DECK_COLUMN_": false + } +} diff --git a/src/client/@types/global.d.ts b/src/client/@types/global.d.ts new file mode 100644 index 000000000..670774fdf --- /dev/null +++ b/src/client/@types/global.d.ts @@ -0,0 +1,8 @@ +declare const _LANGS_: string[]; +declare const _VERSION_: string; +declare const _ENV_: string; +declare const _DEV_: boolean; +declare const _PERF_PREFIX_: string; +declare const _DATA_TRANSFER_DRIVE_FILE_: string; +declare const _DATA_TRANSFER_DRIVE_FOLDER_: string; +declare const _DATA_TRANSFER_DECK_COLUMN_: string; diff --git a/src/client/v.d.ts b/src/client/@types/vue.d.ts similarity index 100% rename from src/client/v.d.ts rename to src/client/@types/vue.d.ts diff --git a/src/client/@types/vuex-shim.d.ts b/src/client/@types/vuex-shim.d.ts new file mode 100644 index 000000000..b15424d79 --- /dev/null +++ b/src/client/@types/vuex-shim.d.ts @@ -0,0 +1,11 @@ +import { ComponentCustomProperties } from 'vue'; +import { Store } from 'vuex'; + +declare module '@vue/runtime-core' { + interface State { + } + + interface ComponentCustomProperties { + $store: Store + } +} diff --git a/src/client/app.vue b/src/client/app.vue deleted file mode 100644 index 3453baa28..000000000 --- a/src/client/app.vue +++ /dev/null @@ -1,788 +0,0 @@ - - - - - diff --git a/src/client/components/acct.vue b/src/client/components/acct.vue index 250e8b237..9d434de6c 100644 --- a/src/client/components/acct.vue +++ b/src/client/components/acct.vue @@ -6,11 +6,11 @@ @@ -393,9 +408,6 @@ export default Vue.extend({ max-width: 100%; margin-top: calc(1em + 8px); overflow: hidden; - background: var(--panel); - border: solid 1px rgba(#000, 0.1); - border-radius: 4px; transition: top 0.1s ease, left 0.1s ease; > ol { diff --git a/src/client/components/avatar.vue b/src/client/components/avatar.vue index ec48d7321..627818a8e 100644 --- a/src/client/components/avatar.vue +++ b/src/client/components/avatar.vue @@ -1,17 +1,19 @@ @@ -95,7 +92,7 @@ export default Vue.extend({ transform: rotate(-37.5deg) skew(-30deg); } } - + .inner { position: absolute; bottom: 0; diff --git a/src/client/components/avatars.vue b/src/client/components/avatars.vue index db618dc7b..8bf64d79b 100644 --- a/src/client/components/avatars.vue +++ b/src/client/components/avatars.vue @@ -1,15 +1,16 @@ diff --git a/src/client/components/formula-core.vue b/src/client/components/formula-core.vue index 45b27f902..29c049297 100644 --- a/src/client/components/formula-core.vue +++ b/src/client/components/formula-core.vue @@ -5,9 +5,10 @@ + + diff --git a/src/client/components/image-viewer.vue b/src/client/components/image-viewer.vue index c78112b98..adde74cb3 100644 --- a/src/client/components/image-viewer.vue +++ b/src/client/components/image-viewer.vue @@ -1,16 +1,26 @@ diff --git a/src/client/components/img-with-blurhash.vue b/src/client/components/img-with-blurhash.vue index 6e6a2a896..7606708e9 100644 --- a/src/client/components/img-with-blurhash.vue +++ b/src/client/components/img-with-blurhash.vue @@ -1,15 +1,15 @@ diff --git a/src/client/components/mfm.ts b/src/client/components/mfm.ts index 1dc878038..791fd1b4e 100644 --- a/src/client/components/mfm.ts +++ b/src/client/components/mfm.ts @@ -1,16 +1,18 @@ -import Vue, { VNode } from 'vue'; +import { VNode, defineComponent, h } from 'vue'; import { MfmForest } from '../../mfm/prelude'; import { parse, parsePlain } from '../../mfm/parse'; import MkUrl from './url.vue'; import MkLink from './link.vue'; import MkMention from './mention.vue'; +import MkEmoji from './emoji.vue'; import { concat } from '../../prelude/array'; import MkFormula from './formula.vue'; import MkCode from './code.vue'; import MkGoogle from './google.vue'; -import { host } from '../config'; +import { host } from '@/config'; +import { RouterLink } from 'vue-router'; -export default Vue.component('misskey-flavored-markdown', { +export default defineComponent({ props: { text: { type: String, @@ -41,7 +43,7 @@ export default Vue.component('misskey-flavored-markdown', { }, }, - render(createElement) { + render() { if (this.text == null || this.text == '') return; const ast = (this.plain ? parsePlain : parse)(this.text); @@ -53,67 +55,49 @@ export default Vue.component('misskey-flavored-markdown', { if (!this.plain) { const x = text.split('\n') - .map(t => t == '' ? [createElement('br')] : [this._v(t), createElement('br')]); // NOTE: this._vはHACK SEE: https://github.com/syuilo/misskey/pull/6399#issuecomment-632820283 + .map(t => t == '' ? [h('br')] : [t, h('br')]); x[x.length - 1].pop(); return x; } else { - return [this._v(text.replace(/\n/g, ' '))]; + return [text.replace(/\n/g, ' ')]; } } case 'bold': { - return [createElement('b', genEl(token.children))]; + return [h('b', genEl(token.children))]; } case 'strike': { - return [createElement('del', genEl(token.children))]; + return [h('del', genEl(token.children))]; } case 'italic': { - return (createElement as any)('i', { - attrs: { - style: 'font-style: oblique;' - }, + return h('i', { + style: 'font-style: oblique;' }, genEl(token.children)); } case 'big': { - return (createElement as any)('strong', { - attrs: { - style: `display: inline-block; font-size: 150%;` - }, - directives: [this.$store.state.device.animatedMfm ? { - name: 'animate-css', - value: { classes: 'tada', iteration: 'infinite' } - }: {}] + return h('strong', { + style: `display: inline-block; font-size: 150%;` + (this.$store.state.device.animatedMfm ? 'animation: anime-tada 1s linear infinite both;' : ''), }, genEl(token.children)); } case 'small': { - return [createElement('small', { - attrs: { - style: 'opacity: 0.7;' - }, + return [h('small', { + style: 'opacity: 0.7;' }, genEl(token.children))]; } case 'center': { - return [createElement('div', { - attrs: { - style: 'text-align:center;' - } + return [h('div', { + style: 'text-align:center;' }, genEl(token.children))]; } case 'motion': { - return (createElement as any)('span', { - attrs: { - style: 'display: inline-block;' - }, - directives: [this.$store.state.device.animatedMfm ? { - name: 'animate-css', - value: { classes: 'rubberBand', iteration: 'infinite' } - } : {}] + return h('span', { + style: 'display: inline-block;' + (this.$store.state.device.animatedMfm ? 'animation: anime-rubberBand 1s linear infinite both;' : ''), }, genEl(token.children)); } @@ -123,163 +107,126 @@ export default Vue.component('misskey-flavored-markdown', { token.node.props.attr == 'alternate' ? 'alternate' : 'normal'; const style = this.$store.state.device.animatedMfm - ? `animation: spin 1.5s linear infinite; animation-direction: ${direction};` : ''; - return (createElement as any)('span', { - attrs: { - style: 'display: inline-block;' + style - }, + ? `animation: anime-spin 1.5s linear infinite; animation-direction: ${direction};` : ''; + return h('span', { + style: 'display: inline-block;' + style }, genEl(token.children)); } case 'jump': { - return (createElement as any)('span', { - attrs: { - style: this.$store.state.device.animatedMfm ? 'display: inline-block; animation: jump 0.75s linear infinite;' : 'display: inline-block;' - }, + return h('span', { + style: this.$store.state.device.animatedMfm ? 'display: inline-block; animation: anime-jump 0.75s linear infinite;' : 'display: inline-block;' }, genEl(token.children)); } case 'flip': { - return (createElement as any)('span', { - attrs: { - style: 'display: inline-block; transform: scaleX(-1);' - }, + return h('span', { + style: 'display: inline-block; transform: scaleX(-1);' }, genEl(token.children)); } case 'url': { - return [createElement(MkUrl, { + return [h(MkUrl, { key: Math.random(), - props: { - url: token.node.props.url, - rel: 'nofollow noopener', - }, + url: token.node.props.url, + rel: 'nofollow noopener', })]; } case 'link': { - return [createElement(MkLink, { + return [h(MkLink, { key: Math.random(), - props: { - url: token.node.props.url, - rel: 'nofollow noopener', - }, + url: token.node.props.url, + rel: 'nofollow noopener', }, genEl(token.children))]; } case 'mention': { - return [createElement(MkMention, { + return [h(MkMention, { key: Math.random(), - props: { - host: (token.node.props.host == null && this.author && this.author.host != null ? this.author.host : token.node.props.host) || host, - username: token.node.props.username - } + host: (token.node.props.host == null && this.author && this.author.host != null ? this.author.host : token.node.props.host) || host, + username: token.node.props.username })]; } case 'hashtag': { - return [createElement('router-link', { + return [h(RouterLink, { key: Math.random(), - attrs: { - to: this.isNote ? `/tags/${encodeURIComponent(token.node.props.hashtag)}` : `/explore/tags/${encodeURIComponent(token.node.props.hashtag)}`, - style: 'color:var(--hashtag);' - } + to: this.isNote ? `/tags/${encodeURIComponent(token.node.props.hashtag)}` : `/explore/tags/${encodeURIComponent(token.node.props.hashtag)}`, + style: 'color:var(--hashtag);' }, `#${token.node.props.hashtag}`)]; } case 'blockCode': { - return [createElement(MkCode, { + return [h(MkCode, { key: Math.random(), - props: { - code: token.node.props.code, - lang: token.node.props.lang, - } + code: token.node.props.code, + lang: token.node.props.lang, })]; } case 'inlineCode': { - return [createElement(MkCode, { + return [h(MkCode, { key: Math.random(), - props: { - code: token.node.props.code, - lang: token.node.props.lang, - inline: true - } + code: token.node.props.code, + lang: token.node.props.lang, + inline: true })]; } case 'quote': { - if (this.shouldBreak) { - return [createElement('div', { - attrs: { - class: 'quote' - } + if (!this.nowrap) { + return [h('div', { + class: 'quote' }, genEl(token.children))]; } else { - return [createElement('span', { - attrs: { - class: 'quote' - } + return [h('span', { + class: 'quote' }, genEl(token.children))]; } } case 'title': { - return [createElement('div', { - attrs: { - class: 'title' - } + return [h('div', { + class: 'title' }, genEl(token.children))]; } case 'emoji': { - return [createElement('mk-emoji', { + return [h(MkEmoji, { key: Math.random(), - attrs: { - emoji: token.node.props.emoji, - name: token.node.props.name - }, - props: { - customEmojis: this.customEmojis, - normal: this.plain - } + emoji: token.node.props.emoji, + name: token.node.props.name, + customEmojis: this.customEmojis, + normal: this.plain })]; } case 'mathInline': { - //const MkFormula = () => import('./formula.vue').then(m => m.default); - return [createElement(MkFormula, { + return [h(MkFormula, { key: Math.random(), - props: { - formula: token.node.props.formula, - block: false - } + formula: token.node.props.formula, + block: false })]; } case 'mathBlock': { - //const MkFormula = () => import('./formula.vue').then(m => m.default); - return [createElement(MkFormula, { + return [h(MkFormula, { key: Math.random(), - props: { - formula: token.node.props.formula, - block: true - } + formula: token.node.props.formula, + block: true })]; } case 'search': { - //const MkGoogle = () => import('./google.vue').then(m => m.default); - return [createElement(MkGoogle, { + return [h(MkGoogle, { key: Math.random(), - props: { - q: token.node.props.query - } + q: token.node.props.query })]; } default: { - console.log('unrecognized ast type:', token.node.type); + console.error('unrecognized ast type:', token.node.type); return []; } @@ -287,6 +234,6 @@ export default Vue.component('misskey-flavored-markdown', { })); // Parse ast to DOM - return createElement('span', genEl(ast)); + return h('span', genEl(ast)); } }); diff --git a/src/client/components/mini-chart.vue b/src/client/components/mini-chart.vue index 5c4f74b6b..2eb9ae8cb 100644 --- a/src/client/components/mini-chart.vue +++ b/src/client/components/mini-chart.vue @@ -30,10 +30,11 @@ - - diff --git a/src/client/components/note-header.vue b/src/client/components/note-header.vue index 039287818..3be0ba38f 100644 --- a/src/client/components/note-header.vue +++ b/src/client/components/note-header.vue @@ -1,33 +1,36 @@ diff --git a/src/client/components/note-preview.vue b/src/client/components/note-preview.vue index 14314889a..4ea97d17e 100644 --- a/src/client/components/note-preview.vue +++ b/src/client/components/note-preview.vue @@ -1,15 +1,15 @@ @@ -795,10 +786,28 @@ export default Vue.extend({ position: relative; transition: box-shadow 0.1s ease; overflow: hidden; + contain: content; &:focus { outline: none; - box-shadow: 0 0 0 3px var(--focus); + + &:after { + content: ""; + pointer-events: none; + display: block; + position: absolute; + z-index: 10; + top: 0; + left: 0; + right: 0; + bottom: 0; + margin: auto; + width: calc(100% - 8px); + height: calc(100% - 8px); + border: dashed 1px var(--focus); + border-radius: var(--radius); + box-sizing: border-box; + } } &:hover > .article > .main > .footer > .button { diff --git a/src/client/components/notes.vue b/src/client/components/notes.vue index 2ae8f696f..f2ea7e929 100644 --- a/src/client/components/notes.vue +++ b/src/client/components/notes.vue @@ -1,42 +1,41 @@ - diff --git a/src/client/components/notification-setting-window.vue b/src/client/components/notification-setting-window.vue index d63a3d48a..e6d109e3a 100644 --- a/src/client/components/notification-setting-window.vue +++ b/src/client/components/notification-setting-window.vue @@ -1,34 +1,40 @@ - - diff --git a/src/client/components/notification.vue b/src/client/components/notification.vue index 71ac963a5..ab890bbf0 100644 --- a/src/client/components/notification.vue +++ b/src/client/components/notification.vue @@ -1,71 +1,75 @@ @@ -153,6 +155,7 @@ export default Vue.extend({ font-size: 0.9em; overflow-wrap: break-word; display: flex; + contain: content; &.max-width_600px { padding: 16px; diff --git a/src/client/components/notifications.vue b/src/client/components/notifications.vue index 0e512e196..3eedf8655 100644 --- a/src/client/components/notifications.vue +++ b/src/client/components/notifications.vue @@ -1,30 +1,31 @@ diff --git a/src/client/components/page-window.vue b/src/client/components/page-window.vue new file mode 100644 index 000000000..77312fec7 --- /dev/null +++ b/src/client/components/page-window.vue @@ -0,0 +1,86 @@ + + + diff --git a/src/client/components/page/page.block.vue b/src/client/components/page/page.block.vue index 0a4b068b6..412c91ee0 100644 --- a/src/client/components/page/page.block.vue +++ b/src/client/components/page/page.block.vue @@ -3,7 +3,7 @@ diff --git a/src/client/components/poll.vue b/src/client/components/poll.vue index f67abf154..071e3d539 100644 --- a/src/client/components/poll.vue +++ b/src/client/components/poll.vue @@ -1,11 +1,11 @@ - - diff --git a/src/client/components/post-form-attaches.vue b/src/client/components/post-form-attaches.vue index 2415bf28e..6f3d1bca6 100644 --- a/src/client/components/post-form-attaches.vue +++ b/src/client/components/post-form-attaches.vue @@ -1,28 +1,28 @@ - - diff --git a/src/client/components/post-form.vue b/src/client/components/post-form.vue index a0d2cd153..ba7770345 100644 --- a/src/client/components/post-form.vue +++ b/src/client/components/post-form.vue @@ -1,84 +1,84 @@ + + diff --git a/src/client/components/reactions-viewer.reaction.vue b/src/client/components/reactions-viewer.reaction.vue index 763f4e9e9..62128d7e6 100644 --- a/src/client/components/reactions-viewer.reaction.vue +++ b/src/client/components/reactions-viewer.reaction.vue @@ -4,24 +4,25 @@ :class="{ reacted: note.myReaction == reaction, canToggle }" @click="toggleReaction(reaction)" v-if="count > 0" - @touchstart="onMouseover" + @touchstart.passive="onMouseover" @mouseover="onMouseover" @mouseleave="onMouseleave" @touchend="onMouseleave" ref="reaction" v-particle="canToggle" > - + {{ count }} - - diff --git a/src/client/components/ui/button.vue b/src/client/components/ui/button.vue index e5abf37be..58b0f7b6d 100644 --- a/src/client/components/ui/button.vue +++ b/src/client/components/ui/button.vue @@ -1,7 +1,7 @@