mirror of
https://github.com/revoltchat/revite.git
synced 2024-11-26 00:50:56 -05:00
Fix: Set global emoji pack.
Fix: Use conditional links for bottom navigation. Fix: Margin error on queued messages.
This commit is contained in:
parent
acadd8ab17
commit
1aa2b1226a
4 changed files with 10 additions and 8 deletions
|
@ -38,7 +38,7 @@ function Message({ attachContext, message, contrast, content: replacement, head:
|
||||||
<>
|
<>
|
||||||
{ message.replies?.map((message_id, index) => <MessageReply index={index} id={message_id} channel={message.channel} />) }
|
{ message.replies?.map((message_id, index) => <MessageReply index={index} id={message_id} channel={message.channel} />) }
|
||||||
<MessageBase id={message._id}
|
<MessageBase id={message._id}
|
||||||
head={head && !message.replies}
|
head={head && !(message.replies && message.replies.length > 0)}
|
||||||
contrast={contrast}
|
contrast={contrast}
|
||||||
sending={typeof queued !== 'undefined'}
|
sending={typeof queued !== 'undefined'}
|
||||||
mention={message.mentions?.includes(client.user!._id)}
|
mention={message.mentions?.includes(client.user!._id)}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import styled, { css } from "styled-components";
|
|
||||||
import { Link } from "react-router-dom";
|
|
||||||
import IconButton from "../ui/IconButton";
|
import IconButton from "../ui/IconButton";
|
||||||
import UserIcon from "../common/user/UserIcon";
|
import UserIcon from "../common/user/UserIcon";
|
||||||
|
import styled, { css } from "styled-components";
|
||||||
import { useSelf } from "../../context/revoltjs/hooks";
|
import { useSelf } from "../../context/revoltjs/hooks";
|
||||||
import { useHistory, useLocation } from "react-router";
|
import { useHistory, useLocation } from "react-router";
|
||||||
|
import ConditionalLink from "../../lib/ConditionalLink";
|
||||||
import { MessageCircle, Users } from "@styled-icons/feather";
|
import { MessageCircle, Users } from "@styled-icons/feather";
|
||||||
|
|
||||||
const NavigationBase = styled.div`
|
const NavigationBase = styled.div`
|
||||||
|
@ -54,18 +54,18 @@ export default function BottomNavigation() {
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Button>
|
</Button>
|
||||||
<Button active={friendsActive}>
|
<Button active={friendsActive}>
|
||||||
<Link to="/friends">
|
<ConditionalLink active={friendsActive} to="/friends">
|
||||||
<IconButton>
|
<IconButton>
|
||||||
<Users size={26} />
|
<Users size={26} />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Link>
|
</ConditionalLink>
|
||||||
</Button>
|
</Button>
|
||||||
<Button active={settingsActive}>
|
<Button active={settingsActive}>
|
||||||
<Link to="/settings">
|
<ConditionalLink active={settingsActive} to="/settings">
|
||||||
<IconButton>
|
<IconButton>
|
||||||
<UserIcon target={user} size={26} status={true} />
|
<UserIcon target={user} size={26} status={true} />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Link>
|
</ConditionalLink>
|
||||||
</Button>
|
</Button>
|
||||||
</NavigationBase>
|
</NavigationBase>
|
||||||
);
|
);
|
||||||
|
|
|
@ -10,6 +10,7 @@ export default styled.button<Props>`
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
font-family: 'Open Sans', sans-serif;
|
||||||
|
|
||||||
transition: 0.2s ease opacity;
|
transition: 0.2s ease opacity;
|
||||||
transition: 0.2s ease background-color;
|
transition: 0.2s ease background-color;
|
||||||
|
|
|
@ -2,6 +2,7 @@ import { filter } from ".";
|
||||||
import { SyncUpdateAction } from "./sync";
|
import { SyncUpdateAction } from "./sync";
|
||||||
import { Sounds } from "../../assets/sounds/Audio";
|
import { Sounds } from "../../assets/sounds/Audio";
|
||||||
import { Theme, ThemeOptions } from "../../context/Theme";
|
import { Theme, ThemeOptions } from "../../context/Theme";
|
||||||
|
import { setEmojiPack } from "../../components/common/Emoji";
|
||||||
|
|
||||||
export type SoundOptions = {
|
export type SoundOptions = {
|
||||||
[key in Sounds]?: boolean
|
[key in Sounds]?: boolean
|
||||||
|
@ -57,7 +58,7 @@ export function settings(
|
||||||
state = {} as Settings,
|
state = {} as Settings,
|
||||||
action: SettingsAction
|
action: SettingsAction
|
||||||
): Settings {
|
): Settings {
|
||||||
// setEmojiPack(state.appearance?.emojiPack ?? 'mutant');
|
setEmojiPack(state.appearance?.emojiPack ?? 'mutant');
|
||||||
|
|
||||||
switch (action.type) {
|
switch (action.type) {
|
||||||
case "SETTINGS_SET_THEME":
|
case "SETTINGS_SET_THEME":
|
||||||
|
|
Loading…
Reference in a new issue