This commit is contained in:
syuilo
2020-01-31 07:01:45 +09:00
parent 1d6947d321
commit 963c7761f2
6 changed files with 32 additions and 101 deletions

View File

@ -1,7 +1,7 @@
<template>
<div class="ngbfujlo">
<mk-textarea class="textarea" :value="text" readonly></mk-textarea>
<mk-button primary @click="post()" :disabled="posting || posted">{{ posted ? $t('posted-from-post-form') : $t('post-from-post-form') }}</mk-button>
<mk-textarea :value="text" readonly style="margin: 0;"></mk-textarea>
<mk-button class="button" primary @click="post()" :disabled="posting || posted">{{ posted ? $t('posted') : $t('post') }}</mk-button>
</div>
</template>
@ -59,16 +59,19 @@ export default Vue.extend({
<style lang="scss" scoped>
.ngbfujlo {
padding: 0 32px 32px 32px;
border: solid 2px var(--divider);
padding: 32px;
border-radius: 6px;
box-shadow: 0 2px 8px var(--shadow);
> .button {
margin-top: 32px;
}
@media (max-width: 600px) {
padding: 0 16px 16px 16px;
padding: 16px;
> .textarea {
> .button {
margin-top: 16px;
margin-bottom: 16px;
}
}
}

View File

@ -97,74 +97,5 @@ export default Vue.extend({
&.center {
text-align: center;
}
> header {
> .title {
z-index: 1;
margin: 0;
padding: 16px 32px;
font-size: 20px;
font-weight: bold;
color: var(--text);
box-shadow: 0 var(--lineWidth) rgba(#000, 0.07);
@media (max-width: 600px) {
padding: 16px 32px;
font-size: 20px;
}
@media (max-width: 400px) {
padding: 10px 20px;
font-size: 16px;
}
}
}
> div {
color: var(--text);
padding: 24px 32px;
font-size: 16px;
@media (max-width: 600px) {
padding: 24px 32px;
font-size: 16px;
}
@media (max-width: 400px) {
padding: 20px 20px;
font-size: 15px;
}
}
> footer {
color: var(--text);
padding: 0 32px 28px 32px;
@media (max-width: 600px) {
padding: 0 32px 28px 32px;
}
@media (max-width: 400px) {
padding: 0 20px 20px 20px;
font-size: 14px;
}
> small {
display: block;
opacity: 0.5;
}
> a {
font-size: 90%;
}
> a + a {
margin-left: 8px;
}
> .like {
margin-top: 16px;
}
}
}
</style>

View File

@ -164,7 +164,7 @@ export default Vue.extend({
? this.$t('renote')
: this.reply
? this.$t('reply')
: this.$t('_postForm.post');
: this.$t('post');
},
canPost(): boolean {

View File

@ -2,7 +2,7 @@
<div>
<div class="gwbmwxkm _panel">
<header>
<div class="title"><fa :icon="faStickyNote"/> {{ readonly ? $t('read-page') : pageId ? $t('edit-page') : $t('new-page') }}</div>
<div class="title"><fa :icon="faStickyNote"/> {{ readonly ? $t('readPage') : pageId ? $t('editPage') : $t('newPage') }}</div>
<div class="buttons">
<button class="_button" @click="del()" v-if="!readonly"><fa :icon="faTrashAlt"/></button>
<button class="_button" @click="() => showOptions = !showOptions"><fa :icon="faCog"/></button>
@ -27,7 +27,7 @@
<span>{{ $t('url') }}</span>
</mk-input>
<mk-switch v-model="alignCenter">{{ $t('align-center') }}</mk-switch>
<mk-switch v-model="alignCenter">{{ $t('alignCenter') }}</mk-switch>
<mk-select v-model="font">
<template #label>{{ $t('font') }}</template>
@ -301,7 +301,7 @@ export default Vue.extend({
async add() {
const { canceled, result: type } = await this.$root.dialog({
type: null,
title: this.$t('choose-block'),
title: this.$t('chooseBlock'),
select: {
groupedItems: this.getPageBlockList()
},
@ -315,7 +315,7 @@ export default Vue.extend({
async addVariable() {
let { canceled, result: name } = await this.$root.dialog({
title: this.$t('enter-variable-name'),
title: this.$t('enterVariableName'),
input: {
type: 'text',
},

View File

@ -11,14 +11,14 @@
<div class="_footer">
<small>@{{ page.user.username }}</small>
<template v-if="$store.getters.isSignedIn && $store.state.i.id === page.userId">
<router-link :to="`/my/pages/edit/${page.id}`">{{ $t('edit-this-page') }}</router-link>
<a v-if="$store.state.i.pinnedPageId === page.id" @click="pin(false)">{{ $t('unpin-this-page') }}</a>
<a v-else @click="pin(true)">{{ $t('pin-this-page') }}</a>
<router-link :to="`/my/pages/edit/${page.id}`">{{ $t('_pages.editThisPage') }}</router-link>
<a v-if="$store.state.i.pinnedPageId === page.id" @click="pin(false)">{{ $t('unpin') }}</a>
<a v-else @click="pin(true)">{{ $t('pin') }}</a>
</template>
<router-link :to="`./${page.name}/view-source`">{{ $t('view-source') }}</router-link>
<router-link :to="`./${page.name}/view-source`">{{ $t('_pages.viewSource') }}</router-link>
<div class="like">
<button @click="unlike()" v-if="page.isLiked" :title="$t('unlike')"><fa :icon="faHeartS"/></button>
<button @click="like()" v-else :title="$t('like')"><fa :icon="faHeart"/></button>
<button @click="unlike()" v-if="page.isLiked" :title="$t('_pages.unlike')"><fa :icon="faHeartS"/></button>
<button @click="like()" v-else :title="$t('_pages.like')"><fa :icon="faHeart"/></button>
<span class="count" v-if="page.likedCount > 0">{{ page.likedCount }}</span>
</div>
</div>