Skip to content

Commit 36bbb6c

Browse files
committed
Pushing for release
1 parent 54fee4d commit 36bbb6c

File tree

14 files changed

+371
-40
lines changed

14 files changed

+371
-40
lines changed

index.js

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -236,24 +236,11 @@ const RequireAllPluginsPlugin = (desktop) => ({
236236
.filter(dir => !dir.endsWith(".ignore"))
237237
.filter(dir => !dir.endsWith(desktop ? ".web" : ".app"))
238238
.filter(dir => dir !== "shared");
239-
const userPluginDirs = [];
240-
// const userPluginDirs = (await readdir("./packages/mod/src/user-plugins", {
241-
// encoding: "binary"
242-
// }))
243-
// .filter(dir => statSync(path.join("./packages/mod/src/user-plugins", dir)).isDirectory())
244-
// .filter(dir => !dir.endsWith(".ignore"))
245-
// .filter(dir => !dir.endsWith(desktop ? ".web" : ".app"))
246-
// .filter(dir => dir !== "shared");
247239

248240
return {
249241
resolveDir: "./packages/mod/src",
250242
contents: `
251-
function esModuleInteropDefault(exports) {
252-
if (typeof exports === "object" && exports !== null && exports.__esModule && exports.default) return exports.default;
253-
return exports;
254-
}
255-
${pluginDirs.map(dir => `module.exports[${JSON.stringify(dir)}] = esModuleInteropDefault(require("./plugins/${dir}"));`).join("\n")}
256-
${userPluginDirs.map(dir => `module.exports[${JSON.stringify(dir)}] = esModuleInteropDefault(require("./user-plugins/${dir}"));`).join("\n")}`
243+
${pluginDirs.map(dir => `module.exports[${JSON.stringify(dir)}] = require("./plugins/${dir}");`).join("\n")}`
257244
}
258245
});
259246
}

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.45",
3+
"version": "1.0.46",
44
"author": "doggybootsy",
55
"main": "index.js",
66
"dependencies": {

packages/desktop/main/ipc.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,6 @@ electron.ipcMain.handle("@vx/splash/resize", (event, { width, height }) => {
8686
window.setResizable(true);
8787
window.setSize(width, height, false);
8888
window.setResizable(false);
89-
90-
console.log([ width, height ]);
9189
});
9290

9391
electron.ipcMain.handle("@vx/devtools/toggle", async (event, options: OpenDevToolsOptions = { }) => {

packages/mod/src/addons/plugins/index.ts

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ export const pluginStore = new class PluginStore extends InternalStore {
9191

9292
removePlugin.call(this, filename);
9393

94+
addons.plugins.setEnabledState(filename, enabled);
95+
9496
const code = addons.plugins.read(filename);
9597

9698
const plugins = {
@@ -174,19 +176,11 @@ export const pluginStore = new class PluginStore extends InternalStore {
174176
delete this.#evaledPlugins[filename];
175177
delete this.#plugins[filename];
176178
metaCache.delete(filename);
177-
178-
const plugins = {
179-
...this.#plugins,
180-
[filename]: {
181-
js,
182-
enabled
183-
}
184-
};
185179

186-
this.#plugins = plugins;
187-
188-
addons.plugins.write(filename, js);
189180
this.emit();
181+
182+
addons.plugins.setEnabledState(filename, enabled);
183+
addons.plugins.write(filename, js);
190184
}
191185

192186
public getMeta(id: string) {

packages/mod/src/api/modals/components.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,25 +42,49 @@ export default {
4242
get ModalCloseButton(): React.FunctionComponent<ModalCloseButtonProps> {
4343
return SystemDesign.ModalCloseButton;
4444
},
45+
get CloseButton(): React.FunctionComponent<ModalCloseButtonProps> {
46+
return SystemDesign.ModalCloseButton;
47+
},
4548
get ModalContent(): React.FunctionComponent<ModalContentProps> {
4649
return SystemDesign.ModalContent;
4750
},
51+
get Content(): React.FunctionComponent<ModalContentProps> {
52+
return SystemDesign.ModalContent;
53+
},
4854
get ModalFooter(): React.FunctionComponent<ModalFooterProps> {
4955
return SystemDesign.ModalFooter;
5056
},
57+
get Footer(): React.FunctionComponent<ModalFooterProps> {
58+
return SystemDesign.ModalFooter;
59+
},
5160
get ModalHeader(): React.FunctionComponent<ModalHeaderProps> {
5261
return SystemDesign.ModalHeader;
5362
},
63+
get Header(): React.FunctionComponent<ModalHeaderProps> {
64+
return SystemDesign.ModalHeader;
65+
},
5466
get ModalListContent(): React.FunctionComponent<any> {
5567
return SystemDesign.ModalListContent;
5668
},
69+
get ListContent(): React.FunctionComponent<any> {
70+
return SystemDesign.ModalListContent;
71+
},
5772
get ModalRoot(): React.FunctionComponent<ModalRootProps> {
5873
return SystemDesign.ModalRoot;
5974
},
75+
get Root(): React.FunctionComponent<ModalRootProps> {
76+
return SystemDesign.ModalRoot;
77+
},
6078
get ModalSize(): Record<"SMALL" | "MEDIUM" | "LARGE" | "DYNAMIC", string> {
6179
return SystemDesign.ModalSize;
6280
},
81+
get Size(): Record<"SMALL" | "MEDIUM" | "LARGE" | "DYNAMIC", string> {
82+
return SystemDesign.ModalSize;
83+
},
6384
get ModalTransitionState(): Record<"ENTERING" | "ENTERED" | "EXITING" | "EXITED" | "HIDDEN", 0 | 1 | 2 | 3 | 4> {
6485
return SystemDesign.ModalTransitionState;
86+
},
87+
get TransitionState(): Record<"ENTERING" | "ENTERED" | "EXITING" | "EXITED" | "HIDDEN", 0 | 1 | 2 | 3 | 4> {
88+
return SystemDesign.ModalTransitionState;
6589
}
6690
};

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -483,10 +483,6 @@ button.vx-community-card-button {
483483
grid-template-columns: repeat(auto-fill, minmax(var(--custom-discover-featured-guilds-section-min-card-width), 1fr));
484484
}
485485

486-
.vx-searchbar {
487-
margin: 0 8px;
488-
}
489-
490486
.vx-dashboard-navigation-spacer {
491487
margin-top: 12px;
492488
}

packages/mod/src/fake_node_modules/react/index.ts

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

packages/mod/src/plugins/archive-viewer/button.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ interface ButtonProps {
99
};
1010

1111
export function ZipButton(props: ButtonProps) {
12+
13+
console.log(props);
14+
1215
if (!props.downloadURL) return null;
1316
if (!isArchive(props.downloadURL)) return null;
1417

packages/mod/src/plugins/archive-viewer/modal.tsx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,16 @@ function ZipModal(props: ZipModalProps) {
128128
useAbortEffect(async (signal) => {
129129
let file: File;
130130
if (typeof props.src === "string") {
131-
const blob = await request.blob(props.src, { cache: "force-cache" });
132-
if (signal.aborted) return;
133-
file = new File([ blob.blob ], props.src.split("/").at(-1)!.split("?").at(0)!);
131+
try {
132+
const blob = await request.blob(props.src, { cache: "force-cache" });
133+
if (signal.aborted) return;
134+
file = new File([ blob.blob ], props.src.split("/").at(-1)!.split("?").at(0)!);
135+
} catch (error) {
136+
setError(error as Error);
137+
return;
138+
}
134139
}
135-
else file = props.src;
140+
else file = props.src;
136141

137142
try {
138143
const archive = await archiveOpenFileAsync(file, "");
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
.vx-gp-banner {
2+
height: var(--banner-height);
3+
min-height: var(--banner-height);
4+
object-fit: cover;
5+
background-position: center center;
6+
background-size: cover;
7+
}
8+
9+
.vx-gp-icon {
10+
position: absolute;
11+
left: 84px;
12+
top: calc(var(--banner-height) - 5px);
13+
transform: translate(-50%, -50%);
14+
border-radius: 50%;
15+
overflow: hidden;
16+
display: flex;
17+
height: 120px;
18+
width: 120px;
19+
background: var(--background-secondary-alt);
20+
background-color: var(--bg-mod-faint);
21+
align-items: center;
22+
justify-content: center;
23+
color: var(--header-primary);
24+
font-size: 34px;
25+
}
26+
27+
.vx-gp-modal {
28+
background: var(--bg-surface-overlay);
29+
display: flex;
30+
flex-direction: column;
31+
flex-grow: 1;
32+
overflow: hidden;
33+
border-radius: var(--radius-xs);
34+
}
35+
36+
.vx-gp-body {
37+
z-index: 1;
38+
display: flex;
39+
flex-direction: column;
40+
gap: 12px;
41+
margin: 16px;
42+
margin-top: 70px;
43+
overflow: hidden;
44+
height: 100%;
45+
}
46+
47+
.vx-gp-name {
48+
user-select: text;
49+
word-break: break-word;
50+
color: var(--header-primary);
51+
font-family: var(--font-display);
52+
font-size: 24px;
53+
font-weight: 700;
54+
}
55+
56+
.vx-gp-content {
57+
height: 100%;
58+
background-color: var(--bg-mod-faint);
59+
border: 1px solid var(--border-faint);
60+
61+
position: relative;
62+
border-radius: var(--radius-sm);
63+
display: flex;
64+
flex-direction: column;
65+
overflow: hidden;
66+
}
67+
68+
.vx-gp-root {
69+
border-radius: 8px;
70+
overflow: hidden;
71+
position: relative;
72+
width: 600px;
73+
max-height: none;
74+
}
75+
76+
.vx-gp-tabs {
77+
display: flex;
78+
gap: 32px;
79+
margin: 16px 16px 0;
80+
border-bottom: 1px solid var(--background-modifier-accent);
81+
flex-direction: row;
82+
}
83+
.vx-gp-tab {
84+
border-bottom-width: 1px;
85+
border-bottom-width: 2px;
86+
border-bottom-style: solid;
87+
border-bottom-color: transparent;
88+
color: var(--interactive-normal);
89+
height: 25px;
90+
box-sizing: border-box;
91+
position: relative;
92+
font-size: 16px;
93+
line-height: 20px;
94+
cursor: pointer;
95+
font-weight: 500;
96+
white-space: nowrap;
97+
text-overflow: ellipsis;
98+
overflow: hidden;
99+
flex-shrink: 0;
100+
}
101+
.vx-gp-tab[aria-selected="true"] {
102+
border-bottom-color: var(--interactive-active);
103+
cursor: default;
104+
color: var(--interactive-active);
105+
}

0 commit comments

Comments
 (0)