mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-23 02:41:02 +00:00
fix: more lint
This commit is contained in:
@@ -102,7 +102,7 @@
|
||||
"playing_now": "Playing now",
|
||||
"change": "Change",
|
||||
"repacks_modal_description": "Choose the repack you want to download",
|
||||
"no_repacks_found": "No sources found for this game",
|
||||
"no_repacks_found": "No sources found for this game",
|
||||
"select_folder_hint": "To change the default folder, go to the <0>Settings</0>",
|
||||
"download_now": "Download now",
|
||||
"no_shop_details": "Could not retrieve shop details.",
|
||||
@@ -125,8 +125,8 @@
|
||||
"remove_from_library_title": "Are you sure?",
|
||||
"remove_from_library_description": "This will remove {{game}} from your library",
|
||||
"options": "Options",
|
||||
"properties": "Properties",
|
||||
"filter_by_source": "Filter by source:",
|
||||
"properties": "Properties",
|
||||
"filter_by_source": "Filter by source:",
|
||||
"executable_section_title": "Executable",
|
||||
"executable_section_description": "Path of the file that will be executed when \"Play\" is clicked",
|
||||
"downloads_section_title": "Downloads",
|
||||
@@ -140,13 +140,13 @@
|
||||
"create_shortcut_success": "Shortcut created successfully",
|
||||
"you_might_need_to_restart_steam": "You might need to restart Steam to see the changes",
|
||||
"create_shortcut_error": "Error creating shortcut",
|
||||
"add_to_favorites": "Add to favorites",
|
||||
"remove_from_favorites": "Remove from favorites",
|
||||
"failed_update_favorites": "Failed to update favorites",
|
||||
"game_removed_from_library": "Game removed from library",
|
||||
"failed_remove_from_library": "Failed to remove from library",
|
||||
"files_removed_success": "Files removed successfully",
|
||||
"failed_remove_files": "Failed to remove files",
|
||||
"add_to_favorites": "Add to favorites",
|
||||
"remove_from_favorites": "Remove from favorites",
|
||||
"failed_update_favorites": "Failed to update favorites",
|
||||
"game_removed_from_library": "Game removed from library",
|
||||
"failed_remove_from_library": "Failed to remove from library",
|
||||
"files_removed_success": "Files removed successfully",
|
||||
"failed_remove_files": "Failed to remove files",
|
||||
"nsfw_content_title": "This game contains inappropriate content",
|
||||
"nsfw_content_description": "{{title}} contains content that may not be suitable for all ages. Are you sure you want to continue?",
|
||||
"allow_nsfw_content": "Continue",
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
"playing_now": "Jogando agora",
|
||||
"change": "Explorar",
|
||||
"repacks_modal_description": "Escolha o repack do jogo que deseja baixar",
|
||||
"no_repacks_found": "Nenhuma fonte encontrada para este jogo",
|
||||
"no_repacks_found": "Nenhuma fonte encontrada para este jogo",
|
||||
"select_folder_hint": "Para trocar o diretório padrão, acesse a <0>Tela de Ajustes</0>",
|
||||
"download_now": "Iniciar download",
|
||||
"no_shop_details": "Não foi possível obter os detalhes da loja.",
|
||||
@@ -110,8 +110,8 @@
|
||||
"create_shortcut_simple": "Criar atalho",
|
||||
"remove_files": "Remover arquivos",
|
||||
"options": "Gerenciar",
|
||||
"properties": "Propriedades",
|
||||
"filter_by_source": "Filtrar por fonte:",
|
||||
"properties": "Propriedades",
|
||||
"filter_by_source": "Filtrar por fonte:",
|
||||
"remove_from_library_description": "Isso irá remover {{game}} da sua biblioteca",
|
||||
"remove_from_library_title": "Tem certeza?",
|
||||
"executable_section_title": "Executável",
|
||||
@@ -194,13 +194,13 @@
|
||||
"download_error_not_cached_on_hydra": "Este download não está disponível no Nimbus.",
|
||||
"game_removed_from_favorites": "Jogo removido dos favoritos",
|
||||
"game_added_to_favorites": "Jogo adicionado aos favoritos",
|
||||
"add_to_favorites": "Adicionar aos favoritos",
|
||||
"remove_from_favorites": "Remover dos favoritos",
|
||||
"failed_update_favorites": "Falha ao atualizar favoritos",
|
||||
"game_removed_from_library": "Jogo removido da biblioteca",
|
||||
"failed_remove_from_library": "Falha ao remover da biblioteca",
|
||||
"files_removed_success": "Arquivos removidos com sucesso",
|
||||
"failed_remove_files": "Falha ao remover arquivos",
|
||||
"add_to_favorites": "Adicionar aos favoritos",
|
||||
"remove_from_favorites": "Remover dos favoritos",
|
||||
"failed_update_favorites": "Falha ao atualizar favoritos",
|
||||
"game_removed_from_library": "Jogo removido da biblioteca",
|
||||
"failed_remove_from_library": "Falha ao remover da biblioteca",
|
||||
"files_removed_success": "Arquivos removidos com sucesso",
|
||||
"failed_remove_files": "Falha ao remover arquivos",
|
||||
"automatically_extract_downloaded_files": "Extrair automaticamente os arquivos baixados",
|
||||
"create_start_menu_shortcut": "Criar atalho no Menu Iniciar",
|
||||
"invalid_wine_prefix_path": "Caminho do prefixo Wine inválido",
|
||||
|
||||
@@ -36,7 +36,9 @@ export function ContextMenu({
|
||||
const [activeSubmenu, setActiveSubmenu] = useState<string | null>(null);
|
||||
const submenuCloseTimeout = useRef<number | null>(null);
|
||||
const itemRefs = useRef<Record<string, HTMLLIElement | null>>({});
|
||||
const [submenuStyles, setSubmenuStyles] = useState<Record<string, React.CSSProperties>>({});
|
||||
const [submenuStyles, setSubmenuStyles] = useState<
|
||||
Record<string, React.CSSProperties>
|
||||
>({});
|
||||
|
||||
useEffect(() => {
|
||||
if (!visible) return;
|
||||
@@ -127,7 +129,9 @@ export function ContextMenu({
|
||||
const parentEl = itemRefs.current[activeSubmenu];
|
||||
if (!parentEl) return;
|
||||
|
||||
const submenuEl = parentEl.querySelector(".context-menu__submenu") as HTMLElement | null;
|
||||
const submenuEl = parentEl.querySelector(
|
||||
".context-menu__submenu"
|
||||
) as HTMLElement | null;
|
||||
if (!submenuEl) return;
|
||||
|
||||
const parentRect = parentEl.getBoundingClientRect();
|
||||
@@ -174,7 +178,9 @@ export function ContextMenu({
|
||||
key={item.id}
|
||||
ref={(el) => (itemRefs.current[item.id] = el)}
|
||||
className="context-menu__item-container"
|
||||
onMouseEnter={() => item.submenu && handleSubmenuMouseEnter(item.id)}
|
||||
onMouseEnter={() =>
|
||||
item.submenu && handleSubmenuMouseEnter(item.id)
|
||||
}
|
||||
onMouseLeave={() => item.submenu && handleSubmenuMouseLeave()}
|
||||
>
|
||||
{item.separator && <div className="context-menu__separator" />}
|
||||
@@ -198,7 +204,7 @@ export function ContextMenu({
|
||||
)}
|
||||
</button>
|
||||
|
||||
{item.submenu && activeSubmenu === item.id && (
|
||||
{item.submenu && activeSubmenu === item.id && (
|
||||
<div
|
||||
className="context-menu__submenu"
|
||||
style={submenuStyles[item.id] || undefined}
|
||||
@@ -207,8 +213,13 @@ export function ContextMenu({
|
||||
>
|
||||
<ul className="context-menu__list">
|
||||
{item.submenu.map((subItem) => (
|
||||
<li key={subItem.id} className="context-menu__item-container">
|
||||
{subItem.separator && <div className="context-menu__separator" />}
|
||||
<li
|
||||
key={subItem.id}
|
||||
className="context-menu__item-container"
|
||||
>
|
||||
{subItem.separator && (
|
||||
<div className="context-menu__separator" />
|
||||
)}
|
||||
<button
|
||||
type="button"
|
||||
className={cn("context-menu__item", {
|
||||
@@ -240,4 +251,4 @@ export function ContextMenu({
|
||||
);
|
||||
|
||||
return createPortal(menuContent, document.body);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user