[WIP] Use FontAwesome Component for Vue (#3127)

* wip

* Rename

* Clean up

* Clean up

* wip

* wip

* Enable tree shaking

* ✌️

* ✌️

* wip

* wip

* Clean up
This commit is contained in:
syuilo 2018-11-06 01:40:11 +09:00 committed by GitHub
parent e640dbc501
commit 9f5dc2c0df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
190 changed files with 924 additions and 865 deletions

View file

@ -1,8 +1,8 @@
<template>
<div class="mkw-messaging">
<mk-widget-container :show-header="props.design == 0">
<template slot="header">%fa:comments%%i18n:@title%</template>
<button slot="func" @click="add">%fa:plus%</button>
<template slot="header"><fa icon="comments"/>%i18n:@title%</template>
<button slot="func" @click="add"><fa icon="plus"/></button>
<mk-messaging ref="index" compact @navigate="navigate"/>
</mk-widget-container>

View file

@ -1,8 +1,8 @@
<template>
<div class="mkw-notifications">
<mk-widget-container :show-header="!props.compact">
<template slot="header">%fa:R bell%%i18n:@title%</template>
<!-- <button slot="func" title="%i18n:@settings%" @click="settings">%fa:cog%</button> -->
<template slot="header"><fa :icon="['far', 'bell']"/>%i18n:@title%</template>
<!-- <button slot="func" title="%i18n:@settings%" @click="settings"><fa icon="cog"/></button> -->
<mk-notifications :class="$style.notifications"/>
</mk-widget-container>

View file

@ -1,17 +1,17 @@
<template>
<div class="mkw-polls">
<mk-widget-container :show-header="!props.compact">
<template slot="header">%fa:chart-pie%%i18n:@title%</template>
<button slot="func" title="%i18n:@refresh%" @click="fetch">%fa:sync%</button>
<template slot="header"><fa icon="chart-pie"/>%i18n:@title%</template>
<button slot="func" title="%i18n:@refresh%" @click="fetch"><fa icon="sync"/></button>
<div class="mkw-polls--body">
<div class="poll" v-if="!fetching && poll != null">
<p v-if="poll.text"><router-link :to="poll | notePage">{{ poll.text }}</router-link></p>
<p v-if="!poll.text"><router-link :to="poll | notePage">%fa:link%</router-link></p>
<p v-if="!poll.text"><router-link :to="poll | notePage"><fa icon="link"/></router-link></p>
<mk-poll :note="poll"/>
</div>
<p class="empty" v-if="!fetching && poll == null">%i18n:@nothing%</p>
<p class="fetching" v-if="fetching">%fa:spinner .pulse .fw%%i18n:common.loading%<mk-ellipsis/></p>
<p class="fetching" v-if="fetching"><fa icon="spinner .pulse" fixed-width/>%i18n:common.loading%<mk-ellipsis/></p>
</div>
</mk-widget-container>
</div>
@ -88,7 +88,7 @@ export default define({
text-align center
color #aaa
> [data-fa]
> [data-icon]
margin-right 4px
</style>

View file

@ -1,7 +1,7 @@
<template>
<div class="mkw-post-form">
<template v-if="props.design == 0">
<p class="title">%fa:pencil-alt%%i18n:@title%</p>
<p class="title"><fa icon="pencil-alt"/>%i18n:@title%</p>
</template>
<textarea :disabled="posting" v-model="text" @keydown="onKeydown" :placeholder="placeholder"></textarea>
<button @click="post" :disabled="posting">%i18n:@note%</button>
@ -86,7 +86,7 @@ export default define({
color #888
box-shadow 0 1px rgba(#000, 0.07)
> [data-fa]
> [data-icon]
margin-right 4px
> textarea

View file

@ -1,11 +1,11 @@
<template>
<div class="mkw-trends">
<mk-widget-container :show-header="!props.compact">
<template slot="header">%fa:fire%%i18n:@title%</template>
<button slot="func" title="%i18n:@refresh%" @click="fetch">%fa:sync%</button>
<template slot="header"><fa icon="fire"/>%i18n:@title%</template>
<button slot="func" title="%i18n:@refresh%" @click="fetch"><fa icon="sync"/></button>
<div class="mkw-trends--body">
<p class="fetching" v-if="fetching">%fa:spinner .pulse .fw%%i18n:common.loading%<mk-ellipsis/></p>
<p class="fetching" v-if="fetching"><fa icon="spinner .pulse" fixed-width/>%i18n:common.loading%<mk-ellipsis/></p>
<div class="note" v-else-if="note != null">
<p class="text"><router-link :to="note | notePage">{{ note.text }}</router-link></p>
<p class="author"><router-link :to="note.user | userPage">@{{ note.user | acct }}</router-link></p>
@ -95,7 +95,7 @@ export default define({
text-align center
color #aaa
> [data-fa]
> [data-icon]
margin-right 4px
</style>

View file

@ -1,11 +1,11 @@
<template>
<div class="mkw-users">
<mk-widget-container :show-header="!props.compact">
<template slot="header">%fa:users%%i18n:@title%</template>
<button slot="func" title="%i18n:@refresh%" @click="refresh">%fa:sync%</button>
<template slot="header"><fa icon="users"/>%i18n:@title%</template>
<button slot="func" title="%i18n:@refresh%" @click="refresh"><fa icon="sync"/></button>
<div class="mkw-users--body">
<p class="fetching" v-if="fetching">%fa:spinner .pulse .fw%%i18n:common.loading%<mk-ellipsis/></p>
<p class="fetching" v-if="fetching"><fa icon="spinner .pulse" fixed-width/>%i18n:common.loading%<mk-ellipsis/></p>
<template v-else-if="users.length != 0">
<div class="user" v-for="_user in users">
<mk-avatar class="avatar" :user="_user"/>
@ -129,7 +129,7 @@ export default define({
text-align center
color #aaa
> [data-fa]
> [data-icon]
margin-right 4px
</style>