Skip to content

Commit

Permalink
fix: further styling fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjozork committed Jan 7, 2024
1 parent 7d4caad commit 4121d77
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
13 changes: 11 additions & 2 deletions src/renderer/components/ErrorModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import { setupInstallPath } from 'renderer/actions/install-path.utils';
import settings from "common/settings";
import { Directories } from "renderer/utils/Directories";
import * as fs from "fs";
import { Button, ButtonType } from "renderer/components/Button";
import { ipcRenderer } from "electron";

Check failure on line 7 in src/renderer/components/ErrorModal/index.tsx

View workflow job for this annotation

GitHub Actions / lint

'ipcRenderer' is defined but never used
import channels from "common/channels";

Check failure on line 8 in src/renderer/components/ErrorModal/index.tsx

View workflow job for this annotation

GitHub Actions / lint

'channels' is defined but never used

export const ErrorModal = (): JSX.Element => {
const [communityError, setCommunityError] = useState<boolean>(!fs.existsSync(Directories.installLocation()) || Directories.installLocation() === 'C:\\');
Expand All @@ -29,7 +32,10 @@ export const ErrorModal = (): JSX.Element => {
<>
<span className="w-3/5 text-center text-2xl">Seems like you're using Linux</span>
<span className="w-3/5 text-center text-2xl">We're unable to autodetect your install currently. Please set the correct location before we can continue.</span>
<button className="bg-navy-lightest hover:bg-navy-lighter px-5 py-2 text-lg font-semibold rounded-lg" onClick={handleSelectPath}>Select</button>

<Button type={ButtonType.Neutral} onClick={handleSelectPath}>
Select
</Button>
</>
);
}
Expand All @@ -39,7 +45,10 @@ export const ErrorModal = (): JSX.Element => {
<span className="w-3/5 text-center text-2xl">Your Community folder is set to</span>
<pre className="w-3/5 bg-gray-700 text-2xl text-center font-mono px-6 py-2.5 mb-0 rounded-lg">{Directories.installLocation()}</pre>
<span className="w-3/5 text-center text-2xl">but we couldn't find it there. Please set the correct location before we can continue.</span>
<button className="bg-navy-lightest hover:bg-navy-lighter px-5 py-2 text-lg font-semibold rounded-lg" onClick={handleSelectPath}>Select</button>

<Button type={ButtonType.Neutral} onClick={handleSelectPath}>
Select
</Button>
</>
);
}
Expand Down
10 changes: 8 additions & 2 deletions src/renderer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ import packageJson from '../../package.json';

import 'simplebar/dist/simplebar.min.css';
import './index.scss';
import { Button, ButtonType } from "renderer/components/Button";

// Setup Sentry
Sentry.init({
Expand All @@ -71,6 +72,8 @@ ipcRenderer.invoke(channels.sentry.requestSessionID).then((sessionID) => {

// Obtain configuration and use it
InstallerConfiguration.obtain().then((config: Configuration) => {
throw new Error('a'.repeat(255));

store.dispatch(setConfiguration({ configuration: config }));

for (const publisher of config.publishers) {
Expand Down Expand Up @@ -117,8 +120,11 @@ InstallerConfiguration.obtain().then((config: Configuration) => {
<div className="h-screen flex flex-col gap-y-5 justify-center items-center bg-navy text-gray-100">
<span className="text-5xl font-semibold">Something went very wrong.</span>
<span className="w-3/5 text-center text-2xl">We could not configure your installer. Please seek support on the Discord #support channel or on GitHub and provide a screenshot of the following information:</span>
<pre className="w-3/5 bg-gray-700 text-2xl font-mono px-6 py-2.5 mb-0 rounded-lg">{error.stack}</pre>
<button className="bg-navy-lightest hover:bg-navy-lighter px-5 py-2 text-lg font-semibold rounded-lg" onClick={() => ipcRenderer.send(channels.window.close)}>Close the Installer</button>
<pre className="w-3/5 bg-gray-700 text-2xl font-mono px-6 py-2.5 mb-0 rounded-lg overflow-scroll">{error.stack}</pre>

<Button type={ButtonType.Neutral} onClick={() => ipcRenderer.send(channels.window.close)}>
Close the installer
</Button>
</div>,
document.getElementById('root'),
);
Expand Down

0 comments on commit 4121d77

Please sign in to comment.