Merge branch 'master' into contextual_border_radius_variables

This commit is contained in:
Paul Makles 2021-09-03 11:01:19 +01:00 committed by GitHub
commit 3aa90ab570
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 54 additions and 40 deletions

2
external/lang vendored

@ -1 +1 @@
Subproject commit eb3716182702af2747025e0ee171d6a1a4415fc7 Subproject commit 3ff3cb0b3c0aa0060e3dd8e5efaca71fd828e530

View file

@ -133,7 +133,7 @@
}, },
"name": "client", "name": "client",
"main": "index.js", "main": "index.js",
"repository": "https://gitlab.insrt.uk/revolt/revite.git", "repository": "https://github.com/revoltchat/revite.git",
"author": "Paul <paulmakles@gmail.com>", "author": "Paul <paulmakles@gmail.com>",
"license": "MIT" "license": "MIT"
} }

View file

@ -30,9 +30,9 @@ export default function TextFile({ attachment }: Props) {
if (typeof content !== "undefined") return; if (typeof content !== "undefined") return;
if (loading) return; if (loading) return;
if (attachment.size > 20_000) { if (attachment.size > 100_000) {
setContent( setContent(
"This file is > 20 KB, for your sake I did not load it.\nSee tracking issue here for previews: https://gitlab.insrt.uk/revolt/revite/-/issues/2", "This file is > 100 KB, for your sake I did not load it.\nSee tracking issue here for previews: https://github.com/revoltchat/revite/issues/35",
); );
return; return;
} }

View file

@ -23,7 +23,7 @@ const Base = styled.div`
user-select: none; user-select: none;
align-items: center; align-items: center;
flex-direction: row; flex-direction: row;
width: calc(100% - 3px); width: calc(100% - var(--scrollbar-thickness));
color: var(--secondary-foreground); color: var(--secondary-foreground);
background: var(--secondary-background); background: var(--secondary-background);
} }

View file

@ -124,7 +124,6 @@
img { img {
width: 32px; width: 32px;
height: 32px; height: 32px;
cursor: pointer;
} }
} }

View file

@ -196,6 +196,8 @@ export const UserProfile = observer(
</IconButton> </IconButton>
)} )}
{!user.bot && {!user.bot &&
flags != 2 &&
flags != 4 &&
(user.relationship === (user.relationship ===
RelationshipStatus.Incoming || RelationshipStatus.Incoming ||
user.relationship === user.relationship ===
@ -315,9 +317,16 @@ export const UserProfile = observer(
content={ content={
<Text id="app.special.popovers.user_profile.badges.translator" /> <Text id="app.special.popovers.user_profile.badges.translator" />
}> }>
<img src="/assets/badges/translator.svg" <img
src="/assets/badges/translator.svg"
style={{
cursor: "pointer",
}}
onClick={() => { onClick={() => {
window.open("https://weblate.insrt.uk/projects/revolt/web-app/", "_blank") window.open(
"https://weblate.insrt.uk/projects/revolt/web-app/",
"_blank",
);
}} }}
/> />
</Tooltip> </Tooltip>
@ -342,8 +351,14 @@ export const UserProfile = observer(
<Money <Money
size={32} size={32}
color="#efab44" color="#efab44"
style={{
cursor: "pointer",
}}
onClick={() => { onClick={() => {
window.open("https://insrt.uk/donate", "_blank") window.open(
"https://insrt.uk/donate",
"_blank",
);
}} }}
/> />
</Tooltip> </Tooltip>

View file

@ -619,8 +619,15 @@ function ContextMenus(props: Props) {
break; break;
case RelationshipStatus.None: case RelationshipStatus.None:
default: default:
if (
(user.flags && 2) ||
(user.flags && 4)
) {
actions = ["block_user"];
} else {
actions = ["add_friend", "block_user"]; actions = ["add_friend", "block_user"];
} }
}
if (userPermissions & UserPermission.ViewProfile) { if (userPermissions & UserPermission.ViewProfile) {
generateAction({ generateAction({

View file

@ -18,10 +18,16 @@ export function FormLogin() {
const browser = detect(); const browser = detect();
let device_name; let device_name;
if (browser) { if (browser) {
const { name, os } = browser; let { name } = browser;
const { os } = browser;
if (window.isNative) { if (window.isNative) {
device_name = `Revolt Desktop on ${os}`; device_name = `Revolt Desktop on ${os}`;
} else { } else {
if (name === "ios") {
name = "safari";
} else if (name === "fxios") {
name = "firefox";
}
device_name = `${name} on ${os}`; device_name = `${name} on ${os}`;
} }
} else { } else {

View file

@ -1,4 +1,4 @@
import { Gitlab } from "@styled-icons/boxicons-logos"; import { Github } from "@styled-icons/boxicons-logos";
import { import {
Sync as SyncIcon, Sync as SyncIcon,
Globe, Globe,
@ -92,7 +92,6 @@ export default function Settings() {
title: <Text id="app.settings.pages.audio.title" />, title: <Text id="app.settings.pages.audio.title" />,
}, },
{ {
id: "appearance", id: "appearance",
icon: <Palette size={20} />, icon: <Palette size={20} />,
title: <Text id="app.settings.pages.appearance.title" />, title: <Text id="app.settings.pages.appearance.title" />,
@ -184,11 +183,11 @@ export default function Settings() {
custom={ custom={
<> <>
<a <a
href="https://gitlab.insrt.uk/revolt" href="https://github.com/revoltchat"
target="_blank" target="_blank"
rel="noreferrer"> rel="noreferrer">
<ButtonItem compact> <ButtonItem compact>
<Gitlab size={20} /> <Github size={20} />
<Text id="app.settings.pages.source_code" /> <Text id="app.settings.pages.source_code" />
</ButtonItem> </ButtonItem>
</a> </a>
@ -221,7 +220,7 @@ export default function Settings() {
<a <a
href={ href={
GIT_BRANCH !== "DETACHED" GIT_BRANCH !== "DETACHED"
? `https://gitlab.insrt.uk/revolt/client/-/tree/${GIT_BRANCH}` ? `https://github.com/revoltchat/revite/tree/${GIT_BRANCH}`
: undefined : undefined
} }
target="_blank" target="_blank"

View file

@ -160,10 +160,10 @@ export const Account = observer(() => {
Two-factor authentication is currently work-in-progress, see{" "} Two-factor authentication is currently work-in-progress, see{" "}
{` `} {` `}
<a <a
href="https://gitlab.insrt.uk/insert/rauth/-/issues/2" href="https://github.com/insertish/rauth/milestone/1"
target="_blank" target="_blank"
rel="noreferrer"> rel="noreferrer">
tracking issue here v1 milestone here
</a> </a>
. .
</h5> </h5>

View file

@ -1,7 +1,6 @@
/* eslint-disable */ /* eslint-disable */
// Strings needs to be explictly stated here as they can cause type issues elsewhere. // Strings needs to be explictly stated here as they can cause type issues elsewhere.
export const REPO_URL: string = export const REPO_URL: string = "https://github.com/revoltchat/revite/commit";
"https://gitlab.insrt.uk/revolt/revite/-/commit";
export const GIT_REVISION: string = "__GIT_REVISION__"; export const GIT_REVISION: string = "__GIT_REVISION__";
export const GIT_BRANCH: string = "__GIT_BRANCH__"; export const GIT_BRANCH: string = "__GIT_BRANCH__";

View file

@ -4,8 +4,8 @@
} }
::-webkit-scrollbar { ::-webkit-scrollbar {
width: 3px; width: var(--scrollbar-thickness);
height: 3px; height: var(--scrollbar-thickness);
} }
::-webkit-scrollbar-track { ::-webkit-scrollbar-track {

View file

@ -3,8 +3,8 @@
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
scrollbar-width: thin;
box-sizing: border-box; box-sizing: border-box;
scrollbar-width: var(--scrollbar-thickness-ff);
} }
html { html {

View file

@ -19,6 +19,8 @@
* Layout * Layout
*/ */
--app-height: 100vh; --app-height: 100vh;
--scrollbar-thickness: 3px;
--scrollbar-thickness-ff: thin;
--border-radius: 6px; --border-radius: 6px;
--border-radius-half: 50%; --border-radius-half: 50%;
--border-radius-user-profile-picture: var(--border-radius-half); --border-radius-user-profile-picture: var(--border-radius-half);
@ -35,17 +37,4 @@
--attachment-max-text-width: 800px; --attachment-max-text-width: 800px;
--bottom-navigation-height: 50px; --bottom-navigation-height: 50px;
/**
* Experimental
*/
--background-rgb: (
25,
25,
25
); //THIS IS SO THAT WE CAN HAVE CUSTOM BACKGROUNDS FOR THE CLIENT, CONVERTS THE HEX TO AN RGB VALUE FROM --background
--background-rgba: rgba(
var(--background-rgb),
0.8
); //make the opacity also customizable
} }