Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JA-52: Add branding elements into the UI. #34

Merged
merged 2 commits into from
Aug 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "j-assistant",
"version": "1.0.0",
"version": "1.0.1",
"private": true,
"dependencies": {
"axios": "^0.19.0",
Expand All @@ -25,7 +25,7 @@
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"homepage": "https://j-assistant.wangjin.me/",
"homepage": "https://jassistant.xyz/",
"eslintConfig": {
"extends": "react-app"
},
Expand Down
Binary file modified public/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 11 additions & 1 deletion src/components/Navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import PropTypes from "prop-types";
import { NavLink, Redirect, withRouter } from "react-router-dom";
import { connect } from "react-redux";

// Bootstrap
import Image from "react-bootstrap/Image";

class Navigation extends React.Component {
render () {
if (!this.props.loginStatus
Expand All @@ -13,7 +16,14 @@ class Navigation extends React.Component {

return (
<nav className="navbar navbar-expand-lg navbar-dark bg-primary">
<NavLink className="navbar-brand header" to="/">{ this.props.appName }</NavLink>
<NavLink className="navbar-brand header" to="/">
{ this.props.appName === "jAssistant"
? <Image src={ require("../images/logo_right_120.png") }
alt="jAssistant"
fluid />
: this.props.appName
}
</NavLink>
<button className="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown"
aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
<span className="navbar-toggler-icon" />
Expand Down
12 changes: 11 additions & 1 deletion src/components/Settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,15 @@ class Settings extends React.Component {
});
});

resetAppName = () => {
this.setState({
generalSettings: {
...this.state.generalSettings,
appName: "jAssistant"
}
});
}

updateAppName = e => {
this.setState({
generalSettings: {
Expand Down Expand Up @@ -106,7 +115,8 @@ class Settings extends React.Component {
value={ this.state.generalSettings.appName }
onChange={ this.updateAppName } />
<Form.Text>
The App Name will be displayed at the top-left corner of every page, as well as in the title bar of your browser.
The App Name will be displayed at the top-left corner of every page, as well as in the title bar of your browser.<br />
If you leave it as <span className="text-success clickable" onClick={ this.resetAppName }>jAssistant</span>, the jAssistant logo will be displayed. :)
</Form.Text>
</Form.Group>
<StateButton buttonType="primary"
Expand Down
Binary file added src/images/logo_right_120.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.