Uncommented blocking feature (buggy), added placeholder in user dropdown for DMs
This commit is contained in:
parent
77f611886b
commit
d5865dd183
@ -17,7 +17,7 @@ export const Theme = model<ThemeDocument>('theme', new Schema({
|
|||||||
default: generateInvite,
|
default: generateInvite,
|
||||||
unique: [true, 'Code should be unique'],
|
unique: [true, 'Code should be unique'],
|
||||||
dropDups: true,
|
dropDups: true,
|
||||||
validate: [/(?<!discord|accord|default)$/, 'This code is reserved'],
|
validate: [/(?<!discord|accord|pvtchat|default)$/, 'This code is reserved'],
|
||||||
maxlength: [32, 'Code is too long'],
|
maxlength: [32, 'Code is too long'],
|
||||||
},
|
},
|
||||||
createdAt: { type: Date, default: new Date() },
|
createdAt: { type: Date, default: new Date() },
|
||||||
|
@ -18,7 +18,7 @@ export default class implements WSEvent<'GUILD_MEMBER_REMOVE'> {
|
|||||||
|
|
||||||
const selfUserId = ws.sessions.get(client.id);
|
const selfUserId = ws.sessions.get(client.id);
|
||||||
if (guild.ownerId === member.userId)
|
if (guild.ownerId === member.userId)
|
||||||
throw new TypeError('You cannot leave a guild you own');
|
throw new TypeError('You cannot leave a guild you own, check guild settings to delete guild');
|
||||||
|
|
||||||
else if (selfUserId !== member.userId)
|
else if (selfUserId !== member.userId)
|
||||||
await deps.wsGuard.validateCan(client, guildId, 'KICK_MEMBERS');
|
await deps.wsGuard.validateCan(client, guildId, 'KICK_MEMBERS');
|
||||||
|
@ -50,7 +50,8 @@ const GuildMemberMenu: React.FunctionComponent<GuildMemberMenuProps> = ({ user }
|
|||||||
<FontAwesomeIcon icon={faUser} />
|
<FontAwesomeIcon icon={faUser} />
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
|
|
||||||
{user.id !== selfUser.id && (<>
|
{user.id !== selfUser.id && (
|
||||||
|
<div>
|
||||||
<hr className="my-2 border-bg-primary" />
|
<hr className="my-2 border-bg-primary" />
|
||||||
<MenuItem className="flex items-center justify-between cursor-pointer danger">
|
<MenuItem className="flex items-center justify-between cursor-pointer danger">
|
||||||
<span
|
<span
|
||||||
@ -59,7 +60,16 @@ const GuildMemberMenu: React.FunctionComponent<GuildMemberMenuProps> = ({ user }
|
|||||||
</span>
|
</span>
|
||||||
<FontAwesomeIcon icon={faBan} />
|
<FontAwesomeIcon icon={faBan} />
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
</>)}
|
<hr className="my-2 border-bg-primary" />
|
||||||
|
<MenuItem className="flex items-center justify-between cursor-pointer">
|
||||||
|
<span
|
||||||
|
onClick>
|
||||||
|
Private messages
|
||||||
|
</span>
|
||||||
|
<FontAwesomeIcon icon={faUser} />
|
||||||
|
</MenuItem>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
{(canKick || canManage) && (
|
{(canKick || canManage) && (
|
||||||
<div>
|
<div>
|
||||||
|
@ -13,9 +13,9 @@ const UserSettingsAdvanced: React.FunctionComponent = () => {
|
|||||||
const requestDelete = () => {
|
const requestDelete = () => {
|
||||||
const confirmation = window.prompt(
|
const confirmation = window.prompt(
|
||||||
`WARNING: You are about to delete account '${selfUser.username}'\n` +
|
`WARNING: You are about to delete account '${selfUser.username}'\n` +
|
||||||
`Type \'accord\' to confirm deletion.`
|
`Type \'confirm\' to confirm deletion.`
|
||||||
);
|
);
|
||||||
if (confirmation == 'accord')
|
if (confirmation == 'confirm')
|
||||||
dispatch(deleteSelf());
|
dispatch(deleteSelf());
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ const LoadingPage: React.FunctionComponent = () => {
|
|||||||
'TypeError: There may be bugs.',
|
'TypeError: There may be bugs.',
|
||||||
'What is a Discord? :thinking:',
|
'What is a Discord? :thinking:',
|
||||||
'Does anyone remember Skype?',
|
'Does anyone remember Skype?',
|
||||||
'Started in 2020.',
|
'Started in 2020, continued by PVTChat team in 2025.',
|
||||||
'Disclaimer: Not actually a Discord clone.',
|
'Disclaimer: Not actually a Discord clone.',
|
||||||
];
|
];
|
||||||
const randomIndex = Math.floor(Math.random() * tips.length);
|
const randomIndex = Math.floor(Math.random() * tips.length);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user