HolyNotes: Fix Fix

This commit is contained in:
thororen1234 2026-01-23 18:38:47 -05:00
parent 7c1ef72641
commit 90f42c2e8f
No known key found for this signature in database
5 changed files with 24 additions and 29 deletions

View file

@ -4,19 +4,17 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/
import { findByProps } from "@webpack";
import { resultsClasses } from "@equicordplugins/holyNotes";
export default ({ error }: { error?: Error; } = {}) => {
const classes = findByProps("emptyResultsWrap");
if (error) {
// Error
console.log(error);
return (
<div className={classes.emptyResultsWrap}>
<div className={classes.emptyResultsContent} style={{ paddingBottom: "0px" }}>
<div className={classes.errorImage} />
<div className={classes.emptyResultsText}>
<div className={resultsClasses.emptyResultsWrap}>
<div className={resultsClasses.emptyResultsContent} style={{ paddingBottom: "0px" }}>
<div className={resultsClasses.errorImage} />
<div className={resultsClasses.emptyResultsText}>
There was an error parsing your notes! The issue was logged in your console, press CTRL
+ I to access it! Please visit the support server if you need extra help!
</div>
@ -26,10 +24,10 @@ export default ({ error }: { error?: Error; } = {}) => {
} else if (Math.floor(Math.random() * 100) <= 10)
// Easter egg
return (
<div className={classes.emptyResultsWrap}>
<div className={classes.emptyResultsContent} style={{ paddingBottom: "0px" }}>
<div className={`${classes.noResultsImage} ${classes.alt}`} />
<div className={classes.emptyResultsText}>
<div className={resultsClasses.emptyResultsWrap}>
<div className={resultsClasses.emptyResultsContent} style={{ paddingBottom: "0px" }}>
<div className={`${resultsClasses.noResultsImage} ${resultsClasses.alt}`} />
<div className={resultsClasses.emptyResultsText}>
No notes were found. Empathy banana is here for you.
</div>
</div>
@ -38,10 +36,10 @@ export default ({ error }: { error?: Error; } = {}) => {
// Empty notebook
else
return (
<div className={classes.emptyResultsWrap}>
<div className={classes.emptyResultsContent} style={{ paddingBottom: "0px" }}>
<div className={classes.noResultsImage} />
<div className={classes.emptyResultsText}>
<div className={resultsClasses.emptyResultsWrap}>
<div className={resultsClasses.emptyResultsContent} style={{ paddingBottom: "0px" }}>
<div className={resultsClasses.noResultsImage} />
<div className={resultsClasses.emptyResultsText}>
No notes were found saved in this notebook.
</div>
</div>

View file

@ -6,15 +6,13 @@
import { BaseText } from "@components/BaseText";
import { Paragraph } from "@components/Paragraph";
import { statusTagGreen } from "@equicordplugins/holyNotes";
import { noteHandler } from "@equicordplugins/holyNotes/NoteHandler";
import { downloadNotes, uploadNotes } from "@equicordplugins/holyNotes/utils";
import { ModalCloseButton, ModalContent, ModalFooter, ModalHeader, ModalProps, ModalRoot, ModalSize } from "@utils/modal";
import { findByProps } from "@webpack";
import { Button } from "@webpack/common";
export default ({ onClose, ...modalProps }: ModalProps & { onClose: () => void; }) => {
const { statusTagGreen } = findByProps("statusTagGreen");
return (
<ModalRoot {...modalProps} className="vc-help-modal" size={ModalSize.MEDIUM}>
<ModalHeader className="vc-help-modal-header">

View file

@ -7,12 +7,12 @@
import { BaseText } from "@components/BaseText";
import ErrorBoundary from "@components/ErrorBoundary";
import { Flex } from "@components/Flex";
import { quickSelect, quickSelectArrow, quickSelectLabel, quickSelectQuick, quickSelectValue } from "@equicordplugins/holyNotes";
import HelpIcon from "@equicordplugins/holyNotes/components/icons/HelpIcon";
import { noteHandler } from "@equicordplugins/holyNotes/NoteHandler";
import { HolyNotes } from "@equicordplugins/holyNotes/types";
import { classes } from "@utils/misc";
import { ModalCloseButton, ModalContent, ModalFooter, ModalHeader, ModalProps, ModalRoot, ModalSize, openModal } from "@utils/modal";
import { findByProps } from "@webpack";
import { ContextMenuApi, FluxDispatcher, Menu, React, TextInput } from "@webpack/common";
import Errors from "./Error";
@ -69,8 +69,6 @@ export const NoteModal = (props: ModalProps & { onClose: () => void; }) => {
const [sortDirection, setSortDirection] = React.useState(true);
const [currentNotebook, setCurrentNotebook] = React.useState("Main");
const { quickSelect, quickSelectLabel, quickSelectQuick, quickSelectValue, quickSelectArrow } = findByProps("quickSelect") || {};
const forceUpdate = React.useReducer(() => ({}), {})[1] as () => void;
const notes = noteHandler.getNotes(currentNotebook);

View file

@ -6,19 +6,14 @@
import { CopyIcon, DeleteIcon, IDIcon, LinkIcon, OpenExternalIcon } from "@components/Icons";
import { makeDummyUser } from "@components/settings/tabs/plugins/PluginModal";
import { MessageType } from "@equicordplugins/holyNotes";
import { ChannelMessage, messageClasses, MessageType } from "@equicordplugins/holyNotes";
import { noteHandler } from "@equicordplugins/holyNotes/NoteHandler";
import { HolyNotes } from "@equicordplugins/holyNotes/types";
import { copyToClipboard } from "@utils/clipboard";
import { classes } from "@utils/misc";
import { ModalProps } from "@utils/modal";
import { findByCodeLazy, findComponentByCodeLazy, findCssClassesLazy } from "@webpack";
import { ContextMenuApi, FluxDispatcher, Menu, NavigationRouter, React } from "@webpack/common";
const messageClasses = findCssClassesLazy("message", "groupStart", "cozyMessage");
const Channel = findByCodeLazy("computeLurkerPermissionsAllowList(){");
const ChannelMessage = findComponentByCodeLazy("Message must not be a thread");
export const RenderMessage = ({
note,
notebook,

View file

@ -26,7 +26,7 @@ import { classes } from "@utils/misc";
import { openModal } from "@utils/modal";
import definePlugin from "@utils/types";
import { Message } from "@vencord/discord-types";
import { findByCodeLazy, findCssClassesLazy } from "@webpack";
import { findByCodeLazy, findComponentByCodeLazy, findCssClassesLazy } from "@webpack";
import { ChannelStore, Menu } from "@webpack/common";
import { Popover as NoteButtonPopover, Popover } from "./components/icons/NoteButton";
@ -35,7 +35,13 @@ import { noteHandler, noteHandlerCache } from "./NoteHandler";
import { DataStoreToCache, HolyNoteStore } from "./utils";
export const MessageType = findByCodeLazy("isEdited(){");
const iconClasses = findCssClassesLazy("iconWrapper", "clickable");
export const { statusTagGreen } = findCssClassesLazy("statusTagGreen");
export const iconClasses = findCssClassesLazy("iconWrapper", "clickable");
export const resultsClasses = findCssClassesLazy("emptyResultsWrap", "emptyResultsContent", "errorImage", "emptyResultsText", "noResultsImage", "alt");
export const { quickSelect, quickSelectLabel, quickSelectQuick, quickSelectValue, quickSelectArrow } = findCssClassesLazy("quickSelect", "quickSelectLabel", "quickSelectQuick", "quickSelectValue", "quickSelectArrow");
export const messageClasses = findCssClassesLazy("message", "groupStart", "cozyMessage");
export const Channel = findByCodeLazy("computeLurkerPermissionsAllowList(){");
export const ChannelMessage = findComponentByCodeLazy("Message must not be a thread");
const messageContextMenuPatch: NavContextMenuPatchCallback = async (children, { message }: { message: Message; }) => {
children.push(