mirror of
https://github.com/revoltchat/revite.git
synced 2024-11-21 22:50:59 -05:00
Fix: Small update to categories and icons
This commit is contained in:
parent
af9d6fdedf
commit
b812aa64ca
5 changed files with 30 additions and 13 deletions
|
@ -24,6 +24,7 @@ import { useCallback, useContext, useEffect, useState } from "preact/hooks";
|
||||||
import { useIntermediate } from "../../../context/intermediate/Intermediate";
|
import { useIntermediate } from "../../../context/intermediate/Intermediate";
|
||||||
import { FileUploader, grabFiles, uploadFile } from "../../../context/revoltjs/FileUploads";
|
import { FileUploader, grabFiles, uploadFile } from "../../../context/revoltjs/FileUploads";
|
||||||
import { SingletonMessageRenderer, SMOOTH_SCROLL_ON_RECEIVE } from "../../../lib/renderer/Singleton";
|
import { SingletonMessageRenderer, SMOOTH_SCROLL_ON_RECEIVE } from "../../../lib/renderer/Singleton";
|
||||||
|
import { ShieldX } from "@styled-icons/boxicons-regular";
|
||||||
|
|
||||||
import ReplyBar from "./bars/ReplyBar";
|
import ReplyBar from "./bars/ReplyBar";
|
||||||
import FilePreview from './bars/FilePreview';
|
import FilePreview from './bars/FilePreview';
|
||||||
|
@ -52,11 +53,16 @@ const Base = styled.div`
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const Blocked = styled.div`
|
const Blocked = styled.div`
|
||||||
padding: 15px 0;
|
display: flex;
|
||||||
line-height: 20px;
|
padding: 14px 0;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
font-size: .875rem;
|
font-size: .875rem;
|
||||||
color: var(--tertiary-foreground);
|
color: var(--tertiary-foreground);
|
||||||
|
|
||||||
|
svg {
|
||||||
|
flex-shrink: 0;
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const Action = styled.div`
|
const Action = styled.div`
|
||||||
|
@ -80,7 +86,10 @@ function MessageBox({ channel, draft, dispatcher }: Props) {
|
||||||
if (!(permissions & ChannelPermission.SendMessage)) {
|
if (!(permissions & ChannelPermission.SendMessage)) {
|
||||||
return (
|
return (
|
||||||
<Base>
|
<Base>
|
||||||
<Blocked><Text id="app.main.channel.misc.no_sending" /></Blocked>
|
<Blocked>
|
||||||
|
<ShieldX size={20}/>
|
||||||
|
<Text id="app.main.channel.misc.no_sending" />
|
||||||
|
</Blocked>
|
||||||
</Base>
|
</Base>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ const CategoryBase = styled.div<Pick<Props, 'variant'>>`
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
|
|
||||||
margin-top: 4px;
|
margin-top: 4px;
|
||||||
padding: 6px 10px;
|
padding: 6px 0;
|
||||||
margin-bottom: 4px;
|
margin-bottom: 4px;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
|
||||||
|
@ -22,6 +22,11 @@ const CategoryBase = styled.div<Pick<Props, 'variant'>>`
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&:first-child {
|
||||||
|
margin-top: 0;
|
||||||
|
padding-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
${ props => props.variant === 'uniform' && css`
|
${ props => props.variant === 'uniform' && css`
|
||||||
padding-top: 6px;
|
padding-top: 6px;
|
||||||
` }
|
` }
|
||||||
|
|
|
@ -30,7 +30,7 @@ export default function ServerSettings() {
|
||||||
<GenericSettings
|
<GenericSettings
|
||||||
pages={[
|
pages={[
|
||||||
{
|
{
|
||||||
category: <Category variant="uniform" text={server.name} />,
|
category: <Category variant="uniform" text={server.name} />, //TOFIX: Just add the server.name as a string, otherwise it makes a duplicate category
|
||||||
id: 'overview',
|
id: 'overview',
|
||||||
icon: <ListUl size={20} />,
|
icon: <ListUl size={20} />,
|
||||||
title: <Text id="app.settings.channel_pages.overview.title" />
|
title: <Text id="app.settings.channel_pages.overview.title" />
|
||||||
|
|
|
@ -8,17 +8,17 @@ import { GenericSettings } from "./GenericSettings";
|
||||||
import { Route, useHistory } from "react-router-dom";
|
import { Route, useHistory } from "react-router-dom";
|
||||||
import {
|
import {
|
||||||
Bell,
|
Bell,
|
||||||
Box,
|
Palette,
|
||||||
Coffee,
|
Coffee,
|
||||||
Globe,
|
Globe,
|
||||||
Image,
|
IdCard,
|
||||||
LogOut,
|
LogOut,
|
||||||
Sync as SyncIcon,
|
Sync as SyncIcon,
|
||||||
Shield,
|
Shield,
|
||||||
ToggleRight,
|
Vial,
|
||||||
User
|
User
|
||||||
} from "@styled-icons/boxicons-regular";
|
} from "@styled-icons/boxicons-regular";
|
||||||
import { Megaphone } from "@styled-icons/boxicons-solid";
|
import { Brush, Megaphone } from "@styled-icons/boxicons-solid";
|
||||||
import { Gitlab } from "@styled-icons/boxicons-logos";
|
import { Gitlab } from "@styled-icons/boxicons-logos";
|
||||||
import { GIT_BRANCH, GIT_REVISION, REPO_URL } from "../../revision";
|
import { GIT_BRANCH, GIT_REVISION, REPO_URL } from "../../revision";
|
||||||
import LineDivider from "../../components/ui/LineDivider";
|
import LineDivider from "../../components/ui/LineDivider";
|
||||||
|
@ -59,7 +59,7 @@ export default function Settings() {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'profile',
|
id: 'profile',
|
||||||
icon: <Image size={20} />,
|
icon: <IdCard size={20} />,
|
||||||
title: <Text id="app.settings.pages.profile.title" />
|
title: <Text id="app.settings.pages.profile.title" />
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -70,7 +70,7 @@ export default function Settings() {
|
||||||
{
|
{
|
||||||
category: <Text id="app.settings.categories.client_settings" />,
|
category: <Text id="app.settings.categories.client_settings" />,
|
||||||
id: 'appearance',
|
id: 'appearance',
|
||||||
icon: <Box size={20} />,
|
icon: <Palette size={20} />,
|
||||||
title: <Text id="app.settings.pages.appearance.title" />
|
title: <Text id="app.settings.pages.appearance.title" />
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -91,7 +91,7 @@ export default function Settings() {
|
||||||
{
|
{
|
||||||
divider: true,
|
divider: true,
|
||||||
id: 'experiments',
|
id: 'experiments',
|
||||||
icon: <ToggleRight size={20} />,
|
icon: <Vial size={20} />,
|
||||||
title: <Text id="app.settings.pages.experiments.title" />
|
title: <Text id="app.settings.pages.experiments.title" />
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -36,7 +36,10 @@ export function Component(props: Props & WithDispatcher) {
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
AVAILABLE_EXPERIMENTS.length === 0 &&
|
AVAILABLE_EXPERIMENTS.length === 0 &&
|
||||||
<Text id="app.settings.pages.experiments.not_available" />
|
<div className={styles.empty}>
|
||||||
|
<Text id="app.settings.pages.experiments.not_available" />
|
||||||
|
</div>
|
||||||
|
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue