diff --git a/package.json b/package.json index e0362ca..c109939 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "hyperspace", "productName": "Hyperspace Desktop", - "version": "1.1.0", + "version": "1.1.1", "description": "A beautiful, fluffy client for the fediverse", "author": "Marquis Kurt ", "repository": "https://github.com/hyperspacedev/hyperspace.git", diff --git a/public/config.json b/public/config.json index 339ce29..9e53599 100644 --- a/public/config.json +++ b/public/config.json @@ -1,5 +1,5 @@ { - "version": "1.1.0", + "version": "1.1.1", "location": "https://hyperspaceapp.herokuapp.com", "branding": { "name": "Hyperspace", diff --git a/src/components/AppLayout/AppLayout.tsx b/src/components/AppLayout/AppLayout.tsx index 8dbf6c0..c0fda03 100644 --- a/src/components/AppLayout/AppLayout.tsx +++ b/src/components/AppLayout/AppLayout.tsx @@ -721,6 +721,7 @@ export class AppLayout extends Component {
{ @@ -773,6 +775,7 @@ export class AppLayout extends Component { diff --git a/src/utilities/settings.tsx b/src/utilities/settings.tsx index 5243875..3e97fac 100644 --- a/src/utilities/settings.tsx +++ b/src/utilities/settings.tsx @@ -133,18 +133,25 @@ export function createUserDefaults() { } /** - * Gets the configuration data from `config.json` + * Gets the configuration data from `config.json`. + * + * In scenarios where the app is being run from the desktop or from a local React server + * started by react-scripts, the location field is adjusted accordingly. + * * @returns The Promise data from getting the config. */ export async function getConfig(): Promise { try { const resp = await axios.get("config.json"); - let { location } = resp.data; + let { location }: { location: string } = resp.data; - if (!location.endsWith("/")) { + if ( + !location.endsWith("/") && + (location !== "desktop" && location !== "dynamic") + ) { console.info( - "Location does not have a backslash, so Hyperspace has added it automatically." + "Location does not have a forward slash, so Hyperspace has added it automatically." ); resp.data.location = location + "/"; }