Skip to content

Commit 82d7e77

Browse files
committed
Last touches for 1.0.44
1 parent 2bf4dd4 commit 82d7e77

File tree

14 files changed

+87
-794
lines changed

14 files changed

+87
-794
lines changed

package-lock.json

Lines changed: 52 additions & 766 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vx",
3-
"version": "1.0.43",
3+
"version": "1.0.44",
44
"author": "doggybootsy",
55
"main": "index.js",
66
"dependencies": {

packages/desktop/preload/native.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { expose, getAndEnsureVXPath } from "common/preloads";
2-
import electron, { ipcRenderer, IpcRendererEvent } from "electron";
2+
import electron, { ipcRenderer, IpcRendererEvent, webFrame } from "electron";
33
import JSZip from "jszip";
44
import { existsSync, mkdirSync, readFileSync, readdirSync, rmSync, unlinkSync, writeFileSync } from "node:fs";
55
import { basename, extname, join } from "node:path";

packages/mod/src/dashboard/pages/addons/plugins/card.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ export function PluginCard({ plugin }: { plugin: SafePlugin }) {
182182
</div>
183183
</div>
184184
</div>
185-
<div className="vx-addon-description"><Markdown text={plugin.description.toString()}/></div>
185+
<div className="vx-addon-description">{plugin.description}</div>
186186
<div className="vx-addon-divider" />
187187
<div className="vx-addon-footer">
188188
{plugin.type === "custom" && (

packages/mod/src/dashboard/pages/addons/plugins/index.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { NO_RESULTS, NO_RESULTS_ALT, NoAddons, queryStore } from "../shared";
88
import { pluginStore } from "../../../../addons/plugins";
99
import { useInternalStore } from "../../../../hooks";
1010
import { openPluginSettingsModal } from "./modal";
11-
import { Messages } from "vx:i18n";
11+
import { FormattedMessage, Messages } from "vx:i18n";
1212
import { addons } from "../../../../native";
1313
import { IS_DESKTOP } from "vx:self";
1414
import type { IconFullProps } from "../../../../components/icons";
@@ -56,7 +56,7 @@ function getCustomPlugin(id: string): SafePlugin {
5656
settings: Settings ? (() => openPluginSettingsModal(name, Settings!)) : null,
5757
isNew: false,
5858
icon: Icon ? (props) => (
59-
<ErrorBoundary fallback={<Icons.Code />}>
59+
<ErrorBoundary fallback={<Icons.Code {...props} />}>
6060
<Icon {...props} />
6161
</ErrorBoundary>
6262
) : Icons.Code
@@ -65,6 +65,9 @@ function getCustomPlugin(id: string): SafePlugin {
6565
function convertToSafePlugin(plugin: Plugin): SafePlugin {
6666
const id = plugin.id.replace(".app", "").replace(".web", "").replace(/-/g, "_").toUpperCase() as Uppercase<string>;
6767

68+
let description = Messages[`${id}_DESCRIPTION`] as string | FormattedMessage;
69+
if (description instanceof FormattedMessage) description = description.format({ }) as string;
70+
6871
return {
6972
type: "internal",
7073
id: plugin.id,
@@ -74,7 +77,7 @@ function convertToSafePlugin(plugin: Plugin): SafePlugin {
7477
getActiveState: () => plugin.getActiveState(),
7578
originalEnabledState: plugin.originalEnabledState,
7679
name: Messages[`${id}_NAME`],
77-
description: Messages[`${id}_DESCRIPTION`],
80+
description,
7881
authors: plugin.authors,
7982
settings: plugin.exports.settings ? (() => openPluginSettingsModal(Messages[`${id}_NAME`], plugin.exports.settings!)) : null,
8083
isNew: newPlugins.has(plugin.id),

packages/mod/src/dashboard/pages/home/index.tsx

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } fr
22
import { IS_DESKTOP } from "vx:self";
33
import { Page } from "../..";
44
import { internalDataStore } from "../../../api/storage";
5-
import { Button, Collapsable, Flex, Icons, Spinner } from "../../../components";
5+
import { Button, Collapsable, Flex, Icons, Markdown, Spinner } from "../../../components";
66
import { FormSwitch } from "../../../components/switch";
77
import { app, nativeFrame, transparency } from "../../../native";
88
import { Updater } from "./updater";
@@ -180,7 +180,7 @@ export function Home() {
180180
}, [ ]);
181181

182182
return (
183-
<Page title="Home" icon={Icons.Logo}>
183+
<Page title="Home" icon={Icons.Logo} bodyClassName="vx-home-page">
184184
<RainbowText>
185185
<div className="vx-home-header">
186186
<div className="vx-home-logo" onClick={changeBackground}>
@@ -212,8 +212,6 @@ export function Home() {
212212

213213
<Updater />
214214

215-
<div style={{ marginTop: 10 }} />
216-
217215
<Category
218216
title="Notifications"
219217
subtitle="Configure notifications here"
@@ -236,8 +234,6 @@ export function Home() {
236234

237235
{IS_DESKTOP && (
238236
<>
239-
<div style={{ marginTop: 10 }} />
240-
241237
<Category
242238
title="Window Settings"
243239
subtitle="Settings for the browser window"
@@ -252,7 +248,6 @@ export function Home() {
252248
internalDataStore.set("content-protection", value);
253249
window.DiscordNative!.window.setContentProtection!(value);
254250
}}
255-
style={{ marginTop: 20 }}
256251
note={Messages.CONTENT_PROTECTION_NOTE}
257252
>
258253
{Messages.CONTENT_PROTECTION}
@@ -295,8 +290,6 @@ export function Home() {
295290
</Category>
296291
</>
297292
)}
298-
299-
<div style={{ marginTop: 10 }} />
300293

301294
<Category
302295
title="VX Settings"
@@ -310,7 +303,6 @@ export function Home() {
310303
setUserSettingShortcut(value);
311304
internalDataStore.set("user-setting-shortcut", value);
312305
}}
313-
style={{ marginTop: 20 }}
314306
note={Messages.USER_SETTINGS_SHORTCUT_NOTE}
315307
>
316308
{Messages.USER_SETTINGS_SHORTCUT}
@@ -353,7 +345,7 @@ export function Home() {
353345
>
354346
{Messages.ADD_VX_TO_TITLEBAR}
355347
</FormSwitch>
356-
</Category>
348+
</Category>
357349
</RainbowText>
358350
</Page>
359351
)

packages/mod/src/dashboard/pages/home/updater.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ export function Updater() {
124124
const state = useInternalStore(updaterStore, () => updaterStore.getState());
125125

126126
return (
127-
<Flex className="vx-updater" justify={Flex.Justify.BETWEEN} align={Flex.Align.CENTER}>
127+
<Flex className="vx-updater" justify={Flex.Justify.BETWEEN} align={Flex.Align.CENTER} grow={0}>
128128
<div className="vx-updater-info">
129129
<div className="vx-updater-notice">
130130
{

packages/mod/src/dashboard/pages/index.css

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,6 @@ input.vx-addon-input:not(:focus) {
214214
padding: 6px;
215215
border-radius: 4px;
216216
color: var(--text-normal);
217-
margin-top: 8px;
218217
border: 1px solid var(--background-secondary-alt);
219218
}
220219

@@ -552,4 +551,10 @@ button.vx-community-card-button {
552551
}
553552
.vx-category[data-is-open="true"] .vx-category-caret {
554553
rotate: -90deg;
554+
}
555+
556+
.vx-home-page {
557+
display: flex;
558+
flex-direction: column;
559+
gap: 12px;
555560
}

packages/mod/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { nativeFrame, transparency } from "./native";
1313
import { compileFunction } from "./util";
1414

1515
import "./notrack";
16-
import { BdApi } from "./betterdiscord";
16+
import { internalDataStore } from "./api/storage";
1717

1818
console.log(`Welcome to VX v${env.VERSION}`);
1919

packages/mod/src/native.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { IS_DESKTOP, git } from "vx:self";
2-
import { DataStore } from "./api/storage";
2+
import { DataStore, internalDataStore } from "./api/storage";
33

44
export const extensions = {
55
open() {

0 commit comments

Comments
 (0)