Skip to content
This repository has been archived by the owner on Jun 17, 2022. It is now read-only.

Commit

Permalink
Merge pull request #201 from hyperspacedev/develop-1.1.1
Browse files Browse the repository at this point in the history
HD-64 #done
  • Loading branch information
alicerunsonfedora authored Apr 17, 2020
2 parents d6f9225 + 1ba6308 commit a86b97c
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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 <hyperspacedev@marquiskurt.net>",
"repository": "https://github.com/hyperspacedev/hyperspace.git",
Expand Down
2 changes: 1 addition & 1 deletion public/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.1.0",
"version": "1.1.1",
"location": "https://hyperspaceapp.herokuapp.com",
"branding": {
"name": "Hyperspace",
Expand Down
3 changes: 3 additions & 0 deletions src/components/AppLayout/AppLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -721,6 +721,7 @@ export class AppLayout extends Component<any, IAppLayoutState> {
<div>
<LinkableListItem
button={true}
onClick={this.toggleAcctMenu}
to={`/profile/${
this.state.currentUser
? this.state.currentUser
Expand Down Expand Up @@ -765,6 +766,7 @@ export class AppLayout extends Component<any, IAppLayoutState> {
<Divider />
<LinkableListItem
button={true}
onClick={this.toggleAcctMenu}
to={"/you"}
>
<ListItemText>
Expand All @@ -773,6 +775,7 @@ export class AppLayout extends Component<any, IAppLayoutState> {
</LinkableListItem>
<LinkableListItem
button={true}
onClick={this.toggleAcctMenu}
to={"/requests"}
>
<ListItemText>
Expand Down
15 changes: 11 additions & 4 deletions src/utilities/settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<Config | undefined> {
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 + "/";
}
Expand Down

0 comments on commit a86b97c

Please sign in to comment.