diff --git a/explorer/README.md b/explorer/README.md index e8d5c1b16..9e8b8cb02 100644 --- a/explorer/README.md +++ b/explorer/README.md @@ -42,10 +42,10 @@ There are several ways to deploy the UI publicly. Here are two common options: `explorer/` to create a build for deployment 2. Configure your web server to serve the contents of the `/build` directory -**Using Vercel (or similar static file hosting):** +**Using static file hosting:** 1. Fork this repository to create your own version -2. Configure your Vercel account to deploy the forked repository +2. Configure your hosting provider to deploy the forked repository **Add Rewrite Rules for Client-Side Routing** @@ -74,21 +74,12 @@ There are two ways to configure the UI: **at build time** and **at run time**. ### Build-Time Configuration -This method is recommended when deploying to static hosting platforms such as -Vercel. - -#### Option 1: Create a `local.json` file +This method is recommended when deploying to static hosting platforms. 1. Copy [`default.json`][def] to a new file in the same directory called `local.json`. 2. Modify the properties in `local.json` to suit your setup. -#### Option 2: Use environment variables - -1. Refer to [`custom-environment-variables.json`][env] for a list of supported - environment variables. -2. Set the desired variables in your environment before building the UI. - > For advanced configuration options, refer to the [`node-config`][nco] > documentation. @@ -230,7 +221,6 @@ The UI is distributed under the terms of GPLv3. See [LICENSE][lic] for details. [app]: https://radicle.network [con]: ../CONTRIBUTING.md [def]: ./config/default.json -[env]: ./config/custom-environment-variables.json [iss]: https://radicle.network/nodes/iris.radicle.network/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5/issues [lic]: ./LICENSE diff --git a/explorer/config/custom-environment-variables.json b/explorer/config/custom-environment-variables.json deleted file mode 100644 index 0cd9c6817..000000000 --- a/explorer/config/custom-environment-variables.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "nodes": { - "fallbackPublicExplorer": "FALLBACK_PUBLIC_EXPLORER", - "defaultHttpdPort": "DEFAULT_HTTPD_PORT", - "defaultLocalHttpdPort": "DEFAULT_LOCAL_HTTPD_PORT", - "defaultHttpdScheme": "DEFAULT_HTTPD_SCHEME" - }, - "source": { - "commitsPerPage": "COMMITS_PER_PAGE" - }, - "supportWebsite": "SUPPORT_WEBSITE", - "deploymentId": "VERCEL_DEPLOYMENT_ID", - "fallbackPreferredSeed": { - "__name": "PREFERRED_SEEDS", - "__format": "json" - } -} diff --git a/explorer/config/default.json b/explorer/config/default.json index 05a73f735..3d22faafa 100644 --- a/explorer/config/default.json +++ b/explorer/config/default.json @@ -10,7 +10,6 @@ "commitsPerPage": 30 }, "supportWebsite": "https://radicle.zulipchat.com", - "deploymentId": null, "preferredSeeds": [ { "hostname": "rosa.radicle.network", diff --git a/explorer/http-client/lib/fetcher.ts b/explorer/http-client/lib/fetcher.ts index ce61b2e05..a73bd5228 100644 --- a/explorer/http-client/lib/fetcher.ts +++ b/explorer/http-client/lib/fetcher.ts @@ -3,7 +3,6 @@ import type { ZodIssue, ZodType, TypeOf } from "zod"; -import config from "@app/lib/config"; import { isOutdated, minimumSupportedVersion, @@ -68,11 +67,8 @@ export class ResponseParseError extends Error { ? ` It runs radicle-httpd ${releaseNumber(nodeVersion)}, but explorer needs ${minimumSupportedVersion} or newer. Its operator should upgrade it.` : ""; this.description = - `${node} sent a response that radicle-explorer can’t parse.${outdated}`.concat( - config.deploymentId - ? "" - : " If you are self-hosting radicle-explorer, try to clear the browser’s localStorage and the cache.", - ); + `${node} sent a response that radicle-explorer can’t parse.${outdated}` + + " If you are self-hosting radicle-explorer, try to clear the browser’s localStorage and the cache."; this.method = method; this.path = path; @@ -115,11 +111,6 @@ export class Fetcher { params: FetchParams, schema: T, ): Promise> { - if (config.deploymentId) { - params.query ||= {}; - params.query["deployment_id"] = config.deploymentId; - } - const response = await this.fetch(params); if (!response.ok) { diff --git a/explorer/module.d.ts b/explorer/module.d.ts index 1dc36cb0f..ce50ec5b1 100644 --- a/explorer/module.d.ts +++ b/explorer/module.d.ts @@ -15,7 +15,6 @@ declare const buildTimeConfig: { source: { commitsPerPage: number; }; - deploymentId: string | null; reactions: string[]; supportWebsite: string; preferredSeeds: BaseUrl[];