forked from FoundKeyGang/FoundKey
Refactoring
This commit is contained in:
parent
1d6791e4c2
commit
71d6394bc8
9 changed files with 34 additions and 34 deletions
|
@ -13,7 +13,7 @@
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import { faExternalLinkSquareAlt } from '@fortawesome/free-solid-svg-icons';
|
import { faExternalLinkSquareAlt } from '@fortawesome/free-solid-svg-icons';
|
||||||
import { url as local } from '../config';
|
import { url as local } from '../config';
|
||||||
import XUrlPreview from './url-preview-popup.vue';
|
import MkUrlPreview from './url-preview-popup.vue';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
props: {
|
props: {
|
||||||
|
@ -44,7 +44,7 @@ export default Vue.extend({
|
||||||
if (!document.body.contains(this.$el)) return;
|
if (!document.body.contains(this.$el)) return;
|
||||||
if (this.preview) return;
|
if (this.preview) return;
|
||||||
|
|
||||||
this.preview = new XUrlPreview({
|
this.preview = new MkUrlPreview({
|
||||||
parent: this,
|
parent: this,
|
||||||
propsData: {
|
propsData: {
|
||||||
url: this.url,
|
url: this.url,
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
<x-media-list :media-list="appearNote.files"/>
|
<x-media-list :media-list="appearNote.files"/>
|
||||||
</div>
|
</div>
|
||||||
<x-poll v-if="appearNote.poll" :note="appearNote" ref="pollViewer"/>
|
<x-poll v-if="appearNote.poll" :note="appearNote" ref="pollViewer"/>
|
||||||
<x-url-preview v-for="url in urls" :url="url" :key="url" :compact="true" class="url-preview"/>
|
<mk-url-preview v-for="url in urls" :url="url" :key="url" :compact="true" class="url-preview"/>
|
||||||
<div class="renote" v-if="appearNote.renote"><x-note-preview :note="appearNote.renote"/></div>
|
<div class="renote" v-if="appearNote.renote"><x-note-preview :note="appearNote.renote"/></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -97,7 +97,7 @@ import XReactionsViewer from './reactions-viewer.vue';
|
||||||
import XMediaList from './media-list.vue';
|
import XMediaList from './media-list.vue';
|
||||||
import XCwButton from './cw-button.vue';
|
import XCwButton from './cw-button.vue';
|
||||||
import XPoll from './poll.vue';
|
import XPoll from './poll.vue';
|
||||||
import XUrlPreview from './url-preview.vue';
|
import MkUrlPreview from './url-preview.vue';
|
||||||
import MkReactionPicker from './reaction-picker.vue';
|
import MkReactionPicker from './reaction-picker.vue';
|
||||||
import pleaseLogin from '../scripts/please-login';
|
import pleaseLogin from '../scripts/please-login';
|
||||||
import { focusPrev, focusNext } from '../scripts/focus';
|
import { focusPrev, focusNext } from '../scripts/focus';
|
||||||
|
@ -115,7 +115,7 @@ export default Vue.extend({
|
||||||
XMediaList,
|
XMediaList,
|
||||||
XCwButton,
|
XCwButton,
|
||||||
XPoll,
|
XPoll,
|
||||||
XUrlPreview,
|
MkUrlPreview,
|
||||||
},
|
},
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="fgmtyycl _panel" :style="{ top: top + 'px', left: left + 'px' }">
|
<div class="fgmtyycl _panel" :style="{ top: top + 'px', left: left + 'px' }">
|
||||||
<x-url-preview :url="url"/>
|
<mk-url-preview :url="url"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import i18n from '../i18n';
|
import i18n from '../i18n';
|
||||||
import XUrlPreview from './url-preview.vue';
|
import MkUrlPreview from './url-preview.vue';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
i18n,
|
i18n,
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
XUrlPreview
|
MkUrlPreview
|
||||||
},
|
},
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
|
|
|
@ -23,7 +23,7 @@ import Vue from 'vue';
|
||||||
import { faExternalLinkSquareAlt } from '@fortawesome/free-solid-svg-icons';
|
import { faExternalLinkSquareAlt } from '@fortawesome/free-solid-svg-icons';
|
||||||
import { toUnicode as decodePunycode } from 'punycode';
|
import { toUnicode as decodePunycode } from 'punycode';
|
||||||
import { url as local } from '../config';
|
import { url as local } from '../config';
|
||||||
import XUrlPreview from './url-preview-popup.vue';
|
import MkUrlPreview from './url-preview-popup.vue';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
props: {
|
props: {
|
||||||
|
@ -70,7 +70,7 @@ export default Vue.extend({
|
||||||
if (!document.body.contains(this.$el)) return;
|
if (!document.body.contains(this.$el)) return;
|
||||||
if (this.preview) return;
|
if (this.preview) return;
|
||||||
|
|
||||||
this.preview = new XUrlPreview({
|
this.preview = new MkUrlPreview({
|
||||||
parent: this,
|
parent: this,
|
||||||
propsData: {
|
propsData: {
|
||||||
url: this.url,
|
url: this.url,
|
||||||
|
|
|
@ -42,10 +42,10 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import { faUser, faUsers, faComments, faPlus } from '@fortawesome/free-solid-svg-icons';
|
import { faUser, faUsers, faComments, faPlus } from '@fortawesome/free-solid-svg-icons';
|
||||||
import i18n from '../i18n';
|
import i18n from '../../i18n';
|
||||||
import getAcct from '../../misc/acct/render';
|
import getAcct from '../../../misc/acct/render';
|
||||||
import MkButton from '../components/ui/button.vue';
|
import MkButton from '../../components/ui/button.vue';
|
||||||
import MkUserSelect from '../components/user-select.vue';
|
import MkUserSelect from '../../components/user-select.vue';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
i18n,
|
i18n,
|
|
@ -27,14 +27,14 @@ import Vue from 'vue';
|
||||||
import { faPaperPlane, faPhotoVideo, faLaughSquint } from '@fortawesome/free-solid-svg-icons';
|
import { faPaperPlane, faPhotoVideo, faLaughSquint } from '@fortawesome/free-solid-svg-icons';
|
||||||
import insertTextAtCursor from 'insert-text-at-cursor';
|
import insertTextAtCursor from 'insert-text-at-cursor';
|
||||||
import * as autosize from 'autosize';
|
import * as autosize from 'autosize';
|
||||||
import i18n from '../i18n';
|
import i18n from '../../i18n';
|
||||||
import { formatTimeString } from '../../misc/format-time-string';
|
import { formatTimeString } from '../../../misc/format-time-string';
|
||||||
import { selectFile } from '../scripts/select-file';
|
import { selectFile } from '../../scripts/select-file';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
i18n,
|
i18n,
|
||||||
components: {
|
components: {
|
||||||
XUploader: () => import('../components/uploader.vue').then(m => m.default),
|
XUploader: () => import('../../components/uploader.vue').then(m => m.default),
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
user: {
|
user: {
|
||||||
|
@ -221,7 +221,7 @@ export default Vue.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
async insertEmoji(ev) {
|
async insertEmoji(ev) {
|
||||||
const vm = this.$root.new(await import('../components/emoji-picker.vue').then(m => m.default), {
|
const vm = this.$root.new(await import('../../components/emoji-picker.vue').then(m => m.default), {
|
||||||
source: ev.currentTarget || ev.target
|
source: ev.currentTarget || ev.target
|
||||||
}).$once('chosen', emoji => {
|
}).$once('chosen', emoji => {
|
||||||
insertTextAtCursor(this.$refs.text, emoji);
|
insertTextAtCursor(this.$refs.text, emoji);
|
|
@ -21,7 +21,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div></div>
|
<div></div>
|
||||||
<mk-url-preview v-for="url in urls" :url="url" :key="url"/>
|
<mk-url-preview v-for="url in urls" :url="url" :key="url" style="margin: 8px 0;"/>
|
||||||
<footer>
|
<footer>
|
||||||
<template v-if="isGroup">
|
<template v-if="isGroup">
|
||||||
<span class="read" v-if="message.reads.length > 0">{{ $t('messageRead') }} {{ message.reads.length }}</span>
|
<span class="read" v-if="message.reads.length > 0">{{ $t('messageRead') }} {{ message.reads.length }}</span>
|
||||||
|
@ -38,12 +38,16 @@
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import i18n from '../i18n';
|
import i18n from '../../i18n';
|
||||||
import { parse } from '../../mfm/parse';
|
import { parse } from '../../../mfm/parse';
|
||||||
import { unique } from '../../prelude/array';
|
import { unique } from '../../../prelude/array';
|
||||||
|
import MkUrlPreview from '../../components/url-preview.vue';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
i18n,
|
i18n,
|
||||||
|
components: {
|
||||||
|
MkUrlPreview
|
||||||
|
},
|
||||||
props: {
|
props: {
|
||||||
message: {
|
message: {
|
||||||
required: true
|
required: true
|
||||||
|
@ -223,10 +227,6 @@ export default Vue.extend({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
> .mk-url-preview {
|
|
||||||
margin: 8px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
> footer {
|
> footer {
|
||||||
display: block;
|
display: block;
|
||||||
margin: 2px 0 0 0;
|
margin: 2px 0 0 0;
|
|
@ -37,12 +37,12 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import { faArrowCircleDown, faFlag, faUsers, faInfoCircle } from '@fortawesome/free-solid-svg-icons';
|
import { faArrowCircleDown, faFlag, faUsers, faInfoCircle } from '@fortawesome/free-solid-svg-icons';
|
||||||
import i18n from '../i18n';
|
import i18n from '../../i18n';
|
||||||
import XList from '../components/date-separated-list.vue';
|
import XList from '../../components/date-separated-list.vue';
|
||||||
import XMessage from './messaging-room.message.vue';
|
import XMessage from './messaging-room.message.vue';
|
||||||
import XForm from './messaging-room.form.vue';
|
import XForm from './messaging-room.form.vue';
|
||||||
import { url } from '../config';
|
import { url } from '../../config';
|
||||||
import parseAcct from '../../misc/acct/parse';
|
import parseAcct from '../../../misc/acct/parse';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
i18n,
|
i18n,
|
|
@ -31,9 +31,9 @@ export const router = new VueRouter({
|
||||||
{ path: '/my/favorites', component: page('favorites') },
|
{ path: '/my/favorites', component: page('favorites') },
|
||||||
{ path: '/my/messages', component: page('messages') },
|
{ path: '/my/messages', component: page('messages') },
|
||||||
{ path: '/my/mentions', component: page('mentions') },
|
{ path: '/my/mentions', component: page('mentions') },
|
||||||
{ path: '/my/messaging', name: 'messaging', component: page('messaging') },
|
{ path: '/my/messaging', name: 'messaging', component: page('messaging/index') },
|
||||||
{ path: '/my/messaging/:user', component: page('messaging-room') },
|
{ path: '/my/messaging/:user', component: page('messaging/messaging-room') },
|
||||||
{ path: '/my/messaging/group/:group', component: page('messaging-room') },
|
{ path: '/my/messaging/group/:group', component: page('messaging/messaging-room') },
|
||||||
{ path: '/my/drive', name: 'drive', component: page('drive') },
|
{ path: '/my/drive', name: 'drive', component: page('drive') },
|
||||||
{ path: '/my/drive/folder/:folder', component: page('drive') },
|
{ path: '/my/drive/folder/:folder', component: page('drive') },
|
||||||
{ path: '/my/pages', name: 'pages', component: page('pages') },
|
{ path: '/my/pages', name: 'pages', component: page('pages') },
|
||||||
|
|
Loading…
Reference in a new issue