forked from AkkomaGang/akkoma-fe
Remove direct style manipulations in favor of classes
This commit is contained in:
parent
ed7310c04b
commit
fc865d3a12
5 changed files with 16 additions and 17 deletions
|
@ -60,19 +60,6 @@ const ChatMessage = {
|
||||||
currentUser: state => state.users.currentUser,
|
currentUser: state => state.users.currentUser,
|
||||||
restrictedNicknames: state => state.instance.restrictedNicknames
|
restrictedNicknames: state => state.instance.restrictedNicknames
|
||||||
}),
|
}),
|
||||||
ellipsisButtonWrapperStyle () {
|
|
||||||
let res = {
|
|
||||||
'opacity': this.hovered || this.menuOpened ? '1' : '0'
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.isCurrentUser) {
|
|
||||||
res.right = '0.4rem'
|
|
||||||
} else {
|
|
||||||
res.left = '0.4rem'
|
|
||||||
}
|
|
||||||
|
|
||||||
return res
|
|
||||||
},
|
|
||||||
popoverMarginStyle () {
|
popoverMarginStyle () {
|
||||||
if (this.isCurrentUser) {
|
if (this.isCurrentUser) {
|
||||||
return {}
|
return {}
|
||||||
|
|
|
@ -117,6 +117,10 @@
|
||||||
color: var(--chatMessageIncomingText, $fallback--text);
|
color: var(--chatMessageIncomingText, $fallback--text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.chat-message-menu {
|
||||||
|
left: 0.4rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.outgoing {
|
.outgoing {
|
||||||
|
@ -139,6 +143,14 @@
|
||||||
.chat-message-inner {
|
.chat-message-inner {
|
||||||
align-items: flex-end;
|
align-items: flex-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.chat-message-menu {
|
||||||
|
right: 0.4rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.visible {
|
||||||
|
opacity: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="chat-message-menu"
|
class="chat-message-menu"
|
||||||
:style="ellipsisButtonWrapperStyle"
|
:class="{ 'visible': hovered || menuOpened }"
|
||||||
>
|
>
|
||||||
<Popover
|
<Popover
|
||||||
trigger="click"
|
trigger="click"
|
||||||
|
|
|
@ -31,8 +31,8 @@ const MobileNav = {
|
||||||
},
|
},
|
||||||
hideSitename () { return this.$store.state.instance.hideSitename },
|
hideSitename () { return this.$store.state.instance.hideSitename },
|
||||||
sitename () { return this.$store.state.instance.name },
|
sitename () { return this.$store.state.instance.name },
|
||||||
navBarStyle () {
|
isChat () {
|
||||||
return { 'visibility': this.$route.name === 'chat' ? 'hidden' : 'visible' }
|
return this.$route.name === 'chat'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<nav
|
<nav
|
||||||
id="nav"
|
id="nav"
|
||||||
class="nav-bar container"
|
class="nav-bar container"
|
||||||
:style="navBarStyle"
|
:class="{ 'mobile-hidden': isChat }"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="mobile-inner-nav"
|
class="mobile-inner-nav"
|
||||||
|
|
Loading…
Reference in a new issue