move some managed css around
This commit is contained in:
parent
6f19368b70
commit
9f2323c67e
4 changed files with 22 additions and 38 deletions
|
|
@ -7,7 +7,6 @@
|
|||
import * as DataStore from "@api/DataStore";
|
||||
import { isPluginEnabled } from "@api/PluginManager";
|
||||
import { definePluginSettings } from "@api/Settings";
|
||||
import { disableStyle, enableStyle } from "@api/Styles";
|
||||
import usrbg from "@plugins/usrbg";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
|
|
@ -73,14 +72,13 @@ export default definePlugin({
|
|||
],
|
||||
|
||||
data: {},
|
||||
managedStyle: style,
|
||||
|
||||
async start() {
|
||||
enableStyle(style);
|
||||
this.data = await DataStore.get(DATASTORE_KEY) || {};
|
||||
},
|
||||
|
||||
stop() {
|
||||
disableStyle(style);
|
||||
DataStore.set(DATASTORE_KEY, this.data);
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import { disableStyle, enableStyle } from "@api/Styles";
|
||||
import { EquicordDevs } from "@utils/constants";
|
||||
import { getUserAvatarUrl } from "@utils/misc";
|
||||
import definePlugin from "@utils/types";
|
||||
|
|
@ -17,6 +16,7 @@ export default definePlugin({
|
|||
description: "Makes avatars take up the entire vc tile",
|
||||
tags: ["Appearance", "Voice"],
|
||||
authors: [EquicordDevs.mochienya],
|
||||
managedStyle: style,
|
||||
patches: [
|
||||
{
|
||||
find: "\"data-selenium-video-tile\":",
|
||||
|
|
@ -44,11 +44,4 @@ export default definePlugin({
|
|||
"--full-res-avatar": `url(${avatarUrl})`
|
||||
};
|
||||
},
|
||||
|
||||
start() {
|
||||
enableStyle(style);
|
||||
},
|
||||
stop() {
|
||||
disableStyle(style);
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -5,12 +5,11 @@
|
|||
*/
|
||||
|
||||
import { findGroupChildrenByChildId, NavContextMenuPatchCallback } from "@api/ContextMenu";
|
||||
import { disableStyle, enableStyle } from "@api/Styles";
|
||||
import { PaintbrushIcon } from "@components/Icons";
|
||||
import { EquicordDevs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
import { extractAndLoadChunksLazy } from "@webpack";
|
||||
import { ChannelStore, closeModal, DraftType, FluxDispatcher, Menu, openModal,PendingReplyStore, SelectedChannelStore, UploadHandler } from "@webpack/common";
|
||||
import { ChannelStore, closeModal, DraftType, FluxDispatcher, Menu, openModal, PendingReplyStore, SelectedChannelStore, UploadHandler } from "@webpack/common";
|
||||
|
||||
import RemixModal from "./RemixModal";
|
||||
import css from "./styles.css?managed";
|
||||
|
|
@ -76,15 +75,10 @@ export default definePlugin({
|
|||
"channel-attach": UploadContextMenuPatch,
|
||||
"message": MessageContextMenuPatch,
|
||||
},
|
||||
managedStyle: css,
|
||||
async start() {
|
||||
|
||||
await requireCreateStickerModal();
|
||||
await requireSettingsMenu();
|
||||
|
||||
enableStyle(css);
|
||||
},
|
||||
|
||||
stop() {
|
||||
disableStyle(css);
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -4,8 +4,6 @@
|
|||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import "./styles.css";
|
||||
|
||||
import { NavContextMenuPatchCallback } from "@api/ContextMenu";
|
||||
import { HeaderBarButton } from "@api/HeaderBar";
|
||||
import ErrorBoundary from "@components/ErrorBoundary";
|
||||
|
|
@ -47,6 +45,7 @@ import {
|
|||
} from "@webpack/common";
|
||||
|
||||
import { getOpenPopoutWindowKeys, getPersistedPopoutChannelIds, getPopoutWindowKey, isPopoutWindowOpen, settings, SidebarStore, syncPersistedPopoutWindows } from "./store";
|
||||
import style from "./style.css?managed";
|
||||
|
||||
const cl = classNameFactory("vc-sidebar-chat-");
|
||||
|
||||
|
|
@ -324,6 +323,23 @@ export default definePlugin({
|
|||
],
|
||||
},
|
||||
],
|
||||
managedStyle: style,
|
||||
settings,
|
||||
contextMenus: {
|
||||
"user-context": UserContextPatch,
|
||||
"channel-context": ChannelContextPatch,
|
||||
"thread-context": ChannelContextPatch,
|
||||
"gdm-context": ChannelContextPatch,
|
||||
},
|
||||
|
||||
toolboxActions: {
|
||||
"Open Previous Chat"() {
|
||||
FluxDispatcher.dispatch({
|
||||
// @ts-ignore
|
||||
type: "VC_SIDEBAR_CHAT_PREVIOUS",
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
headerBarButton: {
|
||||
icon: WindowLaunchIcon,
|
||||
|
|
@ -347,23 +363,6 @@ export default definePlugin({
|
|||
restorePersistedPopouts();
|
||||
},
|
||||
|
||||
settings,
|
||||
contextMenus: {
|
||||
"user-context": UserContextPatch,
|
||||
"channel-context": ChannelContextPatch,
|
||||
"thread-context": ChannelContextPatch,
|
||||
"gdm-context": ChannelContextPatch,
|
||||
},
|
||||
|
||||
toolboxActions: {
|
||||
"Open Previous Chat"() {
|
||||
FluxDispatcher.dispatch({
|
||||
// @ts-ignore
|
||||
type: "VC_SIDEBAR_CHAT_PREVIOUS",
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
renderSidebar() {
|
||||
const { guild, channel /* width*/ } = useStateFromStores(
|
||||
[SidebarStore, GuildStore, ChannelStore], () => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue