This commit is contained in:
syuilo 2018-03-28 16:46:11 +09:00
parent 3d5cdb8d2d
commit 1acc30822d
90 changed files with 286 additions and 286 deletions

View file

@ -71,7 +71,7 @@ export default (os: OS) => (cb, file = null) => {
avatarId: file.id
}).then(i => {
os.i.avatarId = i.avatarId;
os.i.avatar_url = i.avatar_url;
os.i.avatarUrl = i.avatarUrl;
os.apis.dialog({
title: '%fa:info-circle%アバターを更新しました',

View file

@ -71,7 +71,7 @@ export default (os: OS) => (cb, file = null) => {
bannerId: file.id
}).then(i => {
os.i.bannerId = i.bannerId;
os.i.banner_url = i.banner_url;
os.i.bannerUrl = i.bannerUrl;
os.apis.dialog({
title: '%fa:info-circle%バナーを更新しました',

View file

@ -1,7 +1,7 @@
<template>
<mk-window width="400px" height="550px" @closed="$destroy">
<span slot="header" :class="$style.header">
<img :src="`${user.avatar_url}?thumbnail&size=64`" alt=""/>{{ user.name }}のフォロワー
<img :src="`${user.avatarUrl}?thumbnail&size=64`" alt=""/>{{ user.name }}のフォロワー
</span>
<mk-followers :user="user"/>
</mk-window>

View file

@ -1,7 +1,7 @@
<template>
<mk-window width="400px" height="550px" @closed="$destroy">
<span slot="header" :class="$style.header">
<img :src="`${user.avatar_url}?thumbnail&size=64`" alt=""/>{{ user.name }}のフォロー
<img :src="`${user.avatarUrl}?thumbnail&size=64`" alt=""/>{{ user.name }}のフォロー
</span>
<mk-following :user="user"/>
</mk-window>

View file

@ -4,7 +4,7 @@
<div class="users" v-if="!fetching && users.length > 0">
<div class="user" v-for="user in users" :key="user.id">
<router-link class="avatar-anchor" :to="`/@${getAcct(user)}`">
<img class="avatar" :src="`${user.avatar_url}?thumbnail&size=42`" alt="" v-user-preview="user.id"/>
<img class="avatar" :src="`${user.avatarUrl}?thumbnail&size=42`" alt="" v-user-preview="user.id"/>
</router-link>
<div class="body">
<router-link class="name" :to="`/@${getAcct(user)}`" v-user-preview="user.id">{{ user.name }}</router-link>

View file

@ -70,7 +70,7 @@ export default Vue.extend({
this.moreFetching = true;
(this as any).api('posts/mentions', {
following: this.mode == 'following',
until_id: this.posts[this.posts.length - 1].id
untilId: this.posts[this.posts.length - 1].id
}).then(posts => {
this.posts = this.posts.concat(posts);
this.moreFetching = false;

View file

@ -6,7 +6,7 @@
<mk-time :time="notification.createdAt"/>
<template v-if="notification.type == 'reaction'">
<router-link class="avatar-anchor" :to="`/@${getAcct(notification.user)}`" v-user-preview="notification.user.id">
<img class="avatar" :src="`${notification.user.avatar_url}?thumbnail&size=48`" alt="avatar"/>
<img class="avatar" :src="`${notification.user.avatarUrl}?thumbnail&size=48`" alt="avatar"/>
</router-link>
<div class="text">
<p>
@ -20,7 +20,7 @@
</template>
<template v-if="notification.type == 'repost'">
<router-link class="avatar-anchor" :to="`/@${getAcct(notification.post.user)}`" v-user-preview="notification.post.userId">
<img class="avatar" :src="`${notification.post.user.avatar_url}?thumbnail&size=48`" alt="avatar"/>
<img class="avatar" :src="`${notification.post.user.avatarUrl}?thumbnail&size=48`" alt="avatar"/>
</router-link>
<div class="text">
<p>%fa:retweet%
@ -33,7 +33,7 @@
</template>
<template v-if="notification.type == 'quote'">
<router-link class="avatar-anchor" :to="`/@${getAcct(notification.post.user)}`" v-user-preview="notification.post.userId">
<img class="avatar" :src="`${notification.post.user.avatar_url}?thumbnail&size=48`" alt="avatar"/>
<img class="avatar" :src="`${notification.post.user.avatarUrl}?thumbnail&size=48`" alt="avatar"/>
</router-link>
<div class="text">
<p>%fa:quote-left%
@ -44,7 +44,7 @@
</template>
<template v-if="notification.type == 'follow'">
<router-link class="avatar-anchor" :to="`/@${getAcct(notification.user)}`" v-user-preview="notification.user.id">
<img class="avatar" :src="`${notification.user.avatar_url}?thumbnail&size=48`" alt="avatar"/>
<img class="avatar" :src="`${notification.user.avatarUrl}?thumbnail&size=48`" alt="avatar"/>
</router-link>
<div class="text">
<p>%fa:user-plus%
@ -54,7 +54,7 @@
</template>
<template v-if="notification.type == 'reply'">
<router-link class="avatar-anchor" :to="`/@${getAcct(notification.post.user)}`" v-user-preview="notification.post.userId">
<img class="avatar" :src="`${notification.post.user.avatar_url}?thumbnail&size=48`" alt="avatar"/>
<img class="avatar" :src="`${notification.post.user.avatarUrl}?thumbnail&size=48`" alt="avatar"/>
</router-link>
<div class="text">
<p>%fa:reply%
@ -65,7 +65,7 @@
</template>
<template v-if="notification.type == 'mention'">
<router-link class="avatar-anchor" :to="`/@${getAcct(notification.post.user)}`" v-user-preview="notification.post.userId">
<img class="avatar" :src="`${notification.post.user.avatar_url}?thumbnail&size=48`" alt="avatar"/>
<img class="avatar" :src="`${notification.post.user.avatarUrl}?thumbnail&size=48`" alt="avatar"/>
</router-link>
<div class="text">
<p>%fa:at%
@ -76,7 +76,7 @@
</template>
<template v-if="notification.type == 'poll_vote'">
<router-link class="avatar-anchor" :to="`/@${getAcct(notification.user)}`" v-user-preview="notification.user.id">
<img class="avatar" :src="`${notification.user.avatar_url}?thumbnail&size=48`" alt="avatar"/>
<img class="avatar" :src="`${notification.user.avatarUrl}?thumbnail&size=48`" alt="avatar"/>
</router-link>
<div class="text">
<p>%fa:chart-pie%<a :href="`/@${getAcct(notification.user)}`" v-user-preview="notification.user.id">{{ notification.user.name }}</a></p>
@ -161,7 +161,7 @@ export default Vue.extend({
(this as any).api('i/notifications', {
limit: max + 1,
until_id: this.notifications[this.notifications.length - 1].id
untilId: this.notifications[this.notifications.length - 1].id
}).then(notifications => {
if (notifications.length == max + 1) {
this.moreNotifications = true;

View file

@ -1,7 +1,7 @@
<template>
<div class="sub" :title="title">
<router-link class="avatar-anchor" :to="`/@${acct}`">
<img class="avatar" :src="`${post.user.avatar_url}?thumbnail&size=64`" alt="avatar" v-user-preview="post.userId"/>
<img class="avatar" :src="`${post.user.avatarUrl}?thumbnail&size=64`" alt="avatar" v-user-preview="post.userId"/>
</router-link>
<div class="main">
<header>

View file

@ -19,7 +19,7 @@
<div class="repost" v-if="isRepost">
<p>
<router-link class="avatar-anchor" :to="`/@${acct}`" v-user-preview="post.userId">
<img class="avatar" :src="`${post.user.avatar_url}?thumbnail&size=32`" alt="avatar"/>
<img class="avatar" :src="`${post.user.avatarUrl}?thumbnail&size=32`" alt="avatar"/>
</router-link>
%fa:retweet%
<router-link class="name" :href="`/@${acct}`">{{ post.user.name }}</router-link>
@ -28,7 +28,7 @@
</div>
<article>
<router-link class="avatar-anchor" :to="`/@${acct}`">
<img class="avatar" :src="`${p.user.avatar_url}?thumbnail&size=64`" alt="avatar" v-user-preview="p.user.id"/>
<img class="avatar" :src="`${p.user.avatarUrl}?thumbnail&size=64`" alt="avatar" v-user-preview="p.user.id"/>
</router-link>
<header>
<router-link class="name" :to="`/@${acct}`" v-user-preview="p.user.id">{{ p.user.name }}</router-link>

View file

@ -1,7 +1,7 @@
<template>
<div class="mk-post-preview" :title="title">
<router-link class="avatar-anchor" :to="`/@${acct}`">
<img class="avatar" :src="`${post.user.avatar_url}?thumbnail&size=64`" alt="avatar" v-user-preview="post.userId"/>
<img class="avatar" :src="`${post.user.avatarUrl}?thumbnail&size=64`" alt="avatar" v-user-preview="post.userId"/>
</router-link>
<div class="main">
<header>

View file

@ -1,7 +1,7 @@
<template>
<div class="sub" :title="title">
<router-link class="avatar-anchor" :to="`/@${acct}`">
<img class="avatar" :src="`${post.user.avatar_url}?thumbnail&size=64`" alt="avatar" v-user-preview="post.userId"/>
<img class="avatar" :src="`${post.user.avatarUrl}?thumbnail&size=64`" alt="avatar" v-user-preview="post.userId"/>
</router-link>
<div class="main">
<header>

View file

@ -6,7 +6,7 @@
<div class="repost" v-if="isRepost">
<p>
<router-link class="avatar-anchor" :to="`/@${acct}`" v-user-preview="post.userId">
<img class="avatar" :src="`${post.user.avatar_url}?thumbnail&size=32`" alt="avatar"/>
<img class="avatar" :src="`${post.user.avatarUrl}?thumbnail&size=32`" alt="avatar"/>
</router-link>
%fa:retweet%
<span>{{ '%i18n:desktop.tags.mk-timeline-post.reposted-by%'.substr(0, '%i18n:desktop.tags.mk-timeline-post.reposted-by%'.indexOf('{')) }}</span>
@ -17,7 +17,7 @@
</div>
<article>
<router-link class="avatar-anchor" :to="`/@${acct}`">
<img class="avatar" :src="`${p.user.avatar_url}?thumbnail&size=64`" alt="avatar" v-user-preview="p.user.id"/>
<img class="avatar" :src="`${p.user.avatarUrl}?thumbnail&size=64`" alt="avatar" v-user-preview="p.user.id"/>
</router-link>
<div class="main">
<header>

View file

@ -33,8 +33,8 @@ export default Vue.extend({
return;
}
(this as any).api('i/change_password', {
current_password: currentPassword,
new_password: newPassword
currentPasword: currentPassword,
newPassword: newPassword
}).then(() => {
(this as any).apis.notify('%i18n:desktop.tags.mk-password-setting.changed%');
});

View file

@ -2,7 +2,7 @@
<div class="profile">
<label class="avatar ui from group">
<p>%i18n:desktop.tags.mk-profile-setting.avatar%</p>
<img class="avatar" :src="`${os.i.avatar_url}?thumbnail&size=64`" alt="avatar"/>
<img class="avatar" :src="`${os.i.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
<button class="ui" @click="updateAvatar">%i18n:desktop.tags.mk-profile-setting.choice-avatar%</button>
</label>
<label class="ui from group">

View file

@ -86,7 +86,7 @@
<section class="notification" v-show="page == 'notification'">
<h1>通知</h1>
<mk-switch v-model="os.i.account.settings.auto_watch" @change="onChangeAutoWatch" text="投稿の自動ウォッチ">
<mk-switch v-model="os.i.account.settings.autoWatch" @change="onChangeAutoWatch" text="投稿の自動ウォッチ">
<span>リアクションしたり返信したりした投稿に関する通知を自動的に受け取るようにします</span>
</mk-switch>
</section>
@ -283,7 +283,7 @@ export default Vue.extend({
},
onChangeAutoWatch(v) {
(this as any).api('i/update', {
auto_watch: v
autoWatch: v
});
},
onChangeShowPostFormOnTopOfTl(v) {

View file

@ -65,7 +65,7 @@ export default Vue.extend({
(this as any).api('posts/timeline', {
limit: 11,
until_date: this.date ? this.date.getTime() : undefined
untilDate: this.date ? this.date.getTime() : undefined
}).then(posts => {
if (posts.length == 11) {
posts.pop();
@ -82,7 +82,7 @@ export default Vue.extend({
this.moreFetching = true;
(this as any).api('posts/timeline', {
limit: 11,
until_id: this.posts[this.posts.length - 1].id
untilId: this.posts[this.posts.length - 1].id
}).then(posts => {
if (posts.length == 11) {
posts.pop();

View file

@ -2,7 +2,7 @@
<div class="account">
<button class="header" :data-active="isOpen" @click="toggle">
<span class="username">{{ os.i.username }}<template v-if="!isOpen">%fa:angle-down%</template><template v-if="isOpen">%fa:angle-up%</template></span>
<img class="avatar" :src="`${ os.i.avatar_url }?thumbnail&size=64`" alt="avatar"/>
<img class="avatar" :src="`${ os.i.avatarUrl }?thumbnail&size=64`" alt="avatar"/>
</button>
<transition name="zoom-in-top">
<div class="menu" v-if="isOpen">

View file

@ -1,9 +1,9 @@
<template>
<div class="mk-user-preview">
<template v-if="u != null">
<div class="banner" :style="u.banner_url ? `background-image: url(${u.banner_url}?thumbnail&size=512)` : ''"></div>
<div class="banner" :style="u.bannerUrl ? `background-image: url(${u.bannerUrl}?thumbnail&size=512)` : ''"></div>
<router-link class="avatar" :to="`/@${acct}`">
<img :src="`${u.avatar_url}?thumbnail&size=64`" alt="avatar"/>
<img :src="`${u.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
</router-link>
<div class="title">
<router-link class="name" :to="`/@${acct}`">{{ u.name }}</router-link>

View file

@ -1,7 +1,7 @@
<template>
<div class="root item">
<router-link class="avatar-anchor" :to="`/@${acct}`" v-user-preview="user.id">
<img class="avatar" :src="`${user.avatar_url}?thumbnail&size=64`" alt="avatar"/>
<img class="avatar" :src="`${user.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
</router-link>
<div class="main">
<header>

View file

@ -4,7 +4,7 @@
<p class="initializing" v-if="fetching">%fa:spinner .pulse .fw%%i18n:desktop.tags.mk-user.followers-you-know.loading%<mk-ellipsis/></p>
<div v-if="!fetching && users.length > 0">
<router-link v-for="user in users" :to="`/@${getAcct(user)}`" :key="user.id">
<img :src="`${user.avatar_url}?thumbnail&size=64`" :alt="user.name" v-user-preview="user.id"/>
<img :src="`${user.avatarUrl}?thumbnail&size=64`" :alt="user.name" v-user-preview="user.id"/>
</router-link>
</div>
<p class="empty" v-if="!fetching && users.length == 0">%i18n:desktop.tags.mk-user.followers-you-know.no-users%</p>

View file

@ -5,7 +5,7 @@
<template v-if="!fetching && users.length != 0">
<div class="user" v-for="friend in users">
<router-link class="avatar-anchor" :to="`/@${getAcct(friend)}`">
<img class="avatar" :src="`${friend.avatar_url}?thumbnail&size=42`" alt="" v-user-preview="friend.id"/>
<img class="avatar" :src="`${friend.avatarUrl}?thumbnail&size=42`" alt="" v-user-preview="friend.id"/>
</router-link>
<div class="body">
<router-link class="name" :to="`/@${getAcct(friend)}`" v-user-preview="friend.id">{{ friend.name }}</router-link>

View file

@ -1,11 +1,11 @@
<template>
<div class="header" :data-is-dark-background="user.banner_url != null">
<div class="banner-container" :style="user.banner_url ? `background-image: url(${user.banner_url}?thumbnail&size=2048)` : ''">
<div class="banner" ref="banner" :style="user.banner_url ? `background-image: url(${user.banner_url}?thumbnail&size=2048)` : ''" @click="onBannerClick"></div>
<div class="header" :data-is-dark-background="user.bannerUrl != null">
<div class="banner-container" :style="user.bannerUrl ? `background-image: url(${user.bannerUrl}?thumbnail&size=2048)` : ''">
<div class="banner" ref="banner" :style="user.bannerUrl ? `background-image: url(${user.bannerUrl}?thumbnail&size=2048)` : ''" @click="onBannerClick"></div>
</div>
<div class="fade"></div>
<div class="container">
<img class="avatar" :src="`${user.avatar_url}?thumbnail&size=150`" alt="avatar"/>
<img class="avatar" :src="`${user.avatarUrl}?thumbnail&size=150`" alt="avatar"/>
<div class="title">
<p class="name">{{ user.name }}</p>
<p class="username">@{{ acct }}</p>
@ -59,7 +59,7 @@ export default Vue.extend({
if (!(this as any).os.isSignedIn || (this as any).os.i.id != this.user.id) return;
(this as any).apis.updateBanner((this as any).os.i, i => {
this.user.banner_url = i.banner_url;
this.user.bannerUrl = i.bannerUrl;
});
}
}

View file

@ -62,7 +62,7 @@ export default Vue.extend({
fetch(cb?) {
(this as any).api('users/posts', {
userId: this.user.id,
until_date: this.date ? this.date.getTime() : undefined,
untilDate: this.date ? this.date.getTime() : undefined,
with_replies: this.mode == 'with-replies'
}).then(posts => {
this.posts = posts;
@ -76,7 +76,7 @@ export default Vue.extend({
(this as any).api('users/posts', {
userId: this.user.id,
with_replies: this.mode == 'with-replies',
until_id: this.posts[this.posts.length - 1].id
untilId: this.posts[this.posts.length - 1].id
}).then(posts => {
this.moreFetching = false;
this.posts = this.posts.concat(posts);

View file

@ -9,7 +9,7 @@
<p><button class="signup" @click="signup">はじめる</button><button class="signin" @click="signin">ログイン</button></p>
<div class="users">
<router-link v-for="user in users" :key="user.id" class="avatar-anchor" :to="`/@${getAcct(user)}`" v-user-preview="user.id">
<img class="avatar" :src="`${user.avatar_url}?thumbnail&size=64`" alt="avatar"/>
<img class="avatar" :src="`${user.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
</router-link>
</div>
</div>

View file

@ -4,12 +4,12 @@
:data-melt="props.design == 2"
>
<div class="banner"
:style="os.i.banner_url ? `background-image: url(${os.i.banner_url}?thumbnail&size=256)` : ''"
:style="os.i.bannerUrl ? `background-image: url(${os.i.bannerUrl}?thumbnail&size=256)` : ''"
title="クリックでバナー編集"
@click="os.apis.updateBanner"
></div>
<img class="avatar"
:src="`${os.i.avatar_url}?thumbnail&size=96`"
:src="`${os.i.avatarUrl}?thumbnail&size=96`"
@click="os.apis.updateAvatar"
alt="avatar"
title="クリックでアバター編集"

View file

@ -8,7 +8,7 @@
<template v-else-if="users.length != 0">
<div class="user" v-for="_user in users">
<router-link class="avatar-anchor" :to="`/@${getAcct(_user)}`">
<img class="avatar" :src="`${_user.avatar_url}?thumbnail&size=42`" alt="" v-user-preview="_user.id"/>
<img class="avatar" :src="`${_user.avatarUrl}?thumbnail&size=42`" alt="" v-user-preview="_user.id"/>
</router-link>
<div class="body">
<router-link class="name" :to="`/@${getAcct(_user)}`" v-user-preview="_user.id">{{ _user.name }}</router-link>