Resolve conflicts
This commit is contained in:
parent
281b388e39
commit
bfc193d8cd
308 changed files with 3045 additions and 3200 deletions
|
|
@ -49,7 +49,7 @@ export default (os: OS) => (cb, file = null) => {
|
|||
}).$mount();
|
||||
document.body.appendChild(dialog.$el);
|
||||
|
||||
if (folder) data.append('folder_id', folder.id);
|
||||
if (folder) data.append('folderId', folder.id);
|
||||
|
||||
const xhr = new XMLHttpRequest();
|
||||
xhr.open('POST', apiUrl + '/drive/files/create', true);
|
||||
|
|
@ -68,10 +68,10 @@ export default (os: OS) => (cb, file = null) => {
|
|||
|
||||
const set = file => {
|
||||
os.api('i/update', {
|
||||
avatar_id: file.id
|
||||
avatarId: file.id
|
||||
}).then(i => {
|
||||
os.i.avatar_id = i.avatar_id;
|
||||
os.i.avatar_url = i.avatar_url;
|
||||
os.i.avatarId = i.avatarId;
|
||||
os.i.avatarUrl = i.avatarUrl;
|
||||
|
||||
os.apis.dialog({
|
||||
title: '%fa:info-circle%アバターを更新しました',
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ export default (os: OS) => (cb, file = null) => {
|
|||
}).$mount();
|
||||
document.body.appendChild(dialog.$el);
|
||||
|
||||
if (folder) data.append('folder_id', folder.id);
|
||||
if (folder) data.append('folderId', folder.id);
|
||||
|
||||
const xhr = new XMLHttpRequest();
|
||||
xhr.open('POST', apiUrl + '/drive/files/create', true);
|
||||
|
|
@ -68,10 +68,10 @@ export default (os: OS) => (cb, file = null) => {
|
|||
|
||||
const set = file => {
|
||||
os.api('i/update', {
|
||||
banner_id: file.id
|
||||
bannerId: file.id
|
||||
}).then(i => {
|
||||
os.i.banner_id = i.banner_id;
|
||||
os.i.banner_url = i.banner_url;
|
||||
os.i.bannerId = i.bannerId;
|
||||
os.i.bannerUrl = i.bannerUrl;
|
||||
|
||||
os.apis.dialog({
|
||||
title: '%fa:info-circle%バナーを更新しました',
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ export default Vue.extend({
|
|||
},
|
||||
mounted() {
|
||||
(this as any).api('aggregation/users/activity', {
|
||||
user_id: this.user.id,
|
||||
userId: this.user.id,
|
||||
limit: 20 * 7
|
||||
}).then(activity => {
|
||||
this.activity = activity;
|
||||
|
|
|
|||
|
|
@ -9,10 +9,10 @@
|
|||
@contextmenu.prevent.stop="onContextmenu"
|
||||
:title="title"
|
||||
>
|
||||
<div class="label" v-if="os.i.avatar_id == file.id"><img src="/assets/label.svg"/>
|
||||
<div class="label" v-if="os.i.avatarId == file.id"><img src="/assets/label.svg"/>
|
||||
<p>%i18n:desktop.tags.mk-drive-browser-file.avatar%</p>
|
||||
</div>
|
||||
<div class="label" v-if="os.i.banner_id == file.id"><img src="/assets/label.svg"/>
|
||||
<div class="label" v-if="os.i.bannerId == file.id"><img src="/assets/label.svg"/>
|
||||
<p>%i18n:desktop.tags.mk-drive-browser-file.banner%</p>
|
||||
</div>
|
||||
<div class="thumbnail" ref="thumbnail" :style="`background-color: ${ background }`">
|
||||
|
|
@ -50,8 +50,8 @@ export default Vue.extend({
|
|||
return `${this.file.name}\n${this.file.type} ${Vue.filter('bytes')(this.file.datasize)}`;
|
||||
},
|
||||
background(): string {
|
||||
return this.file.properties.average_color
|
||||
? `rgb(${this.file.properties.average_color.join(',')})`
|
||||
return this.file.properties.avgColor
|
||||
? `rgb(${this.file.properties.avgColor.join(',')})`
|
||||
: 'transparent';
|
||||
}
|
||||
},
|
||||
|
|
@ -129,10 +129,10 @@ export default Vue.extend({
|
|||
},
|
||||
|
||||
onThumbnailLoaded() {
|
||||
if (this.file.properties.average_color) {
|
||||
if (this.file.properties.avgColor) {
|
||||
anime({
|
||||
targets: this.$refs.thumbnail,
|
||||
backgroundColor: `rgba(${this.file.properties.average_color.join(',')}, 0)`,
|
||||
backgroundColor: `rgba(${this.file.properties.avgColor.join(',')}, 0)`,
|
||||
duration: 100,
|
||||
easing: 'linear'
|
||||
});
|
||||
|
|
@ -147,7 +147,7 @@ export default Vue.extend({
|
|||
allowEmpty: false
|
||||
}).then(name => {
|
||||
(this as any).api('drive/files/update', {
|
||||
file_id: this.file.id,
|
||||
fileId: this.file.id,
|
||||
name: name
|
||||
})
|
||||
});
|
||||
|
|
|
|||
|
|
@ -135,8 +135,8 @@ export default Vue.extend({
|
|||
const file = JSON.parse(driveFile);
|
||||
this.browser.removeFile(file.id);
|
||||
(this as any).api('drive/files/update', {
|
||||
file_id: file.id,
|
||||
folder_id: this.folder.id
|
||||
fileId: file.id,
|
||||
folderId: this.folder.id
|
||||
});
|
||||
}
|
||||
//#endregion
|
||||
|
|
@ -151,8 +151,8 @@ export default Vue.extend({
|
|||
|
||||
this.browser.removeFolder(folder.id);
|
||||
(this as any).api('drive/folders/update', {
|
||||
folder_id: folder.id,
|
||||
parent_id: this.folder.id
|
||||
folderId: folder.id,
|
||||
parentId: this.folder.id
|
||||
}).then(() => {
|
||||
// noop
|
||||
}).catch(err => {
|
||||
|
|
@ -204,7 +204,7 @@ export default Vue.extend({
|
|||
default: this.folder.name
|
||||
}).then(name => {
|
||||
(this as any).api('drive/folders/update', {
|
||||
folder_id: this.folder.id,
|
||||
folderId: this.folder.id,
|
||||
name: name
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -78,8 +78,8 @@ export default Vue.extend({
|
|||
const file = JSON.parse(driveFile);
|
||||
this.browser.removeFile(file.id);
|
||||
(this as any).api('drive/files/update', {
|
||||
file_id: file.id,
|
||||
folder_id: this.folder ? this.folder.id : null
|
||||
fileId: file.id,
|
||||
folderId: this.folder ? this.folder.id : null
|
||||
});
|
||||
}
|
||||
//#endregion
|
||||
|
|
@ -92,8 +92,8 @@ export default Vue.extend({
|
|||
if (this.folder && folder.id == this.folder.id) return;
|
||||
this.browser.removeFolder(folder.id);
|
||||
(this as any).api('drive/folders/update', {
|
||||
folder_id: folder.id,
|
||||
parent_id: this.folder ? this.folder.id : null
|
||||
folderId: folder.id,
|
||||
parentId: this.folder ? this.folder.id : null
|
||||
});
|
||||
}
|
||||
//#endregion
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ export default Vue.extend({
|
|||
|
||||
onStreamDriveFileUpdated(file) {
|
||||
const current = this.folder ? this.folder.id : null;
|
||||
if (current != file.folder_id) {
|
||||
if (current != file.folderId) {
|
||||
this.removeFile(file);
|
||||
} else {
|
||||
this.addFile(file, true);
|
||||
|
|
@ -173,7 +173,7 @@ export default Vue.extend({
|
|||
|
||||
onStreamDriveFolderUpdated(folder) {
|
||||
const current = this.folder ? this.folder.id : null;
|
||||
if (current != folder.parent_id) {
|
||||
if (current != folder.parentId) {
|
||||
this.removeFolder(folder);
|
||||
} else {
|
||||
this.addFolder(folder, true);
|
||||
|
|
@ -282,8 +282,8 @@ export default Vue.extend({
|
|||
if (this.files.some(f => f.id == file.id)) return;
|
||||
this.removeFile(file.id);
|
||||
(this as any).api('drive/files/update', {
|
||||
file_id: file.id,
|
||||
folder_id: this.folder ? this.folder.id : null
|
||||
fileId: file.id,
|
||||
folderId: this.folder ? this.folder.id : null
|
||||
});
|
||||
}
|
||||
//#endregion
|
||||
|
|
@ -298,8 +298,8 @@ export default Vue.extend({
|
|||
if (this.folders.some(f => f.id == folder.id)) return false;
|
||||
this.removeFolder(folder.id);
|
||||
(this as any).api('drive/folders/update', {
|
||||
folder_id: folder.id,
|
||||
parent_id: this.folder ? this.folder.id : null
|
||||
folderId: folder.id,
|
||||
parentId: this.folder ? this.folder.id : null
|
||||
}).then(() => {
|
||||
// noop
|
||||
}).catch(err => {
|
||||
|
|
@ -332,7 +332,7 @@ export default Vue.extend({
|
|||
}).then(url => {
|
||||
(this as any).api('drive/files/upload_from_url', {
|
||||
url: url,
|
||||
folder_id: this.folder ? this.folder.id : undefined
|
||||
folderId: this.folder ? this.folder.id : undefined
|
||||
});
|
||||
|
||||
(this as any).apis.dialog({
|
||||
|
|
@ -352,7 +352,7 @@ export default Vue.extend({
|
|||
}).then(name => {
|
||||
(this as any).api('drive/folders/create', {
|
||||
name: name,
|
||||
folder_id: this.folder ? this.folder.id : undefined
|
||||
folderId: this.folder ? this.folder.id : undefined
|
||||
}).then(folder => {
|
||||
this.addFolder(folder, true);
|
||||
});
|
||||
|
|
@ -412,7 +412,7 @@ export default Vue.extend({
|
|||
this.fetching = true;
|
||||
|
||||
(this as any).api('drive/folders/show', {
|
||||
folder_id: target
|
||||
folderId: target
|
||||
}).then(folder => {
|
||||
this.folder = folder;
|
||||
this.hierarchyFolders = [];
|
||||
|
|
@ -431,7 +431,7 @@ export default Vue.extend({
|
|||
|
||||
addFolder(folder, unshift = false) {
|
||||
const current = this.folder ? this.folder.id : null;
|
||||
if (current != folder.parent_id) return;
|
||||
if (current != folder.parentId) return;
|
||||
|
||||
if (this.folders.some(f => f.id == folder.id)) {
|
||||
const exist = this.folders.map(f => f.id).indexOf(folder.id);
|
||||
|
|
@ -448,7 +448,7 @@ export default Vue.extend({
|
|||
|
||||
addFile(file, unshift = false) {
|
||||
const current = this.folder ? this.folder.id : null;
|
||||
if (current != file.folder_id) return;
|
||||
if (current != file.folderId) return;
|
||||
|
||||
if (this.files.some(f => f.id == file.id)) {
|
||||
const exist = this.files.map(f => f.id).indexOf(file.id);
|
||||
|
|
@ -514,7 +514,7 @@ export default Vue.extend({
|
|||
|
||||
// フォルダ一覧取得
|
||||
(this as any).api('drive/folders', {
|
||||
folder_id: this.folder ? this.folder.id : null,
|
||||
folderId: this.folder ? this.folder.id : null,
|
||||
limit: foldersMax + 1
|
||||
}).then(folders => {
|
||||
if (folders.length == foldersMax + 1) {
|
||||
|
|
@ -527,7 +527,7 @@ export default Vue.extend({
|
|||
|
||||
// ファイル一覧取得
|
||||
(this as any).api('drive/files', {
|
||||
folder_id: this.folder ? this.folder.id : null,
|
||||
folderId: this.folder ? this.folder.id : null,
|
||||
limit: filesMax + 1
|
||||
}).then(files => {
|
||||
if (files.length == filesMax + 1) {
|
||||
|
|
@ -557,7 +557,7 @@ export default Vue.extend({
|
|||
|
||||
// ファイル一覧取得
|
||||
(this as any).api('drive/files', {
|
||||
folder_id: this.folder ? this.folder.id : null,
|
||||
folderId: this.folder ? this.folder.id : null,
|
||||
limit: max + 1
|
||||
}).then(files => {
|
||||
if (files.length == max + 1) {
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
<template>
|
||||
<button class="mk-follow-button"
|
||||
:class="{ wait, follow: !user.is_following, unfollow: user.is_following, big: size == 'big' }"
|
||||
:class="{ wait, follow: !user.isFollowing, unfollow: user.isFollowing, big: size == 'big' }"
|
||||
@click="onClick"
|
||||
:disabled="wait"
|
||||
:title="user.is_following ? 'フォロー解除' : 'フォローする'"
|
||||
:title="user.isFollowing ? 'フォロー解除' : 'フォローする'"
|
||||
>
|
||||
<template v-if="!wait && user.is_following">
|
||||
<template v-if="!wait && user.isFollowing">
|
||||
<template v-if="size == 'compact'">%fa:minus%</template>
|
||||
<template v-if="size == 'big'">%fa:minus%フォロー解除</template>
|
||||
</template>
|
||||
<template v-if="!wait && !user.is_following">
|
||||
<template v-if="!wait && !user.isFollowing">
|
||||
<template v-if="size == 'compact'">%fa:plus%</template>
|
||||
<template v-if="size == 'big'">%fa:plus%フォロー</template>
|
||||
</template>
|
||||
|
|
@ -53,23 +53,23 @@ export default Vue.extend({
|
|||
|
||||
onFollow(user) {
|
||||
if (user.id == this.user.id) {
|
||||
this.user.is_following = user.is_following;
|
||||
this.user.isFollowing = user.isFollowing;
|
||||
}
|
||||
},
|
||||
|
||||
onUnfollow(user) {
|
||||
if (user.id == this.user.id) {
|
||||
this.user.is_following = user.is_following;
|
||||
this.user.isFollowing = user.isFollowing;
|
||||
}
|
||||
},
|
||||
|
||||
onClick() {
|
||||
this.wait = true;
|
||||
if (this.user.is_following) {
|
||||
if (this.user.isFollowing) {
|
||||
(this as any).api('following/delete', {
|
||||
user_id: this.user.id
|
||||
userId: this.user.id
|
||||
}).then(() => {
|
||||
this.user.is_following = false;
|
||||
this.user.isFollowing = false;
|
||||
}).catch(err => {
|
||||
console.error(err);
|
||||
}).then(() => {
|
||||
|
|
@ -77,9 +77,9 @@ export default Vue.extend({
|
|||
});
|
||||
} else {
|
||||
(this as any).api('following/create', {
|
||||
user_id: this.user.id
|
||||
userId: this.user.id
|
||||
}).then(() => {
|
||||
this.user.is_following = true;
|
||||
this.user.isFollowing = true;
|
||||
}).catch(err => {
|
||||
console.error(err);
|
||||
}).then(() => {
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<template>
|
||||
<mk-users-list
|
||||
:fetch="fetch"
|
||||
:count="user.followers_count"
|
||||
:you-know-count="user.followers_you_know_count"
|
||||
:count="user.followersCount"
|
||||
:you-know-count="user.followersYouKnowCount"
|
||||
>
|
||||
フォロワーはいないようです。
|
||||
</mk-users-list>
|
||||
|
|
@ -15,7 +15,7 @@ export default Vue.extend({
|
|||
methods: {
|
||||
fetch(iknow, limit, cursor, cb) {
|
||||
(this as any).api('users/followers', {
|
||||
user_id: this.user.id,
|
||||
userId: this.user.id,
|
||||
iknow: iknow,
|
||||
limit: limit,
|
||||
cursor: cursor ? cursor : undefined
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<template>
|
||||
<mk-users-list
|
||||
:fetch="fetch"
|
||||
:count="user.following_count"
|
||||
:you-know-count="user.following_you_know_count"
|
||||
:count="user.followingCount"
|
||||
:you-know-count="user.followingYouKnowCount"
|
||||
>
|
||||
フォロー中のユーザーはいないようです。
|
||||
</mk-users-list>
|
||||
|
|
@ -15,7 +15,7 @@ export default Vue.extend({
|
|||
methods: {
|
||||
fetch(iknow, limit, cursor, cb) {
|
||||
(this as any).api('users/following', {
|
||||
user_id: this.user.id,
|
||||
userId: this.user.id,
|
||||
iknow: iknow,
|
||||
limit: limit,
|
||||
cursor: cursor ? cursor : undefined
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@
|
|||
<div class="main">
|
||||
<a @click="hint">カスタマイズのヒント</a>
|
||||
<div>
|
||||
<mk-post-form v-if="os.i.account.client_settings.showPostFormOnTopOfTl"/>
|
||||
<mk-post-form v-if="os.i.account.clientSettings.showPostFormOnTopOfTl"/>
|
||||
<mk-timeline ref="tl" @loaded="onTlLoaded"/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -63,7 +63,7 @@
|
|||
<component v-for="widget in widgets[place]" :is="`mkw-${widget.name}`" :key="widget.id" :ref="widget.id" :widget="widget" @chosen="warp"/>
|
||||
</div>
|
||||
<div class="main">
|
||||
<mk-post-form v-if="os.i.account.client_settings.showPostFormOnTopOfTl"/>
|
||||
<mk-post-form v-if="os.i.account.clientSettings.showPostFormOnTopOfTl"/>
|
||||
<mk-timeline ref="tl" @loaded="onTlLoaded" v-if="mode == 'timeline'"/>
|
||||
<mk-mentions @loaded="onTlLoaded" v-if="mode == 'mentions'"/>
|
||||
</div>
|
||||
|
|
@ -104,16 +104,16 @@ export default Vue.extend({
|
|||
home: {
|
||||
get(): any[] {
|
||||
//#region 互換性のため
|
||||
(this as any).os.i.account.client_settings.home.forEach(w => {
|
||||
(this as any).os.i.account.clientSettings.home.forEach(w => {
|
||||
if (w.name == 'rss-reader') w.name = 'rss';
|
||||
if (w.name == 'user-recommendation') w.name = 'users';
|
||||
if (w.name == 'recommended-polls') w.name = 'polls';
|
||||
});
|
||||
//#endregion
|
||||
return (this as any).os.i.account.client_settings.home;
|
||||
return (this as any).os.i.account.clientSettings.home;
|
||||
},
|
||||
set(value) {
|
||||
(this as any).os.i.account.client_settings.home = value;
|
||||
(this as any).os.i.account.clientSettings.home = value;
|
||||
}
|
||||
},
|
||||
left(): any[] {
|
||||
|
|
@ -126,7 +126,7 @@ export default Vue.extend({
|
|||
created() {
|
||||
this.widgets.left = this.left;
|
||||
this.widgets.right = this.right;
|
||||
this.$watch('os.i.account.client_settings', i => {
|
||||
this.$watch('os.i.account.clientSettings', i => {
|
||||
this.widgets.left = this.left;
|
||||
this.widgets.right = this.right;
|
||||
}, {
|
||||
|
|
@ -161,17 +161,17 @@ export default Vue.extend({
|
|||
},
|
||||
onHomeUpdated(data) {
|
||||
if (data.home) {
|
||||
(this as any).os.i.account.client_settings.home = data.home;
|
||||
(this as any).os.i.account.clientSettings.home = data.home;
|
||||
this.widgets.left = data.home.filter(w => w.place == 'left');
|
||||
this.widgets.right = data.home.filter(w => w.place == 'right');
|
||||
} else {
|
||||
const w = (this as any).os.i.account.client_settings.home.find(w => w.id == data.id);
|
||||
const w = (this as any).os.i.account.clientSettings.home.find(w => w.id == data.id);
|
||||
if (w != null) {
|
||||
w.data = data.data;
|
||||
this.$refs[w.id][0].preventSave = true;
|
||||
this.$refs[w.id][0].props = w.data;
|
||||
this.widgets.left = (this as any).os.i.account.client_settings.home.filter(w => w.place == 'left');
|
||||
this.widgets.right = (this as any).os.i.account.client_settings.home.filter(w => w.place == 'right');
|
||||
this.widgets.left = (this as any).os.i.account.clientSettings.home.filter(w => w.place == 'left');
|
||||
this.widgets.right = (this as any).os.i.account.clientSettings.home.filter(w => w.place == 'right');
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ export default Vue.extend({
|
|||
computed: {
|
||||
style(): any {
|
||||
return {
|
||||
'background-color': this.image.properties.average_color ? `rgb(${this.image.properties.average_color.join(',')})` : 'transparent',
|
||||
'background-color': this.image.properties.avgColor ? `rgb(${this.image.properties.avgColor.join(',')})` : 'transparent',
|
||||
'background-image': `url(${this.image.url}?thumbnail&size=512)`
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@
|
|||
<div class="notifications" v-if="notifications.length != 0">
|
||||
<template v-for="(notification, i) in _notifications">
|
||||
<div class="notification" :class="notification.type" :key="notification.id">
|
||||
<mk-time :time="notification.created_at"/>
|
||||
<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>
|
||||
|
|
@ -19,12 +19,12 @@
|
|||
</div>
|
||||
</template>
|
||||
<template v-if="notification.type == 'repost'">
|
||||
<router-link class="avatar-anchor" :to="`/@${getAcct(notification.post.user)}`" v-user-preview="notification.post.user_id">
|
||||
<img class="avatar" :src="`${notification.post.user.avatar_url}?thumbnail&size=48`" alt="avatar"/>
|
||||
<router-link class="avatar-anchor" :to="`/@${getAcct(notification.post.user)}`" v-user-preview="notification.post.userId">
|
||||
<img class="avatar" :src="`${notification.post.user.avatarUrl}?thumbnail&size=48`" alt="avatar"/>
|
||||
</router-link>
|
||||
<div class="text">
|
||||
<p>%fa:retweet%
|
||||
<router-link :to="`/@${getAcct(notification.post.user)}`" v-user-preview="notification.post.user_id">{{ notification.post.user.name }}</router-link>
|
||||
<router-link :to="`/@${getAcct(notification.post.user)}`" v-user-preview="notification.post.userId">{{ notification.post.user.name }}</router-link>
|
||||
</p>
|
||||
<router-link class="post-ref" :to="`/@${getAcct(notification.post.user)}/${notification.post.id}`">
|
||||
%fa:quote-left%{{ getPostSummary(notification.post.repost) }}%fa:quote-right%
|
||||
|
|
@ -32,19 +32,19 @@
|
|||
</div>
|
||||
</template>
|
||||
<template v-if="notification.type == 'quote'">
|
||||
<router-link class="avatar-anchor" :to="`/@${getAcct(notification.post.user)}`" v-user-preview="notification.post.user_id">
|
||||
<img class="avatar" :src="`${notification.post.user.avatar_url}?thumbnail&size=48`" alt="avatar"/>
|
||||
<router-link class="avatar-anchor" :to="`/@${getAcct(notification.post.user)}`" v-user-preview="notification.post.userId">
|
||||
<img class="avatar" :src="`${notification.post.user.avatarUrl}?thumbnail&size=48`" alt="avatar"/>
|
||||
</router-link>
|
||||
<div class="text">
|
||||
<p>%fa:quote-left%
|
||||
<router-link :to="`/@${getAcct(notification.post.user)}`" v-user-preview="notification.post.user_id">{{ notification.post.user.name }}</router-link>
|
||||
<router-link :to="`/@${getAcct(notification.post.user)}`" v-user-preview="notification.post.userId">{{ notification.post.user.name }}</router-link>
|
||||
</p>
|
||||
<router-link class="post-preview" :to="`/@${getAcct(notification.post.user)}/${notification.post.id}`">{{ getPostSummary(notification.post) }}</router-link>
|
||||
</div>
|
||||
</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%
|
||||
|
|
@ -53,30 +53,30 @@
|
|||
</div>
|
||||
</template>
|
||||
<template v-if="notification.type == 'reply'">
|
||||
<router-link class="avatar-anchor" :to="`/@${getAcct(notification.post.user)}`" v-user-preview="notification.post.user_id">
|
||||
<img class="avatar" :src="`${notification.post.user.avatar_url}?thumbnail&size=48`" alt="avatar"/>
|
||||
<router-link class="avatar-anchor" :to="`/@${getAcct(notification.post.user)}`" v-user-preview="notification.post.userId">
|
||||
<img class="avatar" :src="`${notification.post.user.avatarUrl}?thumbnail&size=48`" alt="avatar"/>
|
||||
</router-link>
|
||||
<div class="text">
|
||||
<p>%fa:reply%
|
||||
<router-link :to="`/@${getAcct(notification.post.user)}`" v-user-preview="notification.post.user_id">{{ notification.post.user.name }}</router-link>
|
||||
<router-link :to="`/@${getAcct(notification.post.user)}`" v-user-preview="notification.post.userId">{{ notification.post.user.name }}</router-link>
|
||||
</p>
|
||||
<router-link class="post-preview" :to="`/@${getAcct(notification.post.user)}/${notification.post.id}`">{{ getPostSummary(notification.post) }}</router-link>
|
||||
</div>
|
||||
</template>
|
||||
<template v-if="notification.type == 'mention'">
|
||||
<router-link class="avatar-anchor" :to="`/@${getAcct(notification.post.user)}`" v-user-preview="notification.post.user_id">
|
||||
<img class="avatar" :src="`${notification.post.user.avatar_url}?thumbnail&size=48`" alt="avatar"/>
|
||||
<router-link class="avatar-anchor" :to="`/@${getAcct(notification.post.user)}`" v-user-preview="notification.post.userId">
|
||||
<img class="avatar" :src="`${notification.post.user.avatarUrl}?thumbnail&size=48`" alt="avatar"/>
|
||||
</router-link>
|
||||
<div class="text">
|
||||
<p>%fa:at%
|
||||
<router-link :to="`/@${getAcct(notification.post.user)}`" v-user-preview="notification.post.user_id">{{ notification.post.user.name }}</router-link>
|
||||
<router-link :to="`/@${getAcct(notification.post.user)}`" v-user-preview="notification.post.userId">{{ notification.post.user.name }}</router-link>
|
||||
</p>
|
||||
<a class="post-preview" :href="`/@${getAcct(notification.post.user)}/${notification.post.id}`">{{ getPostSummary(notification.post) }}</a>
|
||||
</div>
|
||||
</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>
|
||||
|
|
@ -120,8 +120,8 @@ export default Vue.extend({
|
|||
computed: {
|
||||
_notifications(): any[] {
|
||||
return (this.notifications as any).map(notification => {
|
||||
const date = new Date(notification.created_at).getDate();
|
||||
const month = new Date(notification.created_at).getMonth() + 1;
|
||||
const date = new Date(notification.createdAt).getDate();
|
||||
const month = new Date(notification.createdAt).getMonth() + 1;
|
||||
notification._date = date;
|
||||
notification._datetext = `${month}月 ${date}日`;
|
||||
return notification;
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -1,17 +1,17 @@
|
|||
<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.user_id"/>
|
||||
<img class="avatar" :src="`${post.user.avatarUrl}?thumbnail&size=64`" alt="avatar" v-user-preview="post.userId"/>
|
||||
</router-link>
|
||||
<div class="main">
|
||||
<header>
|
||||
<div class="left">
|
||||
<router-link class="name" :to="`/@${acct}`" v-user-preview="post.user_id">{{ post.user.name }}</router-link>
|
||||
<router-link class="name" :to="`/@${acct}`" v-user-preview="post.userId">{{ post.user.name }}</router-link>
|
||||
<span class="username">@{{ acct }}</span>
|
||||
</div>
|
||||
<div class="right">
|
||||
<router-link class="time" :to="`/@${acct}/${post.id}`">
|
||||
<mk-time :time="post.created_at"/>
|
||||
<mk-time :time="post.createdAt"/>
|
||||
</router-link>
|
||||
</div>
|
||||
</header>
|
||||
|
|
@ -37,7 +37,7 @@ export default Vue.extend({
|
|||
return getAcct(this.post.user);
|
||||
},
|
||||
title(): string {
|
||||
return dateStringify(this.post.created_at);
|
||||
return dateStringify(this.post.createdAt);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<div class="mk-post-detail" :title="title">
|
||||
<button
|
||||
class="read-more"
|
||||
v-if="p.reply && p.reply.reply_id && context == null"
|
||||
v-if="p.reply && p.reply.replyId && context == null"
|
||||
title="会話をもっと読み込む"
|
||||
@click="fetchContext"
|
||||
:disabled="contextFetching"
|
||||
|
|
@ -18,8 +18,8 @@
|
|||
</div>
|
||||
<div class="repost" v-if="isRepost">
|
||||
<p>
|
||||
<router-link class="avatar-anchor" :to="`/@${acct}`" v-user-preview="post.user_id">
|
||||
<img class="avatar" :src="`${post.user.avatar_url}?thumbnail&size=32`" alt="avatar"/>
|
||||
<router-link class="avatar-anchor" :to="`/@${acct}`" v-user-preview="post.userId">
|
||||
<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,13 +28,13 @@
|
|||
</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>
|
||||
<span class="username">@{{ acct }}</span>
|
||||
<router-link class="time" :to="`/@${acct}/${p.id}`">
|
||||
<mk-time :time="p.created_at"/>
|
||||
<mk-time :time="p.createdAt"/>
|
||||
</router-link>
|
||||
</header>
|
||||
<div class="body">
|
||||
|
|
@ -56,12 +56,12 @@
|
|||
<footer>
|
||||
<mk-reactions-viewer :post="p"/>
|
||||
<button @click="reply" title="返信">
|
||||
%fa:reply%<p class="count" v-if="p.replies_count > 0">{{ p.replies_count }}</p>
|
||||
%fa:reply%<p class="count" v-if="p.repliesCount > 0">{{ p.repliesCount }}</p>
|
||||
</button>
|
||||
<button @click="repost" title="Repost">
|
||||
%fa:retweet%<p class="count" v-if="p.repost_count > 0">{{ p.repost_count }}</p>
|
||||
%fa:retweet%<p class="count" v-if="p.repostCount > 0">{{ p.repostCount }}</p>
|
||||
</button>
|
||||
<button :class="{ reacted: p.my_reaction != null }" @click="react" ref="reactButton" title="リアクション">
|
||||
<button :class="{ reacted: p.myReaction != null }" @click="react" ref="reactButton" title="リアクション">
|
||||
%fa:plus%<p class="count" v-if="p.reactions_count > 0">{{ p.reactions_count }}</p>
|
||||
</button>
|
||||
<button @click="menu" ref="menuButton">
|
||||
|
|
@ -115,21 +115,21 @@ export default Vue.extend({
|
|||
isRepost(): boolean {
|
||||
return (this.post.repost &&
|
||||
this.post.text == null &&
|
||||
this.post.media_ids == null &&
|
||||
this.post.mediaIds == null &&
|
||||
this.post.poll == null);
|
||||
},
|
||||
p(): any {
|
||||
return this.isRepost ? this.post.repost : this.post;
|
||||
},
|
||||
reactionsCount(): number {
|
||||
return this.p.reaction_counts
|
||||
? Object.keys(this.p.reaction_counts)
|
||||
.map(key => this.p.reaction_counts[key])
|
||||
return this.p.reactionCounts
|
||||
? Object.keys(this.p.reactionCounts)
|
||||
.map(key => this.p.reactionCounts[key])
|
||||
.reduce((a, b) => a + b)
|
||||
: 0;
|
||||
},
|
||||
title(): string {
|
||||
return dateStringify(this.p.created_at);
|
||||
return dateStringify(this.p.createdAt);
|
||||
},
|
||||
urls(): string[] {
|
||||
if (this.p.ast) {
|
||||
|
|
@ -145,7 +145,7 @@ export default Vue.extend({
|
|||
// Get replies
|
||||
if (!this.compact) {
|
||||
(this as any).api('posts/replies', {
|
||||
post_id: this.p.id,
|
||||
postId: this.p.id,
|
||||
limit: 8
|
||||
}).then(replies => {
|
||||
this.replies = replies;
|
||||
|
|
@ -154,7 +154,7 @@ export default Vue.extend({
|
|||
|
||||
// Draw map
|
||||
if (this.p.geo) {
|
||||
const shouldShowMap = (this as any).os.isSignedIn ? (this as any).os.i.account.client_settings.showMaps : true;
|
||||
const shouldShowMap = (this as any).os.isSignedIn ? (this as any).os.i.account.clientSettings.showMaps : true;
|
||||
if (shouldShowMap) {
|
||||
(this as any).os.getGoogleMaps().then(maps => {
|
||||
const uluru = new maps.LatLng(this.p.geo.latitude, this.p.geo.longitude);
|
||||
|
|
@ -176,7 +176,7 @@ export default Vue.extend({
|
|||
|
||||
// Fetch context
|
||||
(this as any).api('posts/context', {
|
||||
post_id: this.p.reply_id
|
||||
postId: this.p.replyId
|
||||
}).then(context => {
|
||||
this.contextFetching = false;
|
||||
this.context = context.reverse();
|
||||
|
|
|
|||
|
|
@ -219,9 +219,9 @@ export default Vue.extend({
|
|||
|
||||
(this as any).api('posts/create', {
|
||||
text: this.text == '' ? undefined : this.text,
|
||||
media_ids: this.files.length > 0 ? this.files.map(f => f.id) : undefined,
|
||||
reply_id: this.reply ? this.reply.id : undefined,
|
||||
repost_id: this.repost ? this.repost.id : undefined,
|
||||
mediaIds: this.files.length > 0 ? this.files.map(f => f.id) : undefined,
|
||||
replyId: this.reply ? this.reply.id : undefined,
|
||||
repostId: this.repost ? this.repost.id : undefined,
|
||||
poll: this.poll ? (this.$refs.poll as any).get() : undefined,
|
||||
geo: this.geo ? {
|
||||
latitude: this.geo.latitude,
|
||||
|
|
@ -255,7 +255,7 @@ export default Vue.extend({
|
|||
const data = JSON.parse(localStorage.getItem('drafts') || '{}');
|
||||
|
||||
data[this.draftId] = {
|
||||
updated_at: new Date(),
|
||||
updatedAt: new Date(),
|
||||
data: {
|
||||
text: this.text,
|
||||
files: this.files,
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
<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.user_id"/>
|
||||
<img class="avatar" :src="`${post.user.avatarUrl}?thumbnail&size=64`" alt="avatar" v-user-preview="post.userId"/>
|
||||
</router-link>
|
||||
<div class="main">
|
||||
<header>
|
||||
<router-link class="name" :to="`/@${acct}`" v-user-preview="post.user_id">{{ post.user.name }}</router-link>
|
||||
<router-link class="name" :to="`/@${acct}`" v-user-preview="post.userId">{{ post.user.name }}</router-link>
|
||||
<span class="username">@{{ acct }}</span>
|
||||
<router-link class="time" :to="`/@${acct}/${post.id}`">
|
||||
<mk-time :time="post.created_at"/>
|
||||
<mk-time :time="post.createdAt"/>
|
||||
</router-link>
|
||||
</header>
|
||||
<div class="body">
|
||||
|
|
@ -30,7 +30,7 @@ export default Vue.extend({
|
|||
return getAcct(this.post.user);
|
||||
},
|
||||
title(): string {
|
||||
return dateStringify(this.post.created_at);
|
||||
return dateStringify(this.post.createdAt);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
<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.user_id"/>
|
||||
<img class="avatar" :src="`${post.user.avatarUrl}?thumbnail&size=64`" alt="avatar" v-user-preview="post.userId"/>
|
||||
</router-link>
|
||||
<div class="main">
|
||||
<header>
|
||||
<router-link class="name" :to="`/@${acct}`" v-user-preview="post.user_id">{{ post.user.name }}</router-link>
|
||||
<router-link class="name" :to="`/@${acct}`" v-user-preview="post.userId">{{ post.user.name }}</router-link>
|
||||
<span class="username">@{{ acct }}</span>
|
||||
<router-link class="created-at" :to="`/@${acct}/${post.id}`">
|
||||
<mk-time :time="post.created_at"/>
|
||||
<mk-time :time="post.createdAt"/>
|
||||
</router-link>
|
||||
</header>
|
||||
<div class="body">
|
||||
|
|
@ -30,7 +30,7 @@ export default Vue.extend({
|
|||
return getAcct(this.post.user);
|
||||
},
|
||||
title(): string {
|
||||
return dateStringify(this.post.created_at);
|
||||
return dateStringify(this.post.createdAt);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -5,30 +5,30 @@
|
|||
</div>
|
||||
<div class="repost" v-if="isRepost">
|
||||
<p>
|
||||
<router-link class="avatar-anchor" :to="`/@${acct}`" v-user-preview="post.user_id">
|
||||
<img class="avatar" :src="`${post.user.avatar_url}?thumbnail&size=32`" alt="avatar"/>
|
||||
<router-link class="avatar-anchor" :to="`/@${acct}`" v-user-preview="post.userId">
|
||||
<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>
|
||||
<a class="name" :href="`/@${acct}`" v-user-preview="post.user_id">{{ post.user.name }}</a>
|
||||
<a class="name" :href="`/@${acct}`" v-user-preview="post.userId">{{ post.user.name }}</a>
|
||||
<span>{{ '%i18n:desktop.tags.mk-timeline-post.reposted-by%'.substr('%i18n:desktop.tags.mk-timeline-post.reposted-by%'.indexOf('}') + 1) }}</span>
|
||||
</p>
|
||||
<mk-time :time="post.created_at"/>
|
||||
<mk-time :time="post.createdAt"/>
|
||||
</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>
|
||||
<router-link class="name" :to="`/@${acct}`" v-user-preview="p.user.id">{{ acct }}</router-link>
|
||||
<span class="is-bot" v-if="p.user.host === null && p.user.account.is_bot">bot</span>
|
||||
<span class="is-bot" v-if="p.user.host === null && p.user.account.isBot">bot</span>
|
||||
<span class="username">@{{ acct }}</span>
|
||||
<div class="info">
|
||||
<span class="app" v-if="p.app">via <b>{{ p.app.name }}</b></span>
|
||||
<span class="mobile" v-if="p.via_mobile">%fa:mobile-alt%</span>
|
||||
<span class="mobile" v-if="p.viaMobile">%fa:mobile-alt%</span>
|
||||
<router-link class="created-at" :to="url">
|
||||
<mk-time :time="p.created_at"/>
|
||||
<mk-time :time="p.createdAt"/>
|
||||
</router-link>
|
||||
</div>
|
||||
</header>
|
||||
|
|
@ -58,12 +58,12 @@
|
|||
<footer>
|
||||
<mk-reactions-viewer :post="p" ref="reactionsViewer"/>
|
||||
<button @click="reply" title="%i18n:desktop.tags.mk-timeline-post.reply%">
|
||||
%fa:reply%<p class="count" v-if="p.replies_count > 0">{{ p.replies_count }}</p>
|
||||
%fa:reply%<p class="count" v-if="p.repliesCount > 0">{{ p.repliesCount }}</p>
|
||||
</button>
|
||||
<button @click="repost" title="%i18n:desktop.tags.mk-timeline-post.repost%">
|
||||
%fa:retweet%<p class="count" v-if="p.repost_count > 0">{{ p.repost_count }}</p>
|
||||
%fa:retweet%<p class="count" v-if="p.repostCount > 0">{{ p.repostCount }}</p>
|
||||
</button>
|
||||
<button :class="{ reacted: p.my_reaction != null }" @click="react" ref="reactButton" title="%i18n:desktop.tags.mk-timeline-post.add-reaction%">
|
||||
<button :class="{ reacted: p.myReaction != null }" @click="react" ref="reactButton" title="%i18n:desktop.tags.mk-timeline-post.add-reaction%">
|
||||
%fa:plus%<p class="count" v-if="p.reactions_count > 0">{{ p.reactions_count }}</p>
|
||||
</button>
|
||||
<button @click="menu" ref="menuButton">
|
||||
|
|
@ -122,21 +122,21 @@ export default Vue.extend({
|
|||
isRepost(): boolean {
|
||||
return (this.post.repost &&
|
||||
this.post.text == null &&
|
||||
this.post.media_ids == null &&
|
||||
this.post.mediaIds == null &&
|
||||
this.post.poll == null);
|
||||
},
|
||||
p(): any {
|
||||
return this.isRepost ? this.post.repost : this.post;
|
||||
},
|
||||
reactionsCount(): number {
|
||||
return this.p.reaction_counts
|
||||
? Object.keys(this.p.reaction_counts)
|
||||
.map(key => this.p.reaction_counts[key])
|
||||
return this.p.reactionCounts
|
||||
? Object.keys(this.p.reactionCounts)
|
||||
.map(key => this.p.reactionCounts[key])
|
||||
.reduce((a, b) => a + b)
|
||||
: 0;
|
||||
},
|
||||
title(): string {
|
||||
return dateStringify(this.p.created_at);
|
||||
return dateStringify(this.p.createdAt);
|
||||
},
|
||||
url(): string {
|
||||
return `/@${this.acct}/${this.p.id}`;
|
||||
|
|
@ -166,7 +166,7 @@ export default Vue.extend({
|
|||
|
||||
// Draw map
|
||||
if (this.p.geo) {
|
||||
const shouldShowMap = (this as any).os.isSignedIn ? (this as any).os.i.account.client_settings.showMaps : true;
|
||||
const shouldShowMap = (this as any).os.isSignedIn ? (this as any).os.i.account.clientSettings.showMaps : true;
|
||||
if (shouldShowMap) {
|
||||
(this as any).os.getGoogleMaps().then(maps => {
|
||||
const uluru = new maps.LatLng(this.p.geo.latitude, this.p.geo.longitude);
|
||||
|
|
@ -216,7 +216,7 @@ export default Vue.extend({
|
|||
const post = data.post;
|
||||
if (post.id == this.post.id) {
|
||||
this.$emit('update:post', post);
|
||||
} else if (post.id == this.post.repost_id) {
|
||||
} else if (post.id == this.post.repostId) {
|
||||
this.post.repost = post;
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@ export default Vue.extend({
|
|||
computed: {
|
||||
_posts(): any[] {
|
||||
return (this.posts as any).map(post => {
|
||||
const date = new Date(post.created_at).getDate();
|
||||
const month = new Date(post.created_at).getMonth() + 1;
|
||||
const date = new Date(post.createdAt).getDate();
|
||||
const month = new Date(post.createdAt).getMonth() + 1;
|
||||
post._date = date;
|
||||
post._datetext = `${month}月 ${date}日`;
|
||||
return post;
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ export default Vue.extend({
|
|||
ok() {
|
||||
this.wait = true;
|
||||
(this as any).api('posts/create', {
|
||||
repost_id: this.post.id
|
||||
repostId: this.post.id
|
||||
}).then(data => {
|
||||
this.$emit('posted');
|
||||
(this as any).apis.notify('%i18n:desktop.tags.mk-repost-form.success%');
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
<div class="2fa">
|
||||
<p>%i18n:desktop.tags.mk-2fa-setting.intro%<a href="%i18n:desktop.tags.mk-2fa-setting.url%" target="_blank">%i18n:desktop.tags.mk-2fa-setting.detail%</a></p>
|
||||
<div class="ui info warn"><p>%fa:exclamation-triangle%%i18n:desktop.tags.mk-2fa-setting.caution%</p></div>
|
||||
<p v-if="!data && !os.i.account.two_factor_enabled"><button @click="register" class="ui primary">%i18n:desktop.tags.mk-2fa-setting.register%</button></p>
|
||||
<template v-if="os.i.account.two_factor_enabled">
|
||||
<p v-if="!data && !os.i.account.twoFactorEnabled"><button @click="register" class="ui primary">%i18n:desktop.tags.mk-2fa-setting.register%</button></p>
|
||||
<template v-if="os.i.account.twoFactorEnabled">
|
||||
<p>%i18n:desktop.tags.mk-2fa-setting.already-registered%</p>
|
||||
<button @click="unregister" class="ui">%i18n:desktop.tags.mk-2fa-setting.unregister%</button>
|
||||
</template>
|
||||
|
|
@ -54,7 +54,7 @@ export default Vue.extend({
|
|||
password: password
|
||||
}).then(() => {
|
||||
(this as any).apis.notify('%i18n:desktop.tags.mk-2fa-setting.unregistered%');
|
||||
(this as any).os.i.account.two_factor_enabled = false;
|
||||
(this as any).os.i.account.twoFactorEnabled = false;
|
||||
});
|
||||
});
|
||||
},
|
||||
|
|
@ -64,7 +64,7 @@ export default Vue.extend({
|
|||
token: this.token
|
||||
}).then(() => {
|
||||
(this as any).apis.notify('%i18n:desktop.tags.mk-2fa-setting.success%');
|
||||
(this as any).os.i.account.two_factor_enabled = true;
|
||||
(this as any).os.i.account.twoFactorEnabled = true;
|
||||
}).catch(() => {
|
||||
(this as any).apis.notify('%i18n:desktop.tags.mk-2fa-setting.failed%');
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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%');
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
<button class="ui primary" @click="save">%i18n:desktop.tags.mk-profile-setting.save%</button>
|
||||
<section>
|
||||
<h2>その他</h2>
|
||||
<mk-switch v-model="os.i.account.is_bot" @change="onChangeIsBot" text="このアカウントはbotです"/>
|
||||
<mk-switch v-model="os.i.account.isBot" @change="onChangeIsBot" text="このアカウントはbotです"/>
|
||||
</section>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -63,7 +63,7 @@ export default Vue.extend({
|
|||
},
|
||||
onChangeIsBot() {
|
||||
(this as any).api('i/update', {
|
||||
is_bot: (this as any).os.i.account.is_bot
|
||||
isBot: (this as any).os.i.account.isBot
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
<template v-if="signin.success">%fa:check%</template>
|
||||
<template v-else>%fa:times%</template>
|
||||
<span class="ip">{{ signin.ip }}</span>
|
||||
<mk-time :time="signin.created_at"/>
|
||||
<mk-time :time="signin.createdAt"/>
|
||||
</header>
|
||||
<div class="headers" v-show="signin._show">
|
||||
<tree-view :data="signin.headers"/>
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
<section class="web" v-show="page == 'web'">
|
||||
<h1>動作</h1>
|
||||
<mk-switch v-model="os.i.account.client_settings.fetchOnScroll" @change="onChangeFetchOnScroll" text="スクロールで自動読み込み">
|
||||
<mk-switch v-model="os.i.account.clientSettings.fetchOnScroll" @change="onChangeFetchOnScroll" text="スクロールで自動読み込み">
|
||||
<span>ページを下までスクロールしたときに自動で追加のコンテンツを読み込みます。</span>
|
||||
</mk-switch>
|
||||
<mk-switch v-model="autoPopout" text="ウィンドウの自動ポップアウト">
|
||||
|
|
@ -33,11 +33,11 @@
|
|||
<div class="div">
|
||||
<button class="ui button" @click="customizeHome">ホームをカスタマイズ</button>
|
||||
</div>
|
||||
<mk-switch v-model="os.i.account.client_settings.showPostFormOnTopOfTl" @change="onChangeShowPostFormOnTopOfTl" text="タイムライン上部に投稿フォームを表示する"/>
|
||||
<mk-switch v-model="os.i.account.client_settings.showMaps" @change="onChangeShowMaps" text="マップの自動展開">
|
||||
<mk-switch v-model="os.i.account.clientSettings.showPostFormOnTopOfTl" @change="onChangeShowPostFormOnTopOfTl" text="タイムライン上部に投稿フォームを表示する"/>
|
||||
<mk-switch v-model="os.i.account.clientSettings.showMaps" @change="onChangeShowMaps" text="マップの自動展開">
|
||||
<span>位置情報が添付された投稿のマップを自動的に展開します。</span>
|
||||
</mk-switch>
|
||||
<mk-switch v-model="os.i.account.client_settings.gradientWindowHeader" @change="onChangeGradientWindowHeader" text="ウィンドウのタイトルバーにグラデーションを使用"/>
|
||||
<mk-switch v-model="os.i.account.clientSettings.gradientWindowHeader" @change="onChangeGradientWindowHeader" text="ウィンドウのタイトルバーにグラデーションを使用"/>
|
||||
</section>
|
||||
|
||||
<section class="web" v-show="page == 'web'">
|
||||
|
|
@ -57,7 +57,7 @@
|
|||
|
||||
<section class="web" v-show="page == 'web'">
|
||||
<h1>モバイル</h1>
|
||||
<mk-switch v-model="os.i.account.client_settings.disableViaMobile" @change="onChangeDisableViaMobile" text="「モバイルからの投稿」フラグを付けない"/>
|
||||
<mk-switch v-model="os.i.account.clientSettings.disableViaMobile" @change="onChangeDisableViaMobile" text="「モバイルからの投稿」フラグを付けない"/>
|
||||
</section>
|
||||
|
||||
<section class="web" v-show="page == 'web'">
|
||||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<template>
|
||||
<div class="mk-sub-post-content">
|
||||
<div class="body">
|
||||
<a class="reply" v-if="post.reply_id">%fa:reply%</a>
|
||||
<a class="reply" v-if="post.replyId">%fa:reply%</a>
|
||||
<mk-post-html :ast="post.ast" :i="os.i"/>
|
||||
<a class="rp" v-if="post.repost_id" :href="`/post:${post.repost_id}`">RP: ...</a>
|
||||
<a class="rp" v-if="post.repostId" :href="`/post:${post.repostId}`">RP: ...</a>
|
||||
<mk-url-preview v-for="url in urls" :url="url" :key="url"/>
|
||||
</div>
|
||||
<details v-if="post.media">
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ export default Vue.extend({
|
|||
},
|
||||
computed: {
|
||||
alone(): boolean {
|
||||
return (this as any).os.i.following_count == 0;
|
||||
return (this as any).os.i.followingCount == 0;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
|
@ -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();
|
||||
|
|
@ -107,7 +107,7 @@ export default Vue.extend({
|
|||
this.fetch();
|
||||
},
|
||||
onScroll() {
|
||||
if ((this as any).os.i.account.client_settings.fetchOnScroll !== false) {
|
||||
if ((this as any).os.i.account.clientSettings.fetchOnScroll !== false) {
|
||||
const current = window.scrollY + window.innerHeight;
|
||||
if (current > document.body.offsetHeight - 8) this.more();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
|
|
|||
|
|
@ -44,9 +44,9 @@ export default Vue.extend({
|
|||
},
|
||||
mounted() {
|
||||
if ((this as any).os.isSignedIn) {
|
||||
const ago = (new Date().getTime() - new Date((this as any).os.i.account.last_used_at).getTime()) / 1000
|
||||
const ago = (new Date().getTime() - new Date((this as any).os.i.account.lastUsedAt).getTime()) / 1000
|
||||
const isHisasiburi = ago >= 3600;
|
||||
(this as any).os.i.account.last_used_at = new Date();
|
||||
(this as any).os.i.account.lastUsedAt = new Date();
|
||||
if (isHisasiburi) {
|
||||
(this.$refs.welcomeback as any).style.display = 'block';
|
||||
(this.$refs.main as any).style.overflow = 'hidden';
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
@ -12,13 +12,13 @@
|
|||
<div class="description">{{ u.description }}</div>
|
||||
<div class="status">
|
||||
<div>
|
||||
<p>投稿</p><a>{{ u.posts_count }}</a>
|
||||
<p>投稿</p><a>{{ u.postsCount }}</a>
|
||||
</div>
|
||||
<div>
|
||||
<p>フォロー</p><a>{{ u.following_count }}</a>
|
||||
<p>フォロー</p><a>{{ u.followingCount }}</a>
|
||||
</div>
|
||||
<div>
|
||||
<p>フォロワー</p><a>{{ u.followers_count }}</a>
|
||||
<p>フォロワー</p><a>{{ u.followersCount }}</a>
|
||||
</div>
|
||||
</div>
|
||||
<mk-follow-button v-if="os.isSignedIn && user.id != os.i.id" :user="u"/>
|
||||
|
|
@ -58,7 +58,7 @@ export default Vue.extend({
|
|||
} else {
|
||||
const query = this.user[0] == '@' ?
|
||||
parseAcct(this.user[0].substr(1)) :
|
||||
{ user_id: this.user[0] };
|
||||
{ userId: this.user[0] };
|
||||
|
||||
(this as any).api('users/show', query).then(user => {
|
||||
this.u = user;
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
<span class="username">@{{ acct }}</span>
|
||||
</header>
|
||||
<div class="body">
|
||||
<p class="followed" v-if="user.is_followed">フォローされています</p>
|
||||
<p class="followed" v-if="user.isFollowed">フォローされています</p>
|
||||
<div class="description">{{ user.description }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@ export default Vue.extend({
|
|||
computed: {
|
||||
withGradient(): boolean {
|
||||
return (this as any).os.isSignedIn
|
||||
? (this as any).os.i.account.client_settings.gradientWindowHeader != null
|
||||
? (this as any).os.i.account.client_settings.gradientWindowHeader
|
||||
? (this as any).os.i.account.clientSettings.gradientWindowHeader != null
|
||||
? (this as any).os.i.account.clientSettings.gradientWindowHeader
|
||||
: false
|
||||
: false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,8 +92,8 @@ export default Vue.extend({
|
|||
},
|
||||
withGradient(): boolean {
|
||||
return (this as any).os.isSignedIn
|
||||
? (this as any).os.i.account.client_settings.gradientWindowHeader != null
|
||||
? (this as any).os.i.account.client_settings.gradientWindowHeader
|
||||
? (this as any).os.i.account.clientSettings.gradientWindowHeader != null
|
||||
? (this as any).os.i.account.clientSettings.gradientWindowHeader
|
||||
: false
|
||||
: false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ export default Vue.extend({
|
|||
},
|
||||
|
||||
onStreamPost(post) {
|
||||
if (document.hidden && post.user_id != (this as any).os.i.id) {
|
||||
if (document.hidden && post.userId != (this as any).os.i.id) {
|
||||
this.unreadCount++;
|
||||
document.title = `(${this.unreadCount}) ${getPostSummary(post)}`;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ export default Vue.extend({
|
|||
this.fetching = true;
|
||||
|
||||
(this as any).api('othello/games/show', {
|
||||
game_id: this.$route.params.game
|
||||
gameId: this.$route.params.game
|
||||
}).then(game => {
|
||||
this.game = game;
|
||||
this.fetching = false;
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ export default Vue.extend({
|
|||
this.fetching = true;
|
||||
|
||||
(this as any).api('posts/show', {
|
||||
post_id: this.$route.params.post
|
||||
postId: this.$route.params.post
|
||||
}).then(post => {
|
||||
this.post = post;
|
||||
this.fetching = false;
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
@ -28,7 +28,7 @@ export default Vue.extend({
|
|||
},
|
||||
mounted() {
|
||||
(this as any).api('users/followers', {
|
||||
user_id: this.user.id,
|
||||
userId: this.user.id,
|
||||
iknow: true,
|
||||
limit: 16
|
||||
}).then(x => {
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
@ -35,7 +35,7 @@ export default Vue.extend({
|
|||
},
|
||||
mounted() {
|
||||
(this as any).api('users/get_frequently_replied_users', {
|
||||
user_id: this.user.id,
|
||||
userId: this.user.id,
|
||||
limit: 4
|
||||
}).then(docs => {
|
||||
this.users = docs.map(doc => doc.user);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,16 +5,16 @@
|
|||
<x-profile :user="user"/>
|
||||
<x-photos :user="user"/>
|
||||
<x-followers-you-know v-if="os.isSignedIn && os.i.id != user.id" :user="user"/>
|
||||
<p v-if="user.host === null">%i18n:desktop.tags.mk-user.last-used-at%: <b><mk-time :time="user.account.last_used_at"/></b></p>
|
||||
<p v-if="user.host === null">%i18n:desktop.tags.mk-user.last-used-at%: <b><mk-time :time="user.account.lastUsedAt"/></b></p>
|
||||
</div>
|
||||
</div>
|
||||
<main>
|
||||
<mk-post-detail v-if="user.pinned_post" :post="user.pinned_post" :compact="true"/>
|
||||
<mk-post-detail v-if="user.pinnedPost" :post="user.pinnedPost" :compact="true"/>
|
||||
<x-timeline class="timeline" ref="tl" :user="user"/>
|
||||
</main>
|
||||
<div>
|
||||
<div ref="right">
|
||||
<mk-calendar @chosen="warp" :start="new Date(user.created_at)"/>
|
||||
<mk-calendar @chosen="warp" :start="new Date(user.createdAt)"/>
|
||||
<mk-activity :user="user"/>
|
||||
<x-friends :user="user"/>
|
||||
<div class="nav"><mk-nav/></div>
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@ export default Vue.extend({
|
|||
},
|
||||
mounted() {
|
||||
(this as any).api('users/posts', {
|
||||
user_id: this.user.id,
|
||||
with_media: true,
|
||||
userId: this.user.id,
|
||||
withMedia: true,
|
||||
limit: 9
|
||||
}).then(posts => {
|
||||
posts.forEach(post => {
|
||||
|
|
|
|||
|
|
@ -2,21 +2,21 @@
|
|||
<div class="profile">
|
||||
<div class="friend-form" v-if="os.isSignedIn && os.i.id != user.id">
|
||||
<mk-follow-button :user="user" size="big"/>
|
||||
<p class="followed" v-if="user.is_followed">%i18n:desktop.tags.mk-user.follows-you%</p>
|
||||
<p v-if="user.is_muted">%i18n:desktop.tags.mk-user.muted% <a @click="unmute">%i18n:desktop.tags.mk-user.unmute%</a></p>
|
||||
<p v-if="!user.is_muted"><a @click="mute">%i18n:desktop.tags.mk-user.mute%</a></p>
|
||||
<p class="followed" v-if="user.isFollowed">%i18n:desktop.tags.mk-user.follows-you%</p>
|
||||
<p v-if="user.isMuted">%i18n:desktop.tags.mk-user.muted% <a @click="unmute">%i18n:desktop.tags.mk-user.unmute%</a></p>
|
||||
<p v-if="!user.isMuted"><a @click="mute">%i18n:desktop.tags.mk-user.mute%</a></p>
|
||||
</div>
|
||||
<div class="description" v-if="user.description">{{ user.description }}</div>
|
||||
<div class="birthday" v-if="user.host === null && user.account.profile.birthday">
|
||||
<p>%fa:birthday-cake%{{ user.account.profile.birthday.replace('-', '年').replace('-', '月') + '日' }} ({{ age }}歳)</p>
|
||||
</div>
|
||||
<div class="twitter" v-if="user.host === null && user.account.twitter">
|
||||
<p>%fa:B twitter%<a :href="`https://twitter.com/${user.account.twitter.screen_name}`" target="_blank">@{{ user.account.twitter.screen_name }}</a></p>
|
||||
<p>%fa:B twitter%<a :href="`https://twitter.com/${user.account.twitter.screenName}`" target="_blank">@{{ user.account.twitter.screenName }}</a></p>
|
||||
</div>
|
||||
<div class="status">
|
||||
<p class="posts-count">%fa:angle-right%<a>{{ user.posts_count }}</a><b>投稿</b></p>
|
||||
<p class="following">%fa:angle-right%<a @click="showFollowing">{{ user.following_count }}</a>人を<b>フォロー</b></p>
|
||||
<p class="followers">%fa:angle-right%<a @click="showFollowers">{{ user.followers_count }}</a>人の<b>フォロワー</b></p>
|
||||
<p class="posts-count">%fa:angle-right%<a>{{ user.postsCount }}</a><b>投稿</b></p>
|
||||
<p class="following">%fa:angle-right%<a @click="showFollowing">{{ user.followingCount }}</a>人を<b>フォロー</b></p>
|
||||
<p class="followers">%fa:angle-right%<a @click="showFollowers">{{ user.followersCount }}</a>人の<b>フォロワー</b></p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -49,9 +49,9 @@ export default Vue.extend({
|
|||
|
||||
mute() {
|
||||
(this as any).api('mute/create', {
|
||||
user_id: this.user.id
|
||||
userId: this.user.id
|
||||
}).then(() => {
|
||||
this.user.is_muted = true;
|
||||
this.user.isMuted = true;
|
||||
}, () => {
|
||||
alert('error');
|
||||
});
|
||||
|
|
@ -59,9 +59,9 @@ export default Vue.extend({
|
|||
|
||||
unmute() {
|
||||
(this as any).api('mute/delete', {
|
||||
user_id: this.user.id
|
||||
userId: this.user.id
|
||||
}).then(() => {
|
||||
this.user.is_muted = false;
|
||||
this.user.isMuted = false;
|
||||
}, () => {
|
||||
alert('error');
|
||||
});
|
||||
|
|
|
|||
|
|
@ -61,8 +61,8 @@ export default Vue.extend({
|
|||
},
|
||||
fetch(cb?) {
|
||||
(this as any).api('users/posts', {
|
||||
user_id: this.user.id,
|
||||
until_date: this.date ? this.date.getTime() : undefined,
|
||||
userId: this.user.id,
|
||||
untilDate: this.date ? this.date.getTime() : undefined,
|
||||
with_replies: this.mode == 'with-replies'
|
||||
}).then(posts => {
|
||||
this.posts = posts;
|
||||
|
|
@ -74,9 +74,9 @@ export default Vue.extend({
|
|||
if (this.moreFetching || this.fetching || this.posts.length == 0) return;
|
||||
this.moreFetching = true;
|
||||
(this as any).api('users/posts', {
|
||||
user_id: this.user.id,
|
||||
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);
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@ export default Vue.extend({
|
|||
|
||||
(this as any).api('posts/create', {
|
||||
text: this.text,
|
||||
reply_id: reply ? reply.id : undefined,
|
||||
channel_id: (this.$parent as any).channel.id
|
||||
replyId: reply ? reply.id : undefined,
|
||||
channelId: (this.$parent as any).channel.id
|
||||
}).then(data => {
|
||||
this.text = '';
|
||||
}).catch(err => {
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ export default Vue.extend({
|
|||
this.fetching = true;
|
||||
|
||||
(this as any).api('channels/posts', {
|
||||
channel_id: this.channel.id
|
||||
channelId: this.channel.id
|
||||
}).then(posts => {
|
||||
this.posts = posts;
|
||||
this.fetching = false;
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ export default define({
|
|||
this.fetching = true;
|
||||
|
||||
(this as any).api('channels/show', {
|
||||
channel_id: this.props.channel
|
||||
channelId: this.props.channel
|
||||
}).then(channel => {
|
||||
this.channel = channel;
|
||||
this.fetching = false;
|
||||
|
|
|
|||
|
|
@ -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="クリックでアバター編集"
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue