mirror of
https://github.com/System-End/Vencord.git
synced 2026-04-19 20:55:13 +00:00
fix ShowHiddenThings, BetterSessions, ShowTimeoutDuration (#3701)
Co-authored-by: Vendicated <vendicated@riseup.net>
This commit is contained in:
parent
18af2e1148
commit
66a8eb4854
3 changed files with 8 additions and 8 deletions
|
|
@ -31,7 +31,7 @@ import { fetchNamesFromDataStore, getDefaultName, GetOsColor, GetPlatformIcon, s
|
|||
const AuthSessionsStore = findStoreLazy("AuthSessionsStore");
|
||||
const UserSettingsModal = findByPropsLazy("saveAccountChanges", "open");
|
||||
|
||||
const TimestampClasses = findByPropsLazy("timestampTooltip", "blockquoteContainer");
|
||||
const TimestampClasses = findByPropsLazy("timestamp", "blockquoteContainer");
|
||||
const SessionIconClasses = findByPropsLazy("sessionIcon");
|
||||
|
||||
const BlobMask = findComponentByCodeLazy("!1,lowerBadgeSize:");
|
||||
|
|
@ -108,7 +108,7 @@ export default definePlugin({
|
|||
|
||||
renderTimestamp: ErrorBoundary.wrap(({ session, timeLabel }: { session: Session, timeLabel: string; }) => {
|
||||
return (
|
||||
<Tooltip text={session.approx_last_used_time.toLocaleString()} tooltipClassName={TimestampClasses.timestampTooltip}>
|
||||
<Tooltip text={session.approx_last_used_time.toLocaleString()}>
|
||||
{props => (
|
||||
<span {...props} className={TimestampClasses.timestamp}>
|
||||
{timeLabel}
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ export default definePlugin({
|
|||
},
|
||||
// fixes a bug where Members page must be loaded to see highest role, why is Discord depending on MemberSafetyStore.getEnhancedMember for something that can be obtained here?
|
||||
{
|
||||
find: "#{intl::GUILD_MEMBER_MOD_VIEW_PERMISSION_GRANTED_BY_ARIA_LABEL}),allowOverflow:",
|
||||
find: "#{intl::GUILD_MEMBER_MOD_VIEW_HIGHEST_ROLE}),children:",
|
||||
predicate: () => settings.store.showModView,
|
||||
replacement: {
|
||||
match: /(?<=\.highestRole\),)role:\i(?<=\[\i\.roles,\i\.highestRoleId,(\i)\].+)/,
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@ import { canonicalizeMatch } from "@utils/patches";
|
|||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { Message } from "@vencord/discord-types";
|
||||
import { findComponentLazy } from "@webpack";
|
||||
import { ChannelStore, GuildMemberStore, Text, Tooltip } from "@webpack/common";
|
||||
import { FunctionComponent, ReactNode } from "react";
|
||||
import { ChannelStore, GuildMemberStore, Text, TooltipContainer } from "@webpack/common";
|
||||
import { ReactNode } from "react";
|
||||
|
||||
const countDownFilter = canonicalizeMatch("#{intl::MAX_AGE_NEVER}");
|
||||
const CountDown = findComponentLazy(m => m.prototype?.render?.toString().includes(countDownFilter));
|
||||
|
|
@ -83,13 +83,13 @@ export default definePlugin({
|
|||
}
|
||||
],
|
||||
|
||||
TooltipWrapper: ErrorBoundary.wrap(({ message, children, text }: { message: Message; children: FunctionComponent<any>; text: ReactNode; }) => {
|
||||
TooltipWrapper: ErrorBoundary.wrap(({ message, children, text }: { message: Message; children: ReactNode; text: ReactNode; }) => {
|
||||
if (settings.store.displayStyle === DisplayStyle.Tooltip)
|
||||
return <Tooltip text={renderTimeout(message, false)}>{children}</Tooltip>;
|
||||
return <TooltipContainer text={renderTimeout(message, false)}>{children}</TooltipContainer>;
|
||||
|
||||
return (
|
||||
<div className="vc-std-wrapper">
|
||||
<Tooltip text={text}>{children}</Tooltip>
|
||||
<TooltipContainer text={text}>{children}</TooltipContainer>
|
||||
<Text variant="text-md/normal" color="status-danger">
|
||||
{renderTimeout(message, true)} timeout remaining
|
||||
</Text>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue