summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2019-03-12 13:02:16 +0900
committersyuilo <syuilotan@yahoo.co.jp>2019-03-12 13:02:16 +0900
commitdb693f598b35752404bce51b038393a5f2b8a6ab (patch)
tree5ab0c2c70102518ccc537c3796dff456ecb4b49a /src
parentBetter share template (diff)
downloadsharkey-db693f598b35752404bce51b038393a5f2b8a6ab.tar.gz
sharkey-db693f598b35752404bce51b038393a5f2b8a6ab.tar.bz2
sharkey-db693f598b35752404bce51b038393a5f2b8a6ab.zip
シェアページを統合
Diffstat (limited to 'src')
-rw-r--r--src/client/app/common/views/pages/share.vue (renamed from src/client/app/mobile/views/pages/share.vue)0
-rw-r--r--src/client/app/desktop/script.ts2
-rw-r--r--src/client/app/desktop/views/pages/share.vue78
-rw-r--r--src/client/app/mobile/script.ts2
4 files changed, 2 insertions, 80 deletions
diff --git a/src/client/app/mobile/views/pages/share.vue b/src/client/app/common/views/pages/share.vue
index e238d325da..e238d325da 100644
--- a/src/client/app/mobile/views/pages/share.vue
+++ b/src/client/app/common/views/pages/share.vue
diff --git a/src/client/app/desktop/script.ts b/src/client/app/desktop/script.ts
index 5d6bf1c448..8d292ce324 100644
--- a/src/client/app/desktop/script.ts
+++ b/src/client/app/desktop/script.ts
@@ -18,7 +18,7 @@ import MkSelectDrive from './views/pages/selectdrive.vue';
import MkDrive from './views/pages/drive.vue';
import MkMessagingRoom from './views/pages/messaging-room.vue';
import MkReversi from './views/pages/games/reversi.vue';
-import MkShare from './views/pages/share.vue';
+import MkShare from '../common/views/pages/share.vue';
import MkFollow from '../common/views/pages/follow.vue';
import MkNotFound from '../common/views/pages/not-found.vue';
import MkSettings from './views/pages/settings.vue';
diff --git a/src/client/app/desktop/views/pages/share.vue b/src/client/app/desktop/views/pages/share.vue
deleted file mode 100644
index bed9ae395d..0000000000
--- a/src/client/app/desktop/views/pages/share.vue
+++ /dev/null
@@ -1,78 +0,0 @@
-<template>
-<div class="pptjhabgjtt7kwskbfv4y3uml6fpuhmr">
- <h1>{{ this.$t('share-with', { name }) }}</h1>
- <div>
- <mk-signin v-if="!$store.getters.isSignedIn"/>
- <mk-post-form v-else-if="!posted" :initial-text="template" :instant="true" @posted="posted = true"/>
- <p v-if="posted" class="posted"><fa icon="check"/></p>
- </div>
- <button v-if="posted" class="ui button" @click="close">{{ $t('@.close') }}</button>
-</div>
-</template>
-
-<script lang="ts">
-import Vue from 'vue';
-import i18n from '../../../i18n';
-
-export default Vue.extend({
- i18n: i18n('desktop/views/pages/share.vue'),
- data() {
- return {
- name: null,
- posted: false,
- text: new URLSearchParams(location.search).get('text'),
- url: new URLSearchParams(location.search).get('url'),
- title: new URLSearchParams(location.search).get('title'),
- };
- },
- computed: {
- template(): string {
- let t = '';
- if (this.title && this.url) t += `【[${title}](${url})】\n`;
- if (this.title && !this.url) t += `【${title}】\n`;
- if (this.text) t += `${text}\n`;
- if (!this.title && this.url) t += `${url}`;
- return t.trim();
- }
- },
- methods: {
- close() {
- window.close();
- }
- },
- mounted() {
- this.$root.getMeta().then(meta => {
- this.name = meta.name;
- });
- }
-});
-</script>
-
-<style lang="stylus" scoped>
-.pptjhabgjtt7kwskbfv4y3uml6fpuhmr
- padding 16px
-
- > h1
- margin 0 0 8px 0
- color #555
- font-size 20px
- text-align center
-
- > div
- max-width 500px
- margin 0 auto
- background #fff
- border solid 1px rgba(#000, 0.1)
- border-radius 6px
- overflow hidden
-
- > .posted
- display block
- margin 0
- padding 64px
- text-align center
-
- > button
- display block
- margin 16px auto
-</style>
diff --git a/src/client/app/mobile/script.ts b/src/client/app/mobile/script.ts
index 688beac9ee..510141f94b 100644
--- a/src/client/app/mobile/script.ts
+++ b/src/client/app/mobile/script.ts
@@ -26,7 +26,7 @@ import MkUserLists from './views/pages/user-lists.vue';
import MkUserList from './views/pages/user-list.vue';
import MkReversi from './views/pages/games/reversi.vue';
import MkTag from './views/pages/tag.vue';
-import MkShare from './views/pages/share.vue';
+import MkShare from '../common/views/pages/share.vue';
import MkFollow from '../common/views/pages/follow.vue';
import MkNotFound from '../common/views/pages/not-found.vue';