From 7199e6f4e0b3a2c2bc198e689c3e0cd0d0f0354a Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 17 Oct 2020 20:12:00 +0900 Subject: 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 --- 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 +- src/client/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 +- src/client/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 | 257 +++++------ src/client/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 +- src/client/components/form-dialog.vue | 106 +++++ src/client/components/form-window.vue | 83 ---- 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 | 399 ++++++++--------- src/client/components/notes.vue | 34 +- .../components/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 +- src/client/components/page/page.number-input.vue | 7 +- src/client/components/page/page.post.vue | 19 +- src/client/components/page/page.radio-button.vue | 7 +- src/client/components/page/page.section.vue | 7 +- src/client/components/page/page.switch.vue | 7 +- src/client/components/page/page.text-input.vue | 7 +- src/client/components/page/page.text.vue | 11 +- src/client/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 ++- src/client/components/reactions-viewer.details.vue | 69 ++- .../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 +- src/client/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 | 262 +++++------ src/client/components/ui/menu.vue | 237 ++++++++++ src/client/components/ui/modal-menu.vue | 47 ++ src/client/components/ui/modal-window.vue | 145 +++++++ 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 +++++++++++++++++++++ src/client/components/upload.vue | 136 ++++++ src/client/components/uploader.vue | 192 -------- 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 | 209 ++++----- src/client/components/user-select-dialog.vue | 169 ++++++++ src/client/components/user-select.vue | 149 ------- src/client/components/users-dialog.vue | 64 ++- src/client/components/visibility-chooser.vue | 170 -------- src/client/components/visibility-picker.vue | 173 ++++++++ src/client/components/window.vue | 160 ------- 142 files changed, 4754 insertions(+), 4135 deletions(-) create mode 100644 src/client/components/form-dialog.vue delete mode 100644 src/client/components/form-window.vue 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 create mode 100644 src/client/components/ui/modal-window.vue create mode 100644 src/client/components/ui/modal.vue create mode 100644 src/client/components/ui/window.vue create mode 100644 src/client/components/upload.vue delete mode 100644 src/client/components/uploader.vue create mode 100644 src/client/components/user-info.vue delete mode 100644 src/client/components/user-menu.vue create mode 100644 src/client/components/user-select-dialog.vue delete mode 100644 src/client/components/user-select.vue delete mode 100644 src/client/components/visibility-chooser.vue create mode 100644 src/client/components/visibility-picker.vue delete mode 100644 src/client/components/window.vue (limited to 'src/client/components') diff --git a/src/client/components/acct.vue b/src/client/components/acct.vue index 250e8b2371..9d434de6cd 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 ec48d73214..627818a8e7 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 db618dc7bf..8bf64d79b5 100644 --- a/src/client/components/avatars.vue +++ b/src/client/components/avatars.vue @@ -1,15 +1,16 @@ diff --git a/src/client/components/form-window.vue b/src/client/components/form-window.vue deleted file mode 100644 index a656d64f84..0000000000 --- a/src/client/components/form-window.vue +++ /dev/null @@ -1,83 +0,0 @@ - - - - - diff --git a/src/client/components/formula-core.vue b/src/client/components/formula-core.vue index 45b27f9026..29c049297e 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 c78112b988..adde74cb3a 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 6e6a2a8965..7606708e9b 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 1dc8780389..791fd1b4e5 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 5c4f74b6b4..2eb9ae8cbe 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 039287818f..3be0ba38fe 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 14314889a3..4ea97d17ee 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 2ae8f696f6..f2ea7e929b 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 d63a3d48a5..e6d109e3a5 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 71ac963a58..ab890bbf0f 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 0e512e1967..3eedf86558 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 0000000000..77312fec7f --- /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 0a4b068b63..412c91ee0d 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 f67abf1543..071e3d539e 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 2415bf28ec..6f3d1bca66 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 a0d2cd153c..ba7770345a 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 763f4e9e9a..62128d7e66 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 e5abf37be3..58b0f7b6d0 100644 --- a/src/client/components/ui/button.vue +++ b/src/client/components/ui/button.vue @@ -1,7 +1,7 @@