error proof settings ui
This commit is contained in:
@@ -4,12 +4,14 @@
|
|||||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import { ErrorBoundary } from "@vencord/types/components";
|
||||||
import { Select } from "@vencord/types/webpack/common";
|
import { Select } from "@vencord/types/webpack/common";
|
||||||
|
|
||||||
import { SettingsComponent } from "./Settings";
|
import { SettingsComponent } from "./Settings";
|
||||||
|
|
||||||
export const DiscordBranchPicker: SettingsComponent = ({ settings }) => {
|
export const DiscordBranchPicker: SettingsComponent = ({ settings }) => {
|
||||||
return (
|
return (
|
||||||
|
<ErrorBoundary noop>
|
||||||
<Select
|
<Select
|
||||||
placeholder="Stable"
|
placeholder="Stable"
|
||||||
options={[
|
options={[
|
||||||
@@ -22,5 +24,6 @@ export const DiscordBranchPicker: SettingsComponent = ({ settings }) => {
|
|||||||
isSelected={v => v === settings.discordBranch}
|
isSelected={v => v === settings.discordBranch}
|
||||||
serialize={s => s}
|
serialize={s => s}
|
||||||
/>
|
/>
|
||||||
|
</ErrorBoundary>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -179,12 +179,12 @@ function SettingsSections() {
|
|||||||
export default ErrorBoundary.wrap(
|
export default ErrorBoundary.wrap(
|
||||||
function SettingsUI() {
|
function SettingsUI() {
|
||||||
return (
|
return (
|
||||||
<Forms.FormSection>
|
<section>
|
||||||
<Text variant="heading-xl/semibold" color="header-primary" className="vcd-settings-title">
|
<Text variant="heading-xl/semibold" color="header-primary" className="vcd-settings-title">
|
||||||
Vesktop Settings
|
Vesktop Settings
|
||||||
</Text>
|
</Text>
|
||||||
<SettingsSections />
|
<SettingsSections />
|
||||||
</Forms.FormSection>
|
</section>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import { ErrorBoundary } from "@vencord/types/components";
|
||||||
import { Margins } from "@vencord/types/utils";
|
import { Margins } from "@vencord/types/utils";
|
||||||
import { Forms, Select } from "@vencord/types/webpack/common";
|
import { Forms, Select } from "@vencord/types/webpack/common";
|
||||||
|
|
||||||
@@ -13,6 +14,7 @@ export const WindowsTransparencyControls: SettingsComponent = ({ settings }) =>
|
|||||||
if (!VesktopNative.app.supportsWindowsTransparency()) return null;
|
if (!VesktopNative.app.supportsWindowsTransparency()) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
<ErrorBoundary noop>
|
||||||
<div>
|
<div>
|
||||||
<Forms.FormTitle className={Margins.bottom8}>Transparency Options</Forms.FormTitle>
|
<Forms.FormTitle className={Margins.bottom8}>Transparency Options</Forms.FormTitle>
|
||||||
<Forms.FormText className={Margins.bottom8}>
|
<Forms.FormText className={Margins.bottom8}>
|
||||||
@@ -43,5 +45,6 @@ export const WindowsTransparencyControls: SettingsComponent = ({ settings }) =>
|
|||||||
serialize={s => s}
|
serialize={s => s}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
</ErrorBoundary>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user