モバイルで投稿ボタン復活するなど

This commit is contained in:
syuilo 2020-12-27 10:42:38 +09:00
parent 167da988da
commit 2f6187a26a
3 changed files with 18 additions and 9 deletions

View file

@ -35,6 +35,9 @@
<MkA class="item" active-class="active" to="/settings">
<Fa :icon="faCog" fixed-width/><span class="text">{{ $ts.settings }}</span>
</MkA>
<button class="item _button post" @click="post">
<Fa :icon="faPencilAlt" fixed-width/><span class="text">{{ $ts.note }}</span>
</button>
</div>
</nav>
</transition>
@ -117,6 +120,10 @@ export default defineComponent({
this.showing = true;
},
post() {
os.post();
},
search() {
if (this.searching) return;
@ -352,7 +359,6 @@ export default defineComponent({
z-index: 1001;
> div {
> .index,
> .notifications {
display: none;
}

View file

@ -204,6 +204,10 @@ export default defineComponent({
border-radius: 100%;
box-shadow: 0 3px 5px -1px rgba(0, 0, 0, 0.2), 0 6px 10px 0 rgba(0, 0, 0, 0.14), 0 1px 18px 0 rgba(0, 0, 0, 0.12);
font-size: 22px;
@media (min-width: ($nav-hide-threshold + 1px)) {
display: none;
}
}
> .post {
@ -215,10 +219,6 @@ export default defineComponent({
background: var(--panel);
color: var(--fg);
@media (min-width: ($nav-hide-threshold + 1px)) {
display: none;
}
&:hover {
background: var(--X2);
}

View file

@ -29,10 +29,9 @@
<div class="buttons" :class="{ navHidden }">
<button class="button nav _button" @click="showNav" ref="navButton"><Fa :icon="faBars"/><i v-if="navIndicated"><Fa :icon="faCircle"/></i></button>
<button v-if="$route.name === 'index'" class="button home _button" @click="top()"><Fa :icon="faHome"/></button>
<button v-else class="button home _button" @click="$router.push('/')"><Fa :icon="faHome"/></button>
<button class="button notifications _button" @click="$router.push('/my/notifications')"><Fa :icon="faBell"/><i v-if="$i.hasUnreadNotification"><Fa :icon="faCircle"/></i></button>
<button class="button widget _button" @click="widgetsShowing = true"><Fa :icon="faLayerGroup"/></button>
<button class="button post _button" @click="post"><Fa :icon="faPencilAlt"/></button>
</div>
<button class="widgetButton _button" :class="{ navHidden }" @click="widgetsShowing = true"><Fa :icon="faLayerGroup"/></button>
@ -55,7 +54,7 @@
<script lang="ts">
import { defineComponent, defineAsyncComponent, markRaw } from 'vue';
import { faLayerGroup, faBars, faHome, faCircle, faWindowMaximize, faColumns } from '@fortawesome/free-solid-svg-icons';
import { faLayerGroup, faBars, faHome, faCircle, faWindowMaximize, faColumns, faPencilAlt } from '@fortawesome/free-solid-svg-icons';
import { faBell } from '@fortawesome/free-regular-svg-icons';
import { host } from '@/config';
import { search } from '@/scripts/search';
@ -97,7 +96,7 @@ export default defineComponent({
navHidden: false,
widgetsShowing: false,
wallpaper: localStorage.getItem('wallpaper') != null,
faLayerGroup, faBars, faBell, faHome, faCircle,
faLayerGroup, faBars, faBell, faHome, faCircle, faPencilAlt,
};
},
@ -192,6 +191,10 @@ export default defineComponent({
}, { passive: true });
},
post() {
os.post();
},
top() {
window.scroll({ top: 0, behavior: 'smooth' });
},