summaryrefslogtreecommitdiff
path: root/src/web/app/mobile
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2018-03-26 14:51:03 +0900
committerGitHub <noreply@github.com>2018-03-26 14:51:03 +0900
commit8d7d200efffcf9ffd49dba28f729a6e5b9c11f68 (patch)
tree10e3209cd77c3a08b488c08bd4b2f9d7e87de974 /src/web/app/mobile
parentMerge pull request #1293 from rinsuki/fix/using-hostname-insteadof-host (diff)
parentIntroduce account document to user document (diff)
downloadmisskey-8d7d200efffcf9ffd49dba28f729a6e5b9c11f68.tar.gz
misskey-8d7d200efffcf9ffd49dba28f729a6e5b9c11f68.tar.bz2
misskey-8d7d200efffcf9ffd49dba28f729a6e5b9c11f68.zip
Merge pull request #1287 from akihikodaki/account
Introduce account document to user document
Diffstat (limited to 'src/web/app/mobile')
-rw-r--r--src/web/app/mobile/views/components/post-detail.vue2
-rw-r--r--src/web/app/mobile/views/components/post-form.vue2
-rw-r--r--src/web/app/mobile/views/components/post.vue4
-rw-r--r--src/web/app/mobile/views/components/ui.header.vue4
-rw-r--r--src/web/app/mobile/views/pages/home.vue20
-rw-r--r--src/web/app/mobile/views/pages/profile-setting.vue4
-rw-r--r--src/web/app/mobile/views/pages/user.vue10
-rw-r--r--src/web/app/mobile/views/pages/user/home.vue2
-rw-r--r--src/web/app/mobile/views/pages/welcome.vue4
9 files changed, 26 insertions, 26 deletions
diff --git a/src/web/app/mobile/views/components/post-detail.vue b/src/web/app/mobile/views/components/post-detail.vue
index d51bfbc0e6..4b0b59eff4 100644
--- a/src/web/app/mobile/views/components/post-detail.vue
+++ b/src/web/app/mobile/views/components/post-detail.vue
@@ -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.client_settings.showMaps : true;
+ const shouldShowMap = (this as any).os.isSignedIn ? (this as any).os.i.account.client_settings.showMaps : true;
if (shouldShowMap) {
(this as any).os.getGoogleMaps().then(maps => {
const uluru = new maps.LatLng(this.p.geo.latitude, this.p.geo.longitude);
diff --git a/src/web/app/mobile/views/components/post-form.vue b/src/web/app/mobile/views/components/post-form.vue
index 5b47caebc7..2aa3c6f6c0 100644
--- a/src/web/app/mobile/views/components/post-form.vue
+++ b/src/web/app/mobile/views/components/post-form.vue
@@ -111,7 +111,7 @@ export default Vue.extend({
},
post() {
this.posting = true;
- const viaMobile = (this as any).os.i.client_settings.disableViaMobile !== true;
+ const viaMobile = (this as any).os.i.account.client_settings.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,
diff --git a/src/web/app/mobile/views/components/post.vue b/src/web/app/mobile/views/components/post.vue
index d464f6460f..8df4dbf22e 100644
--- a/src/web/app/mobile/views/components/post.vue
+++ b/src/web/app/mobile/views/components/post.vue
@@ -22,7 +22,7 @@
<div class="main">
<header>
<router-link class="name" :to="`/${p.user.username}`">{{ p.user.name }}</router-link>
- <span class="is-bot" v-if="p.user.is_bot">bot</span>
+ <span class="is-bot" v-if="p.user.account.is_bot">bot</span>
<span class="username">@{{ p.user.username }}</span>
<div class="info">
<span class="mobile" v-if="p.via_mobile">%fa:mobile-alt%</span>
@@ -137,7 +137,7 @@ export default Vue.extend({
// Draw map
if (this.p.geo) {
- const shouldShowMap = (this as any).os.isSignedIn ? (this as any).os.i.client_settings.showMaps : true;
+ const shouldShowMap = (this as any).os.isSignedIn ? (this as any).os.i.account.client_settings.showMaps : true;
if (shouldShowMap) {
(this as any).os.getGoogleMaps().then(maps => {
const uluru = new maps.LatLng(this.p.geo.latitude, this.p.geo.longitude);
diff --git a/src/web/app/mobile/views/components/ui.header.vue b/src/web/app/mobile/views/components/ui.header.vue
index 1ccbd5c951..66e10a0f8a 100644
--- a/src/web/app/mobile/views/components/ui.header.vue
+++ b/src/web/app/mobile/views/components/ui.header.vue
@@ -57,9 +57,9 @@ export default Vue.extend({
}
});
- const ago = (new Date().getTime() - new Date((this as any).os.i.last_used_at).getTime()) / 1000
+ const ago = (new Date().getTime() - new Date((this as any).os.i.account.last_used_at).getTime()) / 1000
const isHisasiburi = ago >= 3600;
- (this as any).os.i.last_used_at = new Date();
+ (this as any).os.i.account.last_used_at = new Date();
if (isHisasiburi) {
(this.$refs.welcomeback as any).style.display = 'block';
(this.$refs.main as any).style.overflow = 'hidden';
diff --git a/src/web/app/mobile/views/pages/home.vue b/src/web/app/mobile/views/pages/home.vue
index 44b0724915..b110fc4091 100644
--- a/src/web/app/mobile/views/pages/home.vue
+++ b/src/web/app/mobile/views/pages/home.vue
@@ -82,8 +82,8 @@ export default Vue.extend({
};
},
created() {
- if ((this as any).os.i.client_settings.mobile_home == null) {
- Vue.set((this as any).os.i.client_settings, 'mobile_home', [{
+ if ((this as any).os.i.account.client_settings.mobile_home == null) {
+ Vue.set((this as any).os.i.account.client_settings, '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.client_settings.mobile_home;
+ this.widgets = (this as any).os.i.account.client_settings.mobile_home;
this.saveHome();
} else {
- this.widgets = (this as any).os.i.client_settings.mobile_home;
+ this.widgets = (this as any).os.i.account.client_settings.mobile_home;
}
- this.$watch('os.i.client_settings', i => {
- this.widgets = (this as any).os.i.client_settings.mobile_home;
+ this.$watch('os.i.account.client_settings', i => {
+ this.widgets = (this as any).os.i.account.client_settings.mobile_home;
}, {
deep: true
});
@@ -157,15 +157,15 @@ export default Vue.extend({
},
onHomeUpdated(data) {
if (data.home) {
- (this as any).os.i.client_settings.mobile_home = data.home;
+ (this as any).os.i.account.client_settings.mobile_home = data.home;
this.widgets = data.home;
} else {
- const w = (this as any).os.i.client_settings.mobile_home.find(w => w.id == data.id);
+ const w = (this as any).os.i.account.client_settings.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.client_settings.mobile_home;
+ this.widgets = (this as any).os.i.account.client_settings.mobile_home;
}
}
},
@@ -194,7 +194,7 @@ export default Vue.extend({
this.saveHome();
},
saveHome() {
- (this as any).os.i.client_settings.mobile_home = this.widgets;
+ (this as any).os.i.account.client_settings.mobile_home = this.widgets;
(this as any).api('i/update_mobile_home', {
home: this.widgets
});
diff --git a/src/web/app/mobile/views/pages/profile-setting.vue b/src/web/app/mobile/views/pages/profile-setting.vue
index f25d4bbe8d..941165c99e 100644
--- a/src/web/app/mobile/views/pages/profile-setting.vue
+++ b/src/web/app/mobile/views/pages/profile-setting.vue
@@ -53,9 +53,9 @@ export default Vue.extend({
},
created() {
this.name = (this as any).os.i.name;
- this.location = (this as any).os.i.profile.location;
+ this.location = (this as any).os.i.account.profile.location;
this.description = (this as any).os.i.description;
- this.birthday = (this as any).os.i.profile.birthday;
+ this.birthday = (this as any).os.i.account.profile.birthday;
},
mounted() {
document.title = 'Misskey | %i18n:mobile.tags.mk-profile-setting-page.title%';
diff --git a/src/web/app/mobile/views/pages/user.vue b/src/web/app/mobile/views/pages/user.vue
index 90f49a99a4..9f677f6cae 100644
--- a/src/web/app/mobile/views/pages/user.vue
+++ b/src/web/app/mobile/views/pages/user.vue
@@ -18,11 +18,11 @@
</div>
<div class="description">{{ user.description }}</div>
<div class="info">
- <p class="location" v-if="user.profile.location">
- %fa:map-marker%{{ user.profile.location }}
+ <p class="location" v-if="user.account.profile.location">
+ %fa:map-marker%{{ user.account.profile.location }}
</p>
- <p class="birthday" v-if="user.profile.birthday">
- %fa:birthday-cake%{{ user.profile.birthday.replace('-', '年').replace('-', '月') + '日' }} ({{ age }}歳)
+ <p class="birthday" v-if="user.account.profile.birthday">
+ %fa:birthday-cake%{{ user.account.profile.birthday.replace('-', '年').replace('-', '月') + '日' }} ({{ age }}歳)
</p>
</div>
<div class="status">
@@ -74,7 +74,7 @@ export default Vue.extend({
},
computed: {
age(): number {
- return age(this.user.profile.birthday);
+ return age(this.user.account.profile.birthday);
}
},
watch: {
diff --git a/src/web/app/mobile/views/pages/user/home.vue b/src/web/app/mobile/views/pages/user/home.vue
index fdbfd1bf55..dabb3f60b8 100644
--- a/src/web/app/mobile/views/pages/user/home.vue
+++ b/src/web/app/mobile/views/pages/user/home.vue
@@ -31,7 +31,7 @@
<x-followers-you-know :user="user"/>
</div>
</section>
- <p>%i18n:mobile.tags.mk-user-overview.last-used-at%: <b><mk-time :time="user.last_used_at"/></b></p>
+ <p>%i18n:mobile.tags.mk-user-overview.last-used-at%: <b><mk-time :time="user.account.last_used_at"/></b></p>
</div>
</template>
diff --git a/src/web/app/mobile/views/pages/welcome.vue b/src/web/app/mobile/views/pages/welcome.vue
index aa50b572ea..563d2b28c9 100644
--- a/src/web/app/mobile/views/pages/welcome.vue
+++ b/src/web/app/mobile/views/pages/welcome.vue
@@ -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.two_factor_enabled" v-model="token" type="number" placeholder="トークン" required/>
+ <input v-if="user && user.account.two_factor_enabled" 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.two_factor_enabled ? this.token : undefined
+ token: this.user && this.user.account.two_factor_enabled ? this.token : undefined
}).then(() => {
location.reload();
}).catch(() => {