Skip to content

Commit a9dbd95

Browse files
authored
Merge pull request hql287#42 from hql287/update-settings-tour-window
Update settings tour window
2 parents b77cf45 + a39e179 commit a9dbd95

File tree

7 files changed

+45
-63
lines changed

7 files changed

+45
-63
lines changed

app/components/layout/AppUpdate.jsx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,10 @@ class AppUpdate extends Component {
5252
}
5353

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

60-
// Update available, ask user to download or not
6159
ipc.on('update-available', () => {
6260
openDialog(
6361
{
@@ -70,7 +68,6 @@ class AppUpdate extends Component {
7068
);
7169
});
7270

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

83-
// Update Error
8480
ipc.on('update-error', (event, error) => {
8581
openDialog({
8682
type: 'warning',
@@ -90,7 +86,6 @@ class AppUpdate extends Component {
9086
this.removeMessage();
9187
});
9288

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

109-
// Download Progress
110104
ipc.on('update-download-progress', (event, progressMessage) => {
111105
this.setState({
112106
message: progressMessage
113107
});
114108
});
115109

116-
// Update Downloaded
117110
ipc.on('update-downloaded', () => {
118111
// Update Message
119112
this.setState({
@@ -131,7 +124,6 @@ class AppUpdate extends Component {
131124
);
132125
});
133126

134-
// Upgrade Confirmation
135127
ipc.on('upgrade-confirmed', (event, index) => {
136128
if (index === 0) {
137129
ipc.send('restart-app');

app/components/settings/AppSettings.jsx

Lines changed: 29 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -71,61 +71,50 @@ class AppSettings extends Component {
7171
return (
7272
<div>
7373
<div className="row">
74-
<div className="pageItem col-md-6">
75-
<label className="itemLabel">Export Directory</label>
76-
<div className="input-group">
77-
<input
78-
className="form-control"
79-
name="exportDir"
80-
type="text"
81-
value={this.state.exportDir}
82-
disabled
83-
/>
84-
<a
85-
href="#"
86-
className="input-group-customized "
87-
onClick={this.selectExportDir}>
88-
<i className="ion-folder" />
89-
</a>
90-
</div>
91-
</div>
74+
<div className="col-md-12">
75+
<div className="pageItem">
76+
<label className="itemLabel">Export Directory</label>
9277

93-
<div className="pageItem col-md-6">
94-
<label className="itemLabel">Template</label>
95-
<select
96-
name="template"
97-
value={this.state.template}
98-
onChange={this.handleInputChange}>
99-
<option value="minimal">Minimal</option>
100-
<option value="business">Business</option>
101-
{/*
102-
<option value="modern">Modern</option>
103-
*/}
104-
</select>
78+
<div className="input-group">
79+
<input
80+
className="form-control"
81+
name="exportDir"
82+
type="text"
83+
value={this.state.exportDir}
84+
disabled
85+
/>
86+
<a
87+
href="#"
88+
className="input-group-customized "
89+
onClick={this.selectExportDir}>
90+
<i className="ion-folder" />
91+
</a>
92+
</div>
93+
</div>
10594
</div>
10695
</div>
10796

10897
<div className="row">
10998
<div className="col-md-6">
11099
<div className="pageItem">
111-
<label className="itemLabel">Default Language</label>
100+
<label className="itemLabel">Default Currency</label>
112101
<select
113-
name="language"
114-
value={this.state.language}
102+
name="currency"
103+
value={this.state.currency}
115104
onChange={this.handleInputChange}>
116-
<option value="en">English</option>
117-
<option value="vi">Vietnamese</option>
105+
{currenciesOptions}
118106
</select>
119107
</div>
120108
</div>
121109
<div className="col-md-6">
122110
<div className="pageItem">
123-
<label className="itemLabel">Default Currency</label>
111+
<label className="itemLabel">Default Template</label>
124112
<select
125-
name="currency"
126-
value={this.state.currency}
113+
name="template"
114+
value={this.state.template}
127115
onChange={this.handleInputChange}>
128-
{currenciesOptions}
116+
<option value="minimal">Minimal</option>
117+
<option value="business">Business</option>
129118
</select>
130119
</div>
131120
</div>
@@ -146,7 +135,7 @@ class AppSettings extends Component {
146135
</div>
147136
<div className="col-md-6">
148137
<div className="pageItem">
149-
<label className="itemLabel">Muted?</label>
138+
<label className="itemLabel">Mute Sound?</label>
150139
<label className="switch">
151140
<input
152141
name="muted"

app/renderers/menu.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -155,13 +155,6 @@ let menuTemplate = [
155155
ipc.send('start-tour');
156156
},
157157
},
158-
{
159-
label: 'Check For Updates',
160-
accelerator: 'CmdOrCtrl+U',
161-
click() {
162-
ipc.send('check-for-updates');
163-
},
164-
},
165158
{
166159
label: 'Learn More',
167160
click() {
@@ -178,6 +171,14 @@ if (process.platform === 'darwin') {
178171
submenu: [
179172
{role: 'about'},
180173
{type: 'separator'},
174+
{
175+
label: 'Check For Updates',
176+
accelerator: 'CmdOrCtrl+U',
177+
click() {
178+
ipc.send('check-for-updates');
179+
},
180+
},
181+
{type: 'separator'},
181182
{role: 'services', submenu: []},
182183
{type: 'separator'},
183184
{role: 'hide'},

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "Manta",
33
"homepage": "https://manta.life",
44
"productName": "Manta",
5-
"version": "1.0.1",
5+
"version": "1.0.0",
66
"license": "ISC",
77
"description": "Painless invoicing with customizable templates",
88
"author": {

tour/components/slides/Preview.jsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ Manta comes with professional looking templates which can be customized further
99
function Preview() {
1010
return (
1111
<Slide
12-
fromColor="#FFD200"
13-
toColor="#F7971E"
12+
inverted
13+
fromColor="#5691c8"
14+
toColor="#457fca"
1415
heading="Step 2. Customize"
1516
description={description}
1617
imgSrc={path.resolve(__dirname, './imgs/Preview.svg')}

tour/components/slides/Save.jsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,12 @@ const description = `
99
function Save() {
1010
return (
1111
<Slide
12-
inverted
13-
fromColor="#E52D27"
14-
toColor="#B31217"
12+
fromColor="#FFD200"
13+
toColor="#F7971E"
1514
heading="3. Save"
1615
description={description}
1716
imgSrc={path.resolve(__dirname, './imgs/Save.svg')}
18-
imgSize="360px"
17+
imgSize="460px"
1918
/>
2019
);
2120
}

tour/imgs/Save.svg

Lines changed: 1 addition & 1 deletion
Loading

0 commit comments

Comments
 (0)