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 { &-header {
font-size: 24px; font-size: 24px;
font-weight: 700; font-weight: 700;
margin-top: 20px; margin-top: 40px;
} }
&-body { &-body {
margin-top: 20px; 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. * @todo Figure out how to forceUpdate the app initially to render startup notices.
*/ */
async _patchNotices () { async _patchNotices () {
const { base } = getModule('base', 'container'); const { base } = getModule('base', 'container');
const instance = getOwnerInstance(await waitForElement(`.${base.split(' ')[0]}`)); 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 { try {
const { children } = findInReactTree(res, ({ className }) => className === base); const { children } = findInReactTree(res, ({ className }) => className === base);
children.unshift(<NoticeContainer />); children.unshift(<NoticeContainer />);
@ -50,7 +50,7 @@ export default class Notifications extends Builtin {
} }
/** /**
* *
*/ */
async _patchToasts () { async _patchToasts () {
const { app } = getModule('app', 'layers'); const { app } = getModule('app', 'layers');
@ -70,7 +70,7 @@ export default class Notifications extends Builtin {
} }
/** /**
* *
*/ */
_welcomeNewUser () { _welcomeNewUser () {
try { try {

@ -46,7 +46,7 @@ export default class Router extends Builtin {
async patchRouter () { async patchRouter () {
const { container } = await getModule('container', 'downloadProgressCircle', true); const { container } = await getModule('container', 'downloadProgressCircle', true);
const RouteRenderer = getOwnerInstance(await waitForElement(`.${container}`)); 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 { try {
const { children } = findInReactTree(res, m => isArray(m.children) && m.children.length > 5); const { children } = findInReactTree(res, m => isArray(m.children) && m.children.length > 5);
children.push( children.push(
@ -107,7 +107,7 @@ export default class Router extends Builtin {
const { panels } = await getModule('panels', true); const { panels } = await getModule('panels', true);
const instance = getOwnerInstance(await waitForElement(`.${panels}`)); const instance = getOwnerInstance(await waitForElement(`.${panels}`));
const Routes = await getModule('handleRouteChange', true); 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 { try {
const forceUpdate = useForceUpdate(); const forceUpdate = useForceUpdate();
/** /**

@ -546,7 +546,7 @@ async function startInjectionProcess () {
return reinject(discordAppPath); return reinject(discordAppPath);
} }
} catch (err) { } 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