mirror of
https://github.com/revoltchat/revite.git
synced 2024-11-10 01:03:36 -05:00
Add hide email button.
Add device name for Revolt Desktop. Add Italian and Toki Pona.
This commit is contained in:
parent
0884df407e
commit
90c46155e4
5 changed files with 31 additions and 5 deletions
2
external/lang
vendored
2
external/lang
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit 8a9c21da8527b9609404ad64205f6b876c9f53d2
|
Subproject commit 0da16a539dc35a0050119e1a239bd0b31eb7b962
|
|
@ -32,6 +32,7 @@ export enum Language {
|
||||||
CROATIAN = "hr",
|
CROATIAN = "hr",
|
||||||
HUNGARIAN = "hu",
|
HUNGARIAN = "hu",
|
||||||
INDONESIAN = "id",
|
INDONESIAN = "id",
|
||||||
|
ITALIAN = "it",
|
||||||
LITHUANIAN = "lt",
|
LITHUANIAN = "lt",
|
||||||
MACEDONIAN = "mk",
|
MACEDONIAN = "mk",
|
||||||
DUTCH = "nl",
|
DUTCH = "nl",
|
||||||
|
@ -41,6 +42,7 @@ export enum Language {
|
||||||
RUSSIAN = "ru",
|
RUSSIAN = "ru",
|
||||||
SERBIAN = "sr",
|
SERBIAN = "sr",
|
||||||
SWEDISH = "sv",
|
SWEDISH = "sv",
|
||||||
|
TOKIPONA = "tokipona",
|
||||||
TURKISH = "tr",
|
TURKISH = "tr",
|
||||||
UKRANIAN = "uk",
|
UKRANIAN = "uk",
|
||||||
CHINESE_SIMPLIFIED = "zh_Hans",
|
CHINESE_SIMPLIFIED = "zh_Hans",
|
||||||
|
@ -80,6 +82,7 @@ export const Languages: { [key in Language]: LanguageEntry } = {
|
||||||
hr: { display: "Hrvatski", emoji: "🇭🇷", i18n: "hr" },
|
hr: { display: "Hrvatski", emoji: "🇭🇷", i18n: "hr" },
|
||||||
hu: { display: "magyar", emoji: "🇭🇺", i18n: "hu" },
|
hu: { display: "magyar", emoji: "🇭🇺", i18n: "hu" },
|
||||||
id: { display: "bahasa Indonesia", emoji: "🇮🇩", i18n: "id" },
|
id: { display: "bahasa Indonesia", emoji: "🇮🇩", i18n: "id" },
|
||||||
|
it: { display: "italiano", emoji: "🇮🇹", i18n: "it" },
|
||||||
lt: { display: "Lietuvių", emoji: "🇱🇹", i18n: "lt" },
|
lt: { display: "Lietuvių", emoji: "🇱🇹", i18n: "lt" },
|
||||||
mk: { display: "Македонски", emoji: "🇲🇰", i18n: "mk" },
|
mk: { display: "Македонски", emoji: "🇲🇰", i18n: "mk" },
|
||||||
nl: { display: "Nederlands", emoji: "🇳🇱", i18n: "nl" },
|
nl: { display: "Nederlands", emoji: "🇳🇱", i18n: "nl" },
|
||||||
|
@ -94,6 +97,12 @@ export const Languages: { [key in Language]: LanguageEntry } = {
|
||||||
ru: { display: "Русский", emoji: "🇷🇺", i18n: "ru" },
|
ru: { display: "Русский", emoji: "🇷🇺", i18n: "ru" },
|
||||||
sr: { display: "Српски", emoji: "🇷🇸", i18n: "sr" },
|
sr: { display: "Српски", emoji: "🇷🇸", i18n: "sr" },
|
||||||
sv: { display: "Svenska", emoji: "🇸🇪", i18n: "sv" },
|
sv: { display: "Svenska", emoji: "🇸🇪", i18n: "sv" },
|
||||||
|
tokipona: {
|
||||||
|
display: "Toki Pona",
|
||||||
|
emoji: "🙂",
|
||||||
|
i18n: "tokipona",
|
||||||
|
dayjs: "en-gb",
|
||||||
|
},
|
||||||
tr: { display: "Türkçe", emoji: "🇹🇷", i18n: "tr" },
|
tr: { display: "Türkçe", emoji: "🇹🇷", i18n: "tr" },
|
||||||
uk: { display: "Українська", emoji: "🇺🇦", i18n: "uk" },
|
uk: { display: "Українська", emoji: "🇺🇦", i18n: "uk" },
|
||||||
zh_Hans: {
|
zh_Hans: {
|
||||||
|
|
|
@ -19,7 +19,11 @@ export function FormLogin() {
|
||||||
let device_name;
|
let device_name;
|
||||||
if (browser) {
|
if (browser) {
|
||||||
const { name, os } = browser;
|
const { name, os } = browser;
|
||||||
device_name = `${name} on ${os}`;
|
if (window.isNative) {
|
||||||
|
device_name = `Revolt Desktop on ${os}`;
|
||||||
|
} else {
|
||||||
|
device_name = `${name} on ${os}`;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
device_name = "Unknown Device";
|
device_name = "Unknown Device";
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,7 +61,10 @@ export const Account = observer(() => {
|
||||||
<div className={styles.userDetail}>
|
<div className={styles.userDetail}>
|
||||||
@{client.user!.username}
|
@{client.user!.username}
|
||||||
<div className={styles.userid}>
|
<div className={styles.userid}>
|
||||||
<Tooltip content={<Text id="app.settings.pages.account.unique_id" />}>
|
<Tooltip
|
||||||
|
content={
|
||||||
|
<Text id="app.settings.pages.account.unique_id" />
|
||||||
|
}>
|
||||||
<HelpCircle size={16} />
|
<HelpCircle size={16} />
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<Tooltip content={<Text id="app.special.copy" />}>
|
<Tooltip content={<Text id="app.special.copy" />}>
|
||||||
|
@ -89,7 +92,15 @@ export const Account = observer(() => {
|
||||||
<div className={styles.entry}>
|
<div className={styles.entry}>
|
||||||
{field === "email" ? (
|
{field === "email" ? (
|
||||||
revealEmail ? (
|
revealEmail ? (
|
||||||
value
|
<>
|
||||||
|
{value}{" "}
|
||||||
|
<a
|
||||||
|
onClick={() =>
|
||||||
|
setRevealEmail(false)
|
||||||
|
}>
|
||||||
|
<Text id="app.special.modals.actions.hide" />
|
||||||
|
</a>
|
||||||
|
</>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
•••••••••••@{value.split("@").pop()}{" "}
|
•••••••••••@{value.split("@").pop()}{" "}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { Chrome, Android, Apple, Windows } from "@styled-icons/boxicons-logos";
|
import { Chrome, Android, Apple, Windows } from "@styled-icons/boxicons-logos";
|
||||||
import { HelpCircle } from "@styled-icons/boxicons-regular";
|
import { HelpCircle, Desktop } from "@styled-icons/boxicons-regular";
|
||||||
import {
|
import {
|
||||||
Safari,
|
Safari,
|
||||||
Firefoxbrowser,
|
Firefoxbrowser,
|
||||||
|
@ -73,6 +73,8 @@ export function Sessions() {
|
||||||
return <Microsoftedge size={32} />;
|
return <Microsoftedge size={32} />;
|
||||||
case /opera/i.test(name):
|
case /opera/i.test(name):
|
||||||
return <Opera size={32} />;
|
return <Opera size={32} />;
|
||||||
|
case /desktop/i.test(name):
|
||||||
|
return <Desktop size={32} />;
|
||||||
default:
|
default:
|
||||||
return <HelpCircle size={32} />;
|
return <HelpCircle size={32} />;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue