Some bug fixes
This commit is contained in:
parent
a1b490afa7
commit
a02ee3a08b
81 changed files with 337 additions and 1318 deletions
|
|
@ -82,8 +82,8 @@ export default Vue.extend({
|
|||
};
|
||||
},
|
||||
created() {
|
||||
if ((this as any).os.i.account.clientSettings.mobileHome == null) {
|
||||
Vue.set((this as any).os.i.account.clientSettings, 'mobileHome', [{
|
||||
if ((this as any).os.i.clientSettings.mobileHome == null) {
|
||||
Vue.set((this as any).os.i.clientSettings, 'mobileHome', [{
|
||||
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.clientSettings.mobileHome;
|
||||
this.widgets = (this as any).os.i.clientSettings.mobileHome;
|
||||
this.saveHome();
|
||||
} else {
|
||||
this.widgets = (this as any).os.i.account.clientSettings.mobileHome;
|
||||
this.widgets = (this as any).os.i.clientSettings.mobileHome;
|
||||
}
|
||||
|
||||
this.$watch('os.i.account.clientSettings', i => {
|
||||
this.widgets = (this as any).os.i.account.clientSettings.mobileHome;
|
||||
this.$watch('os.i.clientSettings', i => {
|
||||
this.widgets = (this as any).os.i.clientSettings.mobileHome;
|
||||
}, {
|
||||
deep: true
|
||||
});
|
||||
|
|
@ -157,15 +157,15 @@ export default Vue.extend({
|
|||
},
|
||||
onHomeUpdated(data) {
|
||||
if (data.home) {
|
||||
(this as any).os.i.account.clientSettings.mobileHome = data.home;
|
||||
(this as any).os.i.clientSettings.mobileHome = data.home;
|
||||
this.widgets = data.home;
|
||||
} else {
|
||||
const w = (this as any).os.i.account.clientSettings.mobileHome.find(w => w.id == data.id);
|
||||
const w = (this as any).os.i.clientSettings.mobileHome.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.clientSettings.mobileHome;
|
||||
this.widgets = (this as any).os.i.clientSettings.mobileHome;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -194,7 +194,7 @@ export default Vue.extend({
|
|||
this.saveHome();
|
||||
},
|
||||
saveHome() {
|
||||
(this as any).os.i.account.clientSettings.mobileHome = this.widgets;
|
||||
(this as any).os.i.clientSettings.mobileHome = this.widgets;
|
||||
(this as any).api('i/update_mobile_home', {
|
||||
home: this.widgets
|
||||
});
|
||||
|
|
|
|||
|
|
@ -53,9 +53,9 @@ export default Vue.extend({
|
|||
},
|
||||
created() {
|
||||
this.name = (this as any).os.i.name || '';
|
||||
this.location = (this as any).os.i.account.profile.location;
|
||||
this.location = (this as any).os.i.profile.location;
|
||||
this.description = (this as any).os.i.description;
|
||||
this.birthday = (this as any).os.i.account.profile.birthday;
|
||||
this.birthday = (this as any).os.i.profile.birthday;
|
||||
},
|
||||
mounted() {
|
||||
document.title = 'Misskey | %i18n:mobile.tags.mk-profile-setting-page.title%';
|
||||
|
|
|
|||
|
|
@ -18,11 +18,11 @@
|
|||
</div>
|
||||
<div class="description">{{ user.description }}</div>
|
||||
<div class="info">
|
||||
<p class="location" v-if="user.host === null && user.account.profile.location">
|
||||
%fa:map-marker%{{ user.account.profile.location }}
|
||||
<p class="location" v-if="user.host === null && user.profile.location">
|
||||
%fa:map-marker%{{ user.profile.location }}
|
||||
</p>
|
||||
<p class="birthday" v-if="user.host === null && user.account.profile.birthday">
|
||||
%fa:birthday-cake%{{ user.account.profile.birthday.replace('-', '年').replace('-', '月') + '日' }} ({{ age }}歳)
|
||||
<p class="birthday" v-if="user.host === null && user.profile.birthday">
|
||||
%fa:birthday-cake%{{ user.profile.birthday.replace('-', '年').replace('-', '月') + '日' }} ({{ age }}歳)
|
||||
</p>
|
||||
</div>
|
||||
<div class="status">
|
||||
|
|
@ -81,7 +81,7 @@ export default Vue.extend({
|
|||
return this.getAcct(this.user);
|
||||
},
|
||||
age(): number {
|
||||
return age(this.user.account.profile.birthday);
|
||||
return age(this.user.profile.birthday);
|
||||
},
|
||||
name() {
|
||||
return getUserName(this.user);
|
||||
|
|
|
|||
|
|
@ -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.lastUsedAt"/></b></p>
|
||||
<p v-if="user.host === null">%i18n:mobile.tags.mk-user-overview.last-used-at%: <b><mk-time :time="user.lastUsedAt"/></b></p>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
|
|||
|
|
@ -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.twoFactorEnabled" v-model="token" type="number" placeholder="トークン" required/>
|
||||
<input v-if="user && user.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.twoFactorEnabled ? this.token : undefined
|
||||
token: this.user && this.user.twoFactorEnabled ? this.token : undefined
|
||||
}).then(() => {
|
||||
location.reload();
|
||||
}).catch(() => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue