Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions .vitepress/config.mts
Original file line number Diff line number Diff line change
@@ -1,23 +1,38 @@
import { defineConfig } from "vitepress";
import ptLocale from "../pt/config"

// https://vitepress.dev/reference/site-config
export default defineConfig({
title: "Hydra Docs",
description: "Technical documentation for Hydra Launcher",

rewrites: {
"en/:rest*": ":rest*",
},

locales: {
root: {
label: "English",
lang: "en-US",
dir: "ltr",
},
pt: ptLocale
},

themeConfig: {
// https://vitepress.dev/reference/default-theme-config

sidebar: [
{
text: "Introduction",
items: [{ text: "What is Hydra Launcher?", link: "/" }],
items: [{ text: "What is Hydra Launcher?", link: "/index.md" }],
},
{
text: "Guides",
items: [
{ text: "Getting started", link: "/getting-started" },
{ text: "Download sources", link: "/download-sources" },
{ text: "Custom themes", link: "/themes" },
{ text: "Getting started", link: "/getting-started.md" },
{ text: "Download sources", link: "/download-sources.md" },
{ text: "Custom themes", link: "/themes.md" },
],
},
],
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion index.md → en/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# What is Hydra Launcher?

![Hydra Launcher](./images/hydra.png)
![Hydra Launcher](../images/hydra.png)

Hydra Launcher is an open-source gaming platform created to be the single tool that you need in order to manage your gaming library. Hydra is written in Node.js (Electron, React, Typescript) and Python.

Expand Down
20 changes: 10 additions & 10 deletions themes.md → en/themes.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,30 @@ Hydra lets you add custom themes allowing you to make it looks the way you want.

Themes are available in our [Themes Store](https://hydrathemes.shop/). You can easily install one theme by just clicking the "Install Theme" button.

![Hydra Themes Shop Screenshot](images/theme-shop.png)
![Hydra Themes Shop Screenshot](../images/theme-shop.png)

## How to create a custom theme

Go to the Appearance tab in the Settings page and click on the "Create" button.

![Hydra Launcher Settings page](images/settings-page.png)
![Hydra Launcher Settings page](../images/settings-page.png)

Pick a name for your theme
![Hydra create theme modal](images/create-theme-modal.png)
![Hydra create theme modal](../images/create-theme-modal.png)

Click on Set theme to make this your current active theme

![Hydra Appearance tab with active theme](images/activate-theme.png)
![Hydra Appearance tab with active theme](../images/activate-theme.png)

Click on the Edit button to start working on it

![Hydra Appearance tab with active theme](images/theme-edit-button.png)
![Hydra Appearance tab with active theme](../images/theme-edit-button.png)

Two windows will open. One is the theme editor, where you will write the CSS for your custom theme, achievements and select a custom achievement sound. The other one is the Dev Tools for the main window, where you will be able to debug and see all the current HTML and CSS to help you write your theme

![Hydra Theme editor](images/theme-editor-empty.png)
![Hydra Theme editor](../images/theme-editor-empty.png)

And now you can make your Hydra Launcher looks however you want.
And now you can make your Hydra Launcher looks however you want.

You can also add a custom achievement sound to your theme. The sound file should be placed in your theme folder and must be named `achievement` with one of the following extensions: `mp3`, `ogg`, `wav`, or `m4a`. This sound will play when achievements are unlocked.

Expand Down Expand Up @@ -84,7 +84,7 @@ body {
}
```

![Hydra Theme editor with a custom theme code](images/theme-editor.png)
![Hydra Theme editor with a custom theme code](../images/theme-editor.png)

## How to publish your custom theme

Expand Down Expand Up @@ -122,7 +122,7 @@ Things to note:
- You must add your friend code to the folder name. Pull Requests that don't have a friend code, or that have a friend code that don't belong to you, will not be accepted.
- You must not change any other files that don't belong to your theme.

![Visual Studio code with hydra-theme repository](images/hydra-theme-project.png)
![Visual Studio code with hydra-theme repository](../images/hydra-theme-project.png)

### Commit and Push your theme

Expand All @@ -137,7 +137,7 @@ Things to note:
3. Click on "Open pull request"
4. Click on "Create pull request"

![Hydra Theme Fork](images/github-fork.png)
![Hydra Theme Fork](../images/github-fork.png)

### Wait for your theme to be reviewed by the mods

Expand Down
10 changes: 10 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 43 additions & 0 deletions pt/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
export default {
label: "Português",
lang: "pt-BR",
dir: "ltr",
link: "/pt/",

themeConfig: {
sidebar: [
{
text: "Introdução",
items: [
{
text: "O que é Hydra Launcher?",
link: "/pt/index.md",
},
],
},
{
text: "Guias",
items: [
{ text: "Iniciando", link: "/pt/getting-started.md" },
{
text: "Fontes de download", link: "/pt/download-sources.md",
},
{ text: "Temas customizados", link: "/pt/themes.md" },
],
},
],
docFooter: {
prev: "Página Anterior",
next: "Próxima Página",
},
outline: {
label: "Nesta página",
},
lastUpdated: {
text: "Atualizado em",
},
darkModeSwitchLabel: "Aparência",
sidebarMenuLabel: "Menu",
returnToTopLabel: "Voltar ao topo",
},
};
37 changes: 37 additions & 0 deletions pt/download-sources.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Fontes de download

::: warning :construction: TRABALHO EM PROGRESSO
Essa página é um trabalho em progresso e ainda não está completa.
:::

Fontes de download são o componente chave no Hydra. Elas provém um jeito fácil e uma experiência Steam-like para restaurar jogos que você fez backup.

## Como fontes de download funcionam

Hydra por padrão não é instalado com nenhuma fonte de download, então você terá que montar uma você mesmo para poder restaurar os arquivos dos jogos dentro do launcher.

Fontes de download podem ser adicionadas no Hydra Launcher usando uma estrutura de JSON simples que permite que você crie um mapeamento entre os arquivos e titulos dos jogos. Você pode criar e importar quantas fontes de download você quiser.

::: warning NOTA SOBRE SINCRONIZAÇÃO DE CONTA
Fontes de download não são sincronizadas por conta por questões de privacidade. Se você desinstalar Hydra, todos as fontes de download que você importou serão removidas e você terá que importar elas novamente.
:::

## Como criar uma fonte de download

Uma fonte de download JSON tem a seguinte estrutura:

```json
{
"name": "string",
"downloads": [
{
"title": "string",
"fileSize": "string",
"uris": ["string"],
"uploadDate": "string"
}
]
}
```

### Hosters Suportados
85 changes: 85 additions & 0 deletions pt/getting-started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Iniciando

## Pré-requisitos

- [Node.js](https://nodejs.org/en) versão 20 ou mais recente.
- [Python 3.9](https://www.python.org/downloads/release/python-3913/).
- [Yarn](https://classic.yarnpkg.com/lang/en/docs/install/#mac-stable).
- [Git](https://git-scm.com/downloads).

::: warning ALERTA
Nós altamente recomendamos que tenha certeza que está usando Python 3.9. `libtorrent` é conhecido por ter alguns problemas com versões recentes de Python.
:::

### Passo adicional para Windows

Se você está no Windows, você deve instalar [OpenSSL 1.1](https://slproweb.com/download/Win64OpenSSL-1_1_1w.exe) por ser uma dependência do `libtorrent`.

## Clonando o repositório

Depois de ter todos os pré-requisitos instalados, você estará pronto para clonar Hydra:

```bash
git clone https://github.com/hydralauncher/hydra.git
```

## Instalando dependências

Uma vez com o projeto clonado, você precisa instalar as dependências de Python e Node.js para inicializar:

```bash
cd hydra
yarn # Para instalar as dependências de Node.JS com Yarn
pip install -r requirements.txt # Para instalar as dependências de Python usando Pip
```

## Ambientes

Hydra atualmente conta com servidores em dois tipos diferentes de ambientes: `staging` e `production`.

`production` é o ambiente que utilizamos para lançamentos de versões do Hydra que são estáveis.
`staging` é o ambiente que utilizamos para testes. No caso pode ser instável para uso, mas é onde novas funcionalidades estarão.

Você precisa escolher um desses ambientes para inicializar Hydra.

::: tip NOTA SOBRE CONTAS
A conta dos usuários não são compartilhadas entre ambientes. Isso significa que a conta que for utilizada em `production` não será a mesma que você irá usar em `staging`.
:::

### Configurando variáveis de ambiente

Você precisa configurar algumas variáveis em quesito de selecionar qual ambiente se utilizará. Hydra não funcionará sem essa configuração.

| Nome da Variável | Valor em `production` | Valor em `staging` |
| -------------------------------------- | ----------------------------------------- | ----------------------------------------- |
| `MAIN_VITE_API_URL` | https://hydra-api-us-east-1.losbroxas.org | https://api-staging.hydralauncher.gg |
| `MAIN_VITE_AUTH_URL` | https://auth.hydralauncher.gg | https://auth-staging.hydralauncher.gg |
| `MAIN_VITE_CHECKOUT_URL` | https://checkout.hydralauncher.gg | https://checkout-staging.hydralauncher.gg |
| `MAIN_VITE_EXTERNAL_RESOURCES_URL` | https://assets.hydralauncher.gg | https://assets.hydralauncher.gg |
| `RENDERER_VITE_EXTERNAL_RESOURCES_URL` | https://assets.hydralauncher.gg | https://assets.hydralauncher.gg |
| `MAIN_VITE_WS_URL` | wss://ws.hydralauncher.gg | wss://ws-staging.hydralauncher.gg |

Escolha um dos ambientes para configurar as variáveis corretamente no arquivo `.env` na raiz do projeto. Veja o exemplo abaixo:

```
# Variáveis de ambiente em `production`

MAIN_VITE_API_URL=https://hydra-api-us-east-1.losbroxas.org
MAIN_VITE_AUTH_URL=https://auth.hydralauncher.gg
MAIN_VITE_CHECKOUT_URL=https://checkout.hydralauncher.gg
MAIN_VITE_EXTERNAL_RESOURCES_URL=https://assets.hydralauncher.gg
RENDERER_VITE_EXTERNAL_RESOURCES_URL=https://assets.hydralauncher.gg
MAIN_VITE_WS_URL=wss://ws.hydralauncher.gg
```

### Qual ambiente eu deveria usar?

Se você está rodando o Hydra na branch `main`, você deveria escolher `production` na maior parte das vezes. Se você está rodando o Hydra em outra branch, será melhor escolher `staging`.

### Rodando esse projeto

Uma vez que o projeto esteja configurado, você pode rodar o Hydra seguindo o script abaixo:

```bash
yarn dev
```
14 changes: 14 additions & 0 deletions pt/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# O que é Hydra Launcher?

![Hydra Launcher](../images/hydra.png)

O Hydra Launcher é uma plataforma de jogos open-source criada para ser a única ferramenta que você precisa para gerenciar sua biblioteca de jogos. O Hydra é escrito em Node.js (Electron, React, Typescript) e Python.

O que o Hydra pode fazer:

- Adicionar jogos que você possui à sua biblioteca
- Ter um perfil bonito que mostra para seus amigos o que você está jogando
- Salvar o progresso dos seus jogos na nuvem com o Hydra Cloud
- Desbloquear conquistas
- Navegar por um catálogo rico com um poderoso algoritmo de sugestões
- Descobrir novos jogos que você ainda não jogou
Loading