Skip to content

Commit

Permalink
Merge pull request #42 from hql287/update-settings-tour-window
Browse files Browse the repository at this point in the history
Update settings tour window
  • Loading branch information
hql287 authored Dec 5, 2017
2 parents b77cf45 + a39e179 commit a9dbd95
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 63 deletions.
8 changes: 0 additions & 8 deletions app/components/layout/AppUpdate.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,10 @@ class AppUpdate extends Component {
}

componentDidMount() {
// Checkinf For Update
ipc.on('update-checking', event => {
this.setState({message: 'Checking for update'});
});

// Update available, ask user to download or not
ipc.on('update-available', () => {
openDialog(
{
Expand All @@ -70,7 +68,6 @@ class AppUpdate extends Component {
);
});

// Update Not Available
ipc.on('update-not-available', () => {
openDialog({
type: 'info',
Expand All @@ -80,7 +77,6 @@ class AppUpdate extends Component {
this.removeMessage();
});

// Update Error
ipc.on('update-error', (event, error) => {
openDialog({
type: 'warning',
Expand All @@ -90,7 +86,6 @@ class AppUpdate extends Component {
this.removeMessage();
});

// Update Download Confirm
ipc.on('update-download-confirmed', (event, index) => {
// Start the download
if (index === 0) {
Expand All @@ -106,14 +101,12 @@ class AppUpdate extends Component {
}
});

// Download Progress
ipc.on('update-download-progress', (event, progressMessage) => {
this.setState({
message: progressMessage
});
});

// Update Downloaded
ipc.on('update-downloaded', () => {
// Update Message
this.setState({
Expand All @@ -131,7 +124,6 @@ class AppUpdate extends Component {
);
});

// Upgrade Confirmation
ipc.on('upgrade-confirmed', (event, index) => {
if (index === 0) {
ipc.send('restart-app');
Expand Down
69 changes: 29 additions & 40 deletions app/components/settings/AppSettings.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,61 +71,50 @@ class AppSettings extends Component {
return (
<div>
<div className="row">
<div className="pageItem col-md-6">
<label className="itemLabel">Export Directory</label>
<div className="input-group">
<input
className="form-control"
name="exportDir"
type="text"
value={this.state.exportDir}
disabled
/>
<a
href="#"
className="input-group-customized "
onClick={this.selectExportDir}>
<i className="ion-folder" />
</a>
</div>
</div>
<div className="col-md-12">
<div className="pageItem">
<label className="itemLabel">Export Directory</label>

<div className="pageItem col-md-6">
<label className="itemLabel">Template</label>
<select
name="template"
value={this.state.template}
onChange={this.handleInputChange}>
<option value="minimal">Minimal</option>
<option value="business">Business</option>
{/*
<option value="modern">Modern</option>
*/}
</select>
<div className="input-group">
<input
className="form-control"
name="exportDir"
type="text"
value={this.state.exportDir}
disabled
/>
<a
href="#"
className="input-group-customized "
onClick={this.selectExportDir}>
<i className="ion-folder" />
</a>
</div>
</div>
</div>
</div>

<div className="row">
<div className="col-md-6">
<div className="pageItem">
<label className="itemLabel">Default Language</label>
<label className="itemLabel">Default Currency</label>
<select
name="language"
value={this.state.language}
name="currency"
value={this.state.currency}
onChange={this.handleInputChange}>
<option value="en">English</option>
<option value="vi">Vietnamese</option>
{currenciesOptions}
</select>
</div>
</div>
<div className="col-md-6">
<div className="pageItem">
<label className="itemLabel">Default Currency</label>
<label className="itemLabel">Default Template</label>
<select
name="currency"
value={this.state.currency}
name="template"
value={this.state.template}
onChange={this.handleInputChange}>
{currenciesOptions}
<option value="minimal">Minimal</option>
<option value="business">Business</option>
</select>
</div>
</div>
Expand All @@ -146,7 +135,7 @@ class AppSettings extends Component {
</div>
<div className="col-md-6">
<div className="pageItem">
<label className="itemLabel">Muted?</label>
<label className="itemLabel">Mute Sound?</label>
<label className="switch">
<input
name="muted"
Expand Down
15 changes: 8 additions & 7 deletions app/renderers/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,6 @@ let menuTemplate = [
ipc.send('start-tour');
},
},
{
label: 'Check For Updates',
accelerator: 'CmdOrCtrl+U',
click() {
ipc.send('check-for-updates');
},
},
{
label: 'Learn More',
click() {
Expand All @@ -178,6 +171,14 @@ if (process.platform === 'darwin') {
submenu: [
{role: 'about'},
{type: 'separator'},
{
label: 'Check For Updates',
accelerator: 'CmdOrCtrl+U',
click() {
ipc.send('check-for-updates');
},
},
{type: 'separator'},
{role: 'services', submenu: []},
{type: 'separator'},
{role: 'hide'},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Manta",
"homepage": "https://manta.life",
"productName": "Manta",
"version": "1.0.1",
"version": "1.0.0",
"license": "ISC",
"description": "Painless invoicing with customizable templates",
"author": {
Expand Down
5 changes: 3 additions & 2 deletions tour/components/slides/Preview.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ Manta comes with professional looking templates which can be customized further
function Preview() {
return (
<Slide
fromColor="#FFD200"
toColor="#F7971E"
inverted
fromColor="#5691c8"
toColor="#457fca"
heading="Step 2. Customize"
description={description}
imgSrc={path.resolve(__dirname, './imgs/Preview.svg')}
Expand Down
7 changes: 3 additions & 4 deletions tour/components/slides/Save.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@ const description = `
function Save() {
return (
<Slide
inverted
fromColor="#E52D27"
toColor="#B31217"
fromColor="#FFD200"
toColor="#F7971E"
heading="3. Save"
description={description}
imgSrc={path.resolve(__dirname, './imgs/Save.svg')}
imgSize="360px"
imgSize="460px"
/>
);
}
Expand Down
2 changes: 1 addition & 1 deletion tour/imgs/Save.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a9dbd95

Please sign in to comment.