mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-08 14:13:01 -04:00
Fixes
This commit is contained in:
parent
1b3b0dbdf1
commit
9dd488ba4c
5 changed files with 0 additions and 117 deletions
|
@ -1,7 +0,0 @@
|
|||
# User Voice Show
|
||||
|
||||
Shows an indicator when a user is in a Voice Channel
|
||||
|
||||

|
||||
|
||||

|
|
@ -1,15 +0,0 @@
|
|||
.vc-uvs-indicator {
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-left: 4px;
|
||||
vertical-align: top;
|
||||
position: relative;
|
||||
top: 0;
|
||||
padding: 0;
|
||||
gap: 2px;
|
||||
}
|
||||
|
||||
.vc-uvs-indicator>svg {
|
||||
fill: dodgerblue;
|
||||
}
|
|
@ -1,54 +0,0 @@
|
|||
/*
|
||||
* Vencord, a modification for Discord's desktop app
|
||||
* Copyright (c) 2023 Vendicated and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import "./VoiceChannelIndicator.css";
|
||||
|
||||
import { NavigationRouter, PermissionsBits, PermissionStore, Toasts, Tooltip } from "@webpack/common";
|
||||
import { Channel } from "discord-types/general";
|
||||
|
||||
import speakerSvg from "./speaker.svg";
|
||||
|
||||
interface VoiceChannelIndicatorProps {
|
||||
tooltipText?: string;
|
||||
channel: Channel;
|
||||
}
|
||||
|
||||
export const VoiceChannelIndicator = ({ tooltipText, channel }: VoiceChannelIndicatorProps) => (
|
||||
<span className="vc-uvs-indicator" onClick={e => {
|
||||
if (PermissionStore.can(PermissionsBits.VIEW_CHANNEL, channel)) {
|
||||
NavigationRouter.transitionTo(getChannelPath(channel));
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
}
|
||||
else
|
||||
Toasts.show({
|
||||
message: "Insufficient permissions to view the channel.",
|
||||
id: "user-voice-show-insufficient-permissions",
|
||||
type: Toasts.Type.FAILURE,
|
||||
options: {
|
||||
position: Toasts.Position.BOTTOM,
|
||||
}
|
||||
});
|
||||
}}>
|
||||
<Tooltip text={tooltipText}>
|
||||
{(tooltipProps: any) => speakerSvg(tooltipProps)}
|
||||
</Tooltip>
|
||||
</span>
|
||||
);
|
||||
|
||||
const getChannelPath = (c: Channel) => `/channels/${c.guild_id ?? "@me"}/${c.id}`;
|
|
@ -1,20 +0,0 @@
|
|||
/*
|
||||
* Vencord, a Discord client mod
|
||||
* Copyright (c) 2023 Vendicated and contributors
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
export default () => (
|
||||
<svg
|
||||
width="20px"
|
||||
height="20px"
|
||||
fill="currentColor"
|
||||
overflow="hidden"
|
||||
|
||||
style={{ verticalAlign: "middle" }}
|
||||
|
||||
viewBox="0 0 1024 1024"
|
||||
>
|
||||
<path d="M512 384a128 128 0 0 0-128 128 128 128 0 0 0 128 128 128 128 0 0 0 128-128 128 128 0 0 0-128-128m0 341.333333a213.333333 213.333333 0 0 1-213.333333-213.333333 213.333333 213.333333 0 0 1 213.333333-213.333333 213.333333 213.333333 0 0 1 213.333333 213.333333 213.333333 213.333333 0 0 1-213.333333 213.333333m0-533.333333C298.666667 192 116.48 324.693333 42.666667 512c73.813333 187.306667 256 320 469.333333 320s395.52-132.693333 469.333333-320c-73.813333-187.306667-256-320-469.333333-320z" />
|
||||
</svg>
|
||||
);
|
|
@ -1,21 +0,0 @@
|
|||
/*
|
||||
* Vencord, a Discord client mod
|
||||
* Copyright (c) 2023 Vendicated and contributors
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
export default (props: any) => (
|
||||
<svg
|
||||
{...props}
|
||||
width="17px"
|
||||
height="17px"
|
||||
fill="currentColor"
|
||||
overflow="hidden"
|
||||
|
||||
style={{ verticalAlign: "middle" }}
|
||||
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<path d="M12 3a1 1 0 0 0-1-1h-.06a1 1 0 0 0-.74.32L5.92 7H3a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h2.92l4.28 4.68a1 1 0 0 0 .74.32H11a1 1 0 0 0 1-1V3ZM15.1 20.75c-.58.14-1.1-.33-1.1-.92v-.03c0-.5.37-.92.85-1.05a7 7 0 0 0 0-13.5A1.11 1.11 0 0 1 14 4.2v-.03c0-.6.52-1.06 1.1-.92a9 9 0 0 1 0 17.5Z"></path><path d="M15.16 16.51c-.57.28-1.16-.2-1.16-.83v-.14c0-.43.28-.8.63-1.02a3 3 0 0 0 0-5.04c-.35-.23-.63-.6-.63-1.02v-.14c0-.63.59-1.1 1.16-.83a5 5 0 0 1 0 9.02Z"></path>
|
||||
</svg>
|
||||
);
|
Loading…
Add table
Add a link
Reference in a new issue