Merge pull request #201 from hyperspacedev/develop-1.1.1

HD-64 #done
This commit is contained in:
Marquis Kurt 2020-04-17 16:43:33 -04:00 committed by GitHub
commit a86b97c46c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 6 deletions

View File

@ -1,7 +1,7 @@
{ {
"name": "hyperspace", "name": "hyperspace",
"productName": "Hyperspace Desktop", "productName": "Hyperspace Desktop",
"version": "1.1.0", "version": "1.1.1",
"description": "A beautiful, fluffy client for the fediverse", "description": "A beautiful, fluffy client for the fediverse",
"author": "Marquis Kurt <hyperspacedev@marquiskurt.net>", "author": "Marquis Kurt <hyperspacedev@marquiskurt.net>",
"repository": "https://github.com/hyperspacedev/hyperspace.git", "repository": "https://github.com/hyperspacedev/hyperspace.git",

View File

@ -1,5 +1,5 @@
{ {
"version": "1.1.0", "version": "1.1.1",
"location": "https://hyperspaceapp.herokuapp.com", "location": "https://hyperspaceapp.herokuapp.com",
"branding": { "branding": {
"name": "Hyperspace", "name": "Hyperspace",

View File

@ -721,6 +721,7 @@ export class AppLayout extends Component<any, IAppLayoutState> {
<div> <div>
<LinkableListItem <LinkableListItem
button={true} button={true}
onClick={this.toggleAcctMenu}
to={`/profile/${ to={`/profile/${
this.state.currentUser this.state.currentUser
? this.state.currentUser ? this.state.currentUser
@ -765,6 +766,7 @@ export class AppLayout extends Component<any, IAppLayoutState> {
<Divider /> <Divider />
<LinkableListItem <LinkableListItem
button={true} button={true}
onClick={this.toggleAcctMenu}
to={"/you"} to={"/you"}
> >
<ListItemText> <ListItemText>
@ -773,6 +775,7 @@ export class AppLayout extends Component<any, IAppLayoutState> {
</LinkableListItem> </LinkableListItem>
<LinkableListItem <LinkableListItem
button={true} button={true}
onClick={this.toggleAcctMenu}
to={"/requests"} to={"/requests"}
> >
<ListItemText> <ListItemText>

View File

@ -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. * @returns The Promise data from getting the config.
*/ */
export async function getConfig(): Promise<Config | undefined> { export async function getConfig(): Promise<Config | undefined> {
try { try {
const resp = await axios.get("config.json"); 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( 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 + "/"; resp.data.location = location + "/";
} }