misc code cleanup

pull/67/head
dperolio 3 years ago
parent 037c224c37
commit 1f58a687a9
No known key found for this signature in database
GPG Key ID: 3E9BBAA710D3DDCE

@ -1,12 +1,10 @@
.vz-addon-screenshots {
&-grid-wrapper {
column-count: 3;
column-gap: 15px;
column-width: 400px;
}
.vz-addon-listing-screenshots-grid-wrapper {
column-count: 3;
column-gap: 20px;
column-width: 400px;
.vz-image-wrapper {
width: 100%;
margin: 0 0 15px;
margin: 0 0 20px;
max-height: none;
max-width: none;
img {

@ -54,7 +54,6 @@ export default async builtin => {
const ChannelStore = getModule('getChannel')?.getChannel(SelectedChannelId);
if (ariaLabel === Messages.CHANNEL_MUTE_LABEL.format({ channelName: ChannelStore?.name })) {
if (res.props.children.props['aria-checked'] === true) {
console.log('test');
key = 'channel-unmute';
} else {
key = 'channel-mute';

@ -17,22 +17,28 @@
pointer-events: none;
}
// Image carousel model tempfix since Discord broke them
/**
* Image carousel model tempfix since Discord broke them
*/
[vz-modal='image-carousel'] {
.inner-1ilYF7 {
pointer-events: none;
}
}
// Image carousel modal inner wrapper
.wrapper-Dh-cqn {
// -100px to account for the next/previous arrows
@include vz.size(calc(80vw - 100px), 80vh);
margin: auto;
top: 0;
left: 0;
right: 0;
bottom: 0;
position: relative;
/**
* Image carousel modal inner wrapper
*/
.wrapper-Dh-cqn {
/**
* -100px to account for the next/previous arrows
*/
@include vz.size(calc(80vw - 100px), 80vh);
margin: auto;
top: 0;
left: 0;
right: 0;
bottom: 0;
position: relative;
}
}
[vz-guild-icon] .label-22pbtT {
@ -92,3 +98,11 @@
border-radius: 0;
}
}
/**
* This is used for checkbox alignment (and possibly other areas). Discord has
* the property set to align-items: top, which isn't a valid value.
*/
.alignTop-1ntJ4- {
align-items: flex-start;
}

@ -50,7 +50,6 @@ export default class QuickCode extends Builtin {
customCSS = await readFile(this._customCSSFilePath, 'utf8');
} else {
customCSS = customCSS?.trim();
console.log('customCSS', customCSS);
await writeFile(join(__dirname, 'stores', 'css', 'custom.scss'), customCSS);
this._customCSSFilePath = join(__dirname, 'stores', 'css', 'custom.scss');
}

@ -37,7 +37,6 @@ export default class ErrorBoundary extends PureComponent {
let errorStack;
if (RE_INVARIANT_URL.test(error.stack || '')) {
const uri = parse(RE_INVARIANT_URL.exec(error.stack)[0], true);
const code = uri.query.invariant;
const args =
uri.query['args[]']
@ -49,8 +48,7 @@ export default class ErrorBoundary extends PureComponent {
errorStack = `React Invariant Violation #${code}\n${format(invariant[code], ...args)}`;
} else {
const basePath = resolve(__dirname, '../../../../');
console.log(basePath);
const basePath = resolve(__dirname, '..', '..', '..', '..');
errorStack = (error.stack || '')
.split('\n')

@ -303,10 +303,6 @@ export default memo(({ source, type, tab, search, display, limit, className, com
};
useEffect(() => {
console.log('currentTab', currentTab);
console.log('type', type);
console.log(source);
console.log(currentSource);
/**
* There is an issue where it doesn't update currentSource when switching from one
* page to another (Plugins to Themes and Themes to Plugins), but it does properly
@ -316,15 +312,17 @@ export default memo(({ source, type, tab, search, display, limit, className, com
if (prevSource && source !== prevSource) {
setCurrentSource(source);
}
/**
* Add listeners for addons being installed and uninstalled.
*/
vizality.manager[toPlural(type)].on(Events.VIZALITY_ADDON_INSTALL, forceUpdate);
vizality.manager[toPlural(type)].on(Events.VIZALITY_ADDON_UNINSTALL, forceUpdate);
/**
* Remove listeners on dismount.
*/
return () => {
/**
* Remove listeners on dismount.
*/
vizality.manager[toPlural(type)].removeListener(Events.VIZALITY_ADDON_INSTALL, forceUpdate);
vizality.manager[toPlural(type)].removeListener(Events.VIZALITY_ADDON_UNINSTALL, forceUpdate);
};

@ -110,7 +110,9 @@ export const _find = (obj, targetValue, exact = false, type) => {
}).join('\n');
}
if (results.length > 0) return console.log(results);
if (results.length > 0) {
return console.log(results)
};
} catch (err) {
_error(_labels.concat('_find'), err);
}

@ -112,7 +112,7 @@ electron.app.once('ready', () => {
if (reactDeveloperTools) {
installExtension(REACT_DEVELOPER_TOOLS)
.then(name => console.log(`Added Extension: ${name}`))
.catch(err => console.log('An error occurred: ', err));
.catch(err => console.error('An error occurred: ', err));
}
// @todo Possibly add whitelists instead of just disabling CSP.
electron.session.defaultSession.webRequest.onHeadersReceived(({ responseHeaders }, done) => {

Loading…
Cancel
Save