fix dashboard and notifications

pull/99/head
dperolio 2 years ago
parent dc19c429b7
commit 67ae10ef1b
No known key found for this signature in database
GPG Key ID: 4191689562D51409

@ -48,7 +48,7 @@
&-header {
font-size: 24px;
font-weight: 700;
margin-top: 20px;
margin-top: 40px;
}
&-body {
margin-top: 20px;

@ -33,13 +33,13 @@ export default class Notifications extends Builtin {
}
/**
*
*
* @todo Figure out how to forceUpdate the app initially to render startup notices.
*/
async _patchNotices () {
const { base } = getModule('base', 'container');
const instance = getOwnerInstance(await waitForElement(`.${base.split(' ')[0]}`));
patch('vz-notices-notices', instance?.props?.children, 'type', (_, res) => {
patch('vz-notices-notices', instance?.props?.children[0], 'type', (_, res) => {
try {
const { children } = findInReactTree(res, ({ className }) => className === base);
children.unshift(<NoticeContainer />);
@ -50,7 +50,7 @@ export default class Notifications extends Builtin {
}
/**
*
*
*/
async _patchToasts () {
const { app } = getModule('app', 'layers');
@ -70,7 +70,7 @@ export default class Notifications extends Builtin {
}
/**
*
*
*/
_welcomeNewUser () {
try {

@ -46,7 +46,7 @@ export default class Router extends Builtin {
async patchRouter () {
const { container } = await getModule('container', 'downloadProgressCircle', true);
const RouteRenderer = getOwnerInstance(await waitForElement(`.${container}`));
patch('vz-router-routes', RouteRenderer?.props?.children, 'type', (_, res) => {
patch('vz-router-routes', RouteRenderer?.props?.children[0], 'type', (_, res) => {
try {
const { children } = findInReactTree(res, m => isArray(m.children) && m.children.length > 5);
children.push(
@ -107,7 +107,7 @@ export default class Router extends Builtin {
const { panels } = await getModule('panels', true);
const instance = getOwnerInstance(await waitForElement(`.${panels}`));
const Routes = await getModule('handleRouteChange', true);
patch('vz-router-sidebar', instance?.props?.children, 'type', (_, res) => {
patch('vz-router-sidebar', instance?.props?.children[0], 'type', (_, res) => {
try {
const forceUpdate = useForceUpdate();
/**

@ -546,7 +546,7 @@ async function startInjectionProcess () {
return reinject(discordAppPath);
}
} catch (err) {
return error('Something went wrong with the initial setup process:', err);
return error(`Something went wrong with the initial setup process:\n${err}`);
}
}

Loading…
Cancel
Save