From 29ed58e4b349e30e4c389cae1050e1a689a7d466 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 28 Aug 2017 19:43:24 +0900 Subject: [PATCH] #163 --- CHANGELOG.md | 1 + locales/en.yml | 16 +++ locales/ja.yml | 16 +++ src/web/app/mobile/router.js | 6 + src/web/app/mobile/tags/index.js | 1 + src/web/app/mobile/tags/page/settings.tag | 74 ++++++++++-- .../app/mobile/tags/page/settings/profile.tag | 106 ++++++++++++++++++ 7 files changed, 213 insertions(+), 7 deletions(-) create mode 100644 src/web/app/mobile/tags/page/settings/profile.tag diff --git a/CHANGELOG.md b/CHANGELOG.md index d850457df..fb41a5ab7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ChangeLog unreleased ---------- +* New: モバイル版からプロフィールを設定できるように * Improve: 投稿ページに次の投稿/前の投稿リンクを作成 (#734) * Improve: タイムラインの投稿をダブルクリックすることで詳細な情報が見れるように * Fix: モバイル版でおすすめユーザーをフォローしてもタイムラインが更新されない (#736) diff --git a/locales/en.yml b/locales/en.yml index 9bf644664..6d636a110 100644 --- a/locales/en.yml +++ b/locales/en.yml @@ -336,12 +336,28 @@ mobile: mk-search-page: search: "Search" + mk-settings: + signed-in-as: "Signed in as {}" + mk-settings-page: profile: "Profile" applications: "Applications" twitter-integration: "Twitter integration" signin-history: "Sign in history" + api: "API" settings: "Settings" + signout: "Sign out" + + mk-profile-setting-page: + title: "Profile Settings" + + mk-profile-setting: + name: "Name" + location: "Location" + description: "Description" + birthday: "Birthday" + save: "Save" + saved: "Profile updated successfully" mk-user-followers-page: followers-of: "Followers of {}" diff --git a/locales/ja.yml b/locales/ja.yml index d2b282bff..75b1fd627 100644 --- a/locales/ja.yml +++ b/locales/ja.yml @@ -336,12 +336,28 @@ mobile: mk-search-page: search: "検索" + mk-settings: + signed-in-as: "{}としてサインイン中" + mk-settings-page: profile: "プロフィール" applications: "アプリケーション" twitter-integration: "Twitter連携" signin-history: "ログイン履歴" + api: "API" settings: "設定" + signout: "サインアウト" + + mk-profile-setting-page: + title: "プロフィール設定" + + mk-profile-setting: + name: "名前" + location: "場所" + description: "自己紹介" + birthday: "誕生日" + save: "保存" + saved: "プロフィールを保存しました" mk-user-followers-page: followers-of: "{}のフォロワー" diff --git a/src/web/app/mobile/router.js b/src/web/app/mobile/router.js index d0b45d961..de4108a59 100644 --- a/src/web/app/mobile/router.js +++ b/src/web/app/mobile/router.js @@ -15,6 +15,7 @@ export default me => { route('/i/drive/folder/:folder', drive); route('/i/drive/file/:file', drive); route('/i/settings', settings); + route('/i/settings/profile', settingsProfile); route('/i/settings/signin-history', settingsSignin); route('/i/settings/api', settingsApi); route('/i/settings/twitter', settingsTwitter); @@ -63,6 +64,10 @@ export default me => { mount(document.createElement('mk-settings-page')); } + function settingsProfile() { + mount(document.createElement('mk-profile-setting-page')); + } + function settingsSignin() { mount(document.createElement('mk-signin-history-page')); } @@ -130,6 +135,7 @@ export default me => { }; function mount(content) { + document.documentElement.style.background = '#fff'; if (page) page.unmount(); const body = document.getElementById('app'); page = riot.mount(body.appendChild(content))[0]; diff --git a/src/web/app/mobile/tags/index.js b/src/web/app/mobile/tags/index.js index 02d1541fc..2e6b47807 100644 --- a/src/web/app/mobile/tags/index.js +++ b/src/web/app/mobile/tags/index.js @@ -14,6 +14,7 @@ require('./page/post.tag'); require('./page/new-post.tag'); require('./page/search.tag'); require('./page/settings.tag'); +require('./page/settings/profile.tag'); require('./page/settings/signin.tag'); require('./page/settings/api.tag'); require('./page/settings/authorized-apps.tag'); diff --git a/src/web/app/mobile/tags/page/settings.tag b/src/web/app/mobile/tags/page/settings.tag index 58094a876..710591071 100644 --- a/src/web/app/mobile/tags/page/settings.tag +++ b/src/web/app/mobile/tags/page/settings.tag @@ -1,12 +1,6 @@ - + + + diff --git a/src/web/app/mobile/tags/page/settings/profile.tag b/src/web/app/mobile/tags/page/settings/profile.tag new file mode 100644 index 000000000..dfe0586c1 --- /dev/null +++ b/src/web/app/mobile/tags/page/settings/profile.tag @@ -0,0 +1,106 @@ + + + + + + + + + + + + + + + + +