mirror of
https://github.com/Equicord/Equicord.git
synced 2025-02-07 13:34:02 -05:00
Merge remote-tracking branch 'upstream/dev' into dev
This commit is contained in:
commit
85a0046a7a
2 changed files with 6 additions and 7 deletions
|
@ -26,12 +26,11 @@ import { Margins } from "@utils/margins";
|
||||||
import { classes } from "@utils/misc";
|
import { classes } from "@utils/misc";
|
||||||
import { useAwaiter } from "@utils/react";
|
import { useAwaiter } from "@utils/react";
|
||||||
import definePlugin, { OptionType } from "@utils/types";
|
import definePlugin, { OptionType } from "@utils/types";
|
||||||
import { findByCodeLazy, findByPropsLazy, findComponentByCodeLazy } from "@webpack";
|
import { findByCodeLazy, findComponentByCodeLazy } from "@webpack";
|
||||||
import { ApplicationAssetUtils, Button, FluxDispatcher, Forms, GuildStore, React, SelectedChannelStore, SelectedGuildStore, UserStore } from "@webpack/common";
|
import { ApplicationAssetUtils, Button, FluxDispatcher, Forms, GuildStore, React, SelectedChannelStore, SelectedGuildStore, UserStore } from "@webpack/common";
|
||||||
|
|
||||||
const useProfileThemeStyle = findByCodeLazy("profileThemeStyle:", "--profile-gradient-primary-color");
|
const useProfileThemeStyle = findByCodeLazy("profileThemeStyle:", "--profile-gradient-primary-color");
|
||||||
const ActivityComponent = findComponentByCodeLazy(",onOpenGameProfileModal:");
|
const ActivityComponent = findComponentByCodeLazy("onOpenGameProfile");
|
||||||
const ActivityClassName = findByPropsLazy("activity", "buttonColor");
|
|
||||||
|
|
||||||
const ShowCurrentGame = getUserSettingLazy<boolean>("status", "showCurrentGame")!;
|
const ShowCurrentGame = getUserSettingLazy<boolean>("status", "showCurrentGame")!;
|
||||||
|
|
||||||
|
@ -436,8 +435,8 @@ export default definePlugin({
|
||||||
|
|
||||||
<Forms.FormDivider className={Margins.top8} />
|
<Forms.FormDivider className={Margins.top8} />
|
||||||
|
|
||||||
<div style={{ width: "284px", ...profileThemeStyle }}>
|
<div style={{ width: "284px", ...profileThemeStyle, padding: 8, marginTop: 8, borderRadius: 8, background: "var(--bg-mod-faint)" }}>
|
||||||
{activity[0] && <ActivityComponent activity={activity[0]} className={ActivityClassName.activity} channelId={SelectedChannelStore.getChannelId()}
|
{activity[0] && <ActivityComponent activity={activity[0]} channelId={SelectedChannelStore.getChannelId()}
|
||||||
guild={GuildStore.getGuild(SelectedGuildStore.getLastSelectedGuildId())}
|
guild={GuildStore.getGuild(SelectedGuildStore.getLastSelectedGuildId())}
|
||||||
application={{ id: settings.store.appID }}
|
application={{ id: settings.store.appID }}
|
||||||
user={UserStore.getCurrentUser()} />}
|
user={UserStore.getCurrentUser()} />}
|
||||||
|
|
|
@ -40,7 +40,7 @@ export default definePlugin({
|
||||||
settings,
|
settings,
|
||||||
patches: [
|
patches: [
|
||||||
{
|
{
|
||||||
find: '"UserProfileActivityCard"',
|
find: ".gameState,children:",
|
||||||
replacement: [
|
replacement: [
|
||||||
// Insert Spotify time bar component
|
// Insert Spotify time bar component
|
||||||
{
|
{
|
||||||
|
@ -49,7 +49,7 @@ export default definePlugin({
|
||||||
},
|
},
|
||||||
// Hide the large title on listening activities, to make them look more like Spotify (also visible from hovering over the large icon)
|
// Hide the large title on listening activities, to make them look more like Spotify (also visible from hovering over the large icon)
|
||||||
{
|
{
|
||||||
match: /(\i).type===(\i\..{0,10})\.WATCHING/,
|
match: /(\i).type===(\i\.\i)\.WATCHING/,
|
||||||
replace: "($self.settings.store.hideActivityDetailText&&$self.isActivityTimestamped($1)&&$1.type===$2.LISTENING)||$&"
|
replace: "($self.settings.store.hideActivityDetailText&&$self.isActivityTimestamped($1)&&$1.type===$2.LISTENING)||$&"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in a new issue