refs #1318 Apply font-size settings in New toot

This commit is contained in:
AkiraFukushima 2020-04-11 17:23:40 +09:00
parent a8ba8fca6d
commit 4aed8a9065
4 changed files with 38 additions and 34 deletions

View File

@ -2,5 +2,7 @@
"tabWidth": 2,
"semi": false,
"singleQuote": true,
"printWidth": 140
}
"printWidth": 140,
"trailingComma": "none",
"arrowParens": "avoid"
}

View File

@ -217,7 +217,7 @@ export default {
this.$store.dispatch('TimelineSpace/Modals/NewToot/setupLoading')
},
watch: {
newTootModal: function(newState, oldState) {
newTootModal: function (newState, oldState) {
if (!oldState && newState) {
this.showContentWarning = this.initialSpoiler
this.status = this.initialStatus
@ -456,7 +456,7 @@ export default {
font-size: 1.5rem;
.fa-icon {
font-size: 0.9em;
font-size: 0.9rem;
width: auto;
height: 1em;
max-width: 100%;
@ -469,6 +469,7 @@ export default {
.el-dialog__footer {
background-color: #f2f6fc;
font-size: var(--base-font-size);
.upload-image {
text-align: left;

View File

@ -93,10 +93,10 @@ export default {
}),
...mapGetters('TimelineSpace/Modals/NewToot/Status', ['pickerEmojis']),
status: {
get: function() {
get: function () {
return this.value
},
set: function(value) {
set: function (value) {
this.$emit('input', value)
}
}
@ -110,9 +110,9 @@ export default {
}
},
watch: {
opened: function(newState, oldState) {
opened: function (newState, oldState) {
if (!oldState && newState) {
this.$nextTick(function() {
this.$nextTick(function () {
this.$refs.status.focus()
if (this.fixCursorPos) {
this.$refs.status.setSelectionRange(0, 0)
@ -268,6 +268,7 @@ export default {
.status {
position: relative;
z-index: 1;
font-size: var(--base-font-size);
textarea {
display: block;
@ -300,7 +301,7 @@ export default {
box-sizing: border-box;
li {
font-size: 14px;
font-size: var(--base-font-size);
padding: 0 20px;
white-space: nowrap;
overflow: hidden;

View File

@ -1,28 +1,28 @@
<template>
<div
class="follow"
tabIndex="0"
v-shortkey="shortcutEnabled ? {next: ['j'], prev: ['k'], right: ['l'], profile: ['p']} : {}"
@shortkey="handleStatusControl"
ref="status"
@click="$emit('select')"
role="article"
aria-label="follow event"
<div
class="follow"
tabIndex="0"
v-shortkey="shortcutEnabled ? { next: ['j'], prev: ['k'], right: ['l'], profile: ['p'] } : {}"
@shortkey="handleStatusControl"
ref="status"
@click="$emit('select')"
role="article"
aria-label="follow event"
>
<div class="action">
<div class="action-mark">
<icon name="user-plus" scale="0.7"></icon>
</div>
<div class="action-detail">
<span class="bold" @click="openUser(message.account)"><bdi v-html="username(message.account)"></bdi></span> is now following you
</div>
<div class="action-icon" role="presentation">
<FailoverImg :src="message.account.avatar" />
<div class="action">
<div class="action-mark">
<icon name="user-plus" scale="0.7"></icon>
</div>
<div class="action-detail">
<span class="bold" @click="openUser(message.account)"><bdi v-html="username(message.account)"></bdi></span> is now following you
</div>
<div class="action-icon" role="presentation">
<FailoverImg :src="message.account.avatar" />
</div>
</div>
<div class="clearfix"></div>
<div class="fill-line"></div>
</div>
<div class="clearfix"></div>
<div class="fill-line"></div>
</div>
</template>
<script>
@ -53,7 +53,7 @@ export default {
return this.focused && !this.overlaid
}
},
mounted () {
mounted() {
if (this.focused) {
this.$refs.status.focus()
}
@ -72,19 +72,19 @@ export default {
}
},
methods: {
username (account) {
username(account) {
if (account.display_name !== '') {
return emojify(account.display_name, account.emojis)
} else {
return account.username
}
},
openUser (account) {
openUser(account) {
this.$store.dispatch('TimelineSpace/Contents/SideBar/openAccountComponent')
this.$store.dispatch('TimelineSpace/Contents/SideBar/AccountProfile/changeAccount', account)
this.$store.commit('TimelineSpace/Contents/SideBar/changeOpenSideBar', true)
},
handleStatusControl (event) {
handleStatusControl(event) {
switch (event.srcKey) {
case 'next':
this.$emit('focusNext')