mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-02-09 03:37:45 +03:00
refactor: rename all "popup" strings to "alert"
This commit is contained in:
parent
e7acce2dfc
commit
aaee27732d
@ -256,7 +256,7 @@
|
|||||||
"user_unblocked": "User has been unblocked",
|
"user_unblocked": "User has been unblocked",
|
||||||
"enable_achievement_notifications": "When an achievement is unlocked",
|
"enable_achievement_notifications": "When an achievement is unlocked",
|
||||||
"launch_minimized": "Launch Hydra minimized",
|
"launch_minimized": "Launch Hydra minimized",
|
||||||
"disable_nsfw_popup": "Disable NSFW warning popup"
|
"disable_nsfw_alert": "Disable NSFW alert"
|
||||||
},
|
},
|
||||||
"notifications": {
|
"notifications": {
|
||||||
"download_complete": "Download complete",
|
"download_complete": "Download complete",
|
||||||
|
@ -252,7 +252,7 @@
|
|||||||
"user_unblocked": "Usuário desbloqueado",
|
"user_unblocked": "Usuário desbloqueado",
|
||||||
"enable_achievement_notifications": "Quando uma conquista é desbloqueada",
|
"enable_achievement_notifications": "Quando uma conquista é desbloqueada",
|
||||||
"launch_minimized": "Iniciar o Hydra minimizado",
|
"launch_minimized": "Iniciar o Hydra minimizado",
|
||||||
"disable_nsfw_popup": "Desativar popup de conteúdo impróprio"
|
"disable_nsfw_alert": "Desativar alerta de conteúdo inapropriado"
|
||||||
},
|
},
|
||||||
"notifications": {
|
"notifications": {
|
||||||
"download_complete": "Download concluído",
|
"download_complete": "Download concluído",
|
||||||
|
@ -39,7 +39,7 @@ export class UserPreferences {
|
|||||||
startMinimized: boolean;
|
startMinimized: boolean;
|
||||||
|
|
||||||
@Column("boolean", { default: false })
|
@Column("boolean", { default: false })
|
||||||
disableNsfwPopup: boolean;
|
disableNsfwAlert: boolean;
|
||||||
|
|
||||||
@CreateDateColumn()
|
@CreateDateColumn()
|
||||||
createdAt: Date;
|
createdAt: Date;
|
||||||
|
@ -12,7 +12,7 @@ import { CreateUserSubscription } from "./migrations/20241015235142_create_user_
|
|||||||
import { AddBackgroundImageUrl } from "./migrations/20241016100249_add_background_image_url";
|
import { AddBackgroundImageUrl } from "./migrations/20241016100249_add_background_image_url";
|
||||||
import { AddWinePrefixToGame } from "./migrations/20241019081648_add_wine_prefix_to_game";
|
import { AddWinePrefixToGame } from "./migrations/20241019081648_add_wine_prefix_to_game";
|
||||||
import { AddStartMinimizedColumn } from "./migrations/20241030171454_add_start_minimized_column";
|
import { AddStartMinimizedColumn } from "./migrations/20241030171454_add_start_minimized_column";
|
||||||
import { AddDisableNsfwPopupColumn } from "./migrations/20241106053733_add_disable_nsfw_popup_column";
|
import { AddDisableNsfwAlertColumn } from "./migrations/20241106053733_add_disable_nsfw_alert_column";
|
||||||
export type HydraMigration = Knex.Migration & { name: string };
|
export type HydraMigration = Knex.Migration & { name: string };
|
||||||
|
|
||||||
class MigrationSource implements Knex.MigrationSource<HydraMigration> {
|
class MigrationSource implements Knex.MigrationSource<HydraMigration> {
|
||||||
@ -29,7 +29,7 @@ class MigrationSource implements Knex.MigrationSource<HydraMigration> {
|
|||||||
AddBackgroundImageUrl,
|
AddBackgroundImageUrl,
|
||||||
AddWinePrefixToGame,
|
AddWinePrefixToGame,
|
||||||
AddStartMinimizedColumn,
|
AddStartMinimizedColumn,
|
||||||
AddDisableNsfwPopupColumn,
|
AddDisableNsfwAlertColumn,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
getMigrationName(migration: HydraMigration): string {
|
getMigrationName(migration: HydraMigration): string {
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
import type { HydraMigration } from "@main/knex-client";
|
import type { HydraMigration } from "@main/knex-client";
|
||||||
import type { Knex } from "knex";
|
import type { Knex } from "knex";
|
||||||
|
|
||||||
export const AddDisableNsfwPopupColumn: HydraMigration = {
|
export const AddDisableNsfwAlertColumn: HydraMigration = {
|
||||||
name: "AddDisableNsfwPopupColumn",
|
name: "AddDisableNsfwAlertColumn",
|
||||||
up: (knex: Knex) => {
|
up: (knex: Knex) => {
|
||||||
return knex.schema.alterTable("user_preferences", (table) => {
|
return knex.schema.alterTable("user_preferences", (table) => {
|
||||||
return table.boolean("disableNsfwPopup").notNullable().defaultTo(0);
|
return table.boolean("disableNsfwAlert").notNullable().defaultTo(0);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
down: async (knex: Knex) => {
|
down: async (knex: Knex) => {
|
||||||
return knex.schema.alterTable("user_preferences", (table) => {
|
return knex.schema.alterTable("user_preferences", (table) => {
|
||||||
return table.dropColumn("disableNsfwPopup");
|
return table.dropColumn("disableNsfwAlert");
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
};
|
};
|
@ -148,7 +148,7 @@ export function GameDetailsContextProvider({
|
|||||||
result?.content_descriptors.ids.includes(
|
result?.content_descriptors.ids.includes(
|
||||||
SteamContentDescriptor.AdultOnlySexualContent
|
SteamContentDescriptor.AdultOnlySexualContent
|
||||||
) &&
|
) &&
|
||||||
!userPreferences?.disableNsfwPopup
|
!userPreferences?.disableNsfwAlert
|
||||||
) {
|
) {
|
||||||
setHasNSFWContentBlocked(true);
|
setHasNSFWContentBlocked(true);
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@ export function SettingsBehavior() {
|
|||||||
preferQuitInsteadOfHiding: false,
|
preferQuitInsteadOfHiding: false,
|
||||||
runAtStartup: false,
|
runAtStartup: false,
|
||||||
startMinimized: false,
|
startMinimized: false,
|
||||||
disableNsfwPopup: false,
|
disableNsfwAlert: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
const { t } = useTranslation("settings");
|
const { t } = useTranslation("settings");
|
||||||
@ -29,7 +29,7 @@ export function SettingsBehavior() {
|
|||||||
preferQuitInsteadOfHiding: userPreferences.preferQuitInsteadOfHiding,
|
preferQuitInsteadOfHiding: userPreferences.preferQuitInsteadOfHiding,
|
||||||
runAtStartup: userPreferences.runAtStartup,
|
runAtStartup: userPreferences.runAtStartup,
|
||||||
startMinimized: userPreferences.startMinimized,
|
startMinimized: userPreferences.startMinimized,
|
||||||
disableNsfwPopup: userPreferences.disableNsfwPopup,
|
disableNsfwAlert: userPreferences.disableNsfwAlert,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, [userPreferences]);
|
}, [userPreferences]);
|
||||||
@ -90,10 +90,10 @@ export function SettingsBehavior() {
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
<CheckboxField
|
<CheckboxField
|
||||||
label={t("disable_nsfw_popup")}
|
label={t("disable_nsfw_alert")}
|
||||||
checked={form.disableNsfwPopup}
|
checked={form.disableNsfwAlert}
|
||||||
onChange={() =>
|
onChange={() =>
|
||||||
handleChange({ disableNsfwPopup: !form.disableNsfwPopup })
|
handleChange({ disableNsfwAlert: !form.disableNsfwAlert })
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
|
@ -161,7 +161,7 @@ export interface UserPreferences {
|
|||||||
preferQuitInsteadOfHiding: boolean;
|
preferQuitInsteadOfHiding: boolean;
|
||||||
runAtStartup: boolean;
|
runAtStartup: boolean;
|
||||||
startMinimized: boolean;
|
startMinimized: boolean;
|
||||||
disableNsfwPopup: boolean;
|
disableNsfwAlert: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Steam250Game {
|
export interface Steam250Game {
|
||||||
|
Loading…
Reference in New Issue
Block a user