From 5209a584a2ed76057ec5edc351cf155154f3f68f Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 1 Sep 2018 20:47:49 +0900 Subject: [PATCH] Better post form --- package.json | 2 +- src/client/app/app.styl | 14 +- src/client/app/app.vue | 5 +- .../app/desktop/views/pages/welcome.vue | 16 +-- src/client/app/init.ts | 7 +- src/client/app/mobile/api/post.ts | 23 +++ src/client/app/mobile/script.ts | 3 +- .../mobile/views/components/note-detail.vue | 28 +--- .../app/mobile/views/components/note.vue | 28 +--- .../views/components/post-form-dialog.vue | 131 ++++++++++++++++++ src/client/app/mobile/views/pages/home.vue | 10 +- 11 files changed, 184 insertions(+), 83 deletions(-) create mode 100644 src/client/app/mobile/api/post.ts create mode 100644 src/client/app/mobile/views/components/post-form-dialog.vue diff --git a/package.json b/package.json index afdd47b3ce..4c88e02a45 100644 --- a/package.json +++ b/package.json @@ -210,12 +210,12 @@ "vue": "2.5.17", "vue-chartjs": "3.4.0", "vue-cropperjs": "2.2.1", + "vue-js-modal": "1.3.25", "vue-json-tree-view": "2.1.4", "vue-loader": "15.4.1", "vue-router": "3.0.1", "vue-style-loader": "4.1.2", "vue-template-compiler": "2.5.17", - "vue-thin-modal": "1.1.1", "vuedraggable": "2.16.0", "vuex": "3.0.1", "vuex-persistedstate": "2.5.4", diff --git a/src/client/app/app.styl b/src/client/app/app.styl index aaa0d34c71..3911f83a61 100644 --- a/src/client/app/app.styl +++ b/src/client/app/app.styl @@ -6,6 +6,10 @@ html &, * cursor progress !important +html + // iOSのため + overflow auto + body overflow-wrap break-word @@ -126,13 +130,3 @@ pre [data-fa] display inline-block - -.modal-backdrop - z-index 10000 !important - -.modal-content-wrapper - z-index 10001 !important - -.modal-content - padding 0 !important - background-color transparent !important diff --git a/src/client/app/app.vue b/src/client/app/app.vue index 011eb14661..7a46e7dea0 100644 --- a/src/client/app/app.vue +++ b/src/client/app/app.vue @@ -1,6 +1,3 @@ diff --git a/src/client/app/desktop/views/pages/welcome.vue b/src/client/app/desktop/views/pages/welcome.vue index 37c776130e..ae9bf7e678 100644 --- a/src/client/app/desktop/views/pages/welcome.vue +++ b/src/client/app/desktop/views/pages/welcome.vue @@ -38,11 +38,9 @@ - -
-
%i18n:@signup%
- -
+ +
%i18n:@signup%
+
@@ -91,10 +89,10 @@ export default Vue.extend({ this.$refs.pointer.style.left = x.left + 'px'; }, signup() { - this.$modal.push('signup'); + this.$modal.show('signup'); }, signin() { - this.$modal.push('signin'); + this.$modal.show('signin'); }, dark() { this.$store.commit('device/set', { @@ -268,10 +266,6 @@ root(isDark) diff --git a/src/client/app/mobile/views/pages/home.vue b/src/client/app/mobile/views/pages/home.vue index a03fa03c5f..706c9cd28b 100644 --- a/src/client/app/mobile/views/pages/home.vue +++ b/src/client/app/mobile/views/pages/home.vue @@ -42,10 +42,6 @@ - - - - @@ -111,11 +107,7 @@ export default Vue.extend({ methods: { fn() { - this.$modal.push('postForm'); - }, - - postFormClosed() { - this.$modal.pop(); + (this as any).apis.post(); }, saveSrc() {