refactor(client): コンポーネント名が紛らわしくなるのでpreview->simpleにリネーム

This commit is contained in:
syuilo 2021-10-16 01:28:34 +09:00
parent e78f16bcc4
commit 5fb4538315
5 changed files with 14 additions and 14 deletions

View File

@ -80,7 +80,7 @@
</div> </div>
<XPoll v-if="appearNote.poll" :note="appearNote" ref="pollViewer" class="poll"/> <XPoll v-if="appearNote.poll" :note="appearNote" ref="pollViewer" class="poll"/>
<MkUrlPreview v-for="url in urls" :url="url" :key="url" :compact="true" :detail="true" class="url-preview"/> <MkUrlPreview v-for="url in urls" :url="url" :key="url" :compact="true" :detail="true" class="url-preview"/>
<div class="renote" v-if="appearNote.renote"><XNotePreview :note="appearNote.renote"/></div> <div class="renote" v-if="appearNote.renote"><XNoteSimple :note="appearNote.renote"/></div>
</div> </div>
<MkA v-if="appearNote.channel && !inChannel" class="channel" :to="`/channels/${appearNote.channel.id}`"><i class="fas fa-satellite-dish"></i> {{ appearNote.channel.name }}</MkA> <MkA v-if="appearNote.channel && !inChannel" class="channel" :to="`/channels/${appearNote.channel.id}`"><i class="fas fa-satellite-dish"></i> {{ appearNote.channel.name }}</MkA>
</div> </div>
@ -132,7 +132,7 @@ import * as mfm from 'mfm-js';
import { sum } from '../../prelude/array'; import { sum } from '../../prelude/array';
import XSub from './note.sub.vue'; import XSub from './note.sub.vue';
import XNoteHeader from './note-header.vue'; import XNoteHeader from './note-header.vue';
import XNotePreview from './note-preview.vue'; import XNoteSimple from './note-simple.vue';
import XReactionsViewer from './reactions-viewer.vue'; 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';
@ -153,7 +153,7 @@ export default defineComponent({
components: { components: {
XSub, XSub,
XNoteHeader, XNoteHeader,
XNotePreview, XNoteSimple,
XReactionsViewer, XReactionsViewer,
XMediaList, XMediaList,
XCwButton, XCwButton,

View File

@ -64,7 +64,7 @@
</div> </div>
<XPoll v-if="appearNote.poll" :note="appearNote" ref="pollViewer" class="poll"/> <XPoll v-if="appearNote.poll" :note="appearNote" ref="pollViewer" class="poll"/>
<MkUrlPreview v-for="url in urls" :url="url" :key="url" :compact="true" :detail="false" class="url-preview"/> <MkUrlPreview v-for="url in urls" :url="url" :key="url" :compact="true" :detail="false" class="url-preview"/>
<div class="renote" v-if="appearNote.renote"><XNotePreview :note="appearNote.renote"/></div> <div class="renote" v-if="appearNote.renote"><XNoteSimple :note="appearNote.renote"/></div>
<button v-if="collapsed" class="fade _button" @click="collapsed = false"> <button v-if="collapsed" class="fade _button" @click="collapsed = false">
<span>{{ $ts.showMore }}</span> <span>{{ $ts.showMore }}</span>
</button> </button>
@ -114,7 +114,7 @@ import * as mfm from 'mfm-js';
import { sum } from '../../prelude/array'; import { sum } from '../../prelude/array';
import XSub from './note.sub.vue'; import XSub from './note.sub.vue';
import XNoteHeader from './note-header.vue'; import XNoteHeader from './note-header.vue';
import XNotePreview from './note-preview.vue'; import XNoteSimple from './note-simple.vue';
import XReactionsViewer from './reactions-viewer.vue'; 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';
@ -134,7 +134,7 @@ export default defineComponent({
components: { components: {
XSub, XSub,
XNoteHeader, XNoteHeader,
XNotePreview, XNoteSimple,
XReactionsViewer, XReactionsViewer,
XMediaList, XMediaList,
XCwButton, XCwButton,

View File

@ -22,8 +22,8 @@
</div> </div>
</header> </header>
<div class="form" :class="{ fixed }"> <div class="form" :class="{ fixed }">
<XNotePreview class="preview" v-if="reply" :note="reply"/> <XNoteSimple class="preview" v-if="reply" :note="reply"/>
<XNotePreview class="preview" v-if="renote" :note="renote"/> <XNoteSimple class="preview" v-if="renote" :note="renote"/>
<div class="with-quote" v-if="quoteId"><i class="fas fa-quote-left"></i> {{ $ts.quoteAttached }}<button @click="quoteId = null"><i class="fas fa-times"></i></button></div> <div class="with-quote" v-if="quoteId"><i class="fas fa-quote-left"></i> {{ $ts.quoteAttached }}<button @click="quoteId = null"><i class="fas fa-times"></i></button></div>
<div v-if="visibility === 'specified'" class="to-specified"> <div v-if="visibility === 'specified'" class="to-specified">
<span style="margin-right: 8px;">{{ $ts.recipient }}</span> <span style="margin-right: 8px;">{{ $ts.recipient }}</span>
@ -41,7 +41,7 @@
<input v-show="withHashtags" ref="hashtags" class="hashtags" v-model="hashtags" :placeholder="$ts.hashtags" list="hashtags"> <input v-show="withHashtags" ref="hashtags" class="hashtags" v-model="hashtags" :placeholder="$ts.hashtags" list="hashtags">
<XPostFormAttaches class="attaches" :files="files" @updated="updateFiles" @detach="detachFile" @changeSensitive="updateFileSensitive" @changeName="updateFileName"/> <XPostFormAttaches class="attaches" :files="files" @updated="updateFiles" @detach="detachFile" @changeSensitive="updateFileSensitive" @changeName="updateFileName"/>
<XPollEditor v-if="poll" :poll="poll" @destroyed="poll = null" @updated="onPollUpdate"/> <XPollEditor v-if="poll" :poll="poll" @destroyed="poll = null" @updated="onPollUpdate"/>
<XNotePreview class="preview" v-if="showPreview" :note="draftedNote"/> <XNoteSimple class="preview" v-if="showPreview" :note="draftedNote"/>
<footer> <footer>
<button class="_button" @click="chooseFileFrom" v-tooltip="$ts.attachFile"><i class="fas fa-photo-video"></i></button> <button class="_button" @click="chooseFileFrom" v-tooltip="$ts.attachFile"><i class="fas fa-photo-video"></i></button>
<button class="_button" @click="togglePoll" :class="{ active: poll }" v-tooltip="$ts.poll"><i class="fas fa-poll-h"></i></button> <button class="_button" @click="togglePoll" :class="{ active: poll }" v-tooltip="$ts.poll"><i class="fas fa-poll-h"></i></button>
@ -63,7 +63,7 @@ import { defineComponent, defineAsyncComponent } from 'vue';
import insertTextAtCursor from 'insert-text-at-cursor'; import insertTextAtCursor from 'insert-text-at-cursor';
import { length } from 'stringz'; import { length } from 'stringz';
import { toASCII } from 'punycode/'; import { toASCII } from 'punycode/';
import XNotePreview from './note-preview.vue'; import XNoteSimple from './note-simple.vue';
import * as mfm from 'mfm-js'; import * as mfm from 'mfm-js';
import { host, url } from '@client/config'; import { host, url } from '@client/config';
import { erase, unique } from '../../prelude/array'; import { erase, unique } from '../../prelude/array';
@ -82,7 +82,7 @@ import { defaultStore } from '@client/store';
export default defineComponent({ export default defineComponent({
components: { components: {
XNotePreview, XNoteSimple,
XPostFormAttaches: defineAsyncComponent(() => import('./post-form-attaches.vue')), XPostFormAttaches: defineAsyncComponent(() => import('./post-form-attaches.vue')),
XPollEditor: defineAsyncComponent(() => import('./poll-editor.vue')), XPollEditor: defineAsyncComponent(() => import('./poll-editor.vue')),
MkInfo, MkInfo,

View File

@ -56,7 +56,7 @@
</div> </div>
<XPoll v-if="appearNote.poll" :note="appearNote" ref="pollViewer" class="poll"/> <XPoll v-if="appearNote.poll" :note="appearNote" ref="pollViewer" class="poll"/>
<MkUrlPreview v-for="url in urls" :url="url" :key="url" :compact="true" :detail="false" class="url-preview"/> <MkUrlPreview v-for="url in urls" :url="url" :key="url" :compact="true" :detail="false" class="url-preview"/>
<div class="renote" v-if="appearNote.renote"><XNotePreview :note="appearNote.renote"/></div> <div class="renote" v-if="appearNote.renote"><XNoteSimple :note="appearNote.renote"/></div>
<button v-if="collapsed" class="fade _button" @click="collapsed = false"> <button v-if="collapsed" class="fade _button" @click="collapsed = false">
<span>{{ $ts.showMore }}</span> <span>{{ $ts.showMore }}</span>
</button> </button>
@ -106,7 +106,7 @@ import * as mfm from 'mfm-js';
import { sum } from '../../../prelude/array'; import { sum } from '../../../prelude/array';
import XSub from './note.sub.vue'; import XSub from './note.sub.vue';
import XNoteHeader from './note-header.vue'; import XNoteHeader from './note-header.vue';
import XNotePreview from './note-preview.vue'; import XNoteSimple from './note-preview.vue';
import XReactionsViewer from '@client/components/reactions-viewer.vue'; import XReactionsViewer from '@client/components/reactions-viewer.vue';
import XMediaList from '@client/components/media-list.vue'; import XMediaList from '@client/components/media-list.vue';
import XCwButton from '@client/components/cw-button.vue'; import XCwButton from '@client/components/cw-button.vue';
@ -126,7 +126,7 @@ export default defineComponent({
components: { components: {
XSub, XSub,
XNoteHeader, XNoteHeader,
XNotePreview, XNoteSimple,
XReactionsViewer, XReactionsViewer,
XMediaList, XMediaList,
XCwButton, XCwButton,