mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-18 16:53:57 +00:00
feat: add option to disable NSFW warning
This commit is contained in:
@@ -147,7 +147,7 @@ export function GameDetailsContextProvider({
|
||||
if (
|
||||
result?.content_descriptors.ids.includes(
|
||||
SteamContentDescriptor.AdultOnlySexualContent
|
||||
)
|
||||
) && !userPreferences?.disableNsfwPopup
|
||||
) {
|
||||
setHasNSFWContentBlocked(true);
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ export function SettingsBehavior() {
|
||||
preferQuitInsteadOfHiding: false,
|
||||
runAtStartup: false,
|
||||
startMinimized: false,
|
||||
disableNsfwPopup: false,
|
||||
});
|
||||
|
||||
const { t } = useTranslation("settings");
|
||||
@@ -28,6 +29,7 @@ export function SettingsBehavior() {
|
||||
preferQuitInsteadOfHiding: userPreferences.preferQuitInsteadOfHiding,
|
||||
runAtStartup: userPreferences.runAtStartup,
|
||||
startMinimized: userPreferences.startMinimized,
|
||||
disableNsfwPopup: userPreferences.disableNsfwPopup,
|
||||
});
|
||||
}
|
||||
}, [userPreferences]);
|
||||
@@ -86,6 +88,14 @@ export function SettingsBehavior() {
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<CheckboxField
|
||||
label={t("disable_nsfw_popup")}
|
||||
checked={form.disableNsfwPopup}
|
||||
onChange={() =>
|
||||
handleChange({ disableNsfwPopup: !form.disableNsfwPopup })
|
||||
}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user