commit
a86b97c46c
|
@ -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",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"version": "1.1.0",
|
||||
"version": "1.1.1",
|
||||
"location": "https://hyperspaceapp.herokuapp.com",
|
||||
"branding": {
|
||||
"name": "Hyperspace",
|
||||
|
|
|
@ -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
|
||||
|
@ -765,6 +766,7 @@ export class AppLayout extends Component<any, IAppLayoutState> {
|
|||
<Divider />
|
||||
<LinkableListItem
|
||||
button={true}
|
||||
onClick={this.toggleAcctMenu}
|
||||
to={"/you"}
|
||||
>
|
||||
<ListItemText>
|
||||
|
@ -773,6 +775,7 @@ export class AppLayout extends Component<any, IAppLayoutState> {
|
|||
</LinkableListItem>
|
||||
<LinkableListItem
|
||||
button={true}
|
||||
onClick={this.toggleAcctMenu}
|
||||
to={"/requests"}
|
||||
>
|
||||
<ListItemText>
|
||||
|
|
|
@ -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 + "/";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue