Use # instead of v-slot:

This commit is contained in:
syuilo
2019-02-18 11:13:56 +09:00
parent da4ba51a74
commit 388565fb10
95 changed files with 219 additions and 219 deletions

View File

@@ -1,7 +1,7 @@
<template>
<div class="mk-ui">
<x-header>
<template v-slot:func><slot name="func"></slot></template>
<template #func><slot name="func"></slot></template>
<slot name="header"></slot>
</x-header>
<x-nav :is-open="isDrawerOpening"/>

View File

@@ -1,7 +1,7 @@
<template>
<div class="mk-user-timeline">
<mk-notes ref="timeline" :make-promise="makePromise" @inited="() => $emit('loaded')">
<template v-slot:empty>
<template #empty>
<fa :icon="['far', 'comments']"/>
{{ withMedia ? this.$t('no-notes-with-media') : this.$t('no-notes') }}
</template>

View File

@@ -1,11 +1,11 @@
<template>
<mk-ui>
<template v-slot:header>
<template #header>
<template v-if="folder"><span style="margin-right:4px;"><fa :icon="['far', 'folder-open']"/></span>{{ folder.name }}</template>
<template v-if="file"><mk-file-type-icon data-icon :type="file.type" style="margin-right:4px;"/>{{ file.name }}</template>
<template v-if="!folder && !file"><span style="margin-right:4px;"><fa icon="cloud"/></span>{{ $t('@.drive') }}</template>
</template>
<template v-slot:func><button @click="fn"><fa icon="ellipsis-h"/></button></template>
<template #func><button @click="fn"><fa icon="ellipsis-h"/></button></template>
<x-drive
ref="browser"
:init-folder="initFolder"

View File

@@ -1,6 +1,6 @@
<template>
<mk-ui>
<template v-slot:header><span style="margin-right:4px;"><fa :icon="faHashtag"/></span>{{ $t('@.explore') }}</template>
<template #header><span style="margin-right:4px;"><fa :icon="faHashtag"/></span>{{ $t('@.explore') }}</template>
<main>
<x-explore v-bind="$attrs"/>

View File

@@ -1,6 +1,6 @@
<template>
<mk-ui>
<template v-slot:header><span style="margin-right:4px;"><fa icon="star"/></span>{{ $t('title') }}</template>
<template #header><span style="margin-right:4px;"><fa icon="star"/></span>{{ $t('title') }}</template>
<main>
<sequential-entrance animation="entranceFromTop" delay="25">

View File

@@ -1,6 +1,6 @@
<template>
<mk-ui>
<template v-slot:header><span style="margin-right:4px;"><fa :icon="faNewspaper"/></span>{{ $t('@.featured-notes') }}</template>
<template #header><span style="margin-right:4px;"><fa :icon="faNewspaper"/></span>{{ $t('@.featured-notes') }}</template>
<main>
<sequential-entrance animation="entranceFromTop" delay="25">

View File

@@ -1,6 +1,6 @@
<template>
<mk-ui>
<template v-slot:header><span style="margin-right:4px;"><fa icon="gamepad"/></span>{{ $t('reversi') }}</template>
<template #header><span style="margin-right:4px;"><fa icon="gamepad"/></span>{{ $t('reversi') }}</template>
<x-reversi :game-id="$route.params.game" @nav="nav" :self-nav="false"/>
</mk-ui>
</template>

View File

@@ -8,7 +8,7 @@
</ui-container>
<mk-notes ref="timeline" :make-promise="makePromise" @inited="() => $emit('loaded')">
<template v-slot:empty>
<template #empty>
<fa :icon="['far', 'comments']"/>{{ $t('empty') }}
</template>
</mk-notes>

View File

@@ -1,6 +1,6 @@
<template>
<mk-ui>
<template v-slot:header>
<template #header>
<span @click="showNav = true">
<span :class="$style.title">
<span v-if="src == 'home'"><fa icon="home"/>{{ $t('home') }}</span>
@@ -20,7 +20,7 @@
</span>
</template>
<template v-slot:func>
<template #func>
<button @click="fn"><fa icon="pencil-alt"/></button>
</template>

View File

@@ -1,6 +1,6 @@
<template>
<mk-ui>
<template v-slot:header>
<template #header>
<template v-if="user"><span style="margin-right:4px;"><fa :icon="['far', 'comments']"/></span><mk-user-name :user="user"/></template>
<template v-else><mk-ellipsis/></template>
</template>

View File

@@ -1,6 +1,6 @@
<template>
<mk-ui>
<template v-slot:header><span style="margin-right:4px;"><fa :icon="['far', 'comments']"/></span>{{ $t('@.messaging') }}</template>
<template #header><span style="margin-right:4px;"><fa :icon="['far', 'comments']"/></span>{{ $t('@.messaging') }}</template>
<x-messaging @navigate="navigate" :header-top="48"/>
</mk-ui>
</template>

View File

@@ -1,6 +1,6 @@
<template>
<mk-ui>
<template v-slot:header><span style="margin-right:4px;"><fa :icon="['far', 'sticky-note']"/></span>{{ $t('title') }}</template>
<template #header><span style="margin-right:4px;"><fa :icon="['far', 'sticky-note']"/></span>{{ $t('title') }}</template>
<main v-if="!fetching">
<div>
<mk-note-detail :note="note"/>

View File

@@ -1,7 +1,7 @@
<template>
<mk-ui>
<template v-slot:header><span style="margin-right:4px;"><fa :icon="['far', 'bell']"/></span>{{ $t('notifications') }}</template>
<template v-slot:func><button @click="fn"><fa icon="check"/></button></template>
<template #header><span style="margin-right:4px;"><fa :icon="['far', 'bell']"/></span>{{ $t('notifications') }}</template>
<template #func><button @click="fn"><fa icon="check"/></button></template>
<main>
<mk-notifications @fetched="onFetched"/>

View File

@@ -1,6 +1,6 @@
<template>
<mk-ui>
<template v-slot:header><fa :icon="['far', 'envelope']"/>{{ $t('title') }}</template>
<template #header><fa :icon="['far', 'envelope']"/>{{ $t('title') }}</template>
<main>
<div v-for="req in requests">

View File

@@ -1,6 +1,6 @@
<template>
<mk-ui>
<template v-slot:header><fa icon="search"/> {{ q }}</template>
<template #header><fa icon="search"/> {{ q }}</template>
<main>
<mk-notes ref="timeline" :make-promise="makePromise" @inited="inited"/>

View File

@@ -1,6 +1,6 @@
<template>
<mk-ui>
<template v-slot:header><span style="margin-right:4px;"><fa icon="cog"/></span>{{ $t('settings') }}</template>
<template #header><span style="margin-right:4px;"><fa icon="cog"/></span>{{ $t('settings') }}</template>
<main>
<div class="signed-in-as">
<mfm :text="$t('signed-in-as').replace('{}', name)" :should-break="false" :plain-text="true" :custom-emojis="$store.state.i.emojis"/>
@@ -11,7 +11,7 @@
<x-theme/>
<ui-card>
<template v-slot:title><fa icon="poll-h"/> {{ $t('design') }}</template>
<template #title><fa icon="poll-h"/> {{ $t('design') }}</template>
<section>
<ui-switch v-model="darkmode">{{ $t('dark-mode') }}</ui-switch>
@@ -63,7 +63,7 @@
</ui-card>
<ui-card>
<template v-slot:title><fa icon="sliders-h"/> {{ $t('behavior') }}</template>
<template #title><fa icon="sliders-h"/> {{ $t('behavior') }}</template>
<section>
<ui-switch v-model="fetchOnScroll">{{ $t('fetch-on-scroll') }}</ui-switch>
@@ -93,7 +93,7 @@
<section>
<header>{{ $t('web-search-engine') }}</header>
<ui-input v-model="webSearchEngine">{{ $t('web-search-engine') }}<template v-slot:desc>{{ $t('web-search-engine-desc') }}</template></ui-input>
<ui-input v-model="webSearchEngine">{{ $t('web-search-engine') }}<template #desc>{{ $t('web-search-engine-desc') }}</template></ui-input>
</section>
</ui-card>
@@ -104,7 +104,7 @@
<x-mute-and-block/>
<ui-card>
<template v-slot:title><fa icon="volume-up"/> {{ $t('sound') }}</template>
<template #title><fa icon="volume-up"/> {{ $t('sound') }}</template>
<section>
<ui-switch v-model="enableSounds">{{ $t('enable-sounds') }}</ui-switch>
@@ -118,14 +118,14 @@
<x-api-settings />
<ui-card>
<template v-slot:title><fa icon="unlock-alt"/> {{ $t('password') }}</template>
<template #title><fa icon="unlock-alt"/> {{ $t('password') }}</template>
<section>
<x-password-settings/>
</section>
</ui-card>
<ui-card>
<template v-slot:title><fa icon="sync-alt"/> {{ $t('update') }}</template>
<template #title><fa icon="sync-alt"/> {{ $t('update') }}</template>
<section>
<div>{{ $t('version') }} <i>{{ version }}</i></div>

View File

@@ -1,6 +1,6 @@
<template>
<mk-ui>
<template v-slot:header><span style="margin-right:4px;"><fa icon="hashtag"/></span>{{ $route.params.tag }}</template>
<template #header><span style="margin-right:4px;"><fa icon="hashtag"/></span>{{ $route.params.tag }}</template>
<main>
<mk-notes ref="timeline" :make-promise="makePromise" @inited="inited"/>

View File

@@ -1,6 +1,6 @@
<template>
<mk-ui>
<template v-slot:header v-if="!fetching"><fa icon="list"/>{{ list.title }}</template>
<template #header v-if="!fetching"><fa icon="list"/>{{ list.title }}</template>
<main v-if="!fetching">
<x-editor :list="list"/>

View File

@@ -1,7 +1,7 @@
<template>
<mk-ui>
<template v-slot:header><fa icon="list"/>{{ $t('title') }}</template>
<template v-slot:func><button @click="fn"><fa icon="plus"/></button></template>
<template #header><fa icon="list"/>{{ $t('title') }}</template>
<template #func><button @click="fn"><fa icon="plus"/></button></template>
<main>
<ul>

View File

@@ -1,6 +1,6 @@
<template>
<mk-ui>
<template v-slot:header v-if="!fetching"><img :src="avator" alt="">
<template #header v-if="!fetching"><img :src="avator" alt="">
<mk-user-name :user="user"/>
</template>
<div class="wwtwuxyh" v-if="!fetching">

View File

@@ -1,7 +1,7 @@
<template>
<mk-ui>
<template v-slot:header><span style="margin-right:4px;"><fa icon="home"/></span>{{ $t('dashboard') }}</template>
<template v-slot:func>
<template #header><span style="margin-right:4px;"><fa icon="home"/></span>{{ $t('dashboard') }}</template>
<template #func>
<button @click="customizing = !customizing"><fa icon="cog"/></button>
</template>
<main>

View File

@@ -1,7 +1,7 @@
<template>
<div class="mkw-activity">
<ui-container :show-header="!props.compact">
<template v-slot:header><fa icon="chart-bar"/>{{ $t('activity') }}</template>
<template #header><fa icon="chart-bar"/>{{ $t('activity') }}</template>
<div :class="$style.body">
<x-activity :user="$store.state.i"/>
</div>