1
0
This commit is contained in:
syuilo
2018-03-28 16:39:14 +09:00
parent 7d4d9dbaa6
commit 3d5cdb8d2d
237 changed files with 1661 additions and 1354 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ export default (os) => (opts) => {
const text = window.prompt(`${getPostSummary(o.repost)}」をRepost`);
if (text == null) return;
os.api('posts/create', {
repost_id: o.repost.id,
repostId: o.repost.id,
text: text == '' ? undefined : text
});
} else {
@@ -29,7 +29,7 @@ export default Vue.extend({
},
mounted() {
(this as any).api('aggregation/users/activity', {
user_id: this.user.id,
userId: this.user.id,
limit: 30
}).then(data => {
data.forEach(d => d.total = d.posts + d.replies + d.reposts);
@@ -29,7 +29,7 @@
<span class="separator"></span>
<span class="data-size">{{ file.datasize | bytes }}</span>
<span class="separator"></span>
<span class="created-at" @click="showCreatedAt">%fa:R clock%<mk-time :time="file.created_at"/></span>
<span class="created-at" @click="showCreatedAt">%fa:R clock%<mk-time :time="file.createdAt"/></span>
</div>
</div>
<div class="menu">
@@ -86,8 +86,8 @@ export default Vue.extend({
return this.file.type.split('/')[0];
},
style(): any {
return this.file.properties.average_color ? {
'background-color': `rgb(${ this.file.properties.average_color.join(',') })`
return this.file.properties.avgColor ? {
'background-color': `rgb(${ this.file.properties.avgColor.join(',') })`
} : {};
}
},
@@ -96,7 +96,7 @@ export default Vue.extend({
const name = window.prompt('名前を変更', this.file.name);
if (name == null || name == '' || name == this.file.name) return;
(this as any).api('drive/files/update', {
file_id: this.file.id,
fileId: this.file.id,
name: name
}).then(() => {
this.browser.cf(this.file, true);
@@ -105,15 +105,15 @@ export default Vue.extend({
move() {
(this as any).apis.chooseDriveFolder().then(folder => {
(this as any).api('drive/files/update', {
file_id: this.file.id,
folder_id: folder == null ? null : folder.id
fileId: this.file.id,
folderId: folder == null ? null : folder.id
}).then(() => {
this.browser.cf(this.file, true);
});
});
},
showCreatedAt() {
alert(new Date(this.file.created_at).toLocaleString());
alert(new Date(this.file.createdAt).toLocaleString());
},
onImageLoaded() {
const self = this;
@@ -19,7 +19,7 @@
<p class="data-size">{{ file.datasize | bytes }}</p>
<p class="separator"></p>
<p class="created-at">
%fa:R clock%<mk-time :time="file.created_at"/>
%fa:R clock%<mk-time :time="file.createdAt"/>
</p>
</footer>
</div>
@@ -42,7 +42,7 @@ export default Vue.extend({
},
thumbnail(): any {
return {
'background-color': this.file.properties.average_color ? `rgb(${this.file.properties.average_color.join(',')})` : 'transparent',
'background-color': this.file.properties.avgColor ? `rgb(${this.file.properties.avgColor.join(',')})` : 'transparent',
'background-image': `url(${this.file.url}?thumbnail&size=128)`
};
}
+14 -14
View File
@@ -129,7 +129,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);
@@ -142,7 +142,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);
@@ -167,7 +167,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 = [];
@@ -182,7 +182,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)) return;
@@ -197,7 +197,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);
@@ -262,7 +262,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) {
@@ -275,7 +275,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) {
@@ -318,7 +318,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,
until_id: this.files[this.files.length - 1].id
}).then(files => {
@@ -357,7 +357,7 @@ export default Vue.extend({
this.fetching = true;
(this as any).api('drive/files/show', {
file_id: file
fileId: file
}).then(file => {
this.file = file;
this.folder = null;
@@ -405,7 +405,7 @@ export default Vue.extend({
if (name == null || name == '') return;
(this as any).api('drive/folders/create', {
name: name,
parent_id: this.folder ? this.folder.id : undefined
parentId: this.folder ? this.folder.id : undefined
}).then(folder => {
this.addFolder(folder, true);
});
@@ -420,7 +420,7 @@ export default Vue.extend({
if (name == null || name == '') return;
(this as any).api('drive/folders/update', {
name: name,
folder_id: this.folder.id
folderId: this.folder.id
}).then(folder => {
this.cd(folder);
});
@@ -433,8 +433,8 @@ export default Vue.extend({
}
(this as any).apis.chooseDriveFolder().then(folder => {
(this as any).api('drive/folders/update', {
parent_id: folder ? folder.id : null,
folder_id: this.folder.id
parentId: folder ? folder.id : null,
folderId: this.folder.id
}).then(folder => {
this.cd(folder);
});
@@ -446,7 +446,7 @@ export default Vue.extend({
if (url == null || url == '') return;
(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
});
alert('アップロードをリクエストしました。アップロードが完了するまで時間がかかる場合があります。');
},
@@ -57,7 +57,7 @@ export default Vue.extend({
this.wait = true;
if (this.user.is_following) {
(this as any).api('following/delete', {
user_id: this.user.id
userId: this.user.id
}).then(() => {
this.user.is_following = false;
}).catch(err => {
@@ -67,7 +67,7 @@ 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;
}).catch(err => {
@@ -10,7 +10,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)`
};
}
@@ -1,7 +1,7 @@
<template>
<div class="mk-notification">
<div class="notification reaction" v-if="notification.type == 'reaction'">
<mk-time :time="notification.created_at"/>
<mk-time :time="notification.createdAt"/>
<router-link class="avatar-anchor" :to="`/@${acct}`">
<img class="avatar" :src="`${notification.user.avatar_url}?thumbnail&size=64`" alt="avatar"/>
</router-link>
@@ -18,7 +18,7 @@
</div>
<div class="notification repost" v-if="notification.type == 'repost'">
<mk-time :time="notification.created_at"/>
<mk-time :time="notification.createdAt"/>
<router-link class="avatar-anchor" :to="`/@${acct}`">
<img class="avatar" :src="`${notification.post.user.avatar_url}?thumbnail&size=64`" alt="avatar"/>
</router-link>
@@ -38,7 +38,7 @@
</template>
<div class="notification follow" v-if="notification.type == 'follow'">
<mk-time :time="notification.created_at"/>
<mk-time :time="notification.createdAt"/>
<router-link class="avatar-anchor" :to="`/@${acct}`">
<img class="avatar" :src="`${notification.user.avatar_url}?thumbnail&size=64`" alt="avatar"/>
</router-link>
@@ -59,7 +59,7 @@
</template>
<div class="notification poll_vote" v-if="notification.type == 'poll_vote'">
<mk-time :time="notification.created_at"/>
<mk-time :time="notification.createdAt"/>
<router-link class="avatar-anchor" :to="`/@${acct}`">
<img class="avatar" :src="`${notification.user.avatar_url}?thumbnail&size=64`" alt="avatar"/>
</router-link>
@@ -34,8 +34,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;
@@ -7,7 +7,7 @@
<div>
{{ text }}
</div>
<mk-time :time="post.created_at"/>
<mk-time :time="post.createdAt"/>
</a>
</div>
</template>
@@ -8,7 +8,7 @@
<router-link class="name" :to="`/@${acct}`">{{ 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">
@@ -2,7 +2,7 @@
<div class="mk-post-detail">
<button
class="more"
v-if="p.reply && p.reply.reply_id && context == null"
v-if="p.reply && p.reply.replyId && context == null"
@click="fetchContext"
:disabled="fetchingContext"
>
@@ -54,7 +54,7 @@
</div>
</div>
<router-link class="time" :to="`/@${pAcct}/${p.id}`">
<mk-time :time="p.created_at" mode="detail"/>
<mk-time :time="p.createdAt" mode="detail"/>
</router-link>
<footer>
<mk-reactions-viewer :post="p"/>
@@ -115,7 +115,7 @@ 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 {
@@ -142,7 +142,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;
@@ -151,7 +151,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);
@@ -173,7 +173,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();
@@ -111,11 +111,11 @@ export default Vue.extend({
},
post() {
this.posting = true;
const viaMobile = (this as any).os.i.account.client_settings.disableViaMobile !== true;
const viaMobile = (this as any).os.i.account.clientSettings.disableViaMobile !== true;
(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,
mediaIds: this.files.length > 0 ? this.files.map(f => f.id) : undefined,
replyId: this.reply ? this.reply.id : undefined,
poll: this.poll ? (this.$refs.poll as any).get() : undefined,
geo: this.geo ? {
latitude: this.geo.latitude,
@@ -126,7 +126,7 @@ export default Vue.extend({
heading: isNaN(this.geo.heading) ? null : this.geo.heading,
speed: this.geo.speed,
} : null,
via_mobile: viaMobile
viaMobile: viaMobile
}).then(data => {
this.$emit('post');
this.$destroy();
@@ -8,7 +8,7 @@
<router-link class="name" :to="`/@${acct}`">{{ 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">
@@ -8,7 +8,7 @@
<router-link class="name" :to="`/@${acct}`">{{ 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">
+7 -7
View File
@@ -13,7 +13,7 @@
<router-link class="name" :to="`/@${acct}`">{{ post.user.name }}</router-link>
<span>{{ '%i18n:mobile.tags.mk-timeline-post.reposted-by%'.substr('%i18n:mobile.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="`/@${pAcct}`">
@@ -22,12 +22,12 @@
<div class="main">
<header>
<router-link class="name" :to="`/@${pAcct}`">{{ p.user.name }}</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">@{{ pAcct }}</span>
<div class="info">
<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>
@@ -103,7 +103,7 @@ 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 {
@@ -144,7 +144,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);
@@ -194,7 +194,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;
}
},
@@ -28,8 +28,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;
@@ -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 v-if="post.ast" :ast="post.ast" :i="os.i"/>
<a class="rp" v-if="post.repost_id">RP: ...</a>
<a class="rp" v-if="post.repostId">RP: ...</a>
</div>
<details v-if="post.media">
<summary>({{ post.media.length }}個のメディア)</summary>
@@ -41,7 +41,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() {
@@ -57,9 +57,9 @@ export default Vue.extend({
}
});
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';
@@ -33,7 +33,7 @@ export default Vue.extend({
},
mounted() {
(this as any).api('users/posts', {
user_id: this.user.id,
userId: this.user.id,
with_media: this.withMedia,
limit: limit + 1
}).then(posts => {
@@ -50,7 +50,7 @@ export default Vue.extend({
more() {
this.moreFetching = true;
(this as any).api('users/posts', {
user_id: this.user.id,
userId: this.user.id,
with_media: this.withMedia,
limit: limit + 1,
until_id: this.posts[this.posts.length - 1].id
+2 -2
View File
@@ -7,7 +7,7 @@
<mk-users-list
v-if="!fetching"
:fetch="fetchUsers"
:count="user.followers_count"
:count="user.followersCount"
:you-know-count="user.followers_you_know_count"
@loaded="onLoaded"
>
@@ -54,7 +54,7 @@ export default Vue.extend({
},
fetchUsers(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
+2 -2
View File
@@ -7,7 +7,7 @@
<mk-users-list
v-if="!fetching"
:fetch="fetchUsers"
:count="user.following_count"
:count="user.followingCount"
:you-know-count="user.following_you_know_count"
@loaded="onLoaded"
>
@@ -54,7 +54,7 @@ export default Vue.extend({
},
fetchUsers(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
+11 -11
View File
@@ -82,8 +82,8 @@ export default Vue.extend({
};
},
created() {
if ((this as any).os.i.account.client_settings.mobile_home == null) {
Vue.set((this as any).os.i.account.client_settings, 'mobile_home', [{
if ((this as any).os.i.account.clientSettings.mobile_home == null) {
Vue.set((this as any).os.i.account.clientSettings, 'mobile_home', [{
name: 'calendar',
id: 'a', data: {}
}, {
@@ -105,14 +105,14 @@ export default Vue.extend({
name: 'version',
id: 'g', data: {}
}]);
this.widgets = (this as any).os.i.account.client_settings.mobile_home;
this.widgets = (this as any).os.i.account.clientSettings.mobile_home;
this.saveHome();
} else {
this.widgets = (this as any).os.i.account.client_settings.mobile_home;
this.widgets = (this as any).os.i.account.clientSettings.mobile_home;
}
this.$watch('os.i.account.client_settings', i => {
this.widgets = (this as any).os.i.account.client_settings.mobile_home;
this.$watch('os.i.account.clientSettings', i => {
this.widgets = (this as any).os.i.account.clientSettings.mobile_home;
}, {
deep: true
});
@@ -144,7 +144,7 @@ export default Vue.extend({
Progress.done();
},
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)}`;
}
@@ -157,15 +157,15 @@ export default Vue.extend({
},
onHomeUpdated(data) {
if (data.home) {
(this as any).os.i.account.client_settings.mobile_home = data.home;
(this as any).os.i.account.clientSettings.mobile_home = data.home;
this.widgets = data.home;
} else {
const w = (this as any).os.i.account.client_settings.mobile_home.find(w => w.id == data.id);
const w = (this as any).os.i.account.clientSettings.mobile_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 = (this as any).os.i.account.client_settings.mobile_home;
this.widgets = (this as any).os.i.account.clientSettings.mobile_home;
}
}
},
@@ -194,7 +194,7 @@ export default Vue.extend({
this.saveHome();
},
saveHome() {
(this as any).os.i.account.client_settings.mobile_home = this.widgets;
(this as any).os.i.account.clientSettings.mobile_home = this.widgets;
(this as any).api('i/update_mobile_home', {
home: this.widgets
});
+1 -1
View File
@@ -38,7 +38,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;
@@ -69,7 +69,7 @@ export default Vue.extend({
this.avatarSaving = true;
(this as any).api('i/update', {
avatar_id: file.id
avatarId: file.id
}).then(() => {
this.avatarSaving = false;
alert('%i18n:mobile.tags.mk-profile-setting.avatar-saved%');
@@ -83,7 +83,7 @@ export default Vue.extend({
this.bannerSaving = true;
(this as any).api('i/update', {
banner_id: file.id
bannerId: file.id
}).then(() => {
this.bannerSaving = false;
alert('%i18n:mobile.tags.mk-profile-setting.banner-saved%');
+3 -3
View File
@@ -27,15 +27,15 @@
</div>
<div class="status">
<a>
<b>{{ user.posts_count | number }}</b>
<b>{{ user.postsCount | number }}</b>
<i>%i18n:mobile.tags.mk-user.posts%</i>
</a>
<a :href="`@${acct}/following`">
<b>{{ user.following_count | number }}</b>
<b>{{ user.followingCount | number }}</b>
<i>%i18n:mobile.tags.mk-user.following%</i>
</a>
<a :href="`@${acct}/followers`">
<b>{{ user.followers_count | number }}</b>
<b>{{ user.followersCount | number }}</b>
<i>%i18n:mobile.tags.mk-user.followers%</i>
</a>
</div>
@@ -27,7 +27,7 @@ export default Vue.extend({
},
mounted() {
(this as any).api('users/followers', {
user_id: this.user.id,
userId: this.user.id,
iknow: true,
limit: 30
}).then(res => {
@@ -20,7 +20,7 @@ export default Vue.extend({
},
mounted() {
(this as any).api('users/get_frequently_replied_users', {
user_id: this.user.id
userId: this.user.id
}).then(res => {
this.users = res.map(x => x.user);
this.fetching = false;
@@ -29,7 +29,7 @@ export default Vue.extend({
},
mounted() {
(this as any).api('users/posts', {
user_id: this.user.id,
userId: this.user.id,
with_media: true,
limit: 6
}).then(posts => {
@@ -20,7 +20,7 @@ export default Vue.extend({
},
mounted() {
(this as any).api('users/posts', {
user_id: this.user.id
userId: this.user.id
}).then(posts => {
this.posts = posts;
this.fetching = false;
+2 -2
View File
@@ -1,6 +1,6 @@
<template>
<div class="root home">
<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"/>
<section class="recent-posts">
<h2>%fa:R comments%%i18n:mobile.tags.mk-user-overview.recent-posts%</h2>
<div>
@@ -31,7 +31,7 @@
<x-followers-you-know :user="user"/>
</div>
</section>
<p v-if="user.host === null">%i18n:mobile.tags.mk-user-overview.last-used-at%: <b><mk-time :time="user.account.last_used_at"/></b></p>
<p v-if="user.host === null">%i18n:mobile.tags.mk-user-overview.last-used-at%: <b><mk-time :time="user.account.lastUsedAt"/></b></p>
</div>
</template>
+2 -2
View File
@@ -8,7 +8,7 @@
<form @submit.prevent="onSubmit">
<input v-model="username" type="text" pattern="^[a-zA-Z0-9_]+$" placeholder="ユーザー名" autofocus required @change="onUsernameChange"/>
<input v-model="password" type="password" placeholder="パスワード" required/>
<input v-if="user && user.account.two_factor_enabled" v-model="token" type="number" placeholder="トークン" required/>
<input v-if="user && user.account.twoFactorEnabled" v-model="token" type="number" placeholder="トークン" required/>
<button type="submit" :disabled="signing">{{ signing ? 'ログインしています' : 'ログイン' }}</button>
</form>
<div>
@@ -70,7 +70,7 @@ export default Vue.extend({
(this as any).api('signin', {
username: this.username,
password: this.password,
token: this.user && this.user.account.two_factor_enabled ? this.token : undefined
token: this.user && this.user.account.twoFactorEnabled ? this.token : undefined
}).then(() => {
location.reload();
}).catch(() => {