Refactoring

This commit is contained in:
syuilo 2018-11-16 05:53:17 +09:00
parent 84152aa663
commit 6e491c1466
No known key found for this signature in database
GPG key ID: BDC4C49D06AB9D69
3 changed files with 16 additions and 20 deletions

View file

@ -14,14 +14,12 @@
<mk-time :time="note.createdAt"/> <mk-time :time="note.createdAt"/>
</router-link> </router-link>
<span class="visibility" v-if="note.visibility != 'public'"> <span class="visibility" v-if="note.visibility != 'public'">
<template v-if="note.visibility == 'home'"><fa icon="home"/></template> <fa v-if="note.visibility == 'home'" icon="home"/>
<template v-if="note.visibility == 'followers'"><fa icon="unlock"/></template> <fa v-if="note.visibility == 'followers'" icon="unlock"/>
<template v-if="note.visibility == 'specified'"><fa icon="envelope"/></template> <fa v-if="note.visibility == 'specified'" icon="envelope"/>
<template v-if="note.visibility == 'private'"><fa icon="lock"/></template> <fa v-if="note.visibility == 'private'" icon="lock"/>
</span>
<span class="localOnly" v-if="note.localOnly == true">
<template><fa icon="heart"/></template>
</span> </span>
<span class="localOnly" v-if="note.localOnly == true"><fa icon="heart"/></span>
</div> </div>
</header> </header>
</template> </template>

View file

@ -21,14 +21,12 @@
<span>{{ this.$t('reposted-by').substr(this.$t('reposted-by').indexOf('}') + 1) }}</span> <span>{{ this.$t('reposted-by').substr(this.$t('reposted-by').indexOf('}') + 1) }}</span>
<mk-time :time="note.createdAt"/> <mk-time :time="note.createdAt"/>
<span class="visibility" v-if="note.visibility != 'public'"> <span class="visibility" v-if="note.visibility != 'public'">
<template v-if="note.visibility == 'home'"><fa icon="home"/></template> <fa v-if="note.visibility == 'home'" icon="home"/>
<template v-if="note.visibility == 'followers'"><fa icon="unlock"/></template> <fa v-if="note.visibility == 'followers'" icon="unlock"/>
<template v-if="note.visibility == 'specified'"><fa icon="envelope"/></template> <fa v-if="note.visibility == 'specified'" icon="envelope"/>
<template v-if="note.visibility == 'private'"><fa icon="lock"/></template> <fa v-if="note.visibility == 'private'" icon="lock"/>
</span>
<span class="localOnly" v-if="note.localOnly == true">
<template><fa icon="heart"/></template>
</span> </span>
<span class="localOnly" v-if="note.localOnly == true"><fa icon="heart"/></span>
</div> </div>
<article> <article>
<mk-avatar class="avatar" :user="appearNote.user"/> <mk-avatar class="avatar" :user="appearNote.user"/>

View file

@ -1,12 +1,12 @@
<template> <template>
<x-column :menu="menu" :name="name" :column="column" :is-stacked="isStacked"> <x-column :menu="menu" :name="name" :column="column" :is-stacked="isStacked">
<span slot="header"> <span slot="header">
<template v-if="column.type == 'home'"><fa icon="home"/></template> <fa v-if="column.type == 'home'" icon="home"/>
<template v-if="column.type == 'local'"><fa :icon="['far', 'comments']"/></template> <fa v-if="column.type == 'local'" :icon="['far', 'comments']"/>
<template v-if="column.type == 'hybrid'"><fa icon="share-alt"/></template> <fa v-if="column.type == 'hybrid'" icon="share-alt"/>
<template v-if="column.type == 'global'"><fa icon="globe"/></template> <fa v-if="column.type == 'global'" icon="globe"/>
<template v-if="column.type == 'list'"><fa icon="list"/></template> <fa v-if="column.type == 'list'" icon="list"/>
<template v-if="column.type == 'hashtag'"><fa icon="hashtag"/></template> <fa v-if="column.type == 'hashtag'" icon="hashtag"/>
<span>{{ name }}</span> <span>{{ name }}</span>
</span> </span>