Merge branch 'b2u3' of github.com:hyperspacedev/hyperspace into defederate
This commit is contained in:
commit
3010a77c9b
|
@ -34,6 +34,7 @@ interface IWelcomeState {
|
|||
openAuthDialog: boolean;
|
||||
authCode: string;
|
||||
emergencyMode: boolean;
|
||||
version: string;
|
||||
}
|
||||
|
||||
class WelcomePage extends Component<IWelcomeProps, IWelcomeState> {
|
||||
|
@ -53,7 +54,8 @@ class WelcomePage extends Component<IWelcomeProps, IWelcomeState> {
|
|||
defaultRedirectAddress: '',
|
||||
openAuthDialog: false,
|
||||
authCode: '',
|
||||
emergencyMode: false
|
||||
emergencyMode: false,
|
||||
version: ''
|
||||
}
|
||||
|
||||
getConfig().then((result: any) => {
|
||||
|
@ -68,7 +70,8 @@ class WelcomePage extends Component<IWelcomeProps, IWelcomeState> {
|
|||
federates: result.federated? result.federated === "true": true,
|
||||
license: result.license.url,
|
||||
repo: result.repository,
|
||||
defaultRedirectAddress: result.location != "dynamic"? result.location: `https://${window.location.host}`
|
||||
defaultRedirectAddress: result.location != "dynamic"? result.location: `https://${window.location.host}`,
|
||||
version: result.version
|
||||
});
|
||||
}).catch(() => {
|
||||
console.error('config.json is missing. If you want to customize Hyperspace, please include config.json');
|
||||
|
@ -287,9 +290,9 @@ class WelcomePage extends Component<IWelcomeProps, IWelcomeState> {
|
|||
<div className={classes.middlePadding}/>
|
||||
<TextField
|
||||
variant="outlined"
|
||||
label="Account name"
|
||||
label="Username"
|
||||
fullWidth
|
||||
placeholder="example@mastodon.host"
|
||||
placeholder="example@mastodon.example"
|
||||
onChange={(event) => this.updateUserInfo(event.target.value)}
|
||||
error={this.state.userInputError}
|
||||
onBlur={() => this.checkForErrors()}
|
||||
|
@ -299,13 +302,13 @@ class WelcomePage extends Component<IWelcomeProps, IWelcomeState> {
|
|||
}
|
||||
<br/>
|
||||
{
|
||||
this.state.registerBase? <Typography variant="caption">If you are from <b>{this.state.registerBase? this.state.registerBase: "noinstance"}</b>, sign in with your username.</Typography>: null
|
||||
this.state.registerBase? <Typography variant="caption">Not from <b>{this.state.registerBase? this.state.registerBase: "noinstance"}</b>? Sign in with your <Link href="https://docs.joinmastodon.org/usage/decentralization/#addressing-people" target="_blank" rel="noopener noreferrer" color="secondary">full username</Link>.</Typography>: null
|
||||
}
|
||||
<br/>
|
||||
{
|
||||
this.state.foundSavedLogin?
|
||||
<Typography>
|
||||
Signing in from a previous session? <Link onClick={() => this.resumeLogin()}>Continue login</Link>.
|
||||
Signing in from a previous session? <Link className={classes.welcomeLink} onClick={() => this.resumeLogin()}>Continue login</Link>.
|
||||
</Typography>: null
|
||||
}
|
||||
|
||||
|
@ -313,7 +316,6 @@ class WelcomePage extends Component<IWelcomeProps, IWelcomeState> {
|
|||
<div style={{ display: "flex" }}>
|
||||
<Tooltip title="Create account on site">
|
||||
<Button
|
||||
color="primary"
|
||||
href={this.startRegistration()}
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
|
@ -349,7 +351,7 @@ class WelcomePage extends Component<IWelcomeProps, IWelcomeState> {
|
|||
<div className={classes.flexGrow}/>
|
||||
</div>
|
||||
<div className={classes.middlePadding}/>
|
||||
<Typography>Having trouble signing in? <Link onClick={() => this.startEmergencyLogin()}>Sign in with a code.</Link></Typography>
|
||||
<Typography>Having trouble signing in? <Link onClick={() => this.startEmergencyLogin()} className={classes.welcomeLink}>Sign in with a code.</Link></Typography>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
@ -429,10 +431,16 @@ class WelcomePage extends Component<IWelcomeProps, IWelcomeState> {
|
|||
</Fade>
|
||||
<br/>
|
||||
<Typography variant="caption">
|
||||
© {new Date().getFullYear()} {this.state.brandName && this.state.brandName !== "Hyperspace"? `${this.state.brandName} developers and the `: ""}<Link href="https://hyperspace.marquiskurt.net" target="_blank" rel="noreferrer">Hyperspace</Link> developers. All rights reserved.
|
||||
© {new Date().getFullYear()} {this.state.brandName && this.state.brandName !== "Hyperspace"? `${this.state.brandName} developers and the `: ""} <Link className={classes.welcomeLink} href="https://hyperspace.marquiskurt.net" target="_blank" rel="noreferrer">Hyperspace</Link> developers. All rights reserved.
|
||||
</Typography>
|
||||
<Typography variant="caption">
|
||||
{ this.state.repo? <span><Link href={this.state.repo? this.state.repo: "https://github.com/hyperspacedev"} target="_blank" rel="noreferrer">Source code</Link> | </span>: null}<Link href={this.state.license? this.state.license: "https://www.apache.org/licenses/LICENSE-2.0"} target="_blank" rel="noreferrer">License</Link> | <Link href="https://github.com/hyperspacedev/hyperspace/issues/new" target="_blank" rel="noreferrer">File an Issue</Link>
|
||||
{ this.state.repo? <span>
|
||||
<Link className={classes.welcomeLink} href={this.state.repo? this.state.repo: "https://github.com/hyperspacedev"} target="_blank" rel="noreferrer">Source code</Link> | </span>: null}
|
||||
<Link className={classes.welcomeLink} href={this.state.license? this.state.license: "https://www.apache.org/licenses/LICENSE-2.0"} target="_blank" rel="noreferrer">License</Link> |
|
||||
<Link className={classes.welcomeLink} href="https://github.com/hyperspacedev/hyperspace/issues/new" target="_blank" rel="noreferrer">File an Issue</Link>
|
||||
</Typography>
|
||||
<Typography variant="caption" color="textSecondary">
|
||||
{this.state.brandName? this.state.brandName: "Hypersapce"} v.{this.state.version} {this.state.brandName && this.state.brandName !== "Hyperspace"? "(Hyperspace-like)": null}
|
||||
</Typography>
|
||||
</Paper>
|
||||
{this.showAuthDialog()}
|
||||
|
|
|
@ -34,9 +34,9 @@ export const styles = (theme: Theme) => createStyles({
|
|||
paddingRight: theme.spacing.unit * 4,
|
||||
paddingBottom: theme.spacing.unit * 6,
|
||||
textAlign: 'center',
|
||||
'& a': {
|
||||
color: theme.palette.primary.light
|
||||
}
|
||||
},
|
||||
welcomeLink: {
|
||||
color: theme.palette.primary.light
|
||||
},
|
||||
flexGrow: {
|
||||
flexGrow: 1
|
||||
|
|
Loading…
Reference in New Issue