2018-06-16 18:42:49 +09:00
|
|
|
<template>
|
|
|
|
<div class="pptjhabgjtt7kwskbfv4y3uml6fpuhmr">
|
2018-11-09 03:44:35 +09:00
|
|
|
<h1>{{ this.$t('share-with', { name }) }}</h1>
|
2018-06-16 18:42:49 +09:00
|
|
|
<div>
|
|
|
|
<mk-signin v-if="!$store.getters.isSignedIn"/>
|
|
|
|
<mk-post-form v-else-if="!posted" :initial-text="text" :instant="true" @posted="posted = true"/>
|
2018-11-06 01:40:11 +09:00
|
|
|
<p v-if="posted" class="posted"><fa icon="check"/></p>
|
2018-06-16 18:42:49 +09:00
|
|
|
</div>
|
2018-11-09 03:44:35 +09:00
|
|
|
<button v-if="posted" class="ui button" @click="close">{{ $t('@.close') }}</button>
|
2018-06-16 18:42:49 +09:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import Vue from 'vue';
|
2018-11-09 03:44:35 +09:00
|
|
|
import i18n from '../../../i18n';
|
2018-06-16 18:42:49 +09:00
|
|
|
|
|
|
|
export default Vue.extend({
|
2018-11-09 03:44:35 +09:00
|
|
|
i18n: i18n('desktop/views/pages/share.vue'),
|
2018-06-16 18:42:49 +09:00
|
|
|
data() {
|
|
|
|
return {
|
2018-08-26 02:05:42 +09:00
|
|
|
name: null,
|
2018-06-16 18:42:49 +09:00
|
|
|
posted: false,
|
|
|
|
text: new URLSearchParams(location.search).get('text')
|
|
|
|
};
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
close() {
|
|
|
|
window.close();
|
|
|
|
}
|
2018-08-26 02:05:42 +09:00
|
|
|
},
|
|
|
|
mounted() {
|
2018-11-09 08:13:34 +09:00
|
|
|
this.$root.getMeta().then(meta => {
|
2018-08-26 02:05:42 +09:00
|
|
|
this.name = meta.name;
|
|
|
|
});
|
2018-06-16 18:42:49 +09:00
|
|
|
}
|
|
|
|
});
|
|
|
|
</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>
|