mirror of
https://github.com/officialdakari/Extera.git
synced 2025-04-11 23:08:46 +02:00
fix output.ts
This commit is contained in:
parent
59494e51c4
commit
15e155fdcb
5 changed files with 1029 additions and 1001 deletions
12
config.json
12
config.json
|
@ -4,7 +4,17 @@
|
|||
"extera.xyz",
|
||||
"usesarchbtw.lol",
|
||||
"private.coffee",
|
||||
"matrix.im"
|
||||
"matrix.im",
|
||||
"jonasled.de",
|
||||
"aria-net.org",
|
||||
"glasgow.social",
|
||||
"pcriot.org",
|
||||
"tchncs.de",
|
||||
"4d2.org",
|
||||
"studichat.de",
|
||||
"imagisphe.re",
|
||||
"nope.chat",
|
||||
"mtrx.nz"
|
||||
],
|
||||
"allowCustomHomeservers": true,
|
||||
"featuredCommunities": {
|
||||
|
|
|
@ -70,7 +70,15 @@ export const toPlainText = (content: string, getDisplayName: any): string => {
|
|||
// и этот кал будет лежать на гитхабе
|
||||
return content.replaceAll(emojiRegexp, (match: string, shortcode: string, mxc: string) => `:${shortcode}:`)
|
||||
.replaceAll(userMentionRegexp, (match: string, mxId: string) => `${getDisplayName(mxId)}`)
|
||||
.replaceAll(roomMentionRegexp, (match: string, name: string, id: string) => `#${name}`)
|
||||
.replaceAll(roomMentionRegexp, (match: string, id: string) => {
|
||||
var roomName = `${id}`;
|
||||
if (id.startsWith('!')) roomName = getRoomNameOrId(initMatrix.matrixClient!, id);
|
||||
else if (id.startsWith('#')) {
|
||||
const roomId = getCanonicalAliasRoomId(initMatrix.matrixClient!, id);
|
||||
if (roomId) roomName = getRoomNameOrId(initMatrix.matrixClient!, roomId);
|
||||
}
|
||||
return `#${roomName}`;
|
||||
})
|
||||
.replaceAll(everyoneMentionRegexp, '@room');
|
||||
};
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ import React, {
|
|||
useState,
|
||||
} from 'react';
|
||||
import {
|
||||
Box,
|
||||
Header,
|
||||
PopOut,
|
||||
RectCords,
|
||||
|
@ -19,7 +20,7 @@ import { useDebounce } from '../../hooks/useDebounce';
|
|||
import { getText } from '../../../lang';
|
||||
import Icon from '@mdi/react';
|
||||
import { mdiChevronDown } from '@mdi/js';
|
||||
import { Autocomplete, TextField } from '@mui/material';
|
||||
import { Autocomplete, Link, TextField } from '@mui/material';
|
||||
|
||||
export function ServerPicker({
|
||||
server,
|
||||
|
@ -42,12 +43,19 @@ export function ServerPicker({
|
|||
}, [server]);
|
||||
|
||||
return (
|
||||
<Autocomplete
|
||||
renderInput={(params) => <TextField {...params} ref={serverInputRef} variant='filled' label={getText('form.homeserver')} />}
|
||||
options={serverList}
|
||||
defaultValue={server}
|
||||
onChange={(evt, value) => onServerChange(value!)}
|
||||
freeSolo
|
||||
/>
|
||||
<>
|
||||
<Autocomplete
|
||||
renderInput={(params) => <TextField {...params} ref={serverInputRef} variant='filled' label={getText('form.homeserver')} />}
|
||||
options={serverList}
|
||||
defaultValue={server}
|
||||
onChange={(evt, value) => onServerChange(value!)}
|
||||
freeSolo
|
||||
/>
|
||||
<Box grow="Yes" shrink="No" justifyContent="End">
|
||||
<Text as="span" size="T200" priority="400" align="Right">
|
||||
<Link href="https://servers.joinmatrix.org/">{getText('pick_a_server')}</Link>
|
||||
</Text>
|
||||
</Box>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -988,5 +988,6 @@
|
|||
"label.ignore_user": "Matrix ID to ignore",
|
||||
"label.ignore_regex": "Regex matching Matrix IDs to ignore",
|
||||
"nav.dm": "Directs",
|
||||
"room_notification": "Notifications"
|
||||
"room_notification": "Notifications",
|
||||
"pick_a_server": "Server list"
|
||||
}
|
1981
src/lang/ru.json
1981
src/lang/ru.json
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue