Support Gitea/Forgejo and self-hosted repositories (PR #391, merged with main) (#421)

* Extract repository hosts into a provider registry

GitHub and GitLab keep their behavior, but now sit behind a RepositoryProvider interface with a shared RepositoryRef. parseRepository understands provider hosts and leaves an unknown host for detection. This is groundwork for Gitea/Forgejo, self-hosted GitLab and GitHub Enterprise, Bitbucket and release feeds.

* Support Gitea, Forgejo, Bitbucket and release feeds

Adds host-aware adapters and detection, per-host tokens kept in the keychain, and a narrow Rust proxy for hosts that don't send CORS headers. The add-app flow can detect a host or take the player's choice, and source links and READMEs follow the host. Apps from hosts the account doesn't know stay on this computer.

* Cover self-hosted GitLab and GitHub Enterprise hosts

Adds provider tests for host-aware API bases, READMEs and releases, and documents the supported hosts, tokens, checksum limits and release-feed format.

* Keep self-hosted apps device-only and tidy provider wording

The account stores apps from github.com and gitlab.com; a self-hosted GitHub or GitLab has a host the account doesn't store yet, so it stays on this computer. Also updates the provider comments and the API package README.

* Tidy the provider refactor before review

Moves the API error import to the top, keeps catalog repository matching host-aware, and updates the remaining provider wording.

* Fix the release host named for a custom app

The Releases tab takes the host from the player's custom app rather than assuming GitHub, and the remaining provider comments name the host instead of GitHub.

* Handle a bodiless provider answer

The Fetch Response constructor refuses a body on 204 and 205, which a repository API can answer.

* Remove unused provider imports

* Remove unused provider types

* Connect the provider proxy only to the addresses it checked

The proxy looked a host up to refuse private addresses, then let the
request look it up again, so a host could answer the check with a public
address and the request with a private one. The request now connects to
the addresses that were checked.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015HpW15bCSsabfgUpsRDVfe

* Expect the GitLab token in the per-host keychain entry

The settings test, added on main after the provider work branched, looked
for the token under the old gitlabToken entry. Tokens are now kept
together, by host, under repositoryTokens.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015HpW15bCSsabfgUpsRDVfe

---------

Co-authored-by: DieMitchell <mitchell030504@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
authored and GitHub committed 2026-11-16 12:01:46 +11:00
1 parent 9bbc681186
commit caef759788
44 files changed
+2890 -533

No files matched your search

+1 -1
View File
@@ -77,7 +77,7 @@ corporate version of this agreement. Open an issue and we'll sort it out before
| Path | What it is |
| --------------- | -------------------------------------------------------------------------- |
| `apps/launcher` | The Tauri app: React UI in `src`, Rust core in `src-tauri` |
| `packages/api` | Typed client for the catalog API (`https://api.quiverlauncher.com/api/v1`) |
| `packages/api` | Typed client for the catalog API (`https://api.quiverlauncher.com/api/v1`) and the repository providers in `src/providers/` |
| `packages/ui` | Catalog components and styles shared with quiverlauncher.com |
| `e2e` | The web side against a mock catalog, and the real app against the real one |
+6 -2
View File
@@ -10,7 +10,7 @@
[![Join the community on Discord](https://img.shields.io/badge/Join_the_community-5865F2?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/5XRThpWHGk)
[![Support Quiver on Patreon](https://img.shields.io/badge/Support_on_Patreon-B8394A?style=for-the-badge&logo=patreon&logoColor=white)](https://www.patreon.com/c/quiverlauncher)
**One place to find, install, update and play the games and apps people release on GitHub and GitLab**,
**One place to find, install, update and play the games and apps people release on GitHub, GitLab and other forges**,
such as modern ports (source ports and recompilations) and fan projects. Browse the [Quiver catalog](https://quiverlauncher.com), press
**Get**, and Quiver downloads it, checks it and installs it. Then it keeps it up to date.
@@ -26,13 +26,17 @@ such as modern ports (source ports and recompilations) and fan projects. Browse
yourself, or choose to get every update right away. This checks that you get the file the developer published; it
can't promise that the file itself is safe.
- **Your library, your way.** Sort and filter by console, make playlists, and share them or follow other people's.
Add any GitHub or GitLab repository, a program already on your computer, or a folder you fill yourself.
Add any GitHub, GitLab, Gitea/Forgejo, Bitbucket or release-feed repository, a program already on your computer, or a
folder you fill yourself.
- **Made for the couch.** TV mode turns Quiver into a full-screen launcher for a controller. It comes on by itself in
the Steam Deck's Game Mode.
- **Mods.** Browse, install and update mods from Thunderstore and GameBanana for the apps that support them.
- **Play it your way.** Add any app to Steam or the desktop, and run Windows builds on Linux with Wine or Proton.
- **Sign in to sync** (optional). Sign in with GitHub or Discord to keep your library and playlists the same on every
device.
- **Release hosts, your way.** GitHub and GitLab work as before, and so do Gitea/Forgejo (including Codeberg), Bitbucket,
self-hosted GitLab, GitHub Enterprise and any host with a JSON release feed. See
[docs/providers.md](docs/providers.md) for tokens, checksums and self-hosting notes.
- **In your language.** English, Português (Brasil), Español (Latinoamérica), Deutsch, Français, Русский, Italiano,
한국어, 简体中文 and 繁體中文.
+1 -1
View File
@@ -22,7 +22,7 @@ tauri-build = { version = "2", features = [] }
tauri = { version = "2", features = [] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
tokio = { version = "1", features = ["fs", "io-util", "sync"] }
tokio = { version = "1", features = ["fs", "io-util", "net", "sync"] }
reqwest = { version = "0.12", default-features = false, features = ["rustls-tls", "stream"] }
futures-util = "0.3"
sha2 = "0.10"
+2
View File
@@ -18,6 +18,7 @@ mod move_journal;
mod msi;
mod own_copy;
mod picker;
mod provider_http;
#[cfg_attr(target_os = "android", allow(dead_code))]
mod sandbox;
mod secrets;
@@ -1923,6 +1924,7 @@ pub fn run() {
secret_get,
secret_set,
gitlab_limit,
provider_http::provider_http,
browser_sign_in,
browser_sign_in_cancel,
log_error,
@@ -0,0 +1,291 @@
//! A narrow HTTP proxy for repository APIs whose hosts don't send CORS
//! headers, as many self-hosted forges don't. It only makes GET requests,
//! only over https, only to public hosts, and only forwards the headers a
//! provider needs. Redirects are followed by hand so the token never goes to
//! a different host.
use serde::{Deserialize, Serialize};
use std::collections::HashMap;
use std::net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr};
use std::time::Duration;
const MAX_BODY: usize = 10 * 1024 * 1024;
const TIMEOUT: Duration = Duration::from_secs(20);
const MAX_REDIRECTS: usize = 5;
#[derive(Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ProviderRequest {
pub url: String,
#[serde(default)]
pub headers: HashMap<String, String>,
}
#[derive(Serialize)]
#[serde(rename_all = "camelCase")]
pub struct ProviderResponse {
pub status: u16,
pub headers: HashMap<String, String>,
pub body: String,
}
/// A provider's API answer, as text. The page can't read a host that doesn't
/// send CORS headers; this asks from Rust instead.
#[tauri::command]
pub async fn provider_http(request: ProviderRequest) -> Result<ProviderResponse, String> {
let (mut current, mut addrs) = validate_url(
reqwest::Url::parse(&request.url)
.map_err(|_| "That repository address isn't valid.".to_string())?,
)
.await?;
let mut headers = allowed_headers(&request.headers);
for redirects in 0..=MAX_REDIRECTS {
let response = client_for(&current, &addrs)?
.get(current.clone())
.headers(headers.clone())
.send()
.await
.map_err(|_| {
"Couldn't reach the repository host. Check your connection and try again."
.to_string()
})?;
if response.status().is_redirection() {
if redirects == MAX_REDIRECTS {
return Err("The repository host redirected too many times.".into());
}
let location = response
.headers()
.get(reqwest::header::LOCATION)
.and_then(|value| value.to_str().ok())
.ok_or("The repository host redirected without an address.")?;
let next = current
.join(location)
.map_err(|_| "The repository host redirected to an invalid address.")?;
let (next, next_addrs) = validate_url(next).await?;
// A token belongs to its host and port: never carry it to another one.
if next.origin() != current.origin() {
headers.remove(reqwest::header::AUTHORIZATION);
headers.remove("private-token");
}
current = next;
addrs = next_addrs;
continue;
}
let status = response.status().as_u16();
let headers = response_headers(response.headers());
if response
.content_length()
.is_some_and(|length| length > MAX_BODY as u64)
{
return Err("The repository host's answer is too large.".into());
}
let bytes = response
.bytes()
.await
.map_err(|_| "The repository host didn't finish its answer.".to_string())?;
if bytes.len() > MAX_BODY {
return Err("The repository host's answer is too large.".into());
}
let body = String::from_utf8(bytes.to_vec()).map_err(|_| {
"The repository host answered with something other than text.".to_string()
})?;
return Ok(ProviderResponse {
status,
headers,
body,
});
}
Err("The repository host redirected too many times.".into())
}
/// A client that connects only to the addresses `validate_url` checked, so a
/// host can't answer the check with a public address and the request with a
/// private one.
fn client_for(url: &reqwest::Url, addrs: &[SocketAddr]) -> Result<reqwest::Client, String> {
let mut builder = reqwest::Client::builder()
.user_agent("QuiverLauncher/4")
.redirect(reqwest::redirect::Policy::none())
.timeout(TIMEOUT);
if let (Some(host), false) = (url.host_str(), addrs.is_empty()) {
builder = builder.resolve_to_addrs(host, addrs);
}
builder.build().map_err(|e| e.to_string())
}
/// Whether a URL is one the proxy may ask: https, a public host, and no local
/// network. Returns the addresses its name resolved to, all of them checked;
/// none for a host given as an address.
async fn validate_url(url: reqwest::Url) -> Result<(reqwest::Url, Vec<SocketAddr>), String> {
if url.scheme() != "https" {
return Err("Repository hosts must use https.".into());
}
let host = url
.host_str()
.ok_or("That repository address has no host.")?
.to_string();
let port = url.port_or_known_default().unwrap_or(443);
if host.eq_ignore_ascii_case("localhost") {
return Err("A repository host can't be this computer.".into());
}
if let Ok(ip) = host.trim_matches(|c| c == '[' || c == ']').parse::<IpAddr>() {
if blocked_ip(ip) {
return Err("A repository host can't be a private address.".into());
}
return Ok((url, Vec::new()));
}
let addrs: Vec<SocketAddr> = tokio::net::lookup_host((host.as_str(), port))
.await
.map_err(|_| "Couldn't look up the repository host.".to_string())?
.collect();
if addrs.is_empty() {
return Err("Couldn't look up the repository host.".into());
}
if addrs.iter().any(|addr| blocked_ip(addr.ip())) {
return Err("A repository host can't be a private address.".into());
}
Ok((url, addrs))
}
/// Loopback, private, link-local, multicast and documentation addresses, which
/// a repository host has no business being.
fn blocked_ip(ip: IpAddr) -> bool {
match ip {
IpAddr::V4(ip) => {
ip.is_loopback()
|| ip.is_private()
|| ip.is_link_local()
|| ip.is_broadcast()
|| is_documentation_v4(ip)
|| ip.is_unspecified()
|| ip.is_multicast()
// Carrier-grade NAT, and the benchmark range.
|| (ip.octets()[0] == 100 && (64..=127).contains(&ip.octets()[1]))
|| (ip.octets()[0] == 198 && (18..=19).contains(&ip.octets()[1]))
}
IpAddr::V6(ip) => {
ip.is_loopback()
|| ip.is_unspecified()
|| ip.is_multicast()
|| ip.is_unique_local()
|| ip.is_unicast_link_local()
|| is_documentation_v6(ip)
|| ip
.to_ipv4_mapped()
.is_some_and(|v4| blocked_ip(IpAddr::V4(v4)))
}
}
}
/// The IPv4 ranges reserved for documentation: 192.0.2.0/24, 198.51.100.0/24 and 203.0.113.0/24.
fn is_documentation_v4(ip: Ipv4Addr) -> bool {
let [a, b, c, _] = ip.octets();
(a == 192 && b == 0 && c == 2)
|| (a == 198 && b == 51 && c == 100)
|| (a == 203 && b == 0 && c == 113)
}
/// The IPv6 range reserved for documentation: 2001:db8::/32.
fn is_documentation_v6(ip: Ipv6Addr) -> bool {
ip.segments()[0] == 0x2001 && ip.segments()[1] == 0x0db8
}
/// Only the headers a provider sends: its token, what it accepts, and its name.
fn allowed_headers(given: &HashMap<String, String>) -> reqwest::header::HeaderMap {
let mut headers = reqwest::header::HeaderMap::new();
for (name, value) in given {
let lower = name.to_ascii_lowercase();
if !matches!(
lower.as_str(),
"accept" | "content-type" | "authorization" | "private-token" | "user-agent"
) {
continue;
}
if let (Ok(name), Ok(value)) = (
reqwest::header::HeaderName::from_bytes(name.as_bytes()),
reqwest::header::HeaderValue::from_str(value),
) {
headers.insert(name, value);
}
}
headers
}
/// The answer's headers the launcher reads: its type, caching, and rate limits.
fn response_headers(headers: &reqwest::header::HeaderMap) -> HashMap<String, String> {
let mut out = HashMap::new();
for (name, value) in headers {
let lower = name.as_str().to_ascii_lowercase();
if matches!(
lower.as_str(),
"content-type" | "etag" | "last-modified" | "link" | "retry-after"
) || lower.starts_with("x-ratelimit-")
|| lower.starts_with("ratelimit-")
{
if let Ok(value) = value.to_str() {
out.insert(lower, value.to_string());
}
}
}
out
}
#[cfg(test)]
mod tests {
use super::*;
use std::net::{Ipv4Addr, Ipv6Addr};
#[test]
fn private_addresses_are_blocked() {
for ip in [
Ipv4Addr::LOCALHOST,
Ipv4Addr::new(10, 0, 0, 1),
Ipv4Addr::new(172, 16, 0, 1),
Ipv4Addr::new(192, 168, 1, 1),
Ipv4Addr::new(169, 254, 169, 254),
Ipv4Addr::new(100, 64, 0, 1),
Ipv4Addr::UNSPECIFIED,
] {
assert!(blocked_ip(IpAddr::V4(ip)), "{ip} should be blocked");
}
for ip in [
Ipv6Addr::LOCALHOST,
Ipv6Addr::UNSPECIFIED,
Ipv6Addr::new(0xfc00, 0, 0, 0, 0, 0, 0, 1),
] {
assert!(blocked_ip(IpAddr::V6(ip)), "{ip} should be blocked");
}
assert!(!blocked_ip(IpAddr::V4(Ipv4Addr::new(140, 82, 112, 4))));
}
#[test]
fn only_provider_headers_go_through() {
let headers = allowed_headers(&HashMap::from([
("Accept".into(), "application/json".into()),
("Authorization".into(), "token abc".into()),
("Cookie".into(), "secret".into()),
("Host".into(), "evil.test".into()),
]));
assert_eq!(headers.len(), 2);
assert_eq!(headers.get("accept").unwrap(), "application/json");
assert_eq!(headers.get("authorization").unwrap(), "token abc");
assert!(headers.get("cookie").is_none());
assert!(headers.get("host").is_none());
}
#[test]
fn only_readable_answer_headers_come_back() {
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-ratelimit-remaining", "42".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
headers.insert("set-cookie", "secret".parse().unwrap());
let out = response_headers(&headers);
assert_eq!(
out.get("x-ratelimit-remaining").map(String::as_str),
Some("42")
);
assert_eq!(
out.get("content-type").map(String::as_str),
Some("application/json")
);
assert!(!out.contains_key("set-cookie"));
}
}
+2 -2
View File
@@ -16,7 +16,7 @@ import type { Entry } from "@quiverlauncher/api";
import { canGet, earlyGetOffer, earlyOffer, filesAddable, hasUpdate, locatable, movable, pulledVerified, renamable, updateFor, useLauncher } from "./store";
import { Popover, newKey } from "./library";
import { manageTags } from "./tag-settings";
import { foldersOn, shortcutRequest, shortcutsOn, steamRunsUsNote, useAppDetail, withTag } from "./detail";
import { foldersOn, providerName, shortcutRequest, shortcutsOn, steamRunsUsNote, useAppDetail, withTag } from "./detail";
import { bare, versionLabel } from "./versions";
import { isLocal } from "./custom";
import { toggleHidden } from "./browse-hidden";
@@ -121,7 +121,7 @@ function BrowseMenuItems({ entry, onOpen, close, onReadme, onFeedback }: { entry
{top.map((i) => item(i.text, i.act))}
{source === undefined
? item(t`View repository`, () => {}, true)
: source && item(source.provider === "gitlab" ? t`View on GitLab` : t`View on GitHub`, () => void native.openUrl(source.url))}
: source && item(t`View on ${providerName(source.provider, source.host)}`, () => void native.openUrl(source.url))}
{item(t`Read the README`, onReadme)}
<hr />
{item(t`Share feedback…`, onFeedback)}
+37 -5
View File
@@ -5,16 +5,48 @@ import { changesFrom, joinAccount } from "./sync";
import { bestGameArt, folderNameFor, freeFolder } from "./custom";
test("a pasted repository is found on GitHub or GitLab, from any page of it", () => {
expect(parseRepository("owner/name")).toEqual({ provider: "github", repository: "owner/name" });
expect(parseRepository("https://github.com/Owner/Name/releases/tag/v1")).toEqual({ provider: "github", repository: "Owner/Name" });
expect(parseRepository("github.com/owner/name.git")).toEqual({ provider: "github", repository: "owner/name" });
expect(parseRepository("https://gitlab.com/group/sub/project/-/releases")).toEqual({ provider: "gitlab", repository: "group/sub/project" });
expect(parseRepository("gitlab.com/group/project.git/")).toEqual({ provider: "gitlab", repository: "group/project" });
expect(parseRepository("owner/name")).toEqual({ provider: "github", host: "github.com", repository: "owner/name" });
expect(parseRepository("https://github.com/Owner/Name/releases/tag/v1")).toEqual({ provider: "github", host: "github.com", repository: "Owner/Name" });
expect(parseRepository("github.com/owner/name.git")).toEqual({ provider: "github", host: "github.com", repository: "owner/name" });
expect(parseRepository("https://gitlab.com/group/sub/project/-/releases")).toEqual({ provider: "gitlab", host: "gitlab.com", repository: "group/sub/project" });
expect(parseRepository("gitlab.com/group/project.git/")).toEqual({ provider: "gitlab", host: "gitlab.com", repository: "group/project" });
expect(parseRepository("gitlab.com/project")).toBeNull();
expect(parseRepository("gitlab.com/group/..")).toBeNull();
expect(parseRepository("some.owner/repo")).toEqual({ provider: "github", host: "github.com", repository: "some.owner/repo" });
expect(parseRepository("not a repository")).toBeNull();
});
test("Gitea, Forgejo, Bitbucket and an unknown forge are found from their addresses", () => {
expect(parseRepository("https://codeberg.org/forgejo/forgejo")).toEqual({ provider: "gitea", host: "codeberg.org", repository: "forgejo/forgejo" });
expect(parseRepository("git.ryujinx.app/Ryubing/Ryubing/releases")).toEqual({ provider: "gitea", host: "git.ryujinx.app", repository: "Ryubing/Ryubing" });
expect(parseRepository("https://bitbucket.org/workspace/project/downloads")).toEqual({ provider: "bitbucket", host: "bitbucket.org", repository: "workspace/project" });
expect(parseRepository("git.example.com/group/sub/project")).toEqual({ provider: "unknown", host: "git.example.com", repository: "group/sub/project" });
expect(parseRepository("git.example.com/group/sub/project", "gitlab")).toEqual({ provider: "gitlab", host: "git.example.com", repository: "group/sub/project" });
expect(parseRepository("https://example.com/feed.json", "feed")).toEqual({ provider: "feed", host: "example.com", repository: "feed.json" });
});
test("apps from a host the account doesn't know stay on this computer", () => {
const item: LibraryItem = {
id: "gitea:codeberg.org/o/r",
slug: "",
addedAt: 1,
custom: { provider: "gitea", host: "codeberg.org", repository: "o/r", name: "R" },
account: "me",
pending: { added: true },
};
expect(changesFrom([item], "me")).toEqual([]);
const selfHosted: LibraryItem = {
id: "gitlab:git.example.com/group/project",
slug: "",
addedAt: 1,
custom: { provider: "gitlab", host: "git.example.com", repository: "group/project", name: "Project" },
account: "me",
pending: { added: true },
};
expect(changesFrom([selfHosted], "me")).toEqual([]);
});
test("apps on this computer only stay out of the account", () => {
const local: LibraryItem = { id: "local:a", slug: "", addedAt: 1, local: { kind: "program", path: "C:\\Games\\a.exe", name: "A" } };
const guest: LibraryItem = { id: "entry_b", slug: "b", addedAt: 1 };
+38 -9
View File
@@ -1,6 +1,6 @@
/**
* Apps the player adds themselves, which the catalog doesn't list.
* - Custom apps: a GitHub or GitLab repository. They show and install like
* - Custom apps: a repository on any supported host. They show and install like
* catalog apps (unchecked), from a stand-in entry built from the repository
* and its latest release, and sync with the account.
* - Local apps: a program already on this computer, or a folder in the apps
@@ -8,19 +8,44 @@
* moved or deleted.
*/
import { t } from "@lingui/core/macro";
import type { Client, Entry, GameDetail, LibraryArt, Os, Release } from "@quiverlauncher/api";
import { defaultHost, providerById, type Client, type Entry, type GameDetail, type LibraryArt, type Os, type Release, type RepositoryRef } from "@quiverlauncher/api";
import type { CatalogEntry } from "./store";
export type CustomApp = { provider: "github" | "gitlab"; repository: string; name: string; assetFilter?: string };
export type CustomApp = RepositoryRef & { name: string; assetFilter?: string };
export type LocalApp = { kind: "program"; path: string; name: string } | { kind: "folder"; folder: string; name: string };
/** A game's artwork and consoles, matched by name, for an app the player added. */
export type GameArt = { game: { id: string; slug: string; title: string }; artwork?: string; libraryArt?: LibraryArt; consoles: string[] };
export const customKey = (provider: CustomApp["provider"], repository: string) => `${provider}:${repository.toLowerCase()}`;
export const isCustom = (id: string) => /^(github|gitlab):/.test(id);
/** A custom app's library key: provider, its host when it isn't the default, and the repository. */
export const customKey = (provider: string, repository: string, host?: string) => {
const where = host && host !== defaultHost(provider) ? `${host}/` : "";
return `${provider}:${where}${repository}`.toLowerCase();
};
/** Whether an id names an app the player added from a repository. */
export const isCustom = (id: string) => {
const at = id.indexOf(":");
if (at <= 0) return false;
const provider = id.slice(0, at);
return provider !== "local" && Boolean(providerById(provider));
};
export const isLocal = (id: string) => id.startsWith("local:");
/** Added by the player: no catalog page, reviews or checked releases. */
export const isOwn = (id: string) => isCustom(id) || isLocal(id);
/** A custom app's repository from its key, for one not in the library. */
export const fromKey = (id: string): CustomApp => {
const at = id.indexOf(":");
const provider = at > 0 ? id.slice(0, at) : "github";
const rest = at > 0 ? id.slice(at + 1) : id;
const first = rest.split("/")[0];
const known = defaultHost(provider);
// A Gitea key without a host is from before hosts were kept: Codeberg is the one it meant.
const fallback = provider === "gitea" ? "codeberg.org" : undefined;
const hasHost = first.includes(".") || first.includes(":") || first.toLowerCase() === "localhost";
const host = hasHost ? first : known ?? fallback;
const repository = hasHost ? rest.slice(first.length + 1) : rest;
return { provider, ...(host && (host !== known || !known) ? { host } : {}), repository, name: repository.split("/").at(-1)! };
};
export const localKey = () => `local:${Date.now().toString(36)}${Math.random().toString(36).slice(2, 8)}`;
/**
@@ -59,8 +84,8 @@ export const withGame = (entry: CatalogEntry, art: GameArt | null): CatalogEntry
withArt({ ...entry, games: [], consoles: undefined, artwork: undefined, libraryArt: undefined }, art ?? undefined);
/** The catalog's apps for a repository: one repository can ship several, each with an entry of its own (a port of two games). */
export const appsOfRepository = <T extends { provider: string; repository?: string }>(all: T[], { provider, repository }: Pick<CustomApp, "provider" | "repository">) =>
all.filter((s) => s.repository && `${s.provider}:${s.repository}`.toLowerCase() === `${provider}:${repository}`.toLowerCase());
export const appsOfRepository = <T extends { provider: string; host?: string; repository?: string }>(all: T[], ref: Pick<CustomApp, "provider" | "host" | "repository">) =>
all.filter((s) => s.repository && customKey(s.provider, s.repository, s.host) === customKey(ref.provider, ref.repository, ref.host));
const stub = (id: string, name: string, description: string): CatalogEntry => ({
id,
@@ -82,10 +107,14 @@ const stub = (id: string, name: string, description: string): CatalogEntry => ({
export function customEntry(id: string, app: CustomApp, latest?: Release, art?: GameArt): CatalogEntry {
const oses = [...new Set(latest?.assets.map((a) => a.os) ?? [])] as Os[];
const site = `${app.provider}.com/${app.repository}`;
const site = `${app.host ?? defaultHost(app.provider) ?? app.provider}/${app.repository}`;
const entry: CatalogEntry = {
...stub(id, app.name, t`Added from ${site}. Quiver hasn't checked this app.`),
launcher: { folderName: app.repository.split("/").at(-1)!, filesToAdd: [], releaseAssetFilter: app.assetFilter },
launcher: {
folderName: app.provider === "feed" ? folderNameFor(app.name) : app.repository.split("/").at(-1)!,
filesToAdd: [],
releaseAssetFilter: app.assetFilter,
},
supportedOS: oses.length ? oses : ["unknown"],
...(latest
? {
+39 -28
View File
@@ -5,12 +5,12 @@
*/
import { createContext, useContext, useEffect, useLayoutEffect, useRef, useState, type ReactNode } from "react";
import { createPortal } from "react-dom";
import { ArrowUpRight, BadgeCheck, Ban, Check, ChevronDown, ChevronRight, CircleX, Download, ExternalLink, Github, Gitlab, History, Monitor, Package, Pin, ShieldAlert, ShieldCheck, ShieldX, ThumbsUp, TriangleAlert, X } from "lucide-react";
import { ArrowUpRight, BadgeCheck, Ban, Check, ChevronDown, ChevronRight, CircleX, Download, ExternalLink, GitBranch, Github, Gitlab, History, Monitor, Package, Pin, ShieldAlert, ShieldCheck, ShieldX, ThumbsUp, TriangleAlert, X } from "lucide-react";
import { FaSteam } from "react-icons/fa6";
import { msg, plural, t } from "@lingui/core/macro";
import { Trans } from "@lingui/react/macro";
import type { MessageDescriptor } from "@lingui/core";
import { ApiError, type AiUse, type Asset, type Checking, type Client, type DeveloperProfile, type Detail, type Entry, type HistoryRelease, type Os, type Readme as ReadmeText, type Release, type ReleaseScan, type Withdrawn } from "@quiverlauncher/api";
import { ApiError, providerFor, type AiUse, type Asset, type Checking, type Client, type DeveloperProfile, type Detail, type Entry, type HistoryRelease, type Os, type Readme as ReadmeText, type Release, type ReleaseScan, type RepositoryRef, type Withdrawn } from "@quiverlauncher/api";
import { EasySetupChip, OS_NAMES, ReleaseBadge, alertTitles, badgeState, hasEasySetup, fullDate, platformList, relativeTime } from "@quiverlauncher/ui";
import { Markdown } from "@quiverlauncher/ui/markdown";
import { i18n } from "@quiverlauncher/i18n";
@@ -19,16 +19,23 @@ import { launchCopies } from "./own-copy";
import { bare, changesUpTo, saidOf, scanAsks, unverifiedFile, unverifiedIn, versionLabel, versionList, withdrawnAsBlocked, type Said, type Version } from "./versions";
import { native, type ShortcutRequest } from "./native";
import { hasBuildFor, otherSystems, releaseFor, runsHere } from "./assets";
import { isCustom, isLocal } from "./custom";
import { fromKey, isCustom, isLocal } from "./custom";
import { Dialog, PlaylistChoices } from "./library";
import { haloMoved } from "./spatial";
export type Source = { provider: "github" | "gitlab"; repository: string; url: string };
export type Source = RepositoryRef & { url: string };
const sourceOf = (provider: string, repository?: string): Source | null =>
repository && (provider === "github" || provider === "gitlab")
? { provider, repository, url: `https://${provider}.com/${repository}` }
: null;
/** What a source's host is called on screen. */
export const providerName = (provider: string, host?: string) =>
provider === "github" ? "GitHub" : provider === "gitlab" ? "GitLab" : provider === "gitea" ? "Gitea / Forgejo" : provider === "bitbucket" ? "Bitbucket" : host ?? provider;
const sourceOf = (provider: string, repository?: string, host?: string): Source | null => {
// A Gitea or Forgejo repository can be on any host: without one, there's nothing to link to.
if (!repository || (provider === "gitea" && !host)) return null;
const ref: RepositoryRef = { provider, ...(host ? { host } : {}), repository };
const found = providerFor(ref);
return found ? { ...ref, url: found.webUrl(ref) } : null;
};
/**
* The app's page on the site, and where its code lives. Each is undefined
@@ -49,12 +56,15 @@ export function useAppDetail(entry: Entry): { source: Source | null | undefined;
return () => void (live = false);
}, [client, entry.slug, own]);
const source = custom
? sourceOf(custom.provider, custom.repository)
? sourceOf(custom.provider, custom.repository, custom.host)
: isCustom(entry.id)
? sourceOf(entry.id.slice(0, entry.id.indexOf(":")), entry.id.slice(entry.id.indexOf(":") + 1))
? (() => {
const app = fromKey(entry.id);
return sourceOf(app.provider, app.repository, app.host);
})()
: detail === undefined
? undefined
: detail && sourceOf(detail.project.provider, detail.project.repository);
: detail && sourceOf(detail.project.provider, detail.project.repository, detail.project.host);
return { source, detail };
}
@@ -182,7 +192,8 @@ export type ReleaseHistory = ReturnType<typeof useReleaseHistory>;
/** A project's repository: its host's mark (named for a screen reader), then its path, onto another line only after a slash. */
export function RepositoryLink({ source }: { source: Source }) {
const [host, Mark] = source.provider === "github" ? ["GitHub", Github] : ["GitLab", Gitlab];
const host = providerName(source.provider, source.host);
const Mark = source.provider === "github" ? Github : source.provider === "gitlab" ? Gitlab : GitBranch;
const parts = source.repository.split("/");
return (
<a className="repo-link" href={source.url} title={`${host}: ${source.repository}`} aria-label={`${host}: ${source.repository}`}>
@@ -257,9 +268,9 @@ function Clipped({ height, opened = false, children }: { height: number; opened?
);
}
/** The project's README: the site's copy, else straight from GitHub. Asked for (`asked`), it's shown whole, scrolled to, with the focus to read on from. */
/** The project's README: the site's copy, else straight from its host. Asked for (`asked`), it's shown whole, scrolled to, with the focus to read on from. */
export function Readme({ entry, source, asked }: { entry: Entry; source: Source | null | undefined; asked?: boolean }) {
const { client, github } = useLauncher();
const { client, providers } = useLauncher();
const [readme, setReadme] = useState<ReadmeText | null | undefined>();
const start = useRef<HTMLSpanElement>(null);
const arrived = readme !== undefined;
@@ -272,7 +283,7 @@ export function Readme({ entry, source, asked }: { entry: Entry; source: Source
useEffect(() => {
if (source === undefined || isLocal(entry.id)) return;
let live = true;
const upstream = () => (source?.provider === "github" ? github.readme(source.repository) : Promise.resolve(null));
const upstream = () => (source ? providers.readme(source) : Promise.resolve(null));
(isCustom(entry.id) ? upstream() : client.readme(entry.slug).then((r) => r ?? upstream()))
.catch(() => upstream())
.then(
@@ -280,7 +291,7 @@ export function Readme({ entry, source, asked }: { entry: Entry; source: Source
() => live && setReadme(null),
);
return () => void (live = false);
}, [client, github, entry.id, entry.slug, source]);
}, [client, providers, entry.id, entry.slug, source]);
// No README: what the catalog says about it, as on the website.
if (readme === null && entry.description.trim() && !isLocal(entry.id))
return (
@@ -359,7 +370,7 @@ function ReleaseCard({
said?: Said;
/** Installs this release, asking first as Change version does: `asset`, the file the player chose. Unset when it can't install now. */
onInstall?: (asset?: string) => void;
/** Whether this computer can install a file: those it can install it in place of opening it on GitHub. */
/** Whether this computer can install a file: those it can install it in place of opening it on its host. */
runsHere: (asset: Asset) => boolean;
}) {
const { state, scan, withdrawn, version } = release;
@@ -508,7 +519,7 @@ function ReleaseCard({
)}
</>
);
// One this computer runs installs, as the player chose it; any other opens on GitHub or GitLab.
// One this computer runs installs, as the player chose it; any other opens on its host.
return install && runsHere(a) ? (
<button type="button" className="download" key={a.id} onClick={() => install(a.filename)}>
{body}
@@ -590,7 +601,7 @@ export function ReleasesTab({
}) {
const [toggled, setToggled] = useState<Set<string>>(new Set());
const { items } = history;
const { client, installs, jobs, catalog, config, settings } = useLauncher();
const { client, installs, jobs, catalog, config, settings, library } = useLauncher();
const install = installs[entry.id];
// A release the player chose to install, with the file they chose, in Change version's dialog for its questions.
const [chosen, setChosen] = useState<{ version: string; asset?: string } | null>(null);
@@ -608,7 +619,8 @@ export function ReleasesTab({
);
return () => void (live = false);
}, [client, entry.slug]);
const host = detail?.project.provider === "gitlab" ? "GitLab" : "GitHub";
const custom = library.find((i) => i.id === entry.id)?.custom;
const host = custom ? providerName(custom.provider, custom.host) : providerName(detail?.project.provider ?? "github", detail?.project.host);
// A withdrawn release is blocked, whatever the site still says of it.
const releases = items && withdrawnAsBlocked<HistoryRelease & { withdrawn?: Withdrawn }>(items, (r) => r.version, detail?.withdrawn);
const newestVerified = releases?.find((r) => r.state === "verified");
@@ -1147,7 +1159,7 @@ export function Versions({
/** Its dialog over a floating panel that stays open under it (Dialog's `over`). */
over?: boolean;
}) {
const { client, github, gitlab, installs, get, jobs, setUpdates, catalog, config, settings } = useLauncher();
const { client, providers, installs, get, jobs, setUpdates, catalog, config, settings } = useLauncher();
// On Linux, an app with a build for each: Windows' runs through Wine, which plays some apps better.
const builds: Os[] = getting && config.os === "linux" && entry.supportedOS.includes("linux") && entry.supportedOS.includes("windows") ? ["linux", "windows"] : [];
const [platform, setPlatform] = useState<Os | undefined>(builds[0]);
@@ -1182,8 +1194,7 @@ export function Versions({
if (source === undefined || jobs[entry.id]) return null;
async function load() {
setVersions("loading");
const upstream = async (count = 50) =>
!source ? [] : source.provider === "github" ? github.releases(source.repository, count) : gitlab.releases(source.repository, count);
const upstream = async (count = 50) => (!source ? [] : providers.releases(source, count));
const missing = (e: unknown) => {
if (e instanceof ApiError && e.status === 404) return null;
throw e;
@@ -1193,8 +1204,8 @@ export function Versions({
const pulled = (list: Version[]) => withdrawnAsBlocked(list, (v) => v.release.version, catalog[entry.id]?.withdrawn);
if (custom) return setVersions(versionList([], [], await upstream()));
// The site's history marks every release of the repository itself, at the
// one address Cloudflare keeps for every launcher. GitHub or GitLab only
// adds the newest few, which the site may not have seen yet: GitHub
// one address Cloudflare keeps for every launcher. The host only
// adds the newest few, which the site may not have seen yet: the host
// allows a network only 60 requests an hour, so the list doesn't wait on it.
const [checked, history, newest] = await Promise.all([
// Every verified release, pre-releases too: the player picks.
@@ -1203,7 +1214,7 @@ export function Versions({
upstream(3).catch((): Release[] => []),
]);
if (history) return setVersions(pulled(versionList(checked, unverifiedIn(history), newest)));
// A site that doesn't list the history yet: the releases it knows, and the rest from GitHub or GitLab.
// A site that doesn't list the history yet: the releases it knows, and the rest from the host.
const [unverified, others] = await Promise.all([client.unverifiedReleases(entry.slug).catch(missing), upstream()]);
setVersions(pulled(versionList(checked, unverified, others)));
} catch (e) {
@@ -1286,7 +1297,7 @@ export function Versions({
if (asking) {
const close = () => (asking.version === started ? onClose?.() : setAsking(null));
const { version, pin } = asking;
const host = source?.provider === "gitlab" ? "GitLab" : "GitHub";
const host = providerName(source?.provider ?? "github", source?.host);
const waits = version.checkEndsAt !== undefined;
const hours = waits ? hoursFrom(version.checkEndsAt!) : 0;
const release = version.release.version;
@@ -1446,7 +1457,7 @@ export function Versions({
const unavailable = !custom && state !== "verified" && release.assets.length === 0;
const why =
custom || state !== "blocked" ? "" : [...(version.withdrawn ? [t({ message: "Withdrawn:", comment: "Before why a release was withdrawn" })] : []), ...reasons, ...(unavailable ? [t`Quiver won't install it.`] : [])].join(" ");
// "No files" for one with nothing to install, though not for one Quiver hasn't seen, whose files GitHub lists.
// "No files" for one with nothing to install, though not for one Quiver hasn't seen, whose files the host lists.
const badge = version.known ? badgeState({ state, assets: release.assets }) : state;
// Files for other systems only: still the player's to install, as the site can mark a file wrongly, but it says so.
const elsewhere = otherSystems(release.assets, config.os, config.arch);
+4
View File
@@ -81,6 +81,8 @@ export type Config = {
/** How this copy was installed, for usage data (update.rs). Missing from an older build. */
package?: string;
};
/** A repository host's answer, fetched by the Rust side for hosts that don't send CORS headers. */
export type ProviderHttpResponse = { status: number; headers: Record<string, string>; body: string };
export type Progress = {
id: string;
phase: "downloading" | "installing";
@@ -244,6 +246,8 @@ export const native = {
secretSet: (key: string, value: string | null) => invoke<void>("secret_set", { key, value }),
/** GitLab's request limit, read by the Rust side: the page can't see GitLab's rate-limit headers. */
gitlabLimit: (url: string, token: string | null) => invoke<GitlabLimit>("gitlab_limit", { url, token }),
/** A repository host's API answer, fetched by Rust for a host that doesn't send CORS headers. */
providerHttp: (url: string, headers: Record<string, string>) => invoke<ProviderHttpResponse>("provider_http", { request: { url, headers } }),
/** Opens a sign-in page in the browser; resolves once it returns to the launcher. */
browserSignIn: (url: string) => invoke<{ code: string } | { error: string }>("browser_sign_in", { url }),
/** Stops waiting for the sign-in: browserSignIn then resolves to the error "cancelled". Starting another does this too. */
+26 -7
View File
@@ -1,5 +1,5 @@
/**
* Adding an app the catalog doesn't list: a GitHub or GitLab repository, a
* Adding an app the catalog doesn't list: a repository on any supported host, a
* program already on this computer, or a folder to fill. Each can take the
* artwork and consoles of the game it plays, matched by its name.
*/
@@ -9,7 +9,8 @@ import { msg, t } from "@lingui/core/macro";
import { Trans } from "@lingui/react/macro";
import type { MessageDescriptor } from "@lingui/core";
import { i18n } from "@quiverlauncher/i18n";
import type { Entry, GameMatch } from "@quiverlauncher/api";
import { defaultHost, providerChoices, type Entry, type GameMatch } from "@quiverlauncher/api";
import { syncableCustom } from "./sync";
import { Artwork, fullDate } from "@quiverlauncher/ui";
import { useLauncher, type GameArt, type RepositoryPreview } from "./store";
import { native } from "./native";
@@ -61,7 +62,7 @@ function Choose({ onPick }: { onPick: (step: Step) => void }) {
<p className="muted">
<Trans>For an app the catalog doesn't have. It's yours alone; to add one for everyone, suggest it on quiverlauncher.com.</Trans>
</p>
{option("repository", <GitBranch size={22} />, t`From GitHub or GitLab`, t`Installs from the repository's releases, and updates like other apps.`)}
{option("repository", <GitBranch size={22} />, t`From a git repository`, t`Installs from the repository's releases, and updates like other apps.`)}
{option("program", <MonitorPlay size={22} />, t`A program on this computer`, t`Starts it where it is. Nothing is downloaded, moved or deleted.`)}
{option("folder", <FolderPlus size={22} />, t`A folder you fill yourself`, t`Makes a folder in your apps folder to put the app in.`)}
</>
@@ -84,6 +85,7 @@ type Done = { onBack: () => void; onDone: (entry: Entry) => void };
function FromRepository({ onBack, onDone }: Done) {
const { lookUpRepository, addCustomApp } = useLauncher();
const [input, setInput] = useState("");
const [forge, setForge] = useState("auto");
const [busy, setBusy] = useState(false);
const [error, setError] = useState<string | null>(null);
const [preview, setPreview] = useState<RepositoryPreview | null>(null);
@@ -122,7 +124,7 @@ function FromRepository({ onBack, onDone }: Done) {
e.preventDefault();
setBusy(true);
setError(null);
lookUpRepository(input).then((r) => {
lookUpRepository(input, forge === "auto" ? undefined : forge).then((r) => {
if (!live.current) return;
setBusy(false);
if ("error" in r) return setError(r.error);
@@ -134,8 +136,20 @@ function FromRepository({ onBack, onDone }: Done) {
});
}}
>
<Heading title={t`From GitHub or GitLab`} onBack={onBack} />
<input autoFocus aria-label={t`Repository`} placeholder={t`owner/name, or a github.com or gitlab.com address`} value={input} onChange={(e) => setInput(e.target.value)} />
<Heading title={t`From a git repository`} onBack={onBack} />
<input autoFocus aria-label={t`Repository`} placeholder={t`owner/name, or a repository address (github.com, gitlab.com, codeberg.org, …)`} value={input} onChange={(e) => setInput(e.target.value)} />
<label className="field">
<Trans>Where it&apos;s hosted</Trans>
<select value={forge} onChange={(e) => setForge(e.target.value)}>
<option value="auto">{t`Detect it`}</option>
{providerChoices.map((p) => (
<option key={p.id} value={p.id}>
{p.name}
</option>
))}
<option value="feed">{t`Release feed`}</option>
</select>
</label>
{error && <p className="job-error">{error}</p>}
<button className="primary" disabled={busy || !input.trim()}>
{busy ? t`Looking it up…` : t`Look it up`}
@@ -156,7 +170,7 @@ function FromRepository({ onBack, onDone }: Done) {
onDone(addCustomApp({ ...preview.app, name: name.trim(), ...(assetFilter ? { assetFilter } : {}) }, latest, art ?? undefined));
}}
>
<Heading title={`${preview.app.provider === "gitlab" ? "gitlab.com" : "github.com"}/${preview.app.repository}`} onBack={onBack} />
<Heading title={`${preview.app.host ?? defaultHost(preview.app.provider) ?? preview.app.provider}/${preview.app.repository}`} onBack={onBack} />
<label className="field">
<Trans comment="The app's name, a form field">Name</Trans>
<input aria-label={t({ message: "Name", comment: "The app's name, a form field" })} maxLength={200} value={name} onChange={(e) => setName(e.target.value)} />
@@ -166,6 +180,11 @@ function FromRepository({ onBack, onDone }: Done) {
{" · "}
<Trans>Quiver hasn't checked this app.</Trans>
</p>
{!syncableCustom(preview.app) && (
<p className="muted">
<Trans>This app stays on this computer: account sync doesn't support this kind of host yet.</Trans>
</p>
)}
{latest && files.length === 0 && (
<p className="job-error">
<Trans>None of this release's files are for this computer.</Trans>
+27
View File
@@ -0,0 +1,27 @@
/**
* The transport for repository APIs. GitHub, GitLab and Codeberg send CORS
* headers, so the page asks them directly; other hosts go through the Rust
* side, which isn't held to CORS and can read their rate-limit headers.
*/
import { native } from "./native";
const BROWSER_HOSTS = new Set(["api.github.com", "github.com", "gitlab.com", "codeberg.org"]);
export const providerFetch: typeof fetch = async (input, init) => {
const url = typeof input === "string" ? input : input instanceof URL ? input.toString() : input.url;
const method = (init?.method ?? "GET").toUpperCase();
if (method !== "GET") throw new Error("Repository hosts are only read.");
const host = new URL(url).host;
if (BROWSER_HOSTS.has(host)) {
try {
return await fetch(input, init);
} catch {
// A host that blocks CORS or the network: the Rust side can still ask.
}
}
const headers = Object.fromEntries(new Headers(init?.headers).entries());
const response = await native.providerHttp(url, headers);
// 204 and 205 may not carry a body.
const body = response.status === 204 || response.status === 205 ? null : response.body;
return new Response(body, { status: response.status, headers: response.headers });
};
+174
View File
@@ -0,0 +1,174 @@
import { expect, test } from "vitest";
import { bitbucketProvider, bitbucketVersion, createProviders, detectProvider, feedProvider, giteaProvider, githubProvider, gitlabProvider, parseRepository, toRef } from "@quiverlauncher/api";
import { customKey, fromKey } from "./custom";
type Answer = { status?: number; json?: unknown; text?: string; headers?: Record<string, string> };
type Asked = { url: string; headers: Headers };
/** A fetch that answers each URL from `answers`, recording what was asked and with which headers. */
function fakeFetch(answers: Record<string, Answer>) {
const asked: Asked[] = [];
const fetch = (async (input: RequestInfo | URL, init?: RequestInit) => {
const url = typeof input === "string" ? input : input instanceof URL ? input.toString() : input.url;
asked.push({ url, headers: new Headers(init?.headers) });
const answer = answers[url];
if (!answer) return new Response("not found", { status: 404 });
return new Response(answer.text ?? JSON.stringify(answer.json ?? null), { status: answer.status ?? 200, headers: answer.headers });
}) as typeof globalThis.fetch;
return { fetch, asked };
}
test("Gitea releases map their files, put stable ones first and skip drafts", async () => {
const base = "https://codeberg.org/api/v1/repos/forgejo/forgejo/releases";
const { fetch } = fakeFetch({
[`${base}?limit=30&page=1`]: {
json: [
{ tag_name: "v2.0.0-rc.1", draft: false, prerelease: true, published_at: "2026-02-01T00:00:00Z", assets: [] },
{
tag_name: "v1.2.3",
draft: false,
prerelease: false,
published_at: "2026-01-01T00:00:00Z",
body: "Notes",
assets: [{ id: 7, name: "app-win64.zip", size: 123, browser_download_url: "https://codeberg.org/o/r/releases/download/v1.2.3/app-win64.zip" }],
},
{ tag_name: "v1.3.0", draft: true, prerelease: false, published_at: "2026-01-02T00:00:00Z", assets: [] },
],
},
});
const releases = await giteaProvider.releases({ provider: "gitea", host: "codeberg.org", repository: "forgejo/forgejo" }, { fetch });
expect(releases.map((r) => r.version)).toEqual(["v1.2.3", "v2.0.0-rc.1"]);
expect(releases[0].notes).toBe("Notes");
expect(releases[0].assets[0]).toMatchObject({ filename: "app-win64.zip", os: "windows", architecture: "x64", size: 123 });
});
test("Gitea says which host didn't have the repository, and reads its README raw", async () => {
const missing = fakeFetch({});
await expect(
giteaProvider.releases({ provider: "gitea", host: "git.example.com", repository: "o/r" }, { fetch: missing.fetch }),
).rejects.toThrow("That repository wasn't found on git.example.com.");
const readme = fakeFetch({ "https://codeberg.org/api/v1/repos/o/r/raw/README.md": { text: "# A port" } });
expect(await giteaProvider.readme!({ provider: "gitea", host: "codeberg.org", repository: "o/r" }, { fetch: readme.fetch })).toEqual({
markdown: "# A port",
rawBase: "https://codeberg.org/o/r/raw/HEAD/",
htmlBase: "https://codeberg.org/o/r/src/HEAD/",
});
});
test("Gitea sends the player's token only as its own Authorization header", async () => {
const { fetch, asked } = fakeFetch({ "https://codeberg.org/api/v1/repos/o/r/releases?limit=30&page=1": { json: [] } });
const providers = createProviders({ tokens: { "codeberg.org": "tok" }, fetch });
await providers.releases({ provider: "gitea", host: "codeberg.org", repository: "o/r" });
expect(asked[0].headers.get("authorization")).toBe("token tok");
});
test("Bitbucket's flat downloads become releases by the version in their names", async () => {
const url = "https://api.bitbucket.org/2.0/repositories/ws/proj/downloads?pagelen=100";
const { fetch } = fakeFetch({
[url]: {
json: {
values: [
{
name: "app-1.2.3-win64.zip",
size: 10,
created_on: "2026-01-01T00:00:00Z",
links: { self: { href: "https://api.bitbucket.org/2.0/repositories/ws/proj/downloads/app-1.2.3-win64.zip" } },
},
{
name: "app-1.2.3-linux-x64.tar.gz",
size: 20,
created_on: "2026-01-01T00:00:00Z",
links: { self: { href: "https://api.bitbucket.org/2.0/repositories/ws/proj/downloads/app-1.2.3-linux-x64.tar.gz" } },
},
{
name: "app-1.2.2-win64.zip",
size: 10,
created_on: "2025-12-01T00:00:00Z",
links: { self: { href: "https://api.bitbucket.org/2.0/repositories/ws/proj/downloads/app-1.2.2-win64.zip" } },
},
],
},
},
});
const releases = await bitbucketProvider.releases({ provider: "bitbucket", host: "bitbucket.org", repository: "ws/proj" }, { fetch });
expect(releases.map((r) => r.version)).toEqual(["1.2.3", "1.2.2"]);
expect(releases[0].assets.map((a) => a.os).sort()).toEqual(["linux", "windows"]);
expect(bitbucketVersion("app-2.0.0-rc1-macos.zip")).toBe("2.0.0-rc1");
});
test("a release feed maps its files and their checksums", async () => {
const sha = "a".repeat(64);
const { fetch } = fakeFetch({
"https://example.com/releases.json": {
json: {
releases: [
{
version: "1.2.3",
releasedAt: "2026-01-01T00:00:00Z",
assets: [{ name: "app-linux-x64.zip", url: "https://example.com/app.zip", size: 5, sha256: sha }],
},
],
},
},
});
const releases = await feedProvider.releases({ provider: "feed", host: "example.com", repository: "releases.json" }, { fetch });
expect(releases[0].assets[0]).toMatchObject({ filename: "app-linux-x64.zip", os: "linux", architecture: "x64", checksum: `sha256:${sha}` });
});
test("an unknown host is named by what answers its API", async () => {
const gitea = fakeFetch({ "https://gitea.example/api/v1/version": { json: { version: "1.22.0" } } });
expect(await detectProvider("gitea.example", gitea.fetch)).toBe("gitea");
const gitlab = fakeFetch({ "https://gitlab.example/api/v4/projects?per_page=1": { json: [] } });
expect(await detectProvider("gitlab.example", gitlab.fetch)).toBe("gitlab");
const github = fakeFetch({ "https://github.example/api/v3/meta": { json: { installed_version: "3.12.0" } } });
expect(await detectProvider("github.example", github.fetch)).toBe("github");
const neither = fakeFetch({});
expect(await detectProvider("unknown.example", neither.fetch)).toBeNull();
});
test("self-hosted GitHub Enterprise and GitLab use their own API bases", async () => {
expect(githubProvider.apiBase("github.example.com")).toBe("https://github.example.com/api/v3");
expect(gitlabProvider.apiBase("gitlab.example.com")).toBe("https://gitlab.example.com/api/v4");
expect(githubProvider.webUrl({ provider: "github", host: "github.example.com", repository: "o/r" })).toBe("https://github.example.com/o/r");
expect(gitlabProvider.webUrl({ provider: "gitlab", host: "gitlab.example.com", repository: "g/p" })).toBe("https://gitlab.example.com/g/p");
expect(parseRepository("https://gitlab.example.com/group/sub/project/-/releases", "gitlab")).toEqual({
provider: "gitlab",
host: "gitlab.example.com",
repository: "group/sub/project",
});
const readme = fakeFetch({ "https://github.example.com/api/v3/repos/o/r/readme": { text: "# R" } });
expect(await githubProvider.readme!({ provider: "github", host: "github.example.com", repository: "o/r" }, { fetch: readme.fetch })).toEqual({
markdown: "# R",
rawBase: "https://github.example.com/o/r/raw/HEAD/",
htmlBase: "https://github.example.com/o/r/blob/HEAD/",
});
const hub = fakeFetch({
"https://github.example.com/api/v3/repos/o/r/releases?per_page=10": {
json: [{ tag_name: "v1", draft: false, prerelease: false, published_at: "2026-01-01T00:00:00Z", assets: [] }],
},
});
expect((await githubProvider.releases({ provider: "github", host: "github.example.com", repository: "o/r" }, { fetch: hub.fetch }, 10))[0].version).toBe("v1");
const lab = fakeFetch({ "https://gitlab.example.com/api/v4/projects/group%2Fproject/releases?per_page=30": { json: [] } });
expect(await gitlabProvider.releases({ provider: "gitlab", host: "gitlab.example.com", repository: "group/project" }, { fetch: lab.fetch })).toEqual([]);
});
test("a parsed ref leaves a default host out, so library keys keep their shape", () => {
expect(parseRepository("owner/name")).toEqual({ provider: "github", host: "github.com", repository: "owner/name" });
expect(toRef({ provider: "github", host: "github.com", repository: "owner/name" })).toEqual({ provider: "github", repository: "owner/name" });
expect(toRef({ provider: "gitea", host: "codeberg.org", repository: "owner/name" })).toEqual({ provider: "gitea", host: "codeberg.org", repository: "owner/name" });
});
test("custom keys round-trip GitHub, GitLab and a self-hosted Gitea", () => {
expect(customKey("github", "Owner/Repo")).toBe("github:owner/repo");
expect(customKey("gitlab", "Group/Project")).toBe("gitlab:group/project");
expect(customKey("gitea", "Owner/Repo", "codeberg.org")).toBe("gitea:codeberg.org/owner/repo");
expect(fromKey("github:owner/repo")).toEqual({ provider: "github", repository: "owner/repo", name: "repo" });
expect(fromKey("gitea:codeberg.org/owner/repo")).toEqual({ provider: "gitea", host: "codeberg.org", repository: "owner/repo", name: "repo" });
});
+139
View File
@@ -0,0 +1,139 @@
/**
* Settings: tokens for the repository hosts other than github.com and
* gitlab.com, which have their own sections. A token is kept in the
* keychain and sent only to the host it belongs to.
*/
import { useState } from "react";
import { t } from "@lingui/core/macro";
import { Trans } from "@lingui/react/macro";
import { defaultHost, providerById, providerForHost } from "@quiverlauncher/api";
import { native } from "./native";
import { useLauncher } from "./store";
export function RepositoryTokens() {
const { tokens, saveToken } = useLauncher();
const hosts = Object.keys(tokens)
.filter((host) => host !== "github.com" && host !== "gitlab.com")
.sort();
const [host, setHost] = useState("");
const [draft, setDraft] = useState("");
const [message, setMessage] = useState<string | null>(null);
const [saving, setSaving] = useState(false);
async function add() {
const clean = host
.trim()
.toLowerCase()
.replace(/^(?:https?:\/\/)?(?:www\.)?/i, "")
.split("/")[0];
if (!clean || !draft.trim()) return;
setSaving(true);
setMessage(null);
try {
await saveToken(clean, draft.trim());
setHost("");
setDraft("");
setMessage(t`Saved. Requests to ${clean} use your token now.`);
} catch {
setMessage(t`Couldn't save the token. Try again.`);
} finally {
setSaving(false);
}
}
return (
<section className="settings-section" aria-label={t`Other repository tokens`}>
<h3>
<Trans>Other repository tokens</Trans>
</h3>
<p className="muted">
<Trans>
Apps you add from a self-hosted forge, Codeberg, Bitbucket or a release feed use the token you save for that host. A token is kept in this
computer&apos;s keychain and sent only to the host it belongs to.
</Trans>
</p>
{hosts.map((h) => (
<HostToken key={h} host={h} />
))}
<div className="row">
<input aria-label={t`Host`} placeholder={t`git.example.com`} value={host} onChange={(e) => setHost(e.target.value)} spellCheck={false} />
<input
type="password"
aria-label={t`Token`}
placeholder={t`Token`}
autoComplete="off"
spellCheck={false}
value={draft}
onChange={(e) => setDraft(e.target.value)}
/>
<button className="primary" disabled={saving || !host.trim() || !draft.trim()} onClick={() => void add()}>
{saving ? t`Saving…` : t`Save token`}
</button>
</div>
{message && (
<p className="muted" role="status">
{message}
</p>
)}
</section>
);
}
function HostToken({ host }: { host: string }) {
const { tokens, saveToken, library } = useLauncher();
const saved = tokens[host] ?? "";
const [draft, setDraft] = useState(saved);
const [message, setMessage] = useState<string | null>(null);
const [saving, setSaving] = useState(false);
// A host the player already added an app from knows its provider; otherwise, a known host does.
const added = library.find((i) => i.custom && (i.custom.host ?? defaultHost(i.custom.provider)) === host)?.custom?.provider;
const provider = providerForHost(host) ?? (added ? providerById(added) : undefined);
const help = provider?.token;
async function save(token: string) {
setSaving(true);
setMessage(null);
try {
await saveToken(host, token || undefined);
setDraft(token);
setMessage(token ? t`Saved.` : t`Removed.`);
} catch {
setMessage(t`Couldn't save the token. Try again.`);
} finally {
setSaving(false);
}
}
return (
<div className="row">
<strong>{host}</strong>
{provider && <span className="muted">{provider.name}</span>}
<input
type="password"
aria-label={t`Token for ${host}`}
autoComplete="off"
spellCheck={false}
value={draft}
onChange={(e) => setDraft(e.target.value)}
/>
<button className="primary" disabled={saving || draft.trim() === saved} onClick={() => void save(draft.trim())}>
{saving ? t`Checking…` : t`Save token`}
</button>
{saved && (
<button disabled={saving} onClick={() => void save("")}>
<Trans>Remove token</Trans>
</button>
)}
{help && provider && (
<button onClick={() => void native.openUrl(help.createUrl({ provider: provider.id, host, repository: "" }))}>
<Trans>Create a token</Trans>
</button>
)}
{message && (
<span className="muted" role="status">
{message}
</span>
)}
</div>
);
}
+2
View File
@@ -27,6 +27,7 @@ import { UpdateSettings } from "./update";
import { AppUpdatesSetting } from "./app-updates";
import { GithubTokenSetting } from "./github-token";
import { GitlabTokenSetting } from "./gitlab-token";
import { RepositoryTokens } from "./repository-tokens";
import { TelemetrySetting } from "./telemetry-ui";
import type { Theme } from "./theme";
import { INTERFACE_SIZES } from "./zoom";
@@ -144,6 +145,7 @@ export function SettingsPage({ back, onBack, onRunSetup, start }: { back: string
<>
<GithubTokenSetting />
<GitlabTokenSetting />
<RepositoryTokens />
</>
)}
</div>
+112 -55
View File
@@ -7,7 +7,7 @@
*/
import { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState, type Dispatch, type ReactNode, type SetStateAction } from "react";
import { msg, plural, t } from "@lingui/core/macro";
import { ApiError, createClient, createGithub, createGitlab, githubRepository, parseRepository, type Asset, type Client, type Console, type Entry, type Github, type Gitlab, type Os, type HistoryRelease, type Release, type ReleaseScan, type ReleaseStatus, type UnverifiedRelease, type Verified, type Withdrawn } from "@quiverlauncher/api";
import { ApiError, createClient, createGithub, createGitlab, createProviders, githubRepository, parseRepository, toRef, type Asset, type Client, type Console, type Entry, type Github, type Gitlab, type Os, type HistoryRelease, type Release, type ReleaseScan, type ReleaseStatus, type UnverifiedRelease, type Verified, type Withdrawn, type Providers, type RepositoryRef } from "@quiverlauncher/api";
import type { HiddenApp } from "./browse-hidden";
import { native, type Config, type LaunchOptions, type MovingApp, type OldApp, type OldFilter, type Progress, type StateProblem, type V3Library, type WindowsRunner } from "./native";
import { Recovery } from "./recovery";
@@ -16,17 +16,18 @@ import { cameAfter, fromSite, scanAsks, installedFile, insteadOf, newestUnblocke
import { captureError, captureFailure, failureKind, Problem, reasonOf, reportStartupFailure, setTelemetryAppsDir, setTelemetryAppsFolders, telemetryChoice, track, type TelemetryContext } from "./telemetry";
import { appsDueToday, appsOnComputer, librarySummary } from "./usage-summary";
import { AccountProvider, useAccount } from "./account";
import { applyServer, applyServerCollections, changesFrom, hasFilters, joinAccount, matches, newKey, type Collection } from "./sync";
import { applyServer, applyServerCollections, changesFrom, hasFilters, joinAccount, matches, newKey, syncableCustom, type Collection } from "./sync";
import type { Platform } from "./platforms";
import { setBindings, setScrolling, type Bindings } from "./spatial";
import { musicForGame, setMusic } from "./music";
import { appsOfRepository, bestGameArt, customEntry, customKey, folderNameFor, freeFolder, isCustom, isLocal, localEntry, localKey, withGame, type CustomApp, type GameArt, type LocalApp } from "./custom";
import { appsOfRepository, bestGameArt, customEntry, customKey, folderNameFor, fromKey, freeFolder, isCustom, isLocal, localEntry, localKey, withGame, type CustomApp, type GameArt, type LocalApp } from "./custom";
import { artFile, artFiles, isArtAddress, type ArtSlot, type Pictures } from "./custom-art";
import { followTheme, type Theme } from "./theme";
import type { LibraryView } from "./view";
import { nearestInterfaceSize, pageZoom } from "./zoom";
import { copiesNeeded, launchCopies } from "./own-copy";
import { activate, pick, type Language } from "@quiverlauncher/i18n";
import { providerFetch } from "./provider-fetch";
/** The language the launcher shows in: the one picked in Settings, or else the system's nearest. */
export const languageOf = (settings: Settings): Language => settings.language ?? pick(navigator.languages);
@@ -213,6 +214,12 @@ type Launcher = {
gitlabToken?: string;
saveGitlabToken: (token: string | undefined) => Promise<void>;
gitlab: Gitlab;
/** The player's tokens, by repository host. */
tokens: Record<string, string>;
/** Saves a token for a host; none removes it. */
saveToken: (host: string, token: string | undefined) => Promise<void>;
/** The release hosts, with those tokens, for the apps the player added. */
providers: Providers;
/** The catalog's consoles, and their names by id. */
consoles: Console[];
consoleNames: Record<string, string>;
@@ -273,8 +280,8 @@ type Launcher = {
remove: (id: string) => Promise<void>;
/** Deletes the app's files (to the trash), keeping it in the library to get again. */
uninstall: (id: string) => Promise<void>;
/** A GitHub or GitLab repository: the catalog's app when it lists it, else what adding it would install. */
lookUpRepository: (input: string) => Promise<{ error: string } | { listed: Entry[] } | { preview: RepositoryPreview }>;
/** A repository from any supported host: the catalog's app when it lists it, else what adding it would install. */
lookUpRepository: (input: string, provider?: string) => Promise<{ error: string } | { listed: Entry[] } | { preview: RepositoryPreview }>;
/** The catalog's apps for an app the player added from its repository, once the catalog lists it; several when the repository ships several. */
listedAs: (id: string) => Promise<Entry[]>;
/** Repositories the player added that the catalog lists an app of now, that isn't in the library yet. */
@@ -639,12 +646,6 @@ export const stillWaiting = (releasedAt: number | undefined, now = Date.now()) =
const LOOKUP_TIMEOUT = 30_000;
/** The release a player gets: the newest that isn't a pre-release, else the newest. */
const latestOf = (releases: Release[]) => releases.find((r) => !r.prerelease) ?? releases[0];
/** A custom app's repository from its key, for one not in the library; GitHub and GitLab don't mind its lower case. */
const fromKey = (id: string): CustomApp => {
const repository = id.slice(id.indexOf(":") + 1);
return { provider: id.startsWith("gitlab:") ? "gitlab" : "github", repository, name: repository.split("/").at(-1)! };
};
/**
* Whether the player can rename an app's folder: one Quiver keeps in the apps
* folder, at its top or in its console's folder there (Group by console). Not a
@@ -917,7 +918,9 @@ export const locatable = (id: string, install: Install | undefined, job: Job | u
* entry of its own (a port of two games); else the one for its repository.
*/
export function catalogMatch<T>(old: OldApp, ids: Map<string, T>): T | undefined {
return (old.catalogId && ids.get(`id:${old.catalogId}`)) || (old.repository && ids.get(`${old.provider}:${old.repository}`.toLowerCase())) || undefined;
const ref = old.repository ? v3Ref(old.provider, old.repository) : null;
const byRepository = ref ? ids.get(customKey(ref.provider, ref.repository, ref.host)) : undefined;
return (old.catalogId && ids.get(`id:${old.catalogId}`)) || byRepository || undefined;
}
/**
@@ -931,13 +934,22 @@ export function keptInstall(now: Install | undefined, adopted: Install): Install
return now.dir === adopted.dir && adopted.inApps && !now.inApps ? { ...now, inApps: true } : now;
}
/** A 3.x app's repository: GitHub, GitLab, or the Codeberg that 3.x added. */
export const v3Ref = (provider: string, repository: string): RepositoryRef | null => {
if (provider === "gitlab") return { provider: "gitlab", repository };
if (provider === "codeberg") return { provider: "gitea", host: "codeberg.org", repository };
if (provider === "github" && githubRepository(repository)) return { provider: "github", repository };
return null;
};
/** The installs 3.x has for apps in the library that have none here, by app. */
export function looseInstalls(apps: OldApp[], ids: Map<string, { id: string }>, library: LibraryItem[], installs: Record<string, Install>, catalog: Record<string, Entry>, os: Os) {
const loose: Record<string, Install> = {};
const has = (id: string | undefined): id is string => Boolean(id && library.some((i) => i.id === id && !i.removed));
for (const old of apps) {
// A catalog app that couldn't be read when it came over is in the library as a custom one.
const custom = old.repository && (old.provider === "github" || old.provider === "gitlab") ? customKey(old.provider, old.repository) : undefined;
const ref = old.repository ? v3Ref(old.provider, old.repository) : null;
const custom = ref ? customKey(ref.provider, ref.repository, ref.host) : undefined;
const id = [catalogMatch(old, ids)?.id, custom].find(has);
if (!id || loose[id] || installs[id] || !catalog[id]) continue;
const install = adoptedInstall(old, catalog[id], os);
@@ -1177,29 +1189,49 @@ export type Settings = {
previewUpdates?: boolean;
/** Announcements dismissed here, by id (announcements.ts). */
dismissedAnnouncements?: string[];
/** Where earlier versions kept the player's GitHub token, as plain text; it moves to the keychain on start (`GITHUB_TOKEN`). */
/** Where earlier versions kept the player's GitHub token, as plain text; it moves to the keychain's token map on start. */
githubToken?: string;
};
/** The player's GitHub token, for GitHub's higher limit: in the keychain (secret_set), sent only to GitHub's API, never synced. */
/** The player's repository tokens, by host: in the keychain (secret_set), sent only to their host, never synced. */
const REPOSITORY_TOKENS = "repositoryTokens";
/** Where earlier versions kept the GitHub and GitLab tokens; they move into the map above on start. */
const GITHUB_TOKEN = "githubToken";
/** The GitHub token from the keychain, moving one an earlier version left in settings.json there first. */
async function githubToken(settings: Settings | null): Promise<string | undefined> {
if (settings?.githubToken) {
await native.secretSet(GITHUB_TOKEN, settings.githubToken);
delete settings.githubToken;
await native.writeState("settings", settings);
}
return (await native.secretGet(GITHUB_TOKEN)) ?? undefined;
}
/** The player's GitLab token, for GitLab's higher limit: in the keychain (secret_set), sent only to GitLab's API, never synced. */
const GITLAB_TOKEN = "gitlabToken";
/** The GitLab token from the keychain. */
async function gitlabToken(): Promise<string | undefined> {
return (await native.secretGet(GITLAB_TOKEN)) ?? undefined;
/** The tokens from the keychain, moving earlier versions' GitHub and GitLab tokens there first. */
async function repositoryTokens(settings: Settings | null): Promise<Record<string, string>> {
const raw = await native.secretGet(REPOSITORY_TOKENS).catch(() => null);
let tokens: Record<string, string> = {};
try {
tokens = raw ? (JSON.parse(raw) as Record<string, string>) : {};
} catch {
tokens = {};
}
const [github, gitlab] = await Promise.all([
native.secretGet(GITHUB_TOKEN).catch(() => null),
native.secretGet(GITLAB_TOKEN).catch(() => null),
]);
if (github && !tokens["github.com"]) tokens["github.com"] = github;
if (gitlab && !tokens["gitlab.com"]) tokens["gitlab.com"] = gitlab;
const moved = Boolean(settings?.githubToken);
if (settings?.githubToken) {
tokens["github.com"] = settings.githubToken;
delete settings.githubToken;
await native.writeState("settings", settings).catch(() => {});
}
if (github || gitlab || moved) {
const saved = await native.secretSet(REPOSITORY_TOKENS, JSON.stringify(tokens)).then(
() => true,
() => false,
);
// The map has them now; the old keys would only be a second copy. Only removed once the map is safely saved.
if (saved) {
if (github) await native.secretSet(GITHUB_TOKEN, null).catch(() => {});
if (gitlab) await native.secretSet(GITLAB_TOKEN, null).catch(() => {});
}
}
return tokens;
}
/** An app as usage data names it: a catalog app by its slug; one the player added only by where it's from. */
@@ -1223,6 +1255,8 @@ type Saved = {
collections: Collection[];
githubToken?: string;
gitlabToken?: string;
/** The player's tokens, by repository host. */
tokens: Record<string, string>;
};
/** What usage data says about this copy of the launcher, and takes out of what it sends. */
@@ -1266,9 +1300,9 @@ export function LauncherProvider({ children }: { children: ReactNode }) {
// The language picked here before anything shows, not the system's for a moment first.
await activate(languageOf(settings ?? {})).catch(() => {});
// Without them GitHub and GitLab still answer, at their lower limits.
const [token, labToken] = await Promise.all([githubToken(settings).catch(() => undefined), gitlabToken().catch(() => undefined)]);
const tokens = await repositoryTokens(settings).catch(() => ({}) as Record<string, string>);
if (settings?.scale) settings.scale = nearestInterfaceSize(settings.scale);
setSaved({ config, library: library ?? [], installs: installs ?? {}, catalog: usableCatalog(catalog ?? {}), settings: settings ?? {}, collections: collections ?? [], githubToken: token, gitlabToken: labToken });
setSaved({ config, library: library ?? [], installs: installs ?? {}, catalog: usableCatalog(catalog ?? {}), settings: settings ?? {}, collections: collections ?? [], tokens, githubToken: tokens["github.com"], gitlabToken: tokens["gitlab.com"] });
});
}).catch((e) => setBroken(e instanceof Error ? e : new Error(String(e))));
}, []);
@@ -1331,11 +1365,14 @@ function LauncherState({ saved, children }: { saved: Saved; children: ReactNode
onFallback: (e) => track("catalog_fallback_used", { reason: reasonOf(e), error: failureKind(e) }),
onUnreachable: (e) => track("catalog_load_failed", { reason: reasonOf(e), error: failureKind(e) }),
}), [config.api]);
const [tokens, setTokens] = useState(saved.tokens);
const tokensNow = useRef(tokens);
tokensNow.current = tokens;
const providers = useMemo(() => createProviders({ tokens, fetch: providerFetch }), [tokens]);
const [gitlabToken, setGitlabToken] = useState(saved.gitlabToken);
const gitlab = useMemo(() => createGitlab(config.gitlabApi, gitlabToken, native.gitlabLimit), [config.gitlabApi, gitlabToken]);
/** A custom app's releases, newest first. */
const releasesOf = (app: Pick<CustomApp, "provider" | "repository">) =>
app.provider === "gitlab" ? gitlab.releases(app.repository) : github.releases(app.repository);
const releasesOf = (app: Pick<CustomApp, "provider" | "host" | "repository">) => providers.releases(app);
const [consoles, setConsoles] = useState<Console[]>([]);
useEffect(() => void client.facets().then((f) => setConsoles(f.consoles), () => {}), [client]);
const consoleNames = useMemo(() => Object.fromEntries(consoles.map((c) => [c.id, c.name])), [consoles]);
@@ -1504,7 +1541,7 @@ function LauncherState({ saved, children }: { saved: Saved; children: ReactNode
() => {},
);
}
}, [library, client, github, gitlab, round]); // eslint-disable-line react-hooks/exhaustive-deps
}, [library, client, github, gitlab, providers, round]); // eslint-disable-line react-hooks/exhaustive-deps
// Signed in: fold the account's library in, live.
const userId = account.user?.id;
@@ -1529,7 +1566,7 @@ function LauncherState({ saved, children }: { saved: Saved; children: ReactNode
const changes = userId ? changesFrom(allItems, userId) : [];
if (!userId || !changes.length || pushing.current) return;
pushing.current = true;
const sent = new Set(allItems.filter((i) => i.pending && i.account === userId));
const sent = new Set(allItems.filter((i) => i.pending && i.account === userId && (!i.custom || syncableCustom(i.custom))));
(async () => {
// Refused changes come back; they can't succeed by retrying, so they count as done too.
for (let i = 0; i < changes.length; i += 100) await account.save(changes.slice(i, i + 100));
@@ -2056,10 +2093,12 @@ function LauncherState({ saved, children }: { saved: Saved; children: ReactNode
function add(entry: Entry, own: Pick<LibraryItem, "custom" | "local" | "art"> = {}) {
setLibrary((l) => {
const mine = l.find((i) => i.id === entry.id);
const added = { pending: { ...mine?.pending, added: true }, account: userId ?? mine?.account, removed: undefined };
// The account knows GitHub and GitLab: an app from another host stays on this computer.
const syncable = !own.custom || syncableCustom(own.custom);
const added = syncable ? { pending: { ...mine?.pending, added: true }, account: userId ?? mine?.account, removed: undefined } : { removed: undefined };
if (mine) return mine.removed ? l.map((i) => (i === mine ? { ...i, ...added } : i)) : l;
// A local app stays on this computer, out of the account.
return [...l, { id: entry.id, slug: entry.slug, addedAt: Date.now(), ...own, ...(userId && !own.local ? added : {}) }];
return [...l, { id: entry.id, slug: entry.slug, addedAt: Date.now(), ...own, ...(userId && !own.local && syncable ? added : {}) }];
});
}
@@ -2093,7 +2132,7 @@ function LauncherState({ saved, children }: { saved: Saved; children: ReactNode
async function catalogRepositories() {
const ids = new Map<string, { id: string; slug: string }>();
for (const s of await catalogStatuses()) {
if (s.repository) ids.set(`${s.provider}:${s.repository}`.toLowerCase(), s);
if (s.repository) ids.set(customKey(s.provider, s.repository, s.host), s);
// And by its id, as Quiver Launcher 3 kept it (importOld), under a key no provider has.
ids.set(`id:${s.id}`, s);
}
@@ -2105,11 +2144,19 @@ function LauncherState({ saved, children }: { saved: Saved; children: ReactNode
(await Promise.all(statuses.map((s) => client.app(s.slug).catch(() => null)))).flatMap((detail) => (detail ? [detail.entry] : []));
/** The catalog's apps for a repository, or a preview of its latest release. */
async function lookUpRepository(input: string): ReturnType<Launcher["lookUpRepository"]> {
const repository = parseRepository(input);
if (!repository) return { error: t`Enter a GitHub or GitLab repository: owner/name, or its github.com or gitlab.com address.` };
async function lookUpRepository(input: string, chosen?: string): ReturnType<Launcher["lookUpRepository"]> {
let parsed = parseRepository(input, chosen);
if (!parsed) return { error: t`Enter a repository: owner/name, or its address on a forge.` };
if (parsed.provider === "unknown") {
const host = parsed.host;
const detected = await providers.detect(host).catch(() => null);
if (!detected) return { error: t`Quiver couldn't tell what kind of forge ${host} is. Choose its kind and try again.` };
parsed = parseRepository(input, detected);
if (!parsed) return { error: t`That address isn't a repository on ${host}.` };
}
const repository = toRef(parsed);
// Already added: its page.
const key = customKey(repository.provider, repository.repository);
const key = customKey(repository.provider, repository.repository, repository.host);
if (library.some((i) => i.id === key) && catalog[key]) return { listed: [catalog[key]] };
try {
const listed = await entriesOf(appsOfRepository(await catalogStatuses().catch((): ReleaseStatus[] => []), repository));
@@ -2153,27 +2200,36 @@ function LauncherState({ saved, children }: { saved: Saved; children: ReactNode
/** Adds a custom app for a repository; the caller installs it. */
function addCustom(custom: CustomApp, latest?: Release, art?: GameArt) {
const entry = customEntry(customKey(custom.provider, custom.repository), custom, latest, art);
const entry = customEntry(customKey(custom.provider, custom.repository, custom.host), custom, latest, art);
setCatalog((c) => ({ ...c, [entry.id]: entry }));
add(entry, { custom, art });
return entry;
}
/** Saves a token for a host; none removes it. */
async function saveToken(host: string, token: string | undefined) {
const next = { ...tokensNow.current };
if (token?.trim()) next[host] = token.trim();
else delete next[host];
await native.secretSet(REPOSITORY_TOKENS, JSON.stringify(next));
tokensNow.current = next;
setTokens(next);
if (host === "github.com") setGithubToken(next[host]);
if (host === "gitlab.com") setGitlabToken(next[host]);
}
const value: Launcher = {
config,
client,
github,
githubToken,
saveGithubToken: async (token) => {
await native.secretSet(GITHUB_TOKEN, token ?? null);
setGithubToken(token);
},
saveGithubToken: async (token) => saveToken("github.com", token),
gitlab,
gitlabToken,
saveGitlabToken: async (token) => {
await native.secretSet(GITLAB_TOKEN, token ?? null);
setGitlabToken(token);
},
saveGitlabToken: async (token) => saveToken("gitlab.com", token),
tokens,
saveToken,
providers,
consoles,
consoleNames,
collections,
@@ -2475,7 +2531,7 @@ function LauncherState({ saved, children }: { saved: Saved; children: ReactNode
},
/**
* Adds the 3.x apps, keeping their installs: the catalog's as the catalog has them (found by repository, or by
* the entry 3.x knew), any other from GitHub or GitLab as a custom app. Returns the names of those it couldn't:
* the entry 3.x knew), any other from a supported host as a custom app. Returns the names of those it couldn't:
* ones 3.x didn't say where they're from. The player's tag filters come over as playlists.
*/
async importOld({ apps, filters = [] }, onProgress, slots = ["icon"]) {
@@ -2486,11 +2542,12 @@ function LauncherState({ saved, children }: { saved: Saved; children: ReactNode
const match = catalogMatch(old, ids);
const detail = match && (await client.app(match.slug).catch(() => null));
if (detail) return { kind: "catalog" as const, detail };
if (!old.repository || !((old.provider === "github" && githubRepository(old.repository)) || old.provider === "gitlab")) return null;
const ref = old.repository ? v3Ref(old.provider, old.repository) : null;
if (!ref) return null;
// Not in the catalog: a custom app, with its game's artwork and consoles as adding one picks them. A
// repository whose releases can't be read now (gone, or GitHub's hourly limit) still comes over, installs
// and all: its releases are read when its page is opened.
const custom: CustomApp = { provider: old.provider, repository: old.repository, name: old.name };
const custom: CustomApp = { ...ref, name: old.name };
const [releases, art] = await Promise.all([releasesOf(custom).catch(() => null), bestGameArt(client, old.name).catch(() => undefined)]);
return { kind: "custom" as const, custom, latest: releases ? latestOf(releases) : undefined, art };
}, () => onProgress?.(++done));
+9 -1
View File
@@ -84,10 +84,18 @@ export function applyServer(local: LibraryItem[], server: ServerItem[], account:
return [...items.values()];
}
/**
* Whether the account can store an app from this host. It knows github.com and
* gitlab.com; a self-hosted GitHub or GitLab, and every other host, stays on
* this computer until the account stores a host with an app.
*/
export const syncableCustom = (custom: Pick<CustomApp, "provider" | "host">) =>
(custom.provider === "github" || custom.provider === "gitlab") && !custom.host;
/** What still has to reach the account. */
export function changesFrom(local: LibraryItem[], account: string): Change[] {
return local
.filter((i) => i.pending && i.account === account && !i.local)
.filter((i) => i.pending && i.account === account && !i.local && (!i.custom || syncableCustom(i.custom)))
.map(({ id, pending = {}, overrides = {}, removed, custom }): Change => {
if (removed) return { key: id, removed: true };
const added = custom ? { add: true as const, custom } : { add: true as const, entryId: id };
+6 -6
View File
@@ -1,5 +1,5 @@
/**
* Change version's list: every release on GitHub or GitLab and every one
* Change version's list: every release on the repository host and every one
* quiverlauncher.com knows, each verified, unverified or blocked.
*/
import { t } from "@lingui/core/macro";
@@ -10,7 +10,7 @@ import type { ReleaseState } from "@quiverlauncher/ui";
* A release in Change version: verified (published on the site), or not.
* An unverified one the site knows installs its files against the
* checksums the site pinned; one it hasn't seen yet comes straight from
* GitHub or GitLab. A blocked one installs its pinned files only when the
* the host. A blocked one installs its pinned files only when the
* player insists.
*/
export type Version = {
@@ -78,10 +78,10 @@ export const unverifiedIn = (history: HistoryRelease[]) =>
history.filter((h): h is HistoryRelease & UnverifiedRelease => h.state !== "verified");
/**
* Every release on GitHub or GitLab and every one the site knows, each
* Every release on the repository host and every one the site knows, each
* marked verified, unverified or blocked. A site that doesn't list
* unverified releases yet (`unverified` null) leaves every unpublished one
* unverified, as GitHub or GitLab has it.
* unverified, as the host has it.
*/
export function versionList(published: Release[], unverified: UnverifiedRelease[] | null, upstream: Release[]): Version[] {
const verified = new Map(published.map((r) => [bare(r.version), r]));
@@ -138,7 +138,7 @@ export const newestUnblocked = <T extends { state: ReleaseState; assets: Asset[]
* `changed` upstream since its release was verified, and isn't verified yet
* itself (`unverifiedChecksum`); or Quiver checked the release's other files
* but has no checksum for this one (`unchecked`). Undefined for a verified
* file, and for a release with no checksums at all (GitLab), which installs
* file, and for a release with no checksums at all (GitLab, Gitea/Forgejo, Bitbucket), which installs
* as it always has.
*/
export function unverifiedFile(asset: Asset, release: Pick<Release, "assets">): "changed" | "unchecked" | undefined {
@@ -153,7 +153,7 @@ export const sameChecksum = (a: string, b: string) => a.toLowerCase() === b.toLo
/**
* Whether the file installed before Quiver verified it (its checksum) is one
* its release is verified with now: `verified` when it is, or when there's
* nothing to tell by (no checksum kept, or none listed, as on GitLab);
* nothing to tell by (no checksum kept, or none listed, as on GitLab, Gitea/Forgejo or Bitbucket);
* `waiting` when it's a file of the release still in its own wait, or the
* release has a file Quiver has no checksum for, which it may be; `differs`
* when it's none of them.
+103
View File
@@ -0,0 +1,103 @@
# Release hosts
Quiver installs and updates apps from a release host: a forge's releases page, or a JSON feed. The launcher asks the
host's API directly when it allows cross-origin requests, and through a small Rust proxy when it doesn't.
## Supported hosts
| Host | Provider id | Releases | README | Tokens |
| ----------------------------------- | ----------- | -------------- | ------ | ------------------------------- |
| GitHub (github.com) | `github` | yes | yes | PAT, `Authorization: Bearer` |
| GitHub Enterprise | `github` | yes | yes | PAT |
| GitLab (gitlab.com) | `gitlab` | yes | yes | PAT, `PRIVATE-TOKEN` |
| Self-hosted GitLab | `gitlab` | yes | yes | PAT |
| Gitea / Forgejo / Codeberg | `gitea` | yes | yes | token, `Authorization: token` |
| Bitbucket Cloud | `bitbucket` | downloads only | yes | app password (Basic) |
| JSON release feed | `feed` | yes | no | none |
Codeberg (`codeberg.org`), Gitea's own instance (`gitea.com`), Ryubing (`git.ryujinx.app`) and Eden
(`git.eden-emu.dev`) are known by name. Any other Gitea/Forgejo host is detected by asking
`https://<host>/api/v1/version`.
Gogs and other forges that copied GitHub's API can use **Gitea / Forgejo**: their releases are read from
`/api/v1/repos/<owner>/<repo>/releases`. A host that doesn't answer `/api/v1/version` isn't detected, so pick
**Gitea / Forgejo** yourself.
## Adding a repository
1. Add an app and choose **From a git repository**.
2. Paste a repository address (`https://codeberg.org/owner/repo`, `git.example.com/owner/repo`, or `owner/repo` for
GitHub) or a feed URL.
3. Leave **Detect it** selected, or pick the host kind yourself when detection can't reach it.
4. Pick the app's name and, when a release has several files for this computer, the file that belongs to the app.
The library key keeps the host only when it isn't the provider's default:
- `github:owner/repo`
- `gitlab:group/project`
- `gitea:codeberg.org/owner/repo`
- `gitlab:git.example.com/group/project`
## Tokens
Tokens are per host, kept in the OS keychain, and sent only to that host. Settings → Advanced has GitHub, GitLab and
**Other repository tokens**. A token is only needed for private repositories or higher rate limits.
- GitHub: a classic token with no scopes, or a fine-grained token with read access.
- GitLab: `read_api`.
- Gitea/Forgejo: `repository: Read` (and `user: Read` on some versions).
- Bitbucket: an app password with `Repositories: Read`, entered as `username:app-password`.
## Checksums and updates
- GitHub publishes a SHA-256 digest for release assets. Quiver uses it when it's there.
- GitLab, Gitea/Forgejo and Bitbucket don't publish per-file checksums. Those apps show **Quiver hasn't checked this
app**, as GitLab apps already did.
- Catalog apps are verified by quiverlauncher.com; that verification is separate from the host's own checksums.
- Bitbucket has no per-tag releases. Quiver groups its Downloads by the version in each file's name, so update
detection is best effort.
## Self-hosted hosts and the local network
The Rust proxy refuses `http://` and private, loopback, link-local and documentation addresses. A forge on a LAN
(`https://192.168.1.10`, `https://git.local`) won't work yet. A host needs a public HTTPS address with a certificate
the system trusts.
## Account sync
The account stores apps from github.com and gitlab.com. Apps from a self-hosted GitHub or GitLab, and from every other
host, stay on the computer that added them; the add-app dialog says so.
## Release feed format
A project with no release API can publish a JSON file:
```json
{
"releases": [
{
"version": "1.2.3",
"releasedAt": "2026-01-01T00:00:00Z",
"prerelease": false,
"notes": "What changed",
"assets": [
{
"name": "app-linux-x64.zip",
"url": "https://example.com/app-linux-x64.zip",
"size": 123456,
"sha256": "…64 hex characters…"
}
]
}
]
}
```
`releasedAt` may be an ISO 8601 string or a Unix timestamp. `os`, `architecture` and `format` are inferred from `name`
when they're absent. `sha256` is optional; without it the app is unchecked.
## Adding a provider
Providers live in `packages/api/src/providers/`. A provider implements `RepositoryProvider` (`types.ts`): `releases`,
optional `readme`/`rateLimit`, `webUrl`, and optional token help. Register it in `registry.ts` and add its known hosts.
The launcher's UI picks it up from `PROVIDERS`; no page needs to know its name.
+9
View File
@@ -99,6 +99,15 @@ export function standInForRust({ api, state = {}, config: more = {}, maximized =
retryAfter: header("retry-after"),
};
},
// A repository host's API answer, as the real Rust side fetches it for a host without CORS.
provider_http: async ({ request }) => {
const response = await fetch(request.url, { headers: request.headers });
const headers = {};
response.headers.forEach((value, name) => {
if (/^(content-type|etag|last-modified|link|retry-after|x-ratelimit-|ratelimit-)/i.test(name)) headers[name] = value;
});
return { status: response.status, headers, body: await response.text() };
},
// The player's own copy of a game (own-copy-setup.tsx): none found, and one set up stays where it was put.
find_copies: () => files.foundCopies ?? [],
copy_present: () => true,
+2 -2
View File
@@ -169,10 +169,10 @@ test("Advanced Settings takes a GitLab token, keeps it in the keychain, and show
await setting.locator('input[type="password"]').fill("glpat-test");
await setting.getByRole("button", { name: "Save token" }).click();
await setting.getByText("Saved. Requests to GitLab use your token now.").waitFor();
// The token was kept in the keychain, not in settings.json.
// The token was kept in the keychain, not in settings.json: with every host's, under its own host.
assert.deepEqual(
await p.evaluate(() => window.__calls.find((c) => c.cmd === "secret_set")?.args),
{ key: "gitlabToken", value: "glpat-test" },
{ key: "repositoryTokens", value: JSON.stringify({ "gitlab.com": "glpat-test" }) },
);
// It went with the request that checked it, and the mock's higher limit shows.
assert.ok(s2.api.gitlabRequests().some((r) => r.path === "/gitlab/user" && r.token === "glpat-test"));
+3 -1
View File
@@ -17,6 +17,8 @@ deployment's own host (`FALLBACK_API`) from then on, as Quiver Launcher 3 does;
The types follow the site's public responses (also described at `/api/v1/openapi.json`); fields the client
doesn't know are ignored. It also has small helpers the launcher uses: `inferPlatform` for release file names,
`parseRepository` for GitHub and GitLab addresses, and `listSlug`/`listUrl` for shared lists.
`parseRepository` for repository addresses, and `listSlug`/`listUrl` for shared lists. The repository providers in
`src/providers/` (GitHub, GitLab, Gitea/Forgejo, Bitbucket and release feeds) sit behind `createProviders`, with
`detectProvider` naming an unknown host.
All rights reserved. See the repository's [LICENSE](../../LICENSE).
+9
View File
@@ -0,0 +1,9 @@
/** A request the catalog, or a repository host, refused; the status and the message for the player. */
export class ApiError extends Error {
constructor(
readonly status: number,
message: string,
) {
super(message);
}
}
+44 -273
View File
@@ -2,6 +2,7 @@
* The quiverlauncher.com catalog API (https://api.quiverlauncher.com/api/v1),
* typed after the site's public DTOs. Unknown fields are ignored.
*/
import { ApiError } from "./errors";
export type Os = "windows" | "linux" | "macos" | "android" | "ios" | "unknown";
export type Architecture = "x64" | "x86" | "arm64" | "arm" | "universal" | "unknown";
export type ProjectType = "port" | "tool" | "emulator" | "game";
@@ -284,7 +285,7 @@ export type HistoryRelease = {
export type Detail = {
entry: Entry;
project: { name: string; description: string; repository?: string; provider: string; website?: string; author?: string; aiUse?: AiUse };
project: { name: string; description: string; repository?: string; provider: string; host?: string; website?: string; author?: string; aiUse?: AiUse };
withdrawn: Withdrawn[];
checking?: Checking;
/** YouTube videos for the app's Media tab, in the order staff set. Missing from a site that has none yet. */
@@ -309,7 +310,7 @@ export type SharedList = {
name: string;
description?: string;
owner: { name: string; avatar?: string };
items: ({ kind: "entry"; entry: Entry } | { kind: "custom"; custom: { provider: "github" | "gitlab"; repository: string; name: string }; url: string })[];
items: ({ kind: "entry"; entry: Entry } | { kind: "custom"; custom: { provider: string; host?: string; repository: string; name: string }; url: string })[];
/** Apps on it that left the catalog. */
unavailable: number;
createdAt: number;
@@ -391,7 +392,7 @@ export type Announcement = {
editedAt?: number;
};
export type ReleaseStatus = { id: string; slug: string; provider: string; repository?: string };
export type ReleaseStatus = { id: string; slug: string; provider: string; host?: string; repository?: string };
export type Page<T> = { items: T[]; nextCursor: string | null; isDone: boolean };
@@ -433,11 +434,7 @@ export type Readme = { markdown: string; rawBase?: string; htmlBase?: string };
*/
export type DownloadProblem = { version: string; file: string; problem: "missing" | "mismatch" };
export class ApiError extends Error {
constructor(readonly status: number, message: string) {
super(message);
}
}
export { ApiError } from "./errors";
export const DEFAULT_API = "https://api.quiverlauncher.com/api/v1";
/**
@@ -638,271 +635,45 @@ export function createClient(base: string = DEFAULT_API, options: ClientOptions
}
/** Which computer a release file is for, from its name. */
export function inferPlatform(filename: string): { os: Os; architecture: Architecture } {
const s = filename.toLowerCase();
const os: Os = /windows|(?<!dar)win(?:32|64)|(?:^|[^a-z])win(?:[^a-z]|$)|\.exe$|\.msi$/.test(s)
? "windows"
: /linux|appimage|flatpak|steamdeck|\.deb$|\.rpm$/.test(s)
? "linux"
: /macos|darwin|osx|(?:^|[^a-z])mac(?:[^a-z]|$)|\.dmg$/.test(s)
? "macos"
: /android|\.apk$/.test(s)
? "android"
: /(?:^|[^a-z])ios(?:[^a-z]|$)|iphone|ipados|\.ipa$/.test(s)
? "ios"
: "unknown";
// "win64" and "linux64" name the architecture too; "darwin64" isn't Windows.
const architecture: Architecture = /aarch64|arm64/.test(s)
? "arm64"
: /x86[_-]64|amd64|x64|(?<!dar)win(?:dows)?[ _.-]?64|linux[ _.-]?64|(?:^|[^a-z0-9])64[ _-]?bit/.test(s)
? "x64"
: /i[3-6]86|ia32|x86|(?<!dar)win(?:dows)?[ _.-]?32|linux[ _.-]?32|(?:^|[^a-z0-9])32[ _-]?bit/.test(s)
? "x86"
: /universal/.test(s)
? "universal"
: // "arm" only as its own word or armv7/armhf/armel, so "harmony" doesn't count.
/(?:^|[^a-z])arm(?:v\d|hf|el|[^a-z]|$)/.test(s)
? "arm"
: "unknown";
return { os, architecture };
}
export { inferPlatform } from "./platform";
/** "owner/repo" from a GitHub address or the bare name; null if it isn't one. */
export function githubRepository(input: string): string | null {
const m = input.trim().match(/^(?:https:\/\/github\.com\/)?([a-z0-9_][a-z0-9_.-]*)\/([a-z0-9_][a-z0-9_.-]*?)(?:\.git)?\/?$/i);
return m && m[2] !== ".." ? `${m[1]}/${m[2]}` : null;
}
/**
* A repository from what a player pastes: a github.com or gitlab.com address
* (any page of it), or "owner/name" for GitHub. Null if it isn't one.
*/
export function parseRepository(input: string): { provider: "github" | "gitlab"; repository: string } | null {
const text = input.trim().replace(/^(?:https?:\/\/)?(?:www\.)?/i, "");
const lab = text.match(/^gitlab\.com\/(.+?)(?:\/-\/.*)?\/?$/i);
if (lab) {
const path = lab[1].replace(/\.git$/i, "");
const parts = path.split("/");
const ok = parts.length >= 2 && parts.every((p) => /^[a-z0-9_][a-z0-9_.-]*$/i.test(p) && p !== "..");
return ok ? { provider: "gitlab", repository: path } : null;
}
const hub = text.match(/^github\.com\/([^/]+)\/([^/?#]+)/i);
const repository = githubRepository(hub ? `${hub[1]}/${hub[2]}` : text);
return repository ? { provider: "github", repository } : null;
}
/**
* Why GitHub or GitLab refused, worded for players. Without a token each allows
* a network fewer requests, and its answer says when that starts again, in
* `ratelimit-*` headers (GitHub's are prefixed `x-`).
*/
function refusal(response: Response, token: boolean, name: "GitHub" | "GitLab", prefix: "x-ratelimit" | "ratelimit"): ApiError {
const { status, headers } = response;
if (status === 401 && token) return new ApiError(status, `${name} didn't accept your ${name} token. Change or remove it in Settings.`);
if (status === 403 || status === 429) {
const reset = Number(headers.get(`${prefix}-reset`));
if (headers.get(`${prefix}-remaining`) === "0" && reset > 0) {
const at = new Date(reset * 1000).toLocaleTimeString([], { hour: "numeric", minute: "2-digit" });
return new ApiError(
status,
token
? `Your ${name} token's limit of requests is used up until ${at}. Try again then.`
: `${name}'s limit of requests from this network is used up until ${at}. Try again then, or add a ${name} token in Settings to raise the limit.`,
);
}
const wait = Number(headers.get("retry-after"));
if (wait > 0) return new ApiError(status, `${name} is limiting requests from this network. Try again in ${Math.ceil(wait / 60)} min.`);
}
return new ApiError(status, `${name} answered ${status}. Try again later.`);
}
/** Without a token GitHub allows a network 60 requests an hour (a token, 5,000). */
const githubError = (response: Response, token: boolean) => refusal(response, token, "GitHub", "x-ratelimit");
/** How many requests GitHub allows an hour, how many are left, and when it starts again. */
/** How many requests a host allows an hour, how many are left, and when it starts again. */
export type RateLimit = { limit: number; remaining: number; resetAt: number };
/**
* Releases straight from GitHub, for custom apps the catalog doesn't list.
* Nobody has checked these; GitHub's own SHA-256 digest still guards the
* download when it has one. With the player's token, GitHub counts requests
* against it rather than the network.
*/
type RawRelease = {
tag_name: string;
draft: boolean;
prerelease: boolean;
published_at: string;
body?: string;
assets: { id: number; name: string; browser_download_url: string; size: number; digest?: string }[];
};
const fromGithub = (r: RawRelease): Release => ({
id: r.tag_name,
version: r.tag_name,
releasedAt: Date.parse(r.published_at) || 0,
prerelease: r.prerelease,
notes: r.body,
assets: r.assets.map((a) => ({
id: String(a.id),
url: a.browser_download_url,
filename: a.name,
...inferPlatform(a.name),
format: a.name.split(".").pop() ?? "unknown",
size: a.size,
...(/^sha256:[0-9a-f]{64}$/i.test(a.digest ?? "") ? { checksum: a.digest!.toLowerCase() } : {}),
})),
});
export function createGithub(base = "https://api.github.com", token?: string) {
const auth: Record<string, string> = token?.trim() ? { Authorization: `Bearer ${token.trim()}` } : {};
const fail = (response: Response) => githubError(response, Boolean(auth.Authorization));
return {
/**
* Every release, newest first, except drafts; up to `count` of them, stable
* ones first. When those are all pre-releases and there are more, the
* repository's latest release is added in front, so a run of betas doesn't
* hide the stable release players should get.
*/
async releases(repository: string, count = 10): Promise<Release[]> {
const headers = { Accept: "application/vnd.github+json", ...auth };
const response = await fetch(`${base}/repos/${repository}/releases?per_page=${count}`, { headers });
if (response.status === 404) throw new ApiError(404, "That repository wasn't found on GitHub.");
if (!response.ok) throw fail(response);
const raw: RawRelease[] = await response.json();
if (raw.length >= count && raw.every((r) => r.prerelease || r.draft)) {
// A 404 when the repository has no stable release at all.
const latest = await fetch(`${base}/repos/${repository}/releases/latest`, { headers });
if (latest.ok) raw.unshift(await latest.json());
}
return raw
.filter((r) => !r.draft && r.tag_name)
// Stable releases first: the first one is what a player gets.
.sort((a, b) => Number(a.prerelease) - Number(b.prerelease))
.map(fromGithub);
},
/** The repository's README, or null when it has none. */
async readme(repository: string): Promise<Readme | null> {
const response = await fetch(`${base}/repos/${repository}/readme`, { headers: { Accept: "application/vnd.github.raw", ...auth } });
if (response.status === 404) return null;
if (!response.ok) throw fail(response);
return {
markdown: await response.text(),
rawBase: `https://raw.githubusercontent.com/${repository}/HEAD/`,
htmlBase: `https://github.com/${repository}/blob/HEAD/`,
};
},
/** The hourly limit, for the token if there is one; asking doesn't count against it. A 401 ApiError when GitHub refuses the token. */
async rateLimit(): Promise<RateLimit> {
const response = await fetch(`${base}/rate_limit`, { headers: { Accept: "application/vnd.github+json", ...auth } });
if (!response.ok) throw fail(response);
const { resources } = (await response.json()) as { resources: { core: { limit: number; remaining: number; reset: number } } };
return { limit: resources.core.limit, remaining: resources.core.remaining, resetAt: resources.core.reset * 1000 };
},
};
}
export type Github = ReturnType<typeof createGithub>;
/** Without a token GitLab allows a network 500 requests a minute on gitlab.com (a token, 2,000). */
const gitlabError = (response: Response, token: boolean) => refusal(response, token, "GitLab", "ratelimit");
/**
* What GitLab's answer says about the request limit, as the Rust side reads it.
* The browser can't see GitLab's rate-limit headers (GitLab doesn't expose
* them to pages), so the launcher asks the Rust side, which can.
*/
export type GitlabLimit = { status: number; limit?: number | null; remaining?: number | null; reset?: number | null; retryAfter?: number | null };
/** Reads a GitLab URL's status and rate-limit headers, the Rust side's way. */
export type GitlabLimitReader = (url: string, token: string | null) => Promise<GitlabLimit>;
/**
* Releases on GitLab, for catalog apps hosted there. GitLab gives no checksums.
* With the player's token, GitLab counts requests against it rather than the
* network.
*/
export function createGitlab(base = "https://gitlab.com/api/v4", token?: string, readLimit?: GitlabLimitReader) {
const auth: Record<string, string> = token?.trim() ? { "PRIVATE-TOKEN": token.trim() } : {};
const fail = (response: Response) => gitlabError(response, Boolean(auth["PRIVATE-TOKEN"]));
// `/user` checks a token; a project list is public, so it still answers without one.
const limitUrl = `${base}/${auth["PRIVATE-TOKEN"] ? "user" : "projects?per_page=1"}`;
/** GitLab's answer to `limitUrl` as the Rust side read it, headers and all. */
const readByRust = async (reader: GitlabLimitReader) => {
const { status, limit, remaining, reset, retryAfter } = await reader(limitUrl, auth["PRIVATE-TOKEN"] ?? null);
const headers = new Headers();
if (limit != null) headers.set("ratelimit-limit", String(limit));
if (remaining != null) headers.set("ratelimit-remaining", String(remaining));
if (reset != null) headers.set("ratelimit-reset", String(reset));
if (retryAfter != null) headers.set("retry-after", String(retryAfter));
return new Response(null, { status, headers });
};
/**
* When the page can't tell why GitLab refused (it can't see the rate-limit
* headers, and a refusal may come without CORS headers at all), the Rust side
* asks again: its answer when GitLab is limiting requests, otherwise null.
*/
const limited = async (): Promise<Response | null> => {
if (!readLimit) return null;
const response = await readByRust(readLimit).catch(() => null);
return response && (response.status === 403 || response.status === 429) ? response : null;
};
return {
async releases(repository: string, count = 30): Promise<Release[]> {
let response: Response;
try {
response = await fetch(`${base}/projects/${encodeURIComponent(repository)}/releases?per_page=${count}`, { headers: auth });
} catch (e) {
const refused = await limited();
if (refused) throw fail(refused);
throw e;
}
if (response.status === 404) throw new ApiError(404, "That repository wasn't found on GitLab.");
if (response.status === 403 || response.status === 429) throw fail((await limited()) ?? response);
if (!response.ok) throw fail(response);
type Raw = {
tag_name: string;
released_at: string;
upcoming_release?: boolean;
description?: string;
assets?: { links?: { id: number; name: string; url: string; direct_asset_url?: string; filepath?: string }[] };
};
const raw: Raw[] = await response.json();
return raw.map((r) => ({
id: r.tag_name,
version: r.tag_name,
releasedAt: Date.parse(r.released_at) || 0,
prerelease: Boolean(r.upcoming_release),
notes: r.description,
assets: (r.assets?.links ?? []).map((a) => {
// A link's name is its title ("Windows build"); the file's own name is in its path.
const last = (s?: string) => (s ? decodeURIComponent(s.split(/[?#]/)[0].split("/").pop() ?? "") : "");
const filename = [last(a.filepath), last(a.direct_asset_url), last(a.url)].find((f) => /\.[a-z0-9]{1,8}$/i.test(f)) ?? a.name;
return {
id: String(a.id),
url: a.direct_asset_url ?? a.url,
filename,
...inferPlatform(`${filename} ${a.name}`),
format: filename.split(".").pop() ?? "unknown",
};
}),
}));
},
/**
* How many requests GitLab allows, how many are left, and when it starts
* again. Null when GitLab doesn't say, as some instances don't. Asking
* with a token checks it: a 401 ApiError when GitLab refuses it. Unlike
* GitHub's, asking counts as one request.
*/
async rateLimit(): Promise<RateLimit | null> {
// The browser can't read GitLab's rate-limit headers, so the Rust side does when it can.
const response = readLimit ? await readByRust(readLimit) : await fetch(limitUrl, { headers: auth });
if (!response.ok) throw fail(response);
const limit = Number(response.headers.get("ratelimit-limit"));
const remaining = Number(response.headers.get("ratelimit-remaining"));
const resetAt = Number(response.headers.get("ratelimit-reset")) * 1000;
return limit > 0 && remaining >= 0 && resetAt > 0 ? { limit, remaining, resetAt } : null;
},
};
}
export type Gitlab = ReturnType<typeof createGitlab>;
/** The repository hosts, and the ways to name one. */
export {
GITEA_HOSTS,
PROVIDERS,
bitbucketProvider,
bitbucketVersion,
createGithub,
createGitlab,
createProviders,
defaultHost,
detectProvider,
feedProvider,
giteaProvider,
githubProvider,
githubRepository,
gitlabProvider,
hostOf,
parseRepository,
providerById,
providerChoices,
providerFor,
providerForHost,
toRef,
} from "./providers";
export type {
Github,
Gitlab,
GitlabLimit,
GitlabLimitReader,
ParsedRepository,
ProviderAuth,
ProviderContext,
Providers,
ProviderTokenHelp,
RepositoryProvider,
RepositoryRef,
} from "./providers";
+31
View File
@@ -0,0 +1,31 @@
/** Which computer a release file is for, from its name. */
import type { Architecture, Os } from "./index";
export function inferPlatform(filename: string): { os: Os; architecture: Architecture } {
const s = filename.toLowerCase();
const os: Os = /windows|(?<!dar)win(?:32|64)|(?:^|[^a-z])win(?:[^a-z]|$)|\.exe$|\.msi$/.test(s)
? "windows"
: /linux|appimage|flatpak|steamdeck|\.deb$|\.rpm$/.test(s)
? "linux"
: /macos|darwin|osx|(?:^|[^a-z])mac(?:[^a-z]|$)|\.dmg$/.test(s)
? "macos"
: /android|\.apk$/.test(s)
? "android"
: /(?:^|[^a-z])ios(?:[^a-z]|$)|iphone|ipados|\.ipa$/.test(s)
? "ios"
: "unknown";
// "win64" and "linux64" name the architecture too; "darwin64" isn't Windows.
const architecture: Architecture = /aarch64|arm64/.test(s)
? "arm64"
: /x86[_-]64|amd64|x64|(?<!dar)win(?:dows)?[ _.-]?64|linux[ _.-]?64|(?:^|[^a-z0-9])64[ _-]?bit/.test(s)
? "x64"
: /i[3-6]86|ia32|x86|(?<!dar)win(?:dows)?[ _.-]?32|linux[ _.-]?32|(?:^|[^a-z0-9])32[ _-]?bit/.test(s)
? "x86"
: /universal/.test(s)
? "universal"
: // "arm" only as its own word or armv7/armhf/armel, so "harmony" doesn't count.
/(?:^|[^a-z])arm(?:v\d|hf|el|[^a-z]|$)/.test(s)
? "arm"
: "unknown";
return { os, architecture };
}
+106
View File
@@ -0,0 +1,106 @@
import { ApiError } from "../errors";
import { inferPlatform } from "../platform";
import type { Release } from "../index";
import { refusal } from "./refusal";
import type { RepositoryProvider } from "./types";
type RawDownload = { name: string; size?: number; created_on?: string; links?: { self?: { href?: string } } };
type RawPage = { values?: RawDownload[]; next?: string };
const API = "https://api.bitbucket.org/2.0";
/** The version a download's name carries: "app-1.2.3-win64.zip" is 1.2.3. */
export function bitbucketVersion(name: string): string {
const base = name.replace(/\.(zip|7z|tar\.gz|tgz|tar\.xz|txz|tar\.zst|tzst|tar\.bz2|tbz2?|tar|rar|appimage|flatpak|exe|apk|msi)$/i, "");
const match = base.match(/(?:^|[-_.])v?(\d+(?:\.\d+){1,3}(?:[-_.]?(?:alpha|beta|rc|pre|dev)\d*)?)(?:[-_.]|$)/i);
return match ? match[1] : base;
}
const bitbucketError = (response: Response, token: boolean) => refusal(response, token, "Bitbucket", "x-ratelimit");
/**
* Bitbucket Cloud has no releases API: it has a flat Downloads list. Each
* version found in a file's name becomes a release, with that file as its
* asset. Updates compare versions, as there are no release dates. This is
* best effort; Bitbucket is experimental.
*/
export const bitbucketProvider: RepositoryProvider = {
id: "bitbucket",
name: "Bitbucket",
defaultHost: "bitbucket.org",
hosts: ["bitbucket.org"],
apiBase: () => API,
async releases(ref, ctx, count = 30) {
const headers = { Accept: "application/json", ...authOf(ctx.token) };
const fail = (response: Response) => bitbucketError(response, Boolean(ctx.token?.trim()));
const downloads: RawDownload[] = [];
const [workspace = "", slug = ""] = ref.repository.split("/");
const repository = `${API}/repositories/${encodeURIComponent(workspace)}/${encodeURIComponent(slug)}`;
let next: string | undefined = `${repository}/downloads?pagelen=100`;
while (next) {
const response = await ctx.fetch(next, { headers });
if (response.status === 404) throw new ApiError(404, "That repository wasn't found on Bitbucket.");
if (!response.ok) throw fail(response);
const page = (await response.json()) as RawPage;
downloads.push(...(page.values ?? []));
next = page.next;
}
const byVersion = new Map<string, RawDownload[]>();
for (const download of downloads) {
if (!download.links?.self?.href) continue;
const version = bitbucketVersion(download.name);
byVersion.set(version, [...(byVersion.get(version) ?? []), download]);
}
return [...byVersion.entries()]
.map(([version, files]): Release => {
const releasedAt = Math.max(...files.map((f) => Math.max(0, Date.parse(f.created_on ?? "") || 0)));
return {
id: version,
version,
releasedAt,
prerelease: /(?:^|[-_.])(?:alpha|beta|rc|pre|dev)/i.test(version),
assets: files.map((f, i) => ({
id: `${version}-${i}`,
url: f.links!.self!.href!,
filename: f.name,
...inferPlatform(f.name),
format: f.name.split(".").pop() ?? "unknown",
...(f.size ? { size: f.size } : {}),
})),
};
})
.sort((a, b) => b.releasedAt - a.releasedAt || b.version.localeCompare(a.version, undefined, { numeric: true }))
.slice(0, count);
},
async readme(ref, ctx) {
const headers = { Accept: "text/plain", ...authOf(ctx.token) };
const fail = (response: Response) => bitbucketError(response, Boolean(ctx.token?.trim()));
const [workspace = "", slug = ""] = ref.repository.split("/");
for (const file of ["README.md", "README.rst", "README", "README.txt", "readme.md"]) {
const response = await ctx.fetch(
`${API}/repositories/${encodeURIComponent(workspace)}/${encodeURIComponent(slug)}/src/HEAD/${encodeURIComponent(file)}`,
{ headers },
);
if (response.ok) {
return {
markdown: await response.text(),
rawBase: `https://bitbucket.org/${ref.repository}/raw/HEAD/`,
htmlBase: `https://bitbucket.org/${ref.repository}/src/HEAD/`,
};
}
if (response.status !== 404) throw fail(response);
}
return null;
},
webUrl: (ref) => `https://bitbucket.org/${ref.repository}`,
token: {
auth: "basic",
label: "Bitbucket app password",
createUrl: () => "https://bitbucket.org/account/settings/app-passwords/new",
},
};
function authOf(token?: string): Record<string, string> {
return token?.trim() ? { Authorization: `Basic ${btoa(token.trim())}` } : {};
}
+79
View File
@@ -0,0 +1,79 @@
import { ApiError } from "../errors";
import { inferPlatform } from "../platform";
import type { Architecture, Os, Release } from "../index";
import type { RepositoryProvider, RepositoryRef } from "./types";
/** A release feed: one JSON file a project publishes, for hosts with no release API. */
type FeedRelease = {
version: string;
releasedAt?: string | number;
prerelease?: boolean;
notes?: string;
assets: { name: string; url: string; size?: number; sha256?: string; os?: Os; architecture?: Architecture; format?: string }[];
};
type Feed = { releases?: FeedRelease[] };
const feedUrl = (ref: RepositoryRef) => `https://${hostOf(ref)}/${ref.repository}`;
/**
* A JSON release feed, for a project that publishes its files itself:
*
* ```json
* { "releases": [{ "version": "1.2.3", "releasedAt": "2026-01-01T00:00:00Z",
* "assets": [{ "name": "app-linux-x64.zip", "url": "https://…", "sha256": "…" }] }] }
* ```
*/
export const feedProvider: RepositoryProvider = {
id: "feed",
name: "Release feed",
anyHost: true,
hosts: [],
apiBase: () => "",
async releases(ref, ctx) {
const response = await ctx.fetch(feedUrl(ref), { headers: { Accept: "application/json" } });
if (response.status === 404) throw new ApiError(404, "That release feed wasn't found.");
if (!response.ok) throw new ApiError(response.status, `The release feed answered ${response.status}. Try again later.`);
const feed = (await response.json().catch(() => null)) as Feed | null;
if (!feed || !Array.isArray(feed.releases)) throw new ApiError(422, "That file isn't a release feed. It needs a releases list.");
return feed.releases
.filter((r) => r && typeof r.version === "string" && Array.isArray(r.assets))
.map((r): Release => {
// A number under a billion is Unix seconds; larger ones are already milliseconds.
const releasedAt =
typeof r.releasedAt === "number"
? r.releasedAt < 1_000_000_000_000
? r.releasedAt * 1000
: r.releasedAt
: Date.parse(r.releasedAt ?? "") || 0;
return {
id: r.version,
version: r.version,
releasedAt,
prerelease: Boolean(r.prerelease),
notes: r.notes,
assets: r.assets
.filter((a) => a && typeof a.name === "string" && typeof a.url === "string")
.map((a, i) => {
const inferred = inferPlatform(a.name);
return {
id: String(i),
url: a.url,
filename: a.name,
os: a.os ?? inferred.os,
architecture: a.architecture ?? inferred.architecture,
format: a.format ?? a.name.split(".").pop() ?? "unknown",
...(a.size ? { size: a.size } : {}),
...(/^[0-9a-f]{64}$/i.test(a.sha256 ?? "") ? { checksum: `sha256:${a.sha256!.toLowerCase()}` } : {}),
};
}),
};
})
.filter((r) => r.assets.length > 0)
.sort((a, b) => b.releasedAt - a.releasedAt || b.version.localeCompare(a.version, undefined, { numeric: true }));
},
webUrl: (ref) => `https://${hostOf(ref)}`,
};
function hostOf(ref: RepositoryRef): string {
return ref.host ?? "";
}
+149
View File
@@ -0,0 +1,149 @@
import { ApiError } from "../errors";
import { inferPlatform } from "../platform";
import type { Release } from "../index";
import { refusal } from "./refusal";
import type { RepositoryProvider, RepositoryRef } from "./types";
/** Gitea, Forgejo and Codeberg share this API; Gogs is close enough for releases. */
type RawRelease = {
tag_name: string;
name?: string;
body?: string;
draft?: boolean;
prerelease?: boolean;
created_at?: string;
published_at?: string;
assets?: { id: number; name: string; size?: number; browser_download_url: string }[];
};
const time = (value?: string): number => {
const at = Date.parse(value ?? "") || 0;
return at > 0 ? at : 0;
};
const fromGitea = (r: RawRelease): Release => ({
id: r.tag_name,
version: r.tag_name,
releasedAt: time(r.published_at) || time(r.created_at),
prerelease: Boolean(r.prerelease),
notes: r.body,
assets: (r.assets ?? []).map((a) => ({
id: String(a.id),
url: a.browser_download_url,
filename: a.name,
...inferPlatform(a.name),
format: a.name.split(".").pop() ?? "unknown",
...(a.size ? { size: a.size } : {}),
})),
});
const splitRepository = (repository: string): [string, string] => {
const [owner = "", name = ""] = repository.split("/");
return [owner, name];
};
const giteaError = (response: Response, token: boolean, host: string) => refusal(response, token, host, "x-ratelimit");
/**
* Releases from a Gitea or Forgejo instance (codeberg.org among them). Its
* API follows GitHub's release shape, but it publishes no per-file checksum,
* so these installs are unchecked like GitLab's.
*/
export const giteaProvider: RepositoryProvider = {
id: "gitea",
name: "Gitea / Forgejo",
hosts: ["codeberg.org", "gitea.com", "git.ryujinx.app", "git.eden-emu.dev", "try.gitea.io"],
anyHost: true,
apiBase: (host) => `https://${host}/api/v1`,
async releases(ref, ctx, count = 30) {
const host = hostOf(ref);
const base = giteaProvider.apiBase(host);
const [owner, name] = splitRepository(ref.repository);
const headers = { Accept: "application/json", ...authOf(ctx.token) };
const fail = (response: Response) => giteaError(response, Boolean(ctx.token?.trim()), host);
const perPage = Math.min(count, 50);
const raw: RawRelease[] = [];
for (let page = 1; raw.length < count; page++) {
const response = await ctx.fetch(
`${base}/repos/${encodeURIComponent(owner)}/${encodeURIComponent(name)}/releases?limit=${perPage}&page=${page}`,
{ headers },
);
if (response.status === 404) throw new ApiError(404, `That repository wasn't found on ${host}.`);
if (!response.ok) throw fail(response);
const batch = (await response.json()) as RawRelease[];
if (!Array.isArray(batch) || batch.length === 0) break;
raw.push(...batch);
if (batch.length < perPage) break;
}
if (raw.length >= count && raw.every((r) => r.prerelease || r.draft)) {
// A run of betas shouldn't hide the stable release players should get.
const latest = await ctx.fetch(`${base}/repos/${encodeURIComponent(owner)}/${encodeURIComponent(name)}/releases/latest`, { headers });
if (latest.ok) raw.unshift((await latest.json()) as RawRelease);
}
return raw
.filter((r) => !r.draft && r.tag_name)
// Stable releases first: the first one is what a player gets.
.sort((a, b) => Number(Boolean(a.prerelease)) - Number(Boolean(b.prerelease)))
.slice(0, count)
.map(fromGitea);
},
async readme(ref, ctx) {
const host = hostOf(ref);
const base = giteaProvider.apiBase(host);
const [owner, name] = splitRepository(ref.repository);
const headers = { Accept: "text/plain", ...authOf(ctx.token) };
const fail = (response: Response) => giteaError(response, Boolean(ctx.token?.trim()), host);
// Gitea's raw endpoint serves the file as it is; try the names projects use.
for (const file of ["README.md", "README.rst", "README.txt", "README", "readme.md"]) {
const response = await ctx.fetch(`${base}/repos/${encodeURIComponent(owner)}/${encodeURIComponent(name)}/raw/${encodeURIComponent(file)}`, { headers });
if (response.ok) {
return {
markdown: await response.text(),
rawBase: `https://${host}/${ref.repository}/raw/HEAD/`,
htmlBase: `https://${host}/${ref.repository}/src/HEAD/`,
};
}
if (response.status !== 404) throw fail(response);
}
return null;
},
async rateLimit(ref, ctx) {
const host = hostOf(ref);
const base = giteaProvider.apiBase(host);
const [owner, name] = splitRepository(ref.repository);
const response = await ctx.fetch(`${base}/repos/${encodeURIComponent(owner)}/${encodeURIComponent(name)}`, {
headers: { Accept: "application/json", ...authOf(ctx.token) },
});
if (!response.ok) return null;
// Codeberg and some Forgejo versions use RateLimit; older Gitea uses X-RateLimit.
const number = (...names: string[]) => {
for (const name of names) {
const value = Number(response.headers.get(name));
if (Number.isFinite(value) && value > 0) return value;
}
return undefined;
};
const limit = number("x-ratelimit-limit", "ratelimit-limit");
const remaining = number("x-ratelimit-remaining", "ratelimit-remaining");
const reset = number("x-ratelimit-reset", "ratelimit-reset");
return limit && remaining !== undefined && reset ? { limit, remaining, resetAt: reset * 1000 } : null;
},
webUrl: (ref) => `https://${hostOf(ref)}/${ref.repository}`,
token: {
auth: "token",
label: "Gitea token",
createUrl: (ref) => `https://${hostOf(ref)}/user/settings/applications`,
},
};
function hostOf(ref: RepositoryRef): string {
if (!ref.host) throw new Error("A Gitea repository needs its host.");
return ref.host;
}
function authOf(token?: string): Record<string, string> {
return token?.trim() ? { Authorization: `token ${token.trim()}` } : {};
}
/** Gitea's own public instance, for tests and the known-host list. */
export const GITEA_HOSTS = giteaProvider.hosts;
+123
View File
@@ -0,0 +1,123 @@
import { ApiError } from "../errors";
import { inferPlatform } from "../platform";
import type { RateLimit, Readme, Release } from "../index";
import { refusal } from "./refusal";
import type { RepositoryProvider, RepositoryRef } from "./types";
/** Without a token GitHub allows a network 60 requests an hour (a token, 5,000). */
const githubError = (response: Response, token: boolean) => refusal(response, token, "GitHub", "x-ratelimit");
/** A release as GitHub's API gives it. */
type RawRelease = {
tag_name: string;
draft: boolean;
prerelease: boolean;
published_at: string;
body?: string;
assets: { id: number; name: string; browser_download_url: string; size: number; digest?: string }[];
};
const fromGithub = (r: RawRelease): Release => ({
id: r.tag_name,
version: r.tag_name,
releasedAt: Date.parse(r.published_at) || 0,
prerelease: r.prerelease,
notes: r.body,
assets: r.assets.map((a) => ({
id: String(a.id),
url: a.browser_download_url,
filename: a.name,
...inferPlatform(a.name),
format: a.name.split(".").pop() ?? "unknown",
size: a.size,
...(/^sha256:[0-9a-f]{64}$/i.test(a.digest ?? "") ? { checksum: a.digest!.toLowerCase() } : {}),
})),
});
/**
* Releases straight from GitHub, for custom apps the catalog doesn't list.
* Nobody has checked these; GitHub's own SHA-256 digest still guards the
* download when it has one. With the player's token, GitHub counts requests
* against it rather than the network.
*/
export function createGithub(base = "https://api.github.com", token?: string, fetchImpl: typeof globalThis.fetch = globalThis.fetch) {
const auth: Record<string, string> = token?.trim() ? { Authorization: `Bearer ${token.trim()}` } : {};
const fail = (response: Response) => githubError(response, Boolean(auth.Authorization));
const host = (() => {
try {
return new URL(base).host;
} catch {
return "github.com";
}
})();
return {
/**
* Every release, newest first, except drafts; up to `count` of them, stable
* ones first. When those are all pre-releases and there are more, the
* repository's latest release is added in front, so a run of betas doesn't
* hide the stable release players should get.
*/
async releases(repository: string, count = 10): Promise<Release[]> {
const headers = { Accept: "application/vnd.github+json", ...auth };
const response = await fetchImpl(`${base}/repos/${repository}/releases?per_page=${count}`, { headers });
if (response.status === 404) throw new ApiError(404, "That repository wasn't found on GitHub.");
if (!response.ok) throw fail(response);
const raw: RawRelease[] = await response.json();
if (raw.length >= count && raw.every((r) => r.prerelease || r.draft)) {
// A 404 when the repository has no stable release at all.
const latest = await fetchImpl(`${base}/repos/${repository}/releases/latest`, { headers });
if (latest.ok) raw.unshift(await latest.json());
}
return raw
.filter((r) => !r.draft && r.tag_name)
// Stable releases first: the first one is what a player gets.
.sort((a, b) => Number(a.prerelease) - Number(b.prerelease))
.map(fromGithub);
},
/** The repository's README, or null when it has none. */
async readme(repository: string): Promise<Readme | null> {
const response = await fetchImpl(`${base}/repos/${repository}/readme`, { headers: { Accept: "application/vnd.github.raw", ...auth } });
if (response.status === 404) return null;
if (!response.ok) throw fail(response);
// github.com serves relative images from raw.githubusercontent.com; a GitHub Enterprise serves them from itself.
const rawBase = host === "api.github.com" ? `https://raw.githubusercontent.com/${repository}/HEAD/` : `https://${host}/${repository}/raw/HEAD/`;
return {
markdown: await response.text(),
rawBase,
htmlBase: `https://${host === "api.github.com" ? "github.com" : host}/${repository}/blob/HEAD/`,
};
},
/** The hourly limit, for the token if there is one; asking doesn't count against it. A 401 ApiError when GitHub refuses the token. */
async rateLimit(): Promise<RateLimit> {
const response = await fetchImpl(`${base}/rate_limit`, { headers: { Accept: "application/vnd.github+json", ...auth } });
if (!response.ok) throw fail(response);
const { resources } = (await response.json()) as { resources: { core: { limit: number; remaining: number; reset: number } } };
return { limit: resources.core.limit, remaining: resources.core.remaining, resetAt: resources.core.reset * 1000 };
},
};
}
export type Github = ReturnType<typeof createGithub>;
export const githubProvider: RepositoryProvider = {
id: "github",
name: "GitHub",
defaultHost: "github.com",
hosts: ["github.com"],
anyHost: true,
apiBase: (host) => (host === "github.com" ? "https://api.github.com" : `https://${host}/api/v3`),
releases: (ref, ctx, count) => createGithub(githubProvider.apiBase(hostOf(ref)), ctx.token, ctx.fetch).releases(ref.repository, count),
readme: (ref, ctx) => createGithub(githubProvider.apiBase(hostOf(ref)), ctx.token, ctx.fetch).readme(ref.repository),
rateLimit: (ref, ctx) => createGithub(githubProvider.apiBase(hostOf(ref)), ctx.token, ctx.fetch).rateLimit(),
webUrl: (ref) => `https://${hostOf(ref)}/${ref.repository}`,
token: {
auth: "bearer",
label: "GitHub token",
createUrl: (ref) => `https://${hostOf(ref)}/settings/tokens/new?description=Quiver+Launcher`,
},
};
/** A ref's host: its own, or GitHub's. */
function hostOf(ref: RepositoryRef): string {
return ref.host ?? githubProvider.defaultHost!;
}
+162
View File
@@ -0,0 +1,162 @@
import { ApiError } from "../errors";
import { inferPlatform } from "../platform";
import type { RateLimit, Readme, Release } from "../index";
import { refusal } from "./refusal";
import type { RepositoryProvider, RepositoryRef } from "./types";
/** Without a token GitLab allows a network 500 requests a minute on gitlab.com (a token, 2,000). */
const gitlabError = (response: Response, token: boolean) => refusal(response, token, "GitLab", "ratelimit");
/**
* What GitLab's answer says about the request limit, as the Rust side reads it.
* The browser can't see GitLab's rate-limit headers (GitLab doesn't expose
* them to pages), so the launcher asks the Rust side, which can.
*/
export type GitlabLimit = { status: number; limit?: number | null; remaining?: number | null; reset?: number | null; retryAfter?: number | null };
/** Reads a GitLab URL's status and rate-limit headers, the Rust side's way. */
export type GitlabLimitReader = (url: string, token: string | null) => Promise<GitlabLimit>;
/**
* Releases on GitLab, for catalog apps hosted there. GitLab gives no checksums.
* With the player's token, GitLab counts requests against it rather than the
* network.
*/
export function createGitlab(
base = "https://gitlab.com/api/v4",
token?: string,
readLimit?: GitlabLimitReader,
fetchImpl: typeof globalThis.fetch = globalThis.fetch,
) {
const auth: Record<string, string> = token?.trim() ? { "PRIVATE-TOKEN": token.trim() } : {};
const fail = (response: Response) => gitlabError(response, Boolean(auth["PRIVATE-TOKEN"]));
// `/user` checks a token; a project list is public, so it still answers without one.
const limitUrl = `${base}/${auth["PRIVATE-TOKEN"] ? "user" : "projects?per_page=1"}`;
/** GitLab's answer to `limitUrl` as the Rust side read it, headers and all. */
const readByRust = async (reader: GitlabLimitReader) => {
const { status, limit, remaining, reset, retryAfter } = await reader(limitUrl, auth["PRIVATE-TOKEN"] ?? null);
const headers = new Headers();
if (limit != null) headers.set("ratelimit-limit", String(limit));
if (remaining != null) headers.set("ratelimit-remaining", String(remaining));
if (reset != null) headers.set("ratelimit-reset", String(reset));
if (retryAfter != null) headers.set("retry-after", String(retryAfter));
return new Response(null, { status, headers });
};
/**
* When the page can't tell why GitLab refused (it can't see the rate-limit
* headers, and a refusal may come without CORS headers at all), the Rust side
* asks again: its answer when GitLab is limiting requests, otherwise null.
*/
const limited = async (): Promise<Response | null> => {
if (!readLimit) return null;
const response = await readByRust(readLimit).catch(() => null);
return response && (response.status === 403 || response.status === 429) ? response : null;
};
const origin = (() => {
try {
return new URL(base).origin;
} catch {
return "https://gitlab.com";
}
})();
return {
async releases(repository: string, count = 30): Promise<Release[]> {
let response: Response;
try {
response = await fetchImpl(`${base}/projects/${encodeURIComponent(repository)}/releases?per_page=${count}`, { headers: auth });
} catch (e) {
const refused = await limited();
if (refused) throw fail(refused);
throw e;
}
if (response.status === 404) throw new ApiError(404, "That repository wasn't found on GitLab.");
if (response.status === 403 || response.status === 429) throw fail((await limited()) ?? response);
if (!response.ok) throw fail(response);
type Raw = {
tag_name: string;
released_at: string;
upcoming_release?: boolean;
description?: string;
assets?: { links?: { id: number; name: string; url: string; direct_asset_url?: string; filepath?: string }[] };
};
const raw: Raw[] = await response.json();
return raw.map((r) => ({
id: r.tag_name,
version: r.tag_name,
releasedAt: Date.parse(r.released_at) || 0,
prerelease: Boolean(r.upcoming_release),
notes: r.description,
assets: (r.assets?.links ?? []).map((a) => {
// A link's name is its title ("Windows build"); the file's own name is in its path.
const last = (s?: string) => (s ? decodeURIComponent(s.split(/[?#]/)[0].split("/").pop() ?? "") : "");
const filename = [last(a.filepath), last(a.direct_asset_url), last(a.url)].find((f) => /\.[a-z0-9]{1,8}$/i.test(f)) ?? a.name;
return {
id: String(a.id),
url: a.direct_asset_url ?? a.url,
filename,
...inferPlatform(`${filename} ${a.name}`),
format: filename.split(".").pop() ?? "unknown",
};
}),
}));
},
/** The repository's README, or null when it has none. */
async readme(repository: string): Promise<Readme | null> {
const path = `${base}/projects/${encodeURIComponent(repository)}/repository/files/README.md/raw?ref=HEAD`;
let response: Response;
try {
response = await fetchImpl(path, { headers: auth });
} catch (e) {
const refused = await limited();
if (refused) throw fail(refused);
throw e;
}
if (response.status === 404) return null;
if (response.status === 403 || response.status === 429) throw fail((await limited()) ?? response);
if (!response.ok) throw fail(response);
return {
markdown: await response.text(),
rawBase: `${origin}/${repository}/-/raw/HEAD/`,
htmlBase: `${origin}/${repository}/-/blob/HEAD/`,
};
},
/**
* How many requests GitLab allows, how many are left, and when it starts
* again. Null when GitLab doesn't say, as some instances don't. Asking
* with a token checks it: a 401 ApiError when GitLab refuses it. Unlike
* GitHub's, asking counts as one request.
*/
async rateLimit(): Promise<RateLimit | null> {
// The browser can't read GitLab's rate-limit headers, so the Rust side does when it can.
const response = readLimit ? await readByRust(readLimit) : await fetchImpl(limitUrl, { headers: auth });
if (!response.ok) throw fail(response);
const limit = Number(response.headers.get("ratelimit-limit"));
const remaining = Number(response.headers.get("ratelimit-remaining"));
const resetAt = Number(response.headers.get("ratelimit-reset")) * 1000;
return limit > 0 && remaining >= 0 && resetAt > 0 ? { limit, remaining, resetAt } : null;
},
};
}
export type Gitlab = ReturnType<typeof createGitlab>;
export const gitlabProvider: RepositoryProvider = {
id: "gitlab",
name: "GitLab",
defaultHost: "gitlab.com",
hosts: ["gitlab.com"],
anyHost: true,
apiBase: (host) => `https://${host}/api/v4`,
releases: (ref, ctx, count) => createGitlab(gitlabProvider.apiBase(hostOf(ref)), ctx.token, undefined, ctx.fetch).releases(ref.repository, count),
readme: (ref, ctx) => createGitlab(gitlabProvider.apiBase(hostOf(ref)), ctx.token, undefined, ctx.fetch).readme(ref.repository),
rateLimit: (ref, ctx) => createGitlab(gitlabProvider.apiBase(hostOf(ref)), ctx.token, undefined, ctx.fetch).rateLimit(),
webUrl: (ref) => `https://${hostOf(ref)}/${ref.repository}`,
token: {
auth: "private-token",
label: "GitLab token",
createUrl: (ref) => `https://${hostOf(ref)}/-/user_settings/personal_access_tokens?name=Quiver+Launcher&scopes=read_api`,
},
};
function hostOf(ref: RepositoryRef): string {
return ref.host ?? gitlabProvider.defaultHost!;
}
+7
View File
@@ -0,0 +1,7 @@
export * from "./types";
export * from "./registry";
export * from "./github";
export * from "./gitlab";
export * from "./gitea";
export * from "./bitbucket";
export * from "./feed";
+26
View File
@@ -0,0 +1,26 @@
import { ApiError } from "../errors";
/**
* Why a release host refused, worded for players. Without a token each allows
* a network fewer requests, and its answer says when that starts again, in
* `ratelimit-*` headers (GitHub's are prefixed `x-`).
*/
export function refusal(response: Response, token: boolean, name: string, prefix: "x-ratelimit" | "ratelimit"): ApiError {
const { status, headers } = response;
if (status === 401 && token) return new ApiError(status, `${name} didn't accept your ${name} token. Change or remove it in Settings.`);
if (status === 403 || status === 429) {
const reset = Number(headers.get(`${prefix}-reset`));
if (headers.get(`${prefix}-remaining`) === "0" && reset > 0) {
const at = new Date(reset * 1000).toLocaleTimeString([], { hour: "numeric", minute: "2-digit" });
return new ApiError(
status,
token
? `Your ${name} token's limit of requests is used up until ${at}. Try again then.`
: `${name}'s limit of requests from this network is used up until ${at}. Try again then, or add a ${name} token in Settings to raise the limit.`,
);
}
const wait = Number(headers.get("retry-after"));
if (wait > 0) return new ApiError(status, `${name} is limiting requests from this network. Try again in ${Math.ceil(wait / 60)} min.`);
}
return new ApiError(status, `${name} answered ${status}. Try again later.`);
}
+255
View File
@@ -0,0 +1,255 @@
import { bitbucketProvider } from "./bitbucket";
import { feedProvider } from "./feed";
import { giteaProvider } from "./gitea";
import { githubProvider } from "./github";
import { gitlabProvider } from "./gitlab";
import type { ParsedRepository, ProviderTokenHelp, Providers, RepositoryProvider, RepositoryRef } from "./types";
/** Every release host the launcher knows, in the order its add-repository picker lists them. */
export const PROVIDERS: RepositoryProvider[] = [githubProvider, gitlabProvider, giteaProvider, bitbucketProvider, feedProvider];
const byId = new Map(PROVIDERS.map((p) => [p.id, p]));
/** Hosts that belong to a provider without asking. */
const knownHosts = new Map<string, string>();
for (const provider of PROVIDERS) for (const host of provider.hosts) knownHosts.set(host.toLowerCase(), provider.id);
/** A provider's default host, when it has one. */
export const defaultHost = (provider: string): string | undefined => byId.get(provider)?.defaultHost;
/** A ref's host: its own, or its provider's default. */
export function hostOf(ref: RepositoryRef): string {
const host = ref.host ?? defaultHost(ref.provider);
if (!host) throw new Error(`No host for a ${ref.provider} repository.`);
return host;
}
/** The provider a ref names, when the launcher has an adapter for it. */
export const providerFor = (ref: RepositoryRef): RepositoryProvider | undefined => byId.get(ref.provider);
/** A provider by id, for the add-repository picker and tests. */
export const providerById = (id: string): RepositoryProvider | undefined => byId.get(id);
/** The provider a host belongs to, from the known hosts; undefined when it isn't known. */
export const providerForHost = (host: string): RepositoryProvider | undefined => {
const id = knownHosts.get(host.toLowerCase());
return id ? byId.get(id) : undefined;
};
/** GitLab's project paths can have subgroups; these are the pages after a project, not part of its name. */
const GITLAB_RESERVED = new Set([
"-",
"activity",
"archive",
"artifacts",
"badges",
"blob",
"branches",
"cluster",
"commits",
"compare",
"container_registry",
"contributors",
"deployments",
"designs",
"discussions",
"edit",
"environments",
"error_tracking",
"feature_flags",
"forks",
"graphs",
"hooks",
"incidents",
"issues",
"iterations",
"jobs",
"labels",
"merge_requests",
"milestones",
"network",
"packages",
"pipelines",
"project_members",
"raw",
"registry",
"releases",
"remote_mirrors",
"repository",
"requirements",
"resource_groups",
"runners",
"schedules",
"security",
"services",
"settings",
"snippets",
"starrers",
"tags",
"terraform",
"test_cases",
"tree",
"uploads",
"vulnerabilities",
"wikis",
]);
/** The path of a GitLab project: its group(s) and name, without the page after it. */
const gitlabPath = (path: string): string => {
const parts = path.split("/").filter(Boolean);
const end = parts.findIndex((part) => GITLAB_RESERVED.has(part.toLowerCase()));
return (end < 0 ? parts : parts.slice(0, end)).join("/");
};
/** The first two parts of a GitHub, Gitea or Bitbucket path: owner and repository. */
const ownerAndRepo = (path: string): string => path.split("/").filter(Boolean).slice(0, 2).join("/");
/** A path without the `/-/` pages GitLab copies into a project address. */
const withoutGitlabPages = (path: string): string => path.replace(/\/-\/.*$/, "");
const isHost = (part: string): boolean => part.includes(".") || part.includes(":") || part.toLowerCase() === "localhost";
const clean = (input: string): string =>
input
.trim()
.replace(/^git\+/i, "")
.replace(/^(?:https?:\/\/)?(?:www\.)?/i, "")
.replace(/[?#].*$/, "")
.replace(/\/+$/, "");
/**
* A repository from what a player pastes: a GitHub, GitLab, Gitea/Forgejo,
* Bitbucket or other forge address (any page of it), or "owner/name" for
* GitHub. An unknown host comes back as "unknown" for detectProvider to name;
* `forced` picks the adapter when the player chose one themselves.
*/
export function parseRepository(input: string, forced?: string): ParsedRepository | null {
if (forced === "feed") {
// A feed is a file, not a repository: keep its path and query.
const withHost = input
.trim()
.replace(/^git\+/i, "")
.replace(/^(?:https?:\/\/)?(?:www\.)?/i, "");
const slash = withHost.indexOf("/");
if (slash <= 0) return null;
const host = withHost.slice(0, slash).toLowerCase();
const repository = withHost.slice(slash + 1).replace(/^\/+/, "");
// A feed is a file on a host, not a bare "owner/repo".
return host.includes(".") && repository ? { provider: "feed", host, repository } : null;
}
const text = clean(input);
if (!text) return null;
const slash = text.indexOf("/");
const first = slash < 0 ? text : text.slice(0, slash);
// A bare "owner.name/repo" is a GitHub owner, not a host: a host needs a known name, a port,
// localhost, or the owner/repository path after it.
const hasHost = slash > 0 && (knownHosts.has(first.toLowerCase()) || (isHost(first) && text.split("/").length >= 3));
const host = (hasHost ? first : forced ? defaultHost(forced) : githubProvider.defaultHost)?.toLowerCase();
if (!host) return null;
const rawPath = hasHost ? text.slice(slash + 1) : text;
const path = withoutGitlabPages(rawPath).replace(/^\/+|\/+$/g, "").replace(/\.git$/i, "");
const provider = forced ?? knownHosts.get(host) ?? "unknown";
if (!path || path.split("/").some((part) => part === "..")) return null;
if (provider === "gitlab") {
const repository = gitlabPath(path);
return repository.includes("/") ? { provider, host, repository } : null;
}
if (provider === "github" || provider === "gitea" || provider === "bitbucket") {
const repository = ownerAndRepo(path);
return repository.includes("/") ? { provider, host, repository } : null;
}
// An unknown host: keep the path whole, as it may be a GitLab subgroup.
return { provider: "unknown", host, repository: gitlabPath(path) || path };
}
/** "owner/repo" from a GitHub address or the bare name; null if it isn't one. */
export function githubRepository(input: string): string | null {
const parsed = parseRepository(input);
return parsed && parsed.provider === "github" && parsed.host === githubProvider.defaultHost ? parsed.repository : null;
}
/** The provider a ref's host uses, asking the host when it isn't one the launcher knows. */
const detected = new Map<string, string | null>();
export async function detectProvider(host: string, fetchImpl: typeof globalThis.fetch = globalThis.fetch): Promise<string | null> {
const key = host.toLowerCase();
const known = knownHosts.get(key);
if (known) return known;
if (detected.has(key)) return detected.get(key)!;
const gitea = `https://${key}/api/v1/version`;
const gitlab = `https://${key}/api/v4/projects?per_page=1`;
const github = `https://${key}/api/v3/meta`;
const probe = async (url: string, ok: (json: unknown, response: Response) => boolean) => {
try {
const response = await fetchImpl(url, { headers: { Accept: "application/json" } });
if (response.ok) {
const json = await response.json().catch(() => null);
return ok(json, response) ? true : false;
}
// A GitLab that wants a token still names itself in its rate-limit header.
return response.status === 401 && response.headers.get("ratelimit-name")?.includes("api") ? true : false;
} catch {
return false;
}
};
const [isGitea, isGitlab] = await Promise.all([
probe(gitea, (json) => typeof (json as { version?: unknown } | null)?.version === "string"),
probe(gitlab, (json) => Array.isArray(json)),
]);
if (isGitea) {
detected.set(key, "gitea");
return "gitea";
}
if (isGitlab) {
detected.set(key, "gitlab");
return "gitlab";
}
if (await probe(github, (json) => typeof (json as { installed_version?: unknown } | null)?.installed_version === "string")) {
detected.set(key, "github");
return "github";
}
// A host that couldn't be named is asked again next time: it may be offline now.
return null;
}
/**
* The providers, with the player's tokens, that the launcher asks for the
* apps it added. `tokens` is keyed by host; `fetch` is the browser's fetch,
* the Rust provider proxy, or a test's.
*/
export function createProviders({ tokens, fetch: given }: { tokens: Record<string, string>; fetch?: typeof globalThis.fetch }): Providers {
const fetchImpl = given ?? globalThis.fetch;
const ctxFor = (ref: RepositoryRef) => ({ fetch: fetchImpl, token: tokens[hostOf(ref)] });
const need = (ref: RepositoryRef) => {
const provider = byId.get(ref.provider);
if (!provider) throw new Error(`No provider for ${ref.provider}.`);
return provider;
};
return {
releases(ref, count) {
return need(ref).releases(ref, ctxFor(ref), count);
},
async readme(ref) {
const provider = need(ref);
return provider.readme ? provider.readme(ref, ctxFor(ref)) : null;
},
async rateLimit(ref) {
const provider = need(ref);
return provider.rateLimit ? provider.rateLimit(ref, ctxFor(ref)) : null;
},
webUrl: (ref) => need(ref).webUrl(ref),
tokenHelp: (ref): ProviderTokenHelp | undefined => need(ref).token,
provider: (ref) => providerFor(ref),
detect: (host) => detectProvider(host, fetchImpl),
};
}
/** Everything a caller needs to turn a parsed ref into a stored one. */
export const toRef = (parsed: ParsedRepository): RepositoryRef => ({
provider: parsed.provider,
...(parsed.host !== defaultHost(parsed.provider) ? { host: parsed.host } : {}),
repository: parsed.repository,
});
/** The providers a player can pick by hand, for the add-repository flow. */
export const providerChoices = PROVIDERS.filter((p) => p.id !== "feed").map((p) => ({ id: p.id, name: p.name, anyHost: p.anyHost }));
+96
View File
@@ -0,0 +1,96 @@
/**
* A repository a release comes from, and the host that serves it. `host` is
* left out for a provider's own host (github.com, gitlab.com), so library
* keys and stored apps from earlier versions keep their shape.
*/
import type { RateLimit, Readme, Release } from "../index";
export type RepositoryRef = {
/** The adapter's id: "github", "gitlab", "gitea", "bitbucket", "feed". */
provider: string;
/** The web host, when it isn't the provider's default: "codeberg.org", "git.example.com". */
host?: string;
/** "owner/repo" (GitHub, Gitea, Bitbucket), or "group/subgroup/project" (GitLab). */
repository: string;
};
/** A repository as the player pasted it, before an unknown host is detected. */
export type ParsedRepository = {
/** "unknown" when the host isn't known yet; detectProvider names it. */
provider: string;
host: string;
repository: string;
};
/** How a provider's token goes in a request. */
export type ProviderAuth = "bearer" | "token" | "private-token" | "basic";
/** What a provider needs for one call: the transport, and the token saved for its host. */
export type ProviderContext = {
/** The browser's fetch, the Rust provider proxy, or a test's. */
fetch: typeof globalThis.fetch;
/** The player's token for this host, if they saved one. */
token?: string;
};
/** Where the player makes a token, and how it's sent. */
export type ProviderTokenHelp = {
createUrl(ref: RepositoryRef): string;
auth: ProviderAuth;
/** "GitHub token", "Gitea token". */
label: string;
};
/** One release host's API. */
export type RepositoryProvider = {
/** "github", "gitlab", "gitea", "bitbucket", "feed". */
id: string;
/** "GitHub", "GitLab", "Gitea / Forgejo", "Bitbucket", "Release feed". */
name: string;
/** The host a ref without one uses. */
defaultHost?: string;
/** Hosts this provider is known by. */
hosts: string[];
/** Whether the host can be any domain, as a self-hosted forge. */
anyHost?: boolean;
/** The API's address for a host. */
apiBase(host: string): string;
/** This provider's releases, newest first, stable ones first. */
releases(ref: RepositoryRef, ctx: ProviderContext, count?: number): Promise<Release[]>;
/** The repository's README, or null when it has none. */
readme?(ref: RepositoryRef, ctx: ProviderContext): Promise<Readme | null>;
/** The host's request limit, when it says. */
rateLimit?(ref: RepositoryRef, ctx: ProviderContext): Promise<RateLimit | null>;
/** The repository's page on the web. */
webUrl(ref: RepositoryRef): string;
/** How to make and send a token, for providers that take one. */
token?: ProviderTokenHelp;
};
/** The provider a ref names, or undefined when the launcher has no adapter for it. */
export type ProviderRegistry = {
all: RepositoryProvider[];
byId(id: string): RepositoryProvider | undefined;
/** The provider a host belongs to, from the known hosts; undefined when it isn't known. */
forHost(host: string): RepositoryProvider | undefined;
/** The host a ref uses: its own, or its provider's default. */
hostOf(ref: RepositoryRef): string;
};
/** The release hosts, with the player's tokens, that the launcher asks for apps it added. */
export type Providers = {
/** A repository's releases, newest first. */
releases(ref: RepositoryRef, count?: number): Promise<Release[]>;
/** A repository's README, or null when it has none or its host has no readme API. */
readme(ref: RepositoryRef): Promise<Readme | null>;
/** The host's request limit, when it reports one. */
rateLimit(ref: RepositoryRef): Promise<RateLimit | null>;
/** The repository's page on the web. */
webUrl(ref: RepositoryRef): string;
/** How to make and send a token for the ref's host, when the provider takes one. */
tokenHelp(ref: RepositoryRef): ProviderTokenHelp | undefined;
/** The provider a ref names, when the launcher has an adapter for it. */
provider(ref: RepositoryRef): RepositoryProvider | undefined;
/** Names an unknown host's provider ("gitea", "gitlab", "github"), or null when it can't tell. */
detect(host: string): Promise<string | null>;
};
+77 -14
View File
@@ -1192,6 +1192,10 @@ msgstr "Apps, die Quiver herunterlädt und aktualisiert, aus dem Katalog oder ei
msgid "Apps that support it keep their saves and settings in their own folder. Apps you've already installed don't change."
msgstr "Apps, die das unterstützen, behalten ihre Spielstände und Einstellungen im eigenen Ordner. Bereits installierte Apps ändern sich nicht."
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Apps you add from a self-hosted forge, Codeberg, Bitbucket or a release feed use the token you save for that host. A token is kept in this computer's keychain and sent only to the host it belongs to."
msgstr ""
#: ../../apps/launcher/src/github-token.tsx
msgid "Apps you add from GitHub get their releases from GitHub itself, which allows this network 60 requests an hour, or 5,000 with a token. Apps from the catalog don't need one."
msgstr "Apps, die du von GitHub hinzufügst, beziehen ihre Versionen direkt von GitHub, das diesem Netzwerk 60 Anfragen pro Stunde erlaubt, oder 5.000 mit einem Token. Apps aus dem Katalog brauchen keinen."
@@ -1507,6 +1511,7 @@ msgstr "Deine Kopie wird geprüft…"
#: ../../apps/launcher/src/github-token.tsx
#: ../../apps/launcher/src/gitlab-token.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
#: ../../apps/launcher/src/update.tsx
msgid "Checking…"
msgstr "Wird geprüft…"
@@ -1839,6 +1844,7 @@ msgstr "quiverlauncher.com war nicht erreichbar. Prüfe deine Verbindung und ver
#: ../../apps/launcher/src/github-token.tsx
#: ../../apps/launcher/src/gitlab-token.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Couldn't save the token. Try again."
msgstr "Der Token konnte nicht gespeichert werden. Versuch es noch einmal."
@@ -1881,6 +1887,10 @@ msgstr "Cover-Adresse"
msgid "Crashes, poor performance, broken controls or features, or I had to do extra setup this page didn't mention."
msgstr "Abstürze, schlechte Leistung, defekte Steuerung oder Funktionen, oder ich musste Dinge einrichten, die diese Seite nicht erwähnt."
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Create a token"
msgstr ""
#: ../../apps/launcher/src/github-token.tsx
msgid "Create a token on GitHub"
msgstr "Token auf GitHub erstellen"
@@ -1954,6 +1964,10 @@ msgstr "Desktop-Verknüpfung"
msgid "Details"
msgstr "Details"
#: ../../apps/launcher/src/own.tsx
msgid "Detect it"
msgstr ""
#. Tag on a reply from the app's verified developer
#: ../../apps/launcher/src/feedback.tsx
msgid "Developer"
@@ -2144,14 +2158,14 @@ msgstr "E-Mail, Benutzername oder Passwort ist falsch."
msgid "Emulator"
msgstr "Emulator"
#: ../../apps/launcher/src/store.tsx
msgid "Enter a GitHub or GitLab repository: owner/name, or its github.com or gitlab.com address."
msgstr "Gib ein GitHub- oder GitLab-Repository ein: Besitzer/Name oder seine Adresse auf github.com oder gitlab.com."
#: ../../apps/launcher/src/store.tsx
msgid "Enter a name for its folder."
msgstr "Gib einen Namen für den Ordner ein."
#: ../../apps/launcher/src/store.tsx
msgid "Enter a repository: owner/name, or its address on a forge."
msgstr ""
#: ../../apps/launcher/src/own-copy-settings.tsx
msgid "Every console"
msgstr "Jede Konsole"
@@ -2280,8 +2294,8 @@ msgid "Found in {folder}"
msgstr "Gefunden in {folder}"
#: ../../apps/launcher/src/own.tsx
msgid "From GitHub or GitLab"
msgstr "Von GitHub oder GitLab"
msgid "From a git repository"
msgstr ""
#: ../../apps/launcher/src/settings-page.tsx
msgid "From Quiver Launcher 3. Keep this folder until you move its apps."
@@ -2331,6 +2345,10 @@ msgstr "Quiver Launcher holen"
msgid "Getting ready…"
msgstr "Wird vorbereitet…"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "git.example.com"
msgstr ""
#: ../../apps/launcher/src/github-token.tsx
msgid "GitHub didn't accept that token, so it wasn't saved. Check that you copied all of it."
msgstr "GitHub hat diesen Token nicht akzeptiert, deshalb wurde er nicht gespeichert. Prüfe, ob du ihn vollständig kopiert hast."
@@ -2482,6 +2500,10 @@ msgstr "Ausblenden"
msgid "Hide your feedback for {name}"
msgstr "Dein Feedback zu {name} ausblenden"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Host"
msgstr ""
#: ../../apps/launcher/src/app-updates.tsx
msgid "How apps update"
msgstr "Wie Apps aktualisiert werden"
@@ -3887,6 +3909,10 @@ msgstr "Weitere Dateien"
msgid "Other platforms"
msgstr "Andere Plattformen"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Other repository tokens"
msgstr ""
#. Over the list of an app's versions, under Get's own button for its newest
#: ../../apps/launcher/src/detail.tsx
msgid "Other versions"
@@ -3906,8 +3932,8 @@ msgid "Overview"
msgstr "Übersicht"
#: ../../apps/launcher/src/own.tsx
msgid "owner/name, or a github.com or gitlab.com address"
msgstr "besitzer/name oder eine Adresse auf github.com oder gitlab.com"
msgid "owner/name, or a repository address (github.com, gitlab.com, codeberg.org, …)"
msgstr ""
#. Controller hint: what the triggers do in a library in another order, jump a screen at a time
#: ../../apps/launcher/src/spatial.ts
@@ -4186,6 +4212,10 @@ msgstr "Quiver konnte deine Bibliothek nicht öffnen"
msgid "Quiver couldn't show that picture. It may have been moved or deleted."
msgstr "Quiver konnte dieses Bild nicht anzeigen. Es wurde vielleicht verschoben oder gelöscht."
#: ../../apps/launcher/src/store.tsx
msgid "Quiver couldn't tell what kind of forge {host} is. Choose its kind and try again."
msgstr ""
#: ../../apps/launcher/src/own-copy-setup.tsx
msgid "Quiver didn't find one in your game folders."
msgstr "Quiver hat in deinen Spieleordnern keine gefunden."
@@ -4391,6 +4421,10 @@ msgstr "Neu laden"
msgid "Reinstall {installedVersion}"
msgstr "{installedVersion} neu installieren"
#: ../../apps/launcher/src/own.tsx
msgid "Release feed"
msgstr ""
#. Tab of an app's page
#. Which of an app's releases it gets: main releases only, or pre-releases too
#: ../../apps/launcher/src/App.tsx
@@ -4445,6 +4479,7 @@ msgstr "Tag {tag} entfernen"
#: ../../apps/launcher/src/github-token.tsx
#: ../../apps/launcher/src/gitlab-token.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Remove token"
msgstr "Token entfernen"
@@ -4452,6 +4487,7 @@ msgstr "Token entfernen"
#. The GitLab token was removed
#: ../../apps/launcher/src/github-token.tsx
#: ../../apps/launcher/src/gitlab-token.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Removed."
msgstr "Entfernt."
@@ -4582,9 +4618,18 @@ msgstr "Als Playlist speichern"
#: ../../apps/launcher/src/github-token.tsx
#: ../../apps/launcher/src/gitlab-token.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Save token"
msgstr "Token speichern"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Saved."
msgstr ""
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Saved. Requests to {clean} use your token now."
msgstr ""
#: ../../apps/launcher/src/github-token.tsx
msgid "Saved. Requests to GitHub use your token now."
msgstr "Gespeichert. Anfragen an GitHub nutzen jetzt dein Token."
@@ -4598,6 +4643,7 @@ msgid "Saves and settings come too. After that, you can delete your Quiver Launc
msgstr "Spielstände und Einstellungen kommen mit. Danach kannst du deinen Quiver Launcher 3-Ordner löschen."
#: ../../apps/launcher/src/feedback.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Saving…"
msgstr "Wird gespeichert…"
@@ -5236,6 +5282,10 @@ msgstr "Danke, dass du geteilt hast, wie es lief."
msgid "Thanks! A maintainer will take a look."
msgstr "Danke! Ein Maintainer sieht es sich an."
#: ../../apps/launcher/src/store.tsx
msgid "That address isn't a repository on {host}."
msgstr ""
#: ../../apps/launcher/src/store.tsx
msgid "That folder doesn't have an installed app in it."
msgstr "In diesem Ordner ist keine installierte App."
@@ -5423,6 +5473,10 @@ msgstr "Diese App speichert ihre Spielstände möglicherweise in diesem Ordner.
msgid "This app may stop finding its saves and settings, because it will look for them in a different place. Nothing is deleted."
msgstr "Diese App findet ihre Spielstände und Einstellungen möglicherweise nicht mehr, weil sie an einem anderen Ort danach sucht. Es wird nichts gelöscht."
#: ../../apps/launcher/src/own.tsx
msgid "This app stays on this computer: account sync doesn't support this kind of host yet."
msgstr ""
#: ../../apps/launcher/src/store.tsx
msgid "This app's folder can't be moved."
msgstr "Der Ordner dieser App kann nicht verschoben werden."
@@ -5496,6 +5550,14 @@ msgstr "heute"
msgid "Today"
msgstr "Heute"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Token"
msgstr ""
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Token for {host}"
msgstr ""
#: ../../apps/launcher/src/ways-to-play.tsx
msgid "Too few reports"
msgstr "Zu wenige Berichte"
@@ -5858,13 +5920,10 @@ msgstr "Sehr breit, etwa 1920×620. Hinter der Seite der App und bei „Weitersp
msgid "View {version} on {host}"
msgstr "{version} auf {host} ansehen"
#. placeholder {0}: providerName(source.provider, source.host)
#: ../../apps/launcher/src/card-menu.tsx
msgid "View on GitHub"
msgstr "Auf GitHub ansehen"
#: ../../apps/launcher/src/card-menu.tsx
msgid "View on GitLab"
msgstr "Auf GitLab ansehen"
msgid "View on {0}"
msgstr ""
#: ../../apps/launcher/src/App.tsx
#: ../../apps/launcher/src/library.tsx
@@ -5996,6 +6055,10 @@ msgstr "Wo Apps installiert werden"
msgid "Where are your games?"
msgstr "Wo sind deine Spiele?"
#: ../../apps/launcher/src/own.tsx
msgid "Where it's hosted"
msgstr ""
#: ../../apps/launcher/src/settings-page.tsx
msgid "Where your Quiver Launcher 3 apps are, and Quiver's apps folder"
msgstr "Wo deine Apps aus Quiver Launcher 3 liegen, und der App-Ordner von Quiver"
+77 -14
View File
@@ -1192,6 +1192,10 @@ msgstr "Apps Quiver downloads and updates, from the catalog or a repository"
msgid "Apps that support it keep their saves and settings in their own folder. Apps you've already installed don't change."
msgstr "Apps that support it keep their saves and settings in their own folder. Apps you've already installed don't change."
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Apps you add from a self-hosted forge, Codeberg, Bitbucket or a release feed use the token you save for that host. A token is kept in this computer's keychain and sent only to the host it belongs to."
msgstr "Apps you add from a self-hosted forge, Codeberg, Bitbucket or a release feed use the token you save for that host. A token is kept in this computer's keychain and sent only to the host it belongs to."
#: ../../apps/launcher/src/github-token.tsx
msgid "Apps you add from GitHub get their releases from GitHub itself, which allows this network 60 requests an hour, or 5,000 with a token. Apps from the catalog don't need one."
msgstr "Apps you add from GitHub get their releases from GitHub itself, which allows this network 60 requests an hour, or 5,000 with a token. Apps from the catalog don't need one."
@@ -1507,6 +1511,7 @@ msgstr "Checking your copy…"
#: ../../apps/launcher/src/github-token.tsx
#: ../../apps/launcher/src/gitlab-token.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
#: ../../apps/launcher/src/update.tsx
msgid "Checking…"
msgstr "Checking…"
@@ -1839,6 +1844,7 @@ msgstr "Couldn't reach quiverlauncher.com. Check your connection and try again."
#: ../../apps/launcher/src/github-token.tsx
#: ../../apps/launcher/src/gitlab-token.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Couldn't save the token. Try again."
msgstr "Couldn't save the token. Try again."
@@ -1881,6 +1887,10 @@ msgstr "Cover address"
msgid "Crashes, poor performance, broken controls or features, or I had to do extra setup this page didn't mention."
msgstr "Crashes, poor performance, broken controls or features, or I had to do extra setup this page didn't mention."
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Create a token"
msgstr "Create a token"
#: ../../apps/launcher/src/github-token.tsx
msgid "Create a token on GitHub"
msgstr "Create a token on GitHub"
@@ -1954,6 +1964,10 @@ msgstr "Desktop shortcut"
msgid "Details"
msgstr "Details"
#: ../../apps/launcher/src/own.tsx
msgid "Detect it"
msgstr "Detect it"
#. Tag on a reply from the app's verified developer
#: ../../apps/launcher/src/feedback.tsx
msgid "Developer"
@@ -2144,14 +2158,14 @@ msgstr "Email, username or password is incorrect."
msgid "Emulator"
msgstr "Emulator"
#: ../../apps/launcher/src/store.tsx
msgid "Enter a GitHub or GitLab repository: owner/name, or its github.com or gitlab.com address."
msgstr "Enter a GitHub or GitLab repository: owner/name, or its github.com or gitlab.com address."
#: ../../apps/launcher/src/store.tsx
msgid "Enter a name for its folder."
msgstr "Enter a name for its folder."
#: ../../apps/launcher/src/store.tsx
msgid "Enter a repository: owner/name, or its address on a forge."
msgstr "Enter a repository: owner/name, or its address on a forge."
#: ../../apps/launcher/src/own-copy-settings.tsx
msgid "Every console"
msgstr "Every console"
@@ -2280,8 +2294,8 @@ msgid "Found in {folder}"
msgstr "Found in {folder}"
#: ../../apps/launcher/src/own.tsx
msgid "From GitHub or GitLab"
msgstr "From GitHub or GitLab"
msgid "From a git repository"
msgstr "From a git repository"
#: ../../apps/launcher/src/settings-page.tsx
msgid "From Quiver Launcher 3. Keep this folder until you move its apps."
@@ -2331,6 +2345,10 @@ msgstr "Get Quiver Launcher"
msgid "Getting ready…"
msgstr "Getting ready…"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "git.example.com"
msgstr "git.example.com"
#: ../../apps/launcher/src/github-token.tsx
msgid "GitHub didn't accept that token, so it wasn't saved. Check that you copied all of it."
msgstr "GitHub didn't accept that token, so it wasn't saved. Check that you copied all of it."
@@ -2482,6 +2500,10 @@ msgstr "Hide them"
msgid "Hide your feedback for {name}"
msgstr "Hide your feedback for {name}"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Host"
msgstr "Host"
#: ../../apps/launcher/src/app-updates.tsx
msgid "How apps update"
msgstr "How apps update"
@@ -3887,6 +3909,10 @@ msgstr "Other files"
msgid "Other platforms"
msgstr "Other platforms"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Other repository tokens"
msgstr "Other repository tokens"
#. Over the list of an app's versions, under Get's own button for its newest
#: ../../apps/launcher/src/detail.tsx
msgid "Other versions"
@@ -3906,8 +3932,8 @@ msgid "Overview"
msgstr "Overview"
#: ../../apps/launcher/src/own.tsx
msgid "owner/name, or a github.com or gitlab.com address"
msgstr "owner/name, or a github.com or gitlab.com address"
msgid "owner/name, or a repository address (github.com, gitlab.com, codeberg.org, …)"
msgstr "owner/name, or a repository address (github.com, gitlab.com, codeberg.org, …)"
#. Controller hint: what the triggers do in a library in another order, jump a screen at a time
#: ../../apps/launcher/src/spatial.ts
@@ -4186,6 +4212,10 @@ msgstr "Quiver couldn't open your library"
msgid "Quiver couldn't show that picture. It may have been moved or deleted."
msgstr "Quiver couldn't show that picture. It may have been moved or deleted."
#: ../../apps/launcher/src/store.tsx
msgid "Quiver couldn't tell what kind of forge {host} is. Choose its kind and try again."
msgstr "Quiver couldn't tell what kind of forge {host} is. Choose its kind and try again."
#: ../../apps/launcher/src/own-copy-setup.tsx
msgid "Quiver didn't find one in your game folders."
msgstr "Quiver didn't find one in your game folders."
@@ -4391,6 +4421,10 @@ msgstr "Refresh"
msgid "Reinstall {installedVersion}"
msgstr "Reinstall {installedVersion}"
#: ../../apps/launcher/src/own.tsx
msgid "Release feed"
msgstr "Release feed"
#. Tab of an app's page
#. Which of an app's releases it gets: main releases only, or pre-releases too
#: ../../apps/launcher/src/App.tsx
@@ -4445,6 +4479,7 @@ msgstr "Remove tag {tag}"
#: ../../apps/launcher/src/github-token.tsx
#: ../../apps/launcher/src/gitlab-token.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Remove token"
msgstr "Remove token"
@@ -4452,6 +4487,7 @@ msgstr "Remove token"
#. The GitLab token was removed
#: ../../apps/launcher/src/github-token.tsx
#: ../../apps/launcher/src/gitlab-token.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Removed."
msgstr "Removed."
@@ -4582,9 +4618,18 @@ msgstr "Save as playlist"
#: ../../apps/launcher/src/github-token.tsx
#: ../../apps/launcher/src/gitlab-token.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Save token"
msgstr "Save token"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Saved."
msgstr "Saved."
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Saved. Requests to {clean} use your token now."
msgstr "Saved. Requests to {clean} use your token now."
#: ../../apps/launcher/src/github-token.tsx
msgid "Saved. Requests to GitHub use your token now."
msgstr "Saved. Requests to GitHub use your token now."
@@ -4598,6 +4643,7 @@ msgid "Saves and settings come too. After that, you can delete your Quiver Launc
msgstr "Saves and settings come too. After that, you can delete your Quiver Launcher 3 folder."
#: ../../apps/launcher/src/feedback.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Saving…"
msgstr "Saving…"
@@ -5236,6 +5282,10 @@ msgstr "Thanks for sharing how it ran."
msgid "Thanks! A maintainer will take a look."
msgstr "Thanks! A maintainer will take a look."
#: ../../apps/launcher/src/store.tsx
msgid "That address isn't a repository on {host}."
msgstr "That address isn't a repository on {host}."
#: ../../apps/launcher/src/store.tsx
msgid "That folder doesn't have an installed app in it."
msgstr "That folder doesn't have an installed app in it."
@@ -5423,6 +5473,10 @@ msgstr "This app may keep its saves in this folder. They'll be removed with it."
msgid "This app may stop finding its saves and settings, because it will look for them in a different place. Nothing is deleted."
msgstr "This app may stop finding its saves and settings, because it will look for them in a different place. Nothing is deleted."
#: ../../apps/launcher/src/own.tsx
msgid "This app stays on this computer: account sync doesn't support this kind of host yet."
msgstr "This app stays on this computer: account sync doesn't support this kind of host yet."
#: ../../apps/launcher/src/store.tsx
msgid "This app's folder can't be moved."
msgstr "This app's folder can't be moved."
@@ -5496,6 +5550,14 @@ msgstr "today"
msgid "Today"
msgstr "Today"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Token"
msgstr "Token"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Token for {host}"
msgstr "Token for {host}"
#: ../../apps/launcher/src/ways-to-play.tsx
msgid "Too few reports"
msgstr "Too few reports"
@@ -5858,13 +5920,10 @@ msgstr "Very wide, about 1920×620. Behind the app's page and Continue playing."
msgid "View {version} on {host}"
msgstr "View {version} on {host}"
#. placeholder {0}: providerName(source.provider, source.host)
#: ../../apps/launcher/src/card-menu.tsx
msgid "View on GitHub"
msgstr "View on GitHub"
#: ../../apps/launcher/src/card-menu.tsx
msgid "View on GitLab"
msgstr "View on GitLab"
msgid "View on {0}"
msgstr "View on {0}"
#: ../../apps/launcher/src/App.tsx
#: ../../apps/launcher/src/library.tsx
@@ -5996,6 +6055,10 @@ msgstr "Where apps install"
msgid "Where are your games?"
msgstr "Where are your games?"
#: ../../apps/launcher/src/own.tsx
msgid "Where it's hosted"
msgstr "Where it's hosted"
#: ../../apps/launcher/src/settings-page.tsx
msgid "Where your Quiver Launcher 3 apps are, and Quiver's apps folder"
msgstr "Where your Quiver Launcher 3 apps are, and Quiver's apps folder"
+77 -14
View File
@@ -1192,6 +1192,10 @@ msgstr "Apps que Quiver descarga y actualiza, del catálogo o de un repositorio"
msgid "Apps that support it keep their saves and settings in their own folder. Apps you've already installed don't change."
msgstr "Las apps compatibles guardan sus partidas y ajustes en su propia carpeta. Las apps que ya instalaste no cambian."
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Apps you add from a self-hosted forge, Codeberg, Bitbucket or a release feed use the token you save for that host. A token is kept in this computer's keychain and sent only to the host it belongs to."
msgstr ""
#: ../../apps/launcher/src/github-token.tsx
msgid "Apps you add from GitHub get their releases from GitHub itself, which allows this network 60 requests an hour, or 5,000 with a token. Apps from the catalog don't need one."
msgstr "Las apps que agregas desde GitHub obtienen sus versiones del propio GitHub, que permite a esta red 60 solicitudes por hora, o 5,000 con un token. Las apps del catálogo no lo necesitan."
@@ -1507,6 +1511,7 @@ msgstr "Revisando tu copia…"
#: ../../apps/launcher/src/github-token.tsx
#: ../../apps/launcher/src/gitlab-token.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
#: ../../apps/launcher/src/update.tsx
msgid "Checking…"
msgstr "Comprobando…"
@@ -1839,6 +1844,7 @@ msgstr "No se pudo conectar con quiverlauncher.com. Revisa tu conexión e intent
#: ../../apps/launcher/src/github-token.tsx
#: ../../apps/launcher/src/gitlab-token.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Couldn't save the token. Try again."
msgstr "No se pudo guardar el token. Intenta de nuevo."
@@ -1881,6 +1887,10 @@ msgstr "Dirección de la portada"
msgid "Crashes, poor performance, broken controls or features, or I had to do extra setup this page didn't mention."
msgstr "Cierres inesperados, mal rendimiento, controles o funciones que no sirven, o tuve que hacer pasos adicionales que esta página no mencionaba."
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Create a token"
msgstr ""
#: ../../apps/launcher/src/github-token.tsx
msgid "Create a token on GitHub"
msgstr "Crear un token en GitHub"
@@ -1954,6 +1964,10 @@ msgstr "Acceso directo en el escritorio"
msgid "Details"
msgstr "Detalles"
#: ../../apps/launcher/src/own.tsx
msgid "Detect it"
msgstr ""
#. Tag on a reply from the app's verified developer
#: ../../apps/launcher/src/feedback.tsx
msgid "Developer"
@@ -2144,14 +2158,14 @@ msgstr "El correo, el nombre de usuario o la contraseña son incorrectos."
msgid "Emulator"
msgstr "Emulador"
#: ../../apps/launcher/src/store.tsx
msgid "Enter a GitHub or GitLab repository: owner/name, or its github.com or gitlab.com address."
msgstr "Ingresa un repositorio de GitHub o GitLab: propietario/nombre, o su dirección de github.com o gitlab.com."
#: ../../apps/launcher/src/store.tsx
msgid "Enter a name for its folder."
msgstr "Escribe un nombre para su carpeta."
#: ../../apps/launcher/src/store.tsx
msgid "Enter a repository: owner/name, or its address on a forge."
msgstr ""
#: ../../apps/launcher/src/own-copy-settings.tsx
msgid "Every console"
msgstr "Todas las consolas"
@@ -2280,8 +2294,8 @@ msgid "Found in {folder}"
msgstr "Encontrada en {folder}"
#: ../../apps/launcher/src/own.tsx
msgid "From GitHub or GitLab"
msgstr "Desde GitHub o GitLab"
msgid "From a git repository"
msgstr ""
#: ../../apps/launcher/src/settings-page.tsx
msgid "From Quiver Launcher 3. Keep this folder until you move its apps."
@@ -2331,6 +2345,10 @@ msgstr "Obtener Quiver Launcher"
msgid "Getting ready…"
msgstr "Preparando…"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "git.example.com"
msgstr ""
#: ../../apps/launcher/src/github-token.tsx
msgid "GitHub didn't accept that token, so it wasn't saved. Check that you copied all of it."
msgstr "GitHub no aceptó ese token, así que no se guardó. Revisa que lo hayas copiado completo."
@@ -2482,6 +2500,10 @@ msgstr "Ocultarlas"
msgid "Hide your feedback for {name}"
msgstr "Ocultar tu opinión sobre {name}"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Host"
msgstr ""
#: ../../apps/launcher/src/app-updates.tsx
msgid "How apps update"
msgstr "Cómo se actualizan las apps"
@@ -3887,6 +3909,10 @@ msgstr "Otros archivos"
msgid "Other platforms"
msgstr "Otras plataformas"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Other repository tokens"
msgstr ""
#. Over the list of an app's versions, under Get's own button for its newest
#: ../../apps/launcher/src/detail.tsx
msgid "Other versions"
@@ -3906,8 +3932,8 @@ msgid "Overview"
msgstr "Resumen"
#: ../../apps/launcher/src/own.tsx
msgid "owner/name, or a github.com or gitlab.com address"
msgstr "propietario/nombre, o una dirección de github.com o gitlab.com"
msgid "owner/name, or a repository address (github.com, gitlab.com, codeberg.org, …)"
msgstr ""
#. Controller hint: what the triggers do in a library in another order, jump a screen at a time
#: ../../apps/launcher/src/spatial.ts
@@ -4186,6 +4212,10 @@ msgstr "Quiver no pudo abrir tu biblioteca"
msgid "Quiver couldn't show that picture. It may have been moved or deleted."
msgstr "Quiver no pudo mostrar esa imagen. Puede que se haya movido o eliminado."
#: ../../apps/launcher/src/store.tsx
msgid "Quiver couldn't tell what kind of forge {host} is. Choose its kind and try again."
msgstr ""
#: ../../apps/launcher/src/own-copy-setup.tsx
msgid "Quiver didn't find one in your game folders."
msgstr "Quiver no encontró ninguna en tus carpetas de juegos."
@@ -4391,6 +4421,10 @@ msgstr "Refrescar"
msgid "Reinstall {installedVersion}"
msgstr "Reinstalar {installedVersion}"
#: ../../apps/launcher/src/own.tsx
msgid "Release feed"
msgstr ""
#. Tab of an app's page
#. Which of an app's releases it gets: main releases only, or pre-releases too
#: ../../apps/launcher/src/App.tsx
@@ -4445,6 +4479,7 @@ msgstr "Quitar etiqueta {tag}"
#: ../../apps/launcher/src/github-token.tsx
#: ../../apps/launcher/src/gitlab-token.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Remove token"
msgstr "Quitar token"
@@ -4452,6 +4487,7 @@ msgstr "Quitar token"
#. The GitLab token was removed
#: ../../apps/launcher/src/github-token.tsx
#: ../../apps/launcher/src/gitlab-token.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Removed."
msgstr "Quitado."
@@ -4582,9 +4618,18 @@ msgstr "Guardar como playlist"
#: ../../apps/launcher/src/github-token.tsx
#: ../../apps/launcher/src/gitlab-token.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Save token"
msgstr "Guardar token"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Saved."
msgstr ""
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Saved. Requests to {clean} use your token now."
msgstr ""
#: ../../apps/launcher/src/github-token.tsx
msgid "Saved. Requests to GitHub use your token now."
msgstr "Guardado. Las solicitudes a GitHub ahora usan tu token."
@@ -4598,6 +4643,7 @@ msgid "Saves and settings come too. After that, you can delete your Quiver Launc
msgstr "Las partidas guardadas y la configuración también vienen. Después puedes borrar tu carpeta de Quiver Launcher 3."
#: ../../apps/launcher/src/feedback.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Saving…"
msgstr "Guardando…"
@@ -5236,6 +5282,10 @@ msgstr "Gracias por compartir cómo funcionó."
msgid "Thanks! A maintainer will take a look."
msgstr "¡Gracias! Un mantenedor lo revisará."
#: ../../apps/launcher/src/store.tsx
msgid "That address isn't a repository on {host}."
msgstr ""
#: ../../apps/launcher/src/store.tsx
msgid "That folder doesn't have an installed app in it."
msgstr "Esa carpeta no tiene ninguna app instalada."
@@ -5423,6 +5473,10 @@ msgstr "Puede que esta app guarde sus partidas en esta carpeta. Se eliminarán j
msgid "This app may stop finding its saves and settings, because it will look for them in a different place. Nothing is deleted."
msgstr "Puede que esta app deje de encontrar sus partidas y ajustes, porque los buscará en otro lugar. No se elimina nada."
#: ../../apps/launcher/src/own.tsx
msgid "This app stays on this computer: account sync doesn't support this kind of host yet."
msgstr ""
#: ../../apps/launcher/src/store.tsx
msgid "This app's folder can't be moved."
msgstr "La carpeta de esta app no se puede mover."
@@ -5496,6 +5550,14 @@ msgstr "hoy"
msgid "Today"
msgstr "Hoy"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Token"
msgstr ""
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Token for {host}"
msgstr ""
#: ../../apps/launcher/src/ways-to-play.tsx
msgid "Too few reports"
msgstr "Muy pocos reportes"
@@ -5858,13 +5920,10 @@ msgstr "Muy ancha, de unos 1920×620. Detrás de la página de la app y en Segui
msgid "View {version} on {host}"
msgstr "Ver {version} en {host}"
#. placeholder {0}: providerName(source.provider, source.host)
#: ../../apps/launcher/src/card-menu.tsx
msgid "View on GitHub"
msgstr "Ver en GitHub"
#: ../../apps/launcher/src/card-menu.tsx
msgid "View on GitLab"
msgstr "Ver en GitLab"
msgid "View on {0}"
msgstr ""
#: ../../apps/launcher/src/App.tsx
#: ../../apps/launcher/src/library.tsx
@@ -5996,6 +6055,10 @@ msgstr "Dónde se instalan las apps"
msgid "Where are your games?"
msgstr "¿Dónde están tus juegos?"
#: ../../apps/launcher/src/own.tsx
msgid "Where it's hosted"
msgstr ""
#: ../../apps/launcher/src/settings-page.tsx
msgid "Where your Quiver Launcher 3 apps are, and Quiver's apps folder"
msgstr "Dónde están tus apps de Quiver Launcher 3, y la carpeta de apps de Quiver"
+77 -14
View File
@@ -1192,6 +1192,10 @@ msgstr "Applis que Quiver télécharge et met à jour, depuis le catalogue ou un
msgid "Apps that support it keep their saves and settings in their own folder. Apps you've already installed don't change."
msgstr "Les apps compatibles gardent leurs sauvegardes et leurs réglages dans leur propre dossier. Les apps déjà installées ne changent pas."
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Apps you add from a self-hosted forge, Codeberg, Bitbucket or a release feed use the token you save for that host. A token is kept in this computer's keychain and sent only to the host it belongs to."
msgstr ""
#: ../../apps/launcher/src/github-token.tsx
msgid "Apps you add from GitHub get their releases from GitHub itself, which allows this network 60 requests an hour, or 5,000 with a token. Apps from the catalog don't need one."
msgstr "Les apps que vous ajoutez depuis GitHub récupèrent leurs versions sur GitHub même, qui autorise 60 requêtes par heure depuis ce réseau, ou 5 000 avec un jeton. Les apps du catalogue n'en ont pas besoin."
@@ -1507,6 +1511,7 @@ msgstr "Vérification de ta copie…"
#: ../../apps/launcher/src/github-token.tsx
#: ../../apps/launcher/src/gitlab-token.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
#: ../../apps/launcher/src/update.tsx
msgid "Checking…"
msgstr "Vérification…"
@@ -1839,6 +1844,7 @@ msgstr "Impossible de joindre quiverlauncher.com. Vérifiez votre connexion et r
#: ../../apps/launcher/src/github-token.tsx
#: ../../apps/launcher/src/gitlab-token.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Couldn't save the token. Try again."
msgstr "Impossible d'enregistrer le jeton. Réessayez."
@@ -1881,6 +1887,10 @@ msgstr "Adresse de la couverture"
msgid "Crashes, poor performance, broken controls or features, or I had to do extra setup this page didn't mention."
msgstr "Plantages, mauvaises performances, commandes ou fonctionnalités défaillantes, ou j'ai dû faire une configuration supplémentaire que cette page ne mentionnait pas."
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Create a token"
msgstr ""
#: ../../apps/launcher/src/github-token.tsx
msgid "Create a token on GitHub"
msgstr "Créer un jeton sur GitHub"
@@ -1954,6 +1964,10 @@ msgstr "Raccourci sur le bureau"
msgid "Details"
msgstr "Détails"
#: ../../apps/launcher/src/own.tsx
msgid "Detect it"
msgstr ""
#. Tag on a reply from the app's verified developer
#: ../../apps/launcher/src/feedback.tsx
msgid "Developer"
@@ -2144,14 +2158,14 @@ msgstr "E-mail, nom d'utilisateur ou mot de passe incorrect."
msgid "Emulator"
msgstr "Émulateur"
#: ../../apps/launcher/src/store.tsx
msgid "Enter a GitHub or GitLab repository: owner/name, or its github.com or gitlab.com address."
msgstr "Saisissez un dépôt GitHub ou GitLab : propriétaire/nom, ou son adresse github.com ou gitlab.com."
#: ../../apps/launcher/src/store.tsx
msgid "Enter a name for its folder."
msgstr "Saisissez un nom pour son dossier."
#: ../../apps/launcher/src/store.tsx
msgid "Enter a repository: owner/name, or its address on a forge."
msgstr ""
#: ../../apps/launcher/src/own-copy-settings.tsx
msgid "Every console"
msgstr "Toutes les consoles"
@@ -2280,8 +2294,8 @@ msgid "Found in {folder}"
msgstr "Trouvée dans {folder}"
#: ../../apps/launcher/src/own.tsx
msgid "From GitHub or GitLab"
msgstr "Depuis GitHub ou GitLab"
msgid "From a git repository"
msgstr ""
#: ../../apps/launcher/src/settings-page.tsx
msgid "From Quiver Launcher 3. Keep this folder until you move its apps."
@@ -2331,6 +2345,10 @@ msgstr "Obtenir Quiver Launcher"
msgid "Getting ready…"
msgstr "Préparation…"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "git.example.com"
msgstr ""
#: ../../apps/launcher/src/github-token.tsx
msgid "GitHub didn't accept that token, so it wasn't saved. Check that you copied all of it."
msgstr "GitHub n'a pas accepté ce jeton, il n'a donc pas été enregistré. Vérifiez que vous l'avez copié en entier."
@@ -2482,6 +2500,10 @@ msgstr "Les masquer"
msgid "Hide your feedback for {name}"
msgstr "Masquer votre avis sur {name}"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Host"
msgstr ""
#: ../../apps/launcher/src/app-updates.tsx
msgid "How apps update"
msgstr "Comment les apps se mettent à jour"
@@ -3887,6 +3909,10 @@ msgstr "Autres fichiers"
msgid "Other platforms"
msgstr "Autres plateformes"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Other repository tokens"
msgstr ""
#. Over the list of an app's versions, under Get's own button for its newest
#: ../../apps/launcher/src/detail.tsx
msgid "Other versions"
@@ -3906,8 +3932,8 @@ msgid "Overview"
msgstr "Aperçu"
#: ../../apps/launcher/src/own.tsx
msgid "owner/name, or a github.com or gitlab.com address"
msgstr "propriétaire/nom, ou une adresse github.com ou gitlab.com"
msgid "owner/name, or a repository address (github.com, gitlab.com, codeberg.org, …)"
msgstr ""
#. Controller hint: what the triggers do in a library in another order, jump a screen at a time
#: ../../apps/launcher/src/spatial.ts
@@ -4186,6 +4212,10 @@ msgstr "Quiver n'a pas pu ouvrir votre bibliothèque"
msgid "Quiver couldn't show that picture. It may have been moved or deleted."
msgstr "Quiver n'a pas pu afficher cette image. Elle a peut-être été déplacée ou supprimée."
#: ../../apps/launcher/src/store.tsx
msgid "Quiver couldn't tell what kind of forge {host} is. Choose its kind and try again."
msgstr ""
#: ../../apps/launcher/src/own-copy-setup.tsx
msgid "Quiver didn't find one in your game folders."
msgstr "Quiver n'en a trouvé aucune dans tes dossiers de jeux."
@@ -4391,6 +4421,10 @@ msgstr "Actualiser"
msgid "Reinstall {installedVersion}"
msgstr "Réinstaller {installedVersion}"
#: ../../apps/launcher/src/own.tsx
msgid "Release feed"
msgstr ""
#. Tab of an app's page
#. Which of an app's releases it gets: main releases only, or pre-releases too
#: ../../apps/launcher/src/App.tsx
@@ -4445,6 +4479,7 @@ msgstr "Retirer le tag {tag}"
#: ../../apps/launcher/src/github-token.tsx
#: ../../apps/launcher/src/gitlab-token.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Remove token"
msgstr "Supprimer le jeton"
@@ -4452,6 +4487,7 @@ msgstr "Supprimer le jeton"
#. The GitLab token was removed
#: ../../apps/launcher/src/github-token.tsx
#: ../../apps/launcher/src/gitlab-token.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Removed."
msgstr "Supprimé."
@@ -4582,9 +4618,18 @@ msgstr "Enregistrer comme playlist"
#: ../../apps/launcher/src/github-token.tsx
#: ../../apps/launcher/src/gitlab-token.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Save token"
msgstr "Enregistrer le jeton"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Saved."
msgstr ""
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Saved. Requests to {clean} use your token now."
msgstr ""
#: ../../apps/launcher/src/github-token.tsx
msgid "Saved. Requests to GitHub use your token now."
msgstr "Enregistré. Les requêtes vers GitHub utilisent désormais votre jeton."
@@ -4598,6 +4643,7 @@ msgid "Saves and settings come too. After that, you can delete your Quiver Launc
msgstr "Les sauvegardes et les réglages viennent aussi. Ensuite, vous pourrez supprimer votre dossier Quiver Launcher 3."
#: ../../apps/launcher/src/feedback.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Saving…"
msgstr "Enregistrement…"
@@ -5236,6 +5282,10 @@ msgstr "Merci d'avoir dit comment ça a tourné."
msgid "Thanks! A maintainer will take a look."
msgstr "Merci ! Un mainteneur va y jeter un œil."
#: ../../apps/launcher/src/store.tsx
msgid "That address isn't a repository on {host}."
msgstr ""
#: ../../apps/launcher/src/store.tsx
msgid "That folder doesn't have an installed app in it."
msgstr "Ce dossier ne contient aucune app installée."
@@ -5423,6 +5473,10 @@ msgstr "Cette app garde peut-être ses sauvegardes dans ce dossier. Elles seront
msgid "This app may stop finding its saves and settings, because it will look for them in a different place. Nothing is deleted."
msgstr "Cette app risque de ne plus trouver ses sauvegardes et ses réglages, car elle les cherchera ailleurs. Rien n'est supprimé."
#: ../../apps/launcher/src/own.tsx
msgid "This app stays on this computer: account sync doesn't support this kind of host yet."
msgstr ""
#: ../../apps/launcher/src/store.tsx
msgid "This app's folder can't be moved."
msgstr "Le dossier de cette app ne peut pas être déplacé."
@@ -5496,6 +5550,14 @@ msgstr "aujourd'hui"
msgid "Today"
msgstr "Aujourd'hui"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Token"
msgstr ""
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Token for {host}"
msgstr ""
#: ../../apps/launcher/src/ways-to-play.tsx
msgid "Too few reports"
msgstr "Trop peu d’avis"
@@ -5858,13 +5920,10 @@ msgstr "Très large, environ 1920×620. Derrière la page de l'app et Continuer
msgid "View {version} on {host}"
msgstr "Voir {version} sur {host}"
#. placeholder {0}: providerName(source.provider, source.host)
#: ../../apps/launcher/src/card-menu.tsx
msgid "View on GitHub"
msgstr "Voir sur GitHub"
#: ../../apps/launcher/src/card-menu.tsx
msgid "View on GitLab"
msgstr "Voir sur GitLab"
msgid "View on {0}"
msgstr ""
#: ../../apps/launcher/src/App.tsx
#: ../../apps/launcher/src/library.tsx
@@ -5996,6 +6055,10 @@ msgstr "Où les apps s'installent"
msgid "Where are your games?"
msgstr "Où sont tes jeux ?"
#: ../../apps/launcher/src/own.tsx
msgid "Where it's hosted"
msgstr ""
#: ../../apps/launcher/src/settings-page.tsx
msgid "Where your Quiver Launcher 3 apps are, and Quiver's apps folder"
msgstr "Où sont vos apps de Quiver Launcher 3, et le dossier des apps de Quiver"
+77 -14
View File
@@ -1192,6 +1192,10 @@ msgstr "App che Quiver scarica e aggiorna, dal catalogo o da un repository"
msgid "Apps that support it keep their saves and settings in their own folder. Apps you've already installed don't change."
msgstr "Le app che lo supportano tengono salvataggi e impostazioni nella propria cartella. Le app già installate non cambiano."
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Apps you add from a self-hosted forge, Codeberg, Bitbucket or a release feed use the token you save for that host. A token is kept in this computer's keychain and sent only to the host it belongs to."
msgstr ""
#: ../../apps/launcher/src/github-token.tsx
msgid "Apps you add from GitHub get their releases from GitHub itself, which allows this network 60 requests an hour, or 5,000 with a token. Apps from the catalog don't need one."
msgstr "Le app che aggiungi da GitHub prendono le versioni direttamente da GitHub, che consente a questa rete 60 richieste all'ora, o 5.000 con un token. Le app del catalogo non ne hanno bisogno."
@@ -1507,6 +1511,7 @@ msgstr "Controllo della tua copia…"
#: ../../apps/launcher/src/github-token.tsx
#: ../../apps/launcher/src/gitlab-token.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
#: ../../apps/launcher/src/update.tsx
msgid "Checking…"
msgstr "Controllo…"
@@ -1839,6 +1844,7 @@ msgstr "Impossibile raggiungere quiverlauncher.com. Controlla la connessione e r
#: ../../apps/launcher/src/github-token.tsx
#: ../../apps/launcher/src/gitlab-token.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Couldn't save the token. Try again."
msgstr "Impossibile salvare il token. Riprova."
@@ -1881,6 +1887,10 @@ msgstr "Indirizzo della copertina"
msgid "Crashes, poor performance, broken controls or features, or I had to do extra setup this page didn't mention."
msgstr "Crash, prestazioni scarse, controlli o funzioni che non vanno, oppure ho dovuto fare una configurazione extra che questa pagina non indicava."
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Create a token"
msgstr ""
#: ../../apps/launcher/src/github-token.tsx
msgid "Create a token on GitHub"
msgstr "Crea un token su GitHub"
@@ -1954,6 +1964,10 @@ msgstr "Collegamento sul desktop"
msgid "Details"
msgstr "Dettagli"
#: ../../apps/launcher/src/own.tsx
msgid "Detect it"
msgstr ""
#. Tag on a reply from the app's verified developer
#: ../../apps/launcher/src/feedback.tsx
msgid "Developer"
@@ -2144,14 +2158,14 @@ msgstr "Email, nome utente o password errati."
msgid "Emulator"
msgstr "Emulatore"
#: ../../apps/launcher/src/store.tsx
msgid "Enter a GitHub or GitLab repository: owner/name, or its github.com or gitlab.com address."
msgstr "Inserisci un repository GitHub o GitLab: proprietario/nome, oppure il suo indirizzo github.com o gitlab.com."
#: ../../apps/launcher/src/store.tsx
msgid "Enter a name for its folder."
msgstr "Inserisci un nome per la cartella."
#: ../../apps/launcher/src/store.tsx
msgid "Enter a repository: owner/name, or its address on a forge."
msgstr ""
#: ../../apps/launcher/src/own-copy-settings.tsx
msgid "Every console"
msgstr "Tutte le console"
@@ -2280,8 +2294,8 @@ msgid "Found in {folder}"
msgstr "Trovata in {folder}"
#: ../../apps/launcher/src/own.tsx
msgid "From GitHub or GitLab"
msgstr "Da GitHub o GitLab"
msgid "From a git repository"
msgstr ""
#: ../../apps/launcher/src/settings-page.tsx
msgid "From Quiver Launcher 3. Keep this folder until you move its apps."
@@ -2331,6 +2345,10 @@ msgstr "Ottieni Quiver Launcher"
msgid "Getting ready…"
msgstr "Preparazione…"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "git.example.com"
msgstr ""
#: ../../apps/launcher/src/github-token.tsx
msgid "GitHub didn't accept that token, so it wasn't saved. Check that you copied all of it."
msgstr "GitHub non ha accettato quel token, quindi non è stato salvato. Controlla di averlo copiato tutto."
@@ -2482,6 +2500,10 @@ msgstr "Nascondile"
msgid "Hide your feedback for {name}"
msgstr "Nascondi il tuo feedback su {name}"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Host"
msgstr ""
#: ../../apps/launcher/src/app-updates.tsx
msgid "How apps update"
msgstr "Come si aggiornano le app"
@@ -3887,6 +3909,10 @@ msgstr "Altri file"
msgid "Other platforms"
msgstr "Altre piattaforme"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Other repository tokens"
msgstr ""
#. Over the list of an app's versions, under Get's own button for its newest
#: ../../apps/launcher/src/detail.tsx
msgid "Other versions"
@@ -3906,8 +3932,8 @@ msgid "Overview"
msgstr "Panoramica"
#: ../../apps/launcher/src/own.tsx
msgid "owner/name, or a github.com or gitlab.com address"
msgstr "proprietario/nome, o un indirizzo github.com o gitlab.com"
msgid "owner/name, or a repository address (github.com, gitlab.com, codeberg.org, …)"
msgstr ""
#. Controller hint: what the triggers do in a library in another order, jump a screen at a time
#: ../../apps/launcher/src/spatial.ts
@@ -4186,6 +4212,10 @@ msgstr "Quiver non è riuscito ad aprire la tua libreria"
msgid "Quiver couldn't show that picture. It may have been moved or deleted."
msgstr "Quiver non è riuscito a mostrare questa immagine. Potrebbe essere stata spostata o eliminata."
#: ../../apps/launcher/src/store.tsx
msgid "Quiver couldn't tell what kind of forge {host} is. Choose its kind and try again."
msgstr ""
#: ../../apps/launcher/src/own-copy-setup.tsx
msgid "Quiver didn't find one in your game folders."
msgstr "Quiver non ne ha trovata nessuna nelle cartelle dei tuoi giochi."
@@ -4391,6 +4421,10 @@ msgstr "Ricarica"
msgid "Reinstall {installedVersion}"
msgstr "Reinstalla {installedVersion}"
#: ../../apps/launcher/src/own.tsx
msgid "Release feed"
msgstr ""
#. Tab of an app's page
#. Which of an app's releases it gets: main releases only, or pre-releases too
#: ../../apps/launcher/src/App.tsx
@@ -4445,6 +4479,7 @@ msgstr "Rimuovi tag {tag}"
#: ../../apps/launcher/src/github-token.tsx
#: ../../apps/launcher/src/gitlab-token.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Remove token"
msgstr "Rimuovi token"
@@ -4452,6 +4487,7 @@ msgstr "Rimuovi token"
#. The GitLab token was removed
#: ../../apps/launcher/src/github-token.tsx
#: ../../apps/launcher/src/gitlab-token.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Removed."
msgstr "Rimosso."
@@ -4582,9 +4618,18 @@ msgstr "Salva come playlist"
#: ../../apps/launcher/src/github-token.tsx
#: ../../apps/launcher/src/gitlab-token.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Save token"
msgstr "Salva token"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Saved."
msgstr ""
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Saved. Requests to {clean} use your token now."
msgstr ""
#: ../../apps/launcher/src/github-token.tsx
msgid "Saved. Requests to GitHub use your token now."
msgstr "Salvato. Ora le richieste a GitHub usano il tuo token."
@@ -4598,6 +4643,7 @@ msgid "Saves and settings come too. After that, you can delete your Quiver Launc
msgstr "Arrivano anche salvataggi e impostazioni. Dopo, puoi eliminare la cartella di Quiver Launcher 3."
#: ../../apps/launcher/src/feedback.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Saving…"
msgstr "Salvataggio…"
@@ -5236,6 +5282,10 @@ msgstr "Grazie per aver condiviso com'è andata."
msgid "Thanks! A maintainer will take a look."
msgstr "Grazie! Un responsabile darà un'occhiata."
#: ../../apps/launcher/src/store.tsx
msgid "That address isn't a repository on {host}."
msgstr ""
#: ../../apps/launcher/src/store.tsx
msgid "That folder doesn't have an installed app in it."
msgstr "Quella cartella non contiene app installate."
@@ -5423,6 +5473,10 @@ msgstr "Questa app potrebbe tenere i salvataggi in questa cartella. Verranno rim
msgid "This app may stop finding its saves and settings, because it will look for them in a different place. Nothing is deleted."
msgstr "Questa app potrebbe non trovare più salvataggi e impostazioni, perché li cercherà in un altro posto. Non viene eliminato nulla."
#: ../../apps/launcher/src/own.tsx
msgid "This app stays on this computer: account sync doesn't support this kind of host yet."
msgstr ""
#: ../../apps/launcher/src/store.tsx
msgid "This app's folder can't be moved."
msgstr "La cartella di questa app non può essere spostata."
@@ -5496,6 +5550,14 @@ msgstr "oggi"
msgid "Today"
msgstr "Oggi"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Token"
msgstr ""
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Token for {host}"
msgstr ""
#: ../../apps/launcher/src/ways-to-play.tsx
msgid "Too few reports"
msgstr "Troppo poche segnalazioni"
@@ -5858,13 +5920,10 @@ msgstr "Molto larga, circa 1920×620. Dietro la pagina dell'app e Continua a gio
msgid "View {version} on {host}"
msgstr "Vedi {version} su {host}"
#. placeholder {0}: providerName(source.provider, source.host)
#: ../../apps/launcher/src/card-menu.tsx
msgid "View on GitHub"
msgstr "Vedi su GitHub"
#: ../../apps/launcher/src/card-menu.tsx
msgid "View on GitLab"
msgstr "Vedi su GitLab"
msgid "View on {0}"
msgstr ""
#: ../../apps/launcher/src/App.tsx
#: ../../apps/launcher/src/library.tsx
@@ -5996,6 +6055,10 @@ msgstr "Dove vengono installate le app"
msgid "Where are your games?"
msgstr "Dove sono i tuoi giochi?"
#: ../../apps/launcher/src/own.tsx
msgid "Where it's hosted"
msgstr ""
#: ../../apps/launcher/src/settings-page.tsx
msgid "Where your Quiver Launcher 3 apps are, and Quiver's apps folder"
msgstr "Dove si trovano le tue app di Quiver Launcher 3, e la cartella delle app di Quiver"
+77 -14
View File
@@ -1192,6 +1192,10 @@ msgstr "Quiver가 카탈로그나 저장소에서 다운로드하고 업데이
msgid "Apps that support it keep their saves and settings in their own folder. Apps you've already installed don't change."
msgstr "지원하는 앱은 저장 데이터와 설정을 자체 폴더에 보관합니다. 이미 설치한 앱은 바뀌지 않습니다."
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Apps you add from a self-hosted forge, Codeberg, Bitbucket or a release feed use the token you save for that host. A token is kept in this computer's keychain and sent only to the host it belongs to."
msgstr ""
#: ../../apps/launcher/src/github-token.tsx
msgid "Apps you add from GitHub get their releases from GitHub itself, which allows this network 60 requests an hour, or 5,000 with a token. Apps from the catalog don't need one."
msgstr "GitHub에서 추가한 앱은 GitHub에서 직접 버전을 가져와요. GitHub는 이 네트워크에 시간당 60회, 토큰이 있으면 5,000회까지 요청을 허용해요. 카탈로그의 앱에는 토큰이 필요 없어요."
@@ -1507,6 +1511,7 @@ msgstr "사본 확인 중…"
#: ../../apps/launcher/src/github-token.tsx
#: ../../apps/launcher/src/gitlab-token.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
#: ../../apps/launcher/src/update.tsx
msgid "Checking…"
msgstr "확인 중…"
@@ -1839,6 +1844,7 @@ msgstr "quiverlauncher.com에 연결할 수 없어요. 연결 상태를 확인
#: ../../apps/launcher/src/github-token.tsx
#: ../../apps/launcher/src/gitlab-token.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Couldn't save the token. Try again."
msgstr "토큰을 저장하지 못했어요. 다시 시도하세요."
@@ -1881,6 +1887,10 @@ msgstr "커버 주소"
msgid "Crashes, poor performance, broken controls or features, or I had to do extra setup this page didn't mention."
msgstr "충돌, 낮은 성능, 작동하지 않는 조작이나 기능이 있었거나, 이 페이지에 없는 추가 설정이 필요했어요."
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Create a token"
msgstr ""
#: ../../apps/launcher/src/github-token.tsx
msgid "Create a token on GitHub"
msgstr "GitHub에서 토큰 만들기"
@@ -1954,6 +1964,10 @@ msgstr "바탕 화면 바로 가기"
msgid "Details"
msgstr "세부 정보"
#: ../../apps/launcher/src/own.tsx
msgid "Detect it"
msgstr ""
#. Tag on a reply from the app's verified developer
#: ../../apps/launcher/src/feedback.tsx
msgid "Developer"
@@ -2144,14 +2158,14 @@ msgstr "이메일, 사용자 이름 또는 비밀번호가 올바르지 않아
msgid "Emulator"
msgstr "에뮬레이터"
#: ../../apps/launcher/src/store.tsx
msgid "Enter a GitHub or GitLab repository: owner/name, or its github.com or gitlab.com address."
msgstr "GitHub 또는 GitLab 저장소를 입력하세요: owner/name 형식이나 github.com 또는 gitlab.com 주소."
#: ../../apps/launcher/src/store.tsx
msgid "Enter a name for its folder."
msgstr "폴더 이름을 입력해 주세요."
#: ../../apps/launcher/src/store.tsx
msgid "Enter a repository: owner/name, or its address on a forge."
msgstr ""
#: ../../apps/launcher/src/own-copy-settings.tsx
msgid "Every console"
msgstr "모든 콘솔"
@@ -2280,8 +2294,8 @@ msgid "Found in {folder}"
msgstr "{folder}에서 찾았어요"
#: ../../apps/launcher/src/own.tsx
msgid "From GitHub or GitLab"
msgstr "GitHub 또는 GitLab에서"
msgid "From a git repository"
msgstr ""
#: ../../apps/launcher/src/settings-page.tsx
msgid "From Quiver Launcher 3. Keep this folder until you move its apps."
@@ -2331,6 +2345,10 @@ msgstr "Quiver Launcher 받기"
msgid "Getting ready…"
msgstr "준비 중…"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "git.example.com"
msgstr ""
#: ../../apps/launcher/src/github-token.tsx
msgid "GitHub didn't accept that token, so it wasn't saved. Check that you copied all of it."
msgstr "GitHub에서 토큰을 받아들이지 않아 저장하지 않았어요. 전부 복사했는지 확인하세요."
@@ -2482,6 +2500,10 @@ msgstr "숨기기"
msgid "Hide your feedback for {name}"
msgstr "{name} 피드백 숨기기"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Host"
msgstr ""
#: ../../apps/launcher/src/app-updates.tsx
msgid "How apps update"
msgstr "앱 업데이트 방식"
@@ -3887,6 +3909,10 @@ msgstr "기타 파일"
msgid "Other platforms"
msgstr "기타 플랫폼"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Other repository tokens"
msgstr ""
#. Over the list of an app's versions, under Get's own button for its newest
#: ../../apps/launcher/src/detail.tsx
msgid "Other versions"
@@ -3906,8 +3932,8 @@ msgid "Overview"
msgstr "개요"
#: ../../apps/launcher/src/own.tsx
msgid "owner/name, or a github.com or gitlab.com address"
msgstr "소유자/이름 또는 github.com이나 gitlab.com 주소"
msgid "owner/name, or a repository address (github.com, gitlab.com, codeberg.org, …)"
msgstr ""
#. Controller hint: what the triggers do in a library in another order, jump a screen at a time
#: ../../apps/launcher/src/spatial.ts
@@ -4186,6 +4212,10 @@ msgstr "Quiver가 라이브러리를 열지 못했어요"
msgid "Quiver couldn't show that picture. It may have been moved or deleted."
msgstr "Quiver에서 이 이미지를 표시할 수 없습니다. 파일이 이동되었거나 삭제되었을 수 있습니다."
#: ../../apps/launcher/src/store.tsx
msgid "Quiver couldn't tell what kind of forge {host} is. Choose its kind and try again."
msgstr ""
#: ../../apps/launcher/src/own-copy-setup.tsx
msgid "Quiver didn't find one in your game folders."
msgstr "Quiver가 게임 폴더에서 찾지 못했습니다."
@@ -4391,6 +4421,10 @@ msgstr "새로 고침"
msgid "Reinstall {installedVersion}"
msgstr "{installedVersion} 다시 설치"
#: ../../apps/launcher/src/own.tsx
msgid "Release feed"
msgstr ""
#. Tab of an app's page
#. Which of an app's releases it gets: main releases only, or pre-releases too
#: ../../apps/launcher/src/App.tsx
@@ -4445,6 +4479,7 @@ msgstr "태그 {tag} 삭제"
#: ../../apps/launcher/src/github-token.tsx
#: ../../apps/launcher/src/gitlab-token.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Remove token"
msgstr "토큰 삭제"
@@ -4452,6 +4487,7 @@ msgstr "토큰 삭제"
#. The GitLab token was removed
#: ../../apps/launcher/src/github-token.tsx
#: ../../apps/launcher/src/gitlab-token.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Removed."
msgstr "삭제했어요."
@@ -4582,9 +4618,18 @@ msgstr "재생 목록으로 저장"
#: ../../apps/launcher/src/github-token.tsx
#: ../../apps/launcher/src/gitlab-token.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Save token"
msgstr "토큰 저장"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Saved."
msgstr ""
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Saved. Requests to {clean} use your token now."
msgstr ""
#: ../../apps/launcher/src/github-token.tsx
msgid "Saved. Requests to GitHub use your token now."
msgstr "저장했어요. 이제 GitHub 요청에 토큰을 사용해요."
@@ -4598,6 +4643,7 @@ msgid "Saves and settings come too. After that, you can delete your Quiver Launc
msgstr "세이브와 설정도 함께 옮겨져요. 그 뒤에는 Quiver Launcher 3 폴더를 지워도 돼요."
#: ../../apps/launcher/src/feedback.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Saving…"
msgstr "저장하는 중…"
@@ -5236,6 +5282,10 @@ msgstr "실행 후기를 공유해 주셔서 감사해요."
msgid "Thanks! A maintainer will take a look."
msgstr "감사해요! 관리자가 확인할 거예요."
#: ../../apps/launcher/src/store.tsx
msgid "That address isn't a repository on {host}."
msgstr ""
#: ../../apps/launcher/src/store.tsx
msgid "That folder doesn't have an installed app in it."
msgstr "그 폴더에 설치된 앱이 없어요."
@@ -5423,6 +5473,10 @@ msgstr "이 앱은 저장 데이터를 이 폴더에 보관할 수 있습니다.
msgid "This app may stop finding its saves and settings, because it will look for them in a different place. Nothing is deleted."
msgstr "이 앱이 다른 위치를 찾게 되어 저장 데이터와 설정을 찾지 못할 수 있습니다. 삭제되는 것은 없습니다."
#: ../../apps/launcher/src/own.tsx
msgid "This app stays on this computer: account sync doesn't support this kind of host yet."
msgstr ""
#: ../../apps/launcher/src/store.tsx
msgid "This app's folder can't be moved."
msgstr "이 앱의 폴더는 옮길 수 없어요."
@@ -5496,6 +5550,14 @@ msgstr "오늘"
msgid "Today"
msgstr "오늘"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Token"
msgstr ""
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Token for {host}"
msgstr ""
#: ../../apps/launcher/src/ways-to-play.tsx
msgid "Too few reports"
msgstr "보고가 너무 적음"
@@ -5858,13 +5920,10 @@ msgstr "매우 넓은 형식, 약 1920×620. 앱 페이지 뒤와 이어서 플
msgid "View {version} on {host}"
msgstr "{host}에서 {version} 보기"
#. placeholder {0}: providerName(source.provider, source.host)
#: ../../apps/launcher/src/card-menu.tsx
msgid "View on GitHub"
msgstr "GitHub에서 보기"
#: ../../apps/launcher/src/card-menu.tsx
msgid "View on GitLab"
msgstr "GitLab에서 보기"
msgid "View on {0}"
msgstr ""
#: ../../apps/launcher/src/App.tsx
#: ../../apps/launcher/src/library.tsx
@@ -5996,6 +6055,10 @@ msgstr "앱 설치 위치"
msgid "Where are your games?"
msgstr "게임은 어디에 있나요?"
#: ../../apps/launcher/src/own.tsx
msgid "Where it's hosted"
msgstr ""
#: ../../apps/launcher/src/settings-page.tsx
msgid "Where your Quiver Launcher 3 apps are, and Quiver's apps folder"
msgstr "Quiver Launcher 3의 앱이 있는 곳과 Quiver의 앱 폴더"
+77 -14
View File
@@ -1192,6 +1192,10 @@ msgstr "Apps que o Quiver baixa e atualiza, do catálogo ou de um repositório"
msgid "Apps that support it keep their saves and settings in their own folder. Apps you've already installed don't change."
msgstr "Os apps compatíveis mantêm seus saves e configurações na própria pasta. Os apps que você já instalou não mudam."
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Apps you add from a self-hosted forge, Codeberg, Bitbucket or a release feed use the token you save for that host. A token is kept in this computer's keychain and sent only to the host it belongs to."
msgstr ""
#: ../../apps/launcher/src/github-token.tsx
msgid "Apps you add from GitHub get their releases from GitHub itself, which allows this network 60 requests an hour, or 5,000 with a token. Apps from the catalog don't need one."
msgstr "Apps que você adiciona do GitHub buscam as versões no próprio GitHub, que permite a esta rede 60 requisições por hora, ou 5.000 com um token. Apps do catálogo não precisam de um."
@@ -1507,6 +1511,7 @@ msgstr "Conferindo sua cópia…"
#: ../../apps/launcher/src/github-token.tsx
#: ../../apps/launcher/src/gitlab-token.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
#: ../../apps/launcher/src/update.tsx
msgid "Checking…"
msgstr "Verificando…"
@@ -1839,6 +1844,7 @@ msgstr "Não foi possível acessar quiverlauncher.com. Verifique sua conexão e
#: ../../apps/launcher/src/github-token.tsx
#: ../../apps/launcher/src/gitlab-token.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Couldn't save the token. Try again."
msgstr "Não foi possível salvar o token. Tente de novo."
@@ -1881,6 +1887,10 @@ msgstr "Endereço da capa"
msgid "Crashes, poor performance, broken controls or features, or I had to do extra setup this page didn't mention."
msgstr "Travamentos, desempenho ruim, controles ou recursos quebrados, ou precisei fazer uma configuração extra que esta página não mencionava."
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Create a token"
msgstr ""
#: ../../apps/launcher/src/github-token.tsx
msgid "Create a token on GitHub"
msgstr "Criar um token no GitHub"
@@ -1954,6 +1964,10 @@ msgstr "Atalho na área de trabalho"
msgid "Details"
msgstr "Detalhes"
#: ../../apps/launcher/src/own.tsx
msgid "Detect it"
msgstr ""
#. Tag on a reply from the app's verified developer
#: ../../apps/launcher/src/feedback.tsx
msgid "Developer"
@@ -2144,14 +2158,14 @@ msgstr "E-mail, nome de usuário ou senha incorretos."
msgid "Emulator"
msgstr "Emulador"
#: ../../apps/launcher/src/store.tsx
msgid "Enter a GitHub or GitLab repository: owner/name, or its github.com or gitlab.com address."
msgstr "Digite um repositório do GitHub ou GitLab: dono/nome, ou o endereço dele no github.com ou gitlab.com."
#: ../../apps/launcher/src/store.tsx
msgid "Enter a name for its folder."
msgstr "Digite um nome para a pasta."
#: ../../apps/launcher/src/store.tsx
msgid "Enter a repository: owner/name, or its address on a forge."
msgstr ""
#: ../../apps/launcher/src/own-copy-settings.tsx
msgid "Every console"
msgstr "Todos os consoles"
@@ -2280,8 +2294,8 @@ msgid "Found in {folder}"
msgstr "Encontrada em {folder}"
#: ../../apps/launcher/src/own.tsx
msgid "From GitHub or GitLab"
msgstr "Do GitHub ou GitLab"
msgid "From a git repository"
msgstr ""
#: ../../apps/launcher/src/settings-page.tsx
msgid "From Quiver Launcher 3. Keep this folder until you move its apps."
@@ -2331,6 +2345,10 @@ msgstr "Obter o Quiver Launcher"
msgid "Getting ready…"
msgstr "Preparando…"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "git.example.com"
msgstr ""
#: ../../apps/launcher/src/github-token.tsx
msgid "GitHub didn't accept that token, so it wasn't saved. Check that you copied all of it."
msgstr "O GitHub não aceitou esse token, então ele não foi salvo. Confira se você copiou ele inteiro."
@@ -2482,6 +2500,10 @@ msgstr "Ocultar"
msgid "Hide your feedback for {name}"
msgstr "Ocultar seu feedback sobre {name}"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Host"
msgstr ""
#: ../../apps/launcher/src/app-updates.tsx
msgid "How apps update"
msgstr "Como os apps são atualizados"
@@ -3887,6 +3909,10 @@ msgstr "Outros arquivos"
msgid "Other platforms"
msgstr "Outras plataformas"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Other repository tokens"
msgstr ""
#. Over the list of an app's versions, under Get's own button for its newest
#: ../../apps/launcher/src/detail.tsx
msgid "Other versions"
@@ -3906,8 +3932,8 @@ msgid "Overview"
msgstr "Visão geral"
#: ../../apps/launcher/src/own.tsx
msgid "owner/name, or a github.com or gitlab.com address"
msgstr "dono/nome, ou um endereço do github.com ou gitlab.com"
msgid "owner/name, or a repository address (github.com, gitlab.com, codeberg.org, …)"
msgstr ""
#. Controller hint: what the triggers do in a library in another order, jump a screen at a time
#: ../../apps/launcher/src/spatial.ts
@@ -4186,6 +4212,10 @@ msgstr "O Quiver não conseguiu abrir sua biblioteca"
msgid "Quiver couldn't show that picture. It may have been moved or deleted."
msgstr "O Quiver não conseguiu mostrar essa imagem. Ela pode ter sido movida ou excluída."
#: ../../apps/launcher/src/store.tsx
msgid "Quiver couldn't tell what kind of forge {host} is. Choose its kind and try again."
msgstr ""
#: ../../apps/launcher/src/own-copy-setup.tsx
msgid "Quiver didn't find one in your game folders."
msgstr "O Quiver não encontrou nenhuma nas suas pastas de jogos."
@@ -4391,6 +4421,10 @@ msgstr "Atualizar"
msgid "Reinstall {installedVersion}"
msgstr "Reinstalar {installedVersion}"
#: ../../apps/launcher/src/own.tsx
msgid "Release feed"
msgstr ""
#. Tab of an app's page
#. Which of an app's releases it gets: main releases only, or pre-releases too
#: ../../apps/launcher/src/App.tsx
@@ -4445,6 +4479,7 @@ msgstr "Remover tag {tag}"
#: ../../apps/launcher/src/github-token.tsx
#: ../../apps/launcher/src/gitlab-token.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Remove token"
msgstr "Remover token"
@@ -4452,6 +4487,7 @@ msgstr "Remover token"
#. The GitLab token was removed
#: ../../apps/launcher/src/github-token.tsx
#: ../../apps/launcher/src/gitlab-token.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Removed."
msgstr "Removido."
@@ -4582,9 +4618,18 @@ msgstr "Salvar como playlist"
#: ../../apps/launcher/src/github-token.tsx
#: ../../apps/launcher/src/gitlab-token.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Save token"
msgstr "Salvar token"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Saved."
msgstr ""
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Saved. Requests to {clean} use your token now."
msgstr ""
#: ../../apps/launcher/src/github-token.tsx
msgid "Saved. Requests to GitHub use your token now."
msgstr "Salvo. As solicitações ao GitHub agora usam seu token."
@@ -4598,6 +4643,7 @@ msgid "Saves and settings come too. After that, you can delete your Quiver Launc
msgstr "Saves e configurações vêm junto. Depois disso, você pode apagar sua pasta do Quiver Launcher 3."
#: ../../apps/launcher/src/feedback.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Saving…"
msgstr "Salvando…"
@@ -5236,6 +5282,10 @@ msgstr "Obrigado por contar como rodou."
msgid "Thanks! A maintainer will take a look."
msgstr "Obrigado! Um mantenedor vai dar uma olhada."
#: ../../apps/launcher/src/store.tsx
msgid "That address isn't a repository on {host}."
msgstr ""
#: ../../apps/launcher/src/store.tsx
msgid "That folder doesn't have an installed app in it."
msgstr "Essa pasta não tem nenhum app instalado."
@@ -5423,6 +5473,10 @@ msgstr "Este app pode manter os saves nesta pasta. Eles serão removidos junto c
msgid "This app may stop finding its saves and settings, because it will look for them in a different place. Nothing is deleted."
msgstr "Este app pode deixar de encontrar os saves e as configurações, porque vai procurá-los em outro lugar. Nada é excluído."
#: ../../apps/launcher/src/own.tsx
msgid "This app stays on this computer: account sync doesn't support this kind of host yet."
msgstr ""
#: ../../apps/launcher/src/store.tsx
msgid "This app's folder can't be moved."
msgstr "A pasta deste app não pode ser movida."
@@ -5496,6 +5550,14 @@ msgstr "hoje"
msgid "Today"
msgstr "Hoje"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Token"
msgstr ""
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Token for {host}"
msgstr ""
#: ../../apps/launcher/src/ways-to-play.tsx
msgid "Too few reports"
msgstr "Poucos relatos"
@@ -5858,13 +5920,10 @@ msgstr "Bem larga, cerca de 1920×620. Atrás da página do app e em Continuar j
msgid "View {version} on {host}"
msgstr "Ver a {version} no {host}"
#. placeholder {0}: providerName(source.provider, source.host)
#: ../../apps/launcher/src/card-menu.tsx
msgid "View on GitHub"
msgstr "Ver no GitHub"
#: ../../apps/launcher/src/card-menu.tsx
msgid "View on GitLab"
msgstr "Ver no GitLab"
msgid "View on {0}"
msgstr ""
#: ../../apps/launcher/src/App.tsx
#: ../../apps/launcher/src/library.tsx
@@ -5996,6 +6055,10 @@ msgstr "Onde os apps são instalados"
msgid "Where are your games?"
msgstr "Onde estão seus jogos?"
#: ../../apps/launcher/src/own.tsx
msgid "Where it's hosted"
msgstr ""
#: ../../apps/launcher/src/settings-page.tsx
msgid "Where your Quiver Launcher 3 apps are, and Quiver's apps folder"
msgstr "Onde estão seus apps do Quiver Launcher 3, e a pasta de apps do Quiver"
+77 -14
View File
@@ -1192,6 +1192,10 @@ msgstr "Приложения, которые Quiver скачивает и обн
msgid "Apps that support it keep their saves and settings in their own folder. Apps you've already installed don't change."
msgstr "Приложения с поддержкой этой функции хранят сохранения и настройки в своей папке. Уже установленные приложения не изменятся."
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Apps you add from a self-hosted forge, Codeberg, Bitbucket or a release feed use the token you save for that host. A token is kept in this computer's keychain and sent only to the host it belongs to."
msgstr ""
#: ../../apps/launcher/src/github-token.tsx
msgid "Apps you add from GitHub get their releases from GitHub itself, which allows this network 60 requests an hour, or 5,000 with a token. Apps from the catalog don't need one."
msgstr "Приложения, добавленные с GitHub, получают версии напрямую с GitHub, а он разрешает этой сети 60 запросов в час или 5000 с токеном. Приложениям из каталога токен не нужен."
@@ -1507,6 +1511,7 @@ msgstr "Проверка вашей копии…"
#: ../../apps/launcher/src/github-token.tsx
#: ../../apps/launcher/src/gitlab-token.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
#: ../../apps/launcher/src/update.tsx
msgid "Checking…"
msgstr "Проверка…"
@@ -1839,6 +1844,7 @@ msgstr "Не удалось связаться с quiverlauncher.com. Прове
#: ../../apps/launcher/src/github-token.tsx
#: ../../apps/launcher/src/gitlab-token.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Couldn't save the token. Try again."
msgstr "Не удалось сохранить токен. Попробуйте ещё раз."
@@ -1881,6 +1887,10 @@ msgstr "Адрес обложки"
msgid "Crashes, poor performance, broken controls or features, or I had to do extra setup this page didn't mention."
msgstr "Вылеты, низкая производительность, сломанное управление или функции, либо понадобилась дополнительная настройка, о которой на этой странице не сказано."
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Create a token"
msgstr ""
#: ../../apps/launcher/src/github-token.tsx
msgid "Create a token on GitHub"
msgstr "Создать токен на GitHub"
@@ -1954,6 +1964,10 @@ msgstr "Ярлык на рабочем столе"
msgid "Details"
msgstr "Подробнее"
#: ../../apps/launcher/src/own.tsx
msgid "Detect it"
msgstr ""
#. Tag on a reply from the app's verified developer
#: ../../apps/launcher/src/feedback.tsx
msgid "Developer"
@@ -2144,14 +2158,14 @@ msgstr "Неверная эл. почта, имя пользователя ил
msgid "Emulator"
msgstr "Эмулятор"
#: ../../apps/launcher/src/store.tsx
msgid "Enter a GitHub or GitLab repository: owner/name, or its github.com or gitlab.com address."
msgstr "Укажите репозиторий GitHub или GitLab: владелец/название или его адрес на github.com или gitlab.com."
#: ../../apps/launcher/src/store.tsx
msgid "Enter a name for its folder."
msgstr "Введите имя папки."
#: ../../apps/launcher/src/store.tsx
msgid "Enter a repository: owner/name, or its address on a forge."
msgstr ""
#: ../../apps/launcher/src/own-copy-settings.tsx
msgid "Every console"
msgstr "Все консоли"
@@ -2280,8 +2294,8 @@ msgid "Found in {folder}"
msgstr "Найдена в папке {folder}"
#: ../../apps/launcher/src/own.tsx
msgid "From GitHub or GitLab"
msgstr "С GitHub или GitLab"
msgid "From a git repository"
msgstr ""
#: ../../apps/launcher/src/settings-page.tsx
msgid "From Quiver Launcher 3. Keep this folder until you move its apps."
@@ -2331,6 +2345,10 @@ msgstr "Получить Quiver Launcher"
msgid "Getting ready…"
msgstr "Подготовка…"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "git.example.com"
msgstr ""
#: ../../apps/launcher/src/github-token.tsx
msgid "GitHub didn't accept that token, so it wasn't saved. Check that you copied all of it."
msgstr "GitHub не принял этот токен, поэтому он не сохранён. Проверьте, что скопировали его полностью."
@@ -2482,6 +2500,10 @@ msgstr "Скрыть их"
msgid "Hide your feedback for {name}"
msgstr "Скрыть ваш отзыв о {name}"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Host"
msgstr ""
#: ../../apps/launcher/src/app-updates.tsx
msgid "How apps update"
msgstr "Как обновляются приложения"
@@ -3887,6 +3909,10 @@ msgstr "Другие файлы"
msgid "Other platforms"
msgstr "Другие платформы"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Other repository tokens"
msgstr ""
#. Over the list of an app's versions, under Get's own button for its newest
#: ../../apps/launcher/src/detail.tsx
msgid "Other versions"
@@ -3906,8 +3932,8 @@ msgid "Overview"
msgstr "Описание"
#: ../../apps/launcher/src/own.tsx
msgid "owner/name, or a github.com or gitlab.com address"
msgstr "владелец/название или адрес github.com или gitlab.com"
msgid "owner/name, or a repository address (github.com, gitlab.com, codeberg.org, …)"
msgstr ""
#. Controller hint: what the triggers do in a library in another order, jump a screen at a time
#: ../../apps/launcher/src/spatial.ts
@@ -4186,6 +4212,10 @@ msgstr "Quiver не удалось открыть вашу библиотеку"
msgid "Quiver couldn't show that picture. It may have been moved or deleted."
msgstr "Quiver не удалось показать это изображение. Возможно, оно было перемещено или удалено."
#: ../../apps/launcher/src/store.tsx
msgid "Quiver couldn't tell what kind of forge {host} is. Choose its kind and try again."
msgstr ""
#: ../../apps/launcher/src/own-copy-setup.tsx
msgid "Quiver didn't find one in your game folders."
msgstr "Quiver не нашёл её в ваших папках с играми."
@@ -4391,6 +4421,10 @@ msgstr "Обновить список"
msgid "Reinstall {installedVersion}"
msgstr "Переустановить {installedVersion}"
#: ../../apps/launcher/src/own.tsx
msgid "Release feed"
msgstr ""
#. Tab of an app's page
#. Which of an app's releases it gets: main releases only, or pre-releases too
#: ../../apps/launcher/src/App.tsx
@@ -4445,6 +4479,7 @@ msgstr "Убрать тег {tag}"
#: ../../apps/launcher/src/github-token.tsx
#: ../../apps/launcher/src/gitlab-token.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Remove token"
msgstr "Удалить токен"
@@ -4452,6 +4487,7 @@ msgstr "Удалить токен"
#. The GitLab token was removed
#: ../../apps/launcher/src/github-token.tsx
#: ../../apps/launcher/src/gitlab-token.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Removed."
msgstr "Удалён."
@@ -4582,9 +4618,18 @@ msgstr "Сохранить как плейлист"
#: ../../apps/launcher/src/github-token.tsx
#: ../../apps/launcher/src/gitlab-token.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Save token"
msgstr "Сохранить токен"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Saved."
msgstr ""
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Saved. Requests to {clean} use your token now."
msgstr ""
#: ../../apps/launcher/src/github-token.tsx
msgid "Saved. Requests to GitHub use your token now."
msgstr "Сохранено. Теперь запросы к GitHub используют ваш токен."
@@ -4598,6 +4643,7 @@ msgid "Saves and settings come too. After that, you can delete your Quiver Launc
msgstr "Сохранения и настройки тоже переносятся. После этого папку Quiver Launcher 3 можно удалить."
#: ../../apps/launcher/src/feedback.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Saving…"
msgstr "Сохранение…"
@@ -5236,6 +5282,10 @@ msgstr "Спасибо, что рассказали, как работало."
msgid "Thanks! A maintainer will take a look."
msgstr "Спасибо! Сопровождающий посмотрит."
#: ../../apps/launcher/src/store.tsx
msgid "That address isn't a repository on {host}."
msgstr ""
#: ../../apps/launcher/src/store.tsx
msgid "That folder doesn't have an installed app in it."
msgstr "В этой папке нет установленного приложения."
@@ -5423,6 +5473,10 @@ msgstr "Это приложение может хранить сохранени
msgid "This app may stop finding its saves and settings, because it will look for them in a different place. Nothing is deleted."
msgstr "Приложение может перестать находить сохранения и настройки, потому что будет искать их в другом месте. Ничего не удаляется."
#: ../../apps/launcher/src/own.tsx
msgid "This app stays on this computer: account sync doesn't support this kind of host yet."
msgstr ""
#: ../../apps/launcher/src/store.tsx
msgid "This app's folder can't be moved."
msgstr "Папку этого приложения нельзя переместить."
@@ -5496,6 +5550,14 @@ msgstr "сегодня"
msgid "Today"
msgstr "Сегодня"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Token"
msgstr ""
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Token for {host}"
msgstr ""
#: ../../apps/launcher/src/ways-to-play.tsx
msgid "Too few reports"
msgstr "Слишком мало отзывов"
@@ -5858,13 +5920,10 @@ msgstr "Очень широкое, примерно 1920×620. За страни
msgid "View {version} on {host}"
msgstr "Открыть {version} на {host}"
#. placeholder {0}: providerName(source.provider, source.host)
#: ../../apps/launcher/src/card-menu.tsx
msgid "View on GitHub"
msgstr "Открыть на GitHub"
#: ../../apps/launcher/src/card-menu.tsx
msgid "View on GitLab"
msgstr "Открыть на GitLab"
msgid "View on {0}"
msgstr ""
#: ../../apps/launcher/src/App.tsx
#: ../../apps/launcher/src/library.tsx
@@ -5996,6 +6055,10 @@ msgstr "Куда устанавливаются приложения"
msgid "Where are your games?"
msgstr "Где ваши игры?"
#: ../../apps/launcher/src/own.tsx
msgid "Where it's hosted"
msgstr ""
#: ../../apps/launcher/src/settings-page.tsx
msgid "Where your Quiver Launcher 3 apps are, and Quiver's apps folder"
msgstr "Где находятся ваши приложения из Quiver Launcher 3 и папка приложений Quiver"
+77 -14
View File
@@ -1192,6 +1192,10 @@ msgstr "Quiver 从目录或代码仓库下载并更新的应用"
msgid "Apps that support it keep their saves and settings in their own folder. Apps you've already installed don't change."
msgstr "支持此功能的应用会将存档和设置保存在各自的文件夹中。你已经安装的应用不会改变。"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Apps you add from a self-hosted forge, Codeberg, Bitbucket or a release feed use the token you save for that host. A token is kept in this computer's keychain and sent only to the host it belongs to."
msgstr ""
#: ../../apps/launcher/src/github-token.tsx
msgid "Apps you add from GitHub get their releases from GitHub itself, which allows this network 60 requests an hour, or 5,000 with a token. Apps from the catalog don't need one."
msgstr "你从 GitHub 添加的应用会直接从 GitHub 获取版本。此网络每小时允许 60 次请求;使用令牌时为 5,000 次。目录中的应用无需令牌。"
@@ -1507,6 +1511,7 @@ msgstr "正在检查你的副本 →"
#: ../../apps/launcher/src/github-token.tsx
#: ../../apps/launcher/src/gitlab-token.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
#: ../../apps/launcher/src/update.tsx
msgid "Checking…"
msgstr "正在检查 →"
@@ -1839,6 +1844,7 @@ msgstr "无法连接 quiverlauncher.com。请检查网络连接,然后重试
#: ../../apps/launcher/src/github-token.tsx
#: ../../apps/launcher/src/gitlab-token.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Couldn't save the token. Try again."
msgstr "无法保存令牌。请重试。"
@@ -1881,6 +1887,10 @@ msgstr "封面地址"
msgid "Crashes, poor performance, broken controls or features, or I had to do extra setup this page didn't mention."
msgstr "崩溃、性能不佳、控制或功能失效,或者我不得不进行此页面未提及的额外设置。"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Create a token"
msgstr ""
#: ../../apps/launcher/src/github-token.tsx
msgid "Create a token on GitHub"
msgstr "在 GitHub 上创建令牌"
@@ -1954,6 +1964,10 @@ msgstr "桌面快捷方式"
msgid "Details"
msgstr "详细信息"
#: ../../apps/launcher/src/own.tsx
msgid "Detect it"
msgstr ""
#. Tag on a reply from the app's verified developer
#: ../../apps/launcher/src/feedback.tsx
msgid "Developer"
@@ -2144,14 +2158,14 @@ msgstr "电子邮件、用户名或密码不正确。"
msgid "Emulator"
msgstr "模拟器"
#: ../../apps/launcher/src/store.tsx
msgid "Enter a GitHub or GitLab repository: owner/name, or its github.com or gitlab.com address."
msgstr "输入 GitHub 或 GitLab 代码仓库:owner/name,或其 github.com、gitlab.com 地址。"
#: ../../apps/launcher/src/store.tsx
msgid "Enter a name for its folder."
msgstr "为其文件夹输入名称。"
#: ../../apps/launcher/src/store.tsx
msgid "Enter a repository: owner/name, or its address on a forge."
msgstr ""
#: ../../apps/launcher/src/own-copy-settings.tsx
msgid "Every console"
msgstr "所有主机"
@@ -2280,8 +2294,8 @@ msgid "Found in {folder}"
msgstr "在 {folder} 中找到"
#: ../../apps/launcher/src/own.tsx
msgid "From GitHub or GitLab"
msgstr "来自 GitHub 或 GitLab"
msgid "From a git repository"
msgstr ""
#: ../../apps/launcher/src/settings-page.tsx
msgid "From Quiver Launcher 3. Keep this folder until you move its apps."
@@ -2331,6 +2345,10 @@ msgstr "获取 Quiver Launcher"
msgid "Getting ready…"
msgstr "正在准备 →"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "git.example.com"
msgstr ""
#: ../../apps/launcher/src/github-token.tsx
msgid "GitHub didn't accept that token, so it wasn't saved. Check that you copied all of it."
msgstr "GitHub 不接受该令牌,因此未保存。请检查是否已完整复制。"
@@ -2482,6 +2500,10 @@ msgstr "隐藏它们"
msgid "Hide your feedback for {name}"
msgstr "隐藏你对 {name} 的反馈"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Host"
msgstr ""
#: ../../apps/launcher/src/app-updates.tsx
msgid "How apps update"
msgstr "应用如何更新"
@@ -3887,6 +3909,10 @@ msgstr "其他文件"
msgid "Other platforms"
msgstr "其他平台"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Other repository tokens"
msgstr ""
#. Over the list of an app's versions, under Get's own button for its newest
#: ../../apps/launcher/src/detail.tsx
msgid "Other versions"
@@ -3906,8 +3932,8 @@ msgid "Overview"
msgstr "概览"
#: ../../apps/launcher/src/own.tsx
msgid "owner/name, or a github.com or gitlab.com address"
msgstr "owner/name,或 github.com、gitlab.com 地址"
msgid "owner/name, or a repository address (github.com, gitlab.com, codeberg.org, …)"
msgstr ""
#. Controller hint: what the triggers do in a library in another order, jump a screen at a time
#: ../../apps/launcher/src/spatial.ts
@@ -4186,6 +4212,10 @@ msgstr "Quiver 无法打开你的游戏库"
msgid "Quiver couldn't show that picture. It may have been moved or deleted."
msgstr "Quiver 无法显示此图片。它可能已被移动或删除。"
#: ../../apps/launcher/src/store.tsx
msgid "Quiver couldn't tell what kind of forge {host} is. Choose its kind and try again."
msgstr ""
#: ../../apps/launcher/src/own-copy-setup.tsx
msgid "Quiver didn't find one in your game folders."
msgstr "Quiver 在你的游戏文件夹中没有找到。"
@@ -4391,6 +4421,10 @@ msgstr "刷新"
msgid "Reinstall {installedVersion}"
msgstr "重新安装 {installedVersion}"
#: ../../apps/launcher/src/own.tsx
msgid "Release feed"
msgstr ""
#. Tab of an app's page
#. Which of an app's releases it gets: main releases only, or pre-releases too
#: ../../apps/launcher/src/App.tsx
@@ -4445,6 +4479,7 @@ msgstr "移除标签 {tag}"
#: ../../apps/launcher/src/github-token.tsx
#: ../../apps/launcher/src/gitlab-token.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Remove token"
msgstr "移除令牌"
@@ -4452,6 +4487,7 @@ msgstr "移除令牌"
#. The GitLab token was removed
#: ../../apps/launcher/src/github-token.tsx
#: ../../apps/launcher/src/gitlab-token.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Removed."
msgstr "已移除。"
@@ -4582,9 +4618,18 @@ msgstr "保存为播放列表"
#: ../../apps/launcher/src/github-token.tsx
#: ../../apps/launcher/src/gitlab-token.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Save token"
msgstr "保存令牌"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Saved."
msgstr ""
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Saved. Requests to {clean} use your token now."
msgstr ""
#: ../../apps/launcher/src/github-token.tsx
msgid "Saved. Requests to GitHub use your token now."
msgstr "已保存。现在,向 GitHub 发送请求时会使用你的令牌。"
@@ -4598,6 +4643,7 @@ msgid "Saves and settings come too. After that, you can delete your Quiver Launc
msgstr "存档和设置也会一起移动。之后你就可以删除 Quiver Launcher 3 文件夹。"
#: ../../apps/launcher/src/feedback.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Saving…"
msgstr "正在保存 →"
@@ -5236,6 +5282,10 @@ msgstr "感谢你分享运行体验。"
msgid "Thanks! A maintainer will take a look."
msgstr "谢谢!维护者会查看此问题。"
#: ../../apps/launcher/src/store.tsx
msgid "That address isn't a repository on {host}."
msgstr ""
#: ../../apps/launcher/src/store.tsx
msgid "That folder doesn't have an installed app in it."
msgstr "该文件夹中没有已安装的应用。"
@@ -5423,6 +5473,10 @@ msgstr "此应用可能会将存档保存在此文件夹中。卸载时,这些
msgid "This app may stop finding its saves and settings, because it will look for them in a different place. Nothing is deleted."
msgstr "此应用可能会无法找到存档和设置,因为它会在其他位置查找。不会删除任何内容。"
#: ../../apps/launcher/src/own.tsx
msgid "This app stays on this computer: account sync doesn't support this kind of host yet."
msgstr ""
#: ../../apps/launcher/src/store.tsx
msgid "This app's folder can't be moved."
msgstr "无法移动此应用的文件夹。"
@@ -5496,6 +5550,14 @@ msgstr "今天"
msgid "Today"
msgstr "今天"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Token"
msgstr ""
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Token for {host}"
msgstr ""
#: ../../apps/launcher/src/ways-to-play.tsx
msgid "Too few reports"
msgstr "反馈太少"
@@ -5858,13 +5920,10 @@ msgstr "超宽,约 1920 × 620。显示在应用页面和“继续游玩”后
msgid "View {version} on {host}"
msgstr "在 {host} 上查看 {version}"
#. placeholder {0}: providerName(source.provider, source.host)
#: ../../apps/launcher/src/card-menu.tsx
msgid "View on GitHub"
msgstr "在 GitHub 上查看"
#: ../../apps/launcher/src/card-menu.tsx
msgid "View on GitLab"
msgstr "在 GitLab 上查看"
msgid "View on {0}"
msgstr ""
#: ../../apps/launcher/src/App.tsx
#: ../../apps/launcher/src/library.tsx
@@ -5996,6 +6055,10 @@ msgstr "应用安装位置"
msgid "Where are your games?"
msgstr "你的游戏在哪里?"
#: ../../apps/launcher/src/own.tsx
msgid "Where it's hosted"
msgstr ""
#: ../../apps/launcher/src/settings-page.tsx
msgid "Where your Quiver Launcher 3 apps are, and Quiver's apps folder"
msgstr "你的 Quiver Launcher 3 应用所在位置,以及 Quiver 的应用文件夹"
+77 -14
View File
@@ -1192,6 +1192,10 @@ msgstr "Quiver 從目錄或程式碼儲存庫下載並更新的應用程式"
msgid "Apps that support it keep their saves and settings in their own folder. Apps you've already installed don't change."
msgstr "支援此功能的應用程式會將存檔和設定儲存在各自的資料夾中。你已經安裝的應用程式不會改變。"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Apps you add from a self-hosted forge, Codeberg, Bitbucket or a release feed use the token you save for that host. A token is kept in this computer's keychain and sent only to the host it belongs to."
msgstr ""
#: ../../apps/launcher/src/github-token.tsx
msgid "Apps you add from GitHub get their releases from GitHub itself, which allows this network 60 requests an hour, or 5,000 with a token. Apps from the catalog don't need one."
msgstr "你從 GitHub 新增的應用程式會直接從 GitHub 獲取版本。此網路每小時允許 60 次請求;使用權杖時為 5,000 次。目錄中的應用程式無需權杖。"
@@ -1507,6 +1511,7 @@ msgstr "正在檢查你的副本 →"
#: ../../apps/launcher/src/github-token.tsx
#: ../../apps/launcher/src/gitlab-token.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
#: ../../apps/launcher/src/update.tsx
msgid "Checking…"
msgstr "正在檢查 →"
@@ -1839,6 +1844,7 @@ msgstr "無法連線 quiverlauncher.com。請檢查網路連線,然後重試
#: ../../apps/launcher/src/github-token.tsx
#: ../../apps/launcher/src/gitlab-token.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Couldn't save the token. Try again."
msgstr "無法儲存權杖。請重試。"
@@ -1881,6 +1887,10 @@ msgstr "封面地址"
msgid "Crashes, poor performance, broken controls or features, or I had to do extra setup this page didn't mention."
msgstr "崩潰、效能不佳、控制或功能失效,或者我不得不進行此頁面未提及的額外設定。"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Create a token"
msgstr ""
#: ../../apps/launcher/src/github-token.tsx
msgid "Create a token on GitHub"
msgstr "在 GitHub 上建立權杖"
@@ -1954,6 +1964,10 @@ msgstr "桌面快捷方式"
msgid "Details"
msgstr "詳細資訊"
#: ../../apps/launcher/src/own.tsx
msgid "Detect it"
msgstr ""
#. Tag on a reply from the app's verified developer
#: ../../apps/launcher/src/feedback.tsx
msgid "Developer"
@@ -2144,14 +2158,14 @@ msgstr "電子郵件、使用者名稱或密碼不正確。"
msgid "Emulator"
msgstr "模擬器"
#: ../../apps/launcher/src/store.tsx
msgid "Enter a GitHub or GitLab repository: owner/name, or its github.com or gitlab.com address."
msgstr "輸入 GitHub 或 GitLab 程式碼儲存庫:owner/name,或其 github.com、gitlab.com 地址。"
#: ../../apps/launcher/src/store.tsx
msgid "Enter a name for its folder."
msgstr "為其資料夾輸入名稱。"
#: ../../apps/launcher/src/store.tsx
msgid "Enter a repository: owner/name, or its address on a forge."
msgstr ""
#: ../../apps/launcher/src/own-copy-settings.tsx
msgid "Every console"
msgstr "所有主機"
@@ -2280,8 +2294,8 @@ msgid "Found in {folder}"
msgstr "在 {folder} 中找到"
#: ../../apps/launcher/src/own.tsx
msgid "From GitHub or GitLab"
msgstr "來自 GitHub 或 GitLab"
msgid "From a git repository"
msgstr ""
#: ../../apps/launcher/src/settings-page.tsx
msgid "From Quiver Launcher 3. Keep this folder until you move its apps."
@@ -2331,6 +2345,10 @@ msgstr "獲取 Quiver Launcher"
msgid "Getting ready…"
msgstr "正在準備 →"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "git.example.com"
msgstr ""
#: ../../apps/launcher/src/github-token.tsx
msgid "GitHub didn't accept that token, so it wasn't saved. Check that you copied all of it."
msgstr "GitHub 不接受該權杖,因此未儲存。請檢查是否已完整複製。"
@@ -2482,6 +2500,10 @@ msgstr "隱藏它們"
msgid "Hide your feedback for {name}"
msgstr "隱藏你對 {name} 的反饋"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Host"
msgstr ""
#: ../../apps/launcher/src/app-updates.tsx
msgid "How apps update"
msgstr "應用程式如何更新"
@@ -3887,6 +3909,10 @@ msgstr "其他檔案"
msgid "Other platforms"
msgstr "其他平臺"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Other repository tokens"
msgstr ""
#. Over the list of an app's versions, under Get's own button for its newest
#: ../../apps/launcher/src/detail.tsx
msgid "Other versions"
@@ -3906,8 +3932,8 @@ msgid "Overview"
msgstr "概覽"
#: ../../apps/launcher/src/own.tsx
msgid "owner/name, or a github.com or gitlab.com address"
msgstr "owner/name,或 github.com、gitlab.com 地址"
msgid "owner/name, or a repository address (github.com, gitlab.com, codeberg.org, …)"
msgstr ""
#. Controller hint: what the triggers do in a library in another order, jump a screen at a time
#: ../../apps/launcher/src/spatial.ts
@@ -4186,6 +4212,10 @@ msgstr "Quiver 無法開啟你的遊戲庫"
msgid "Quiver couldn't show that picture. It may have been moved or deleted."
msgstr "Quiver 無法顯示此圖片。它可能已被移動或刪除。"
#: ../../apps/launcher/src/store.tsx
msgid "Quiver couldn't tell what kind of forge {host} is. Choose its kind and try again."
msgstr ""
#: ../../apps/launcher/src/own-copy-setup.tsx
msgid "Quiver didn't find one in your game folders."
msgstr "Quiver 在你的遊戲資料夾中沒有找到。"
@@ -4391,6 +4421,10 @@ msgstr "重新整理"
msgid "Reinstall {installedVersion}"
msgstr "重新安裝 {installedVersion}"
#: ../../apps/launcher/src/own.tsx
msgid "Release feed"
msgstr ""
#. Tab of an app's page
#. Which of an app's releases it gets: main releases only, or pre-releases too
#: ../../apps/launcher/src/App.tsx
@@ -4445,6 +4479,7 @@ msgstr "移除標籤 {tag}"
#: ../../apps/launcher/src/github-token.tsx
#: ../../apps/launcher/src/gitlab-token.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Remove token"
msgstr "移除權杖"
@@ -4452,6 +4487,7 @@ msgstr "移除權杖"
#. The GitLab token was removed
#: ../../apps/launcher/src/github-token.tsx
#: ../../apps/launcher/src/gitlab-token.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Removed."
msgstr "已移除。"
@@ -4582,9 +4618,18 @@ msgstr "儲存為播放清單"
#: ../../apps/launcher/src/github-token.tsx
#: ../../apps/launcher/src/gitlab-token.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Save token"
msgstr "儲存權杖"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Saved."
msgstr ""
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Saved. Requests to {clean} use your token now."
msgstr ""
#: ../../apps/launcher/src/github-token.tsx
msgid "Saved. Requests to GitHub use your token now."
msgstr "已儲存。現在,向 GitHub 傳送請求時會使用你的權杖。"
@@ -4598,6 +4643,7 @@ msgid "Saves and settings come too. After that, you can delete your Quiver Launc
msgstr "存檔和設定也會一起移動。之後你就可以刪除 Quiver Launcher 3 資料夾。"
#: ../../apps/launcher/src/feedback.tsx
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Saving…"
msgstr "正在儲存 →"
@@ -5236,6 +5282,10 @@ msgstr "感謝你分享執行體驗。"
msgid "Thanks! A maintainer will take a look."
msgstr "謝謝!維護者會檢視此問題。"
#: ../../apps/launcher/src/store.tsx
msgid "That address isn't a repository on {host}."
msgstr ""
#: ../../apps/launcher/src/store.tsx
msgid "That folder doesn't have an installed app in it."
msgstr "該資料夾中沒有已安裝的應用程式。"
@@ -5423,6 +5473,10 @@ msgstr "此應用程式可能會將存檔儲存在此資料夾中。解除安裝
msgid "This app may stop finding its saves and settings, because it will look for them in a different place. Nothing is deleted."
msgstr "此應用程式可能會無法找到存檔和設定,因為它會在其他位置查詢。不會刪除任何內容。"
#: ../../apps/launcher/src/own.tsx
msgid "This app stays on this computer: account sync doesn't support this kind of host yet."
msgstr ""
#: ../../apps/launcher/src/store.tsx
msgid "This app's folder can't be moved."
msgstr "無法移動此應用程式的資料夾。"
@@ -5496,6 +5550,14 @@ msgstr "今天"
msgid "Today"
msgstr "今天"
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Token"
msgstr ""
#: ../../apps/launcher/src/repository-tokens.tsx
msgid "Token for {host}"
msgstr ""
#: ../../apps/launcher/src/ways-to-play.tsx
msgid "Too few reports"
msgstr "回報太少"
@@ -5858,13 +5920,10 @@ msgstr "超寬,約 1920 × 620。顯示在應用程式頁面和“繼續遊玩
msgid "View {version} on {host}"
msgstr "在 {host} 上檢視 {version}"
#. placeholder {0}: providerName(source.provider, source.host)
#: ../../apps/launcher/src/card-menu.tsx
msgid "View on GitHub"
msgstr "在 GitHub 上檢視"
#: ../../apps/launcher/src/card-menu.tsx
msgid "View on GitLab"
msgstr "在 GitLab 上檢視"
msgid "View on {0}"
msgstr ""
#: ../../apps/launcher/src/App.tsx
#: ../../apps/launcher/src/library.tsx
@@ -5996,6 +6055,10 @@ msgstr "應用程式安裝位置"
msgid "Where are your games?"
msgstr "你的遊戲在哪裡?"
#: ../../apps/launcher/src/own.tsx
msgid "Where it's hosted"
msgstr ""
#: ../../apps/launcher/src/settings-page.tsx
msgid "Where your Quiver Launcher 3 apps are, and Quiver's apps folder"
msgstr "你的 Quiver Launcher 3 應用程式所在位置,以及 Quiver 的應用程式資料夾"