Skip to content

Commit

Permalink
Simple 'about' window
Browse files Browse the repository at this point in the history
  • Loading branch information
nukeop committed Apr 17, 2019
1 parent fc42799 commit cdcbfdb
Show file tree
Hide file tree
Showing 8 changed files with 82 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import settingsConst from './constants/settings';

import PlaylistsSubMenu from './components/PlaylistsSubMenu';
import Footer from './components/Footer';
import HelpButton from './components/HelpButton';
import HelpModal from './components/HelpModal';
import Navbar from './components/Navbar';
import VerticalPanel from './components/VerticalPanel';
import Spacer from './components/Spacer';
Expand Down Expand Up @@ -110,7 +110,7 @@ class App extends React.Component {
<SearchBoxContainer />
<Spacer />
<Spacer />
<HelpButton />
<HelpModal />
{this.props.settings.framelessWindow && <WindowControls />}
</Navbar>
);
Expand Down
1 change: 1 addition & 0 deletions app/components/Downloads/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

.downloads_container {
position: relative;
height: 100%;

.empty_state {
@include emptyState;
Expand Down
1 change: 1 addition & 0 deletions app/components/HelpButton/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const HelpButton = props => {
return (
<Button icon
className={styles.help_button}
{ ...props }
>
<Icon name='question circle outline'/>
</Button>
Expand Down
7 changes: 7 additions & 0 deletions app/components/HelpModal/const.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
agplDisclaimer: 'This program is free software: you can redistribute'
+ ' it and/or modify it under the terms of the GNU Affero General'
+ ' Public License as published by the Free Software Foundation,'
+ ' either version 3 of the License, or (at your option) any later'
+ ' version. See the GNU Affero General Public License for more details.'
};
62 changes: 62 additions & 0 deletions app/components/HelpModal/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import React from 'react';
import {
Button,
Header,
Image,
Modal
} from 'semantic-ui-react';

import HelpButton from '../HelpButton';
import { agplDisclaimer } from './const';

import logoImg from '../../../resources/media/logo_full_light.png';
import styles from './styles.scss';

class HelpModal extends React.Component {
constructor(props) {
super(props);

this.state = {
open: false
};
}

handleOpen() {
this.setState({ open: true });
}

handleClose() {
this.setState({ open: false });
}

render() {
return (
<Modal
open={ this.state.open }
onClose={ this.handleClose.bind(this) }
basic
centered
dimmer='blurring'
trigger={ <HelpButton onClick={ this.handleOpen.bind(this) } /> }
className={ styles.help_modal }
>
<Modal.Header>About Nuclear Music Player</Modal.Header>
<Modal.Content image>
<Image wrapped size='medium' src={logoImg}/>
<Modal.Description>
<Header inverted>Desktop music player for streaming from free sources</Header>
<p>Copyright © <a href='https://github.com/nukeop/'>nukeop</a> 2019, released under AGPL-3.0</p>
<p>Many thanks to our contributors on Github, your help was vital in creating this program.</p>
</Modal.Description>
</Modal.Content>
<Modal.Content>
<Modal.Description>
{ agplDisclaimer }
</Modal.Description>
</Modal.Content>
</Modal>
);
}
}

export default HelpModal;
9 changes: 9 additions & 0 deletions app/components/HelpModal/styles.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@import '../../vars.scss';

.help_modal {
top: 25% !important;
color: rgba($white, 0.75) !important;
a {
color: $cyan;
}
}
2 changes: 0 additions & 2 deletions app/components/InputDialog/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import React from 'react';
import { Button, Input, Modal } from 'semantic-ui-react';

import styles from './styles.scss';

class InputDialog extends React.Component {
constructor(props) {
super(props);
Expand Down
1 change: 0 additions & 1 deletion app/components/PlayQueue/QueueMenu/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import FontAwesome from 'react-fontawesome';
import _ from 'lodash';

import InputDialog from '../../InputDialog';
import Spacer from '../../Spacer';

import styles from './styles.scss';
import globalStyles from '../../../app.global.scss';
Expand Down

0 comments on commit cdcbfdb

Please sign in to comment.