mirror of
https://github.com/paricafe/misskey.git
synced 2024-11-29 04:16:44 -06:00
refactor
This commit is contained in:
parent
7378c4a9d8
commit
0dba5607a8
1 changed files with 4 additions and 8 deletions
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="cmuxhskf _root" v-hotkey.global="keymap">
|
<div class="cmuxhskf _root" v-hotkey.global="keymap">
|
||||||
<div class="new" v-if="queue > 0" :style="{ width: width + 'px' }"><button class="_buttonPrimary" @click="top()">{{ $ts.newNoteRecived }}</button></div>
|
<div class="new" v-if="queue > 0"><button class="_buttonPrimary" @click="top()">{{ $ts.newNoteRecived }}</button></div>
|
||||||
|
|
||||||
<div class="_magnet"></div>
|
<div class="_magnet"></div>
|
||||||
<XTutorial v-if="$store.reactiveState.tutorial.value != -1" class="tutorial _block"/>
|
<XTutorial v-if="$store.reactiveState.tutorial.value != -1" class="tutorial _block"/>
|
||||||
|
@ -64,7 +64,6 @@ export default defineComponent({
|
||||||
channel: null,
|
channel: null,
|
||||||
menuOpened: false,
|
menuOpened: false,
|
||||||
queue: 0,
|
queue: 0,
|
||||||
width: 0,
|
|
||||||
[symbols.PAGE_INFO]: computed(() => ({
|
[symbols.PAGE_INFO]: computed(() => ({
|
||||||
title: this.$ts.timeline,
|
title: this.$ts.timeline,
|
||||||
icon: this.src === 'local' ? faComments : this.src === 'social' ? faShareAlt : this.src === 'global' ? faGlobe : faHome,
|
icon: this.src === 'local' ? faComments : this.src === 'social' ? faShareAlt : this.src === 'global' ? faGlobe : faHome,
|
||||||
|
@ -126,10 +125,6 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
|
||||||
this.width = this.$el.offsetWidth;
|
|
||||||
},
|
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
before() {
|
before() {
|
||||||
Progress.start();
|
Progress.start();
|
||||||
|
@ -140,7 +135,6 @@ export default defineComponent({
|
||||||
},
|
},
|
||||||
|
|
||||||
queueUpdated(q) {
|
queueUpdated(q) {
|
||||||
if (this.$el.offsetWidth !== 0) this.width = this.$el.offsetWidth;
|
|
||||||
this.queue = q;
|
this.queue = q;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -223,8 +217,10 @@ export default defineComponent({
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.cmuxhskf {
|
.cmuxhskf {
|
||||||
> .new {
|
> .new {
|
||||||
position: fixed;
|
position: sticky;
|
||||||
|
top: calc(var(--stickyTop, 0px) + 16px);
|
||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
> button {
|
> button {
|
||||||
display: block;
|
display: block;
|
||||||
|
|
Loading…
Reference in a new issue