Skip to content

Commit

Permalink
Loads of good fixes from HackerNews members
Browse files Browse the repository at this point in the history
  • Loading branch information
reZach committed May 16, 2019
1 parent 8c7b06e commit f15b860
Show file tree
Hide file tree
Showing 35 changed files with 166 additions and 118 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ You can download the application [here](https://rezach.github.io/my-budget/). Th
Join us on [slack](https://join.slack.com/t/my-budget/shared_invite/enQtNjA0NDg1MTI2MzI2LTkxZmI0M2YzMGQ2YzlkMDc1YzkxMjU1M2EyZmI4MjlkYTY3MzgwNzVhMmY2MzJhNmM4OGE0Njc0NDZiMDVkY2U) if you have concerns or questions. For bugs, please go to [github](https://github.com/reZach/my-budget/issues) and submit an issue, thanks.

# Documentation
New users should check out our [new user's guide](https://github.com/reZach/my-budget/wiki/New-user's-guide)!
Have a question how to use My Budget? All of it is available on the [wiki](https://github.com/reZach/my-budget/wiki).
4 changes: 2 additions & 2 deletions app/app.global.css
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ li {
}

a {
color: white;
opacity: 0.75;
/* color: white;
opacity: 0.75; */
text-decoration: none;
}

Expand Down
2 changes: 1 addition & 1 deletion app/components/Category/Category.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

.dark {
background-color:#989898;
color:white;
color:black;
}
.dark i{
color:black;
Expand Down
4 changes: 2 additions & 2 deletions app/components/Category/Category.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ class Category extends Component<Props> {
deleteItem(categoryId: string, id: string, name: string){

dialog.showMessageBox({
title: "delete sub-category",
title: "Delete sub-category",
type: "warning",
buttons: ["Yes", "No"],
message: `are you sure you want to delete '${name}'?`
message: `Are you sure you want to delete '${name}'?`
}, (i) => {

// Yes
Expand Down
16 changes: 8 additions & 8 deletions app/components/CategoryCollection/CategoryCollection.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ class CategoryCollection extends Component<Props> {
deleteCategory(id, name){

dialog.showMessageBox({
title: "delete category",
title: "Delete category",
type: "warning",
buttons: ["Yes", "No"],
message: `are you sure you want to delete '${name}'?`
message: `Are you sure you want to delete '${name}'?`
}, (i) => {

// Yes
Expand Down Expand Up @@ -196,7 +196,7 @@ class CategoryCollection extends Component<Props> {
<div className="columns">
<div className="column col-12 text-left">
<form onSubmit={() => this.toggleCopyPreviousCategories()}>
<button className="btn btn-primary btn-lg" type="submit">copy previous categories</button>
<button className="btn btn-primary btn-lg" type="submit">Copy previous categories</button>
</form>
</div>
</div>
Expand All @@ -210,7 +210,7 @@ class CategoryCollection extends Component<Props> {
<option value="">---</option>
{this.createPreviousCategoriesDropdown()}
</select>
<button className="btn btn-primary input-group-btn" type="button" onClick={() => this.copyPreviousCategories()} disabled={this.state.selectedPreviousDateForCategories === ""}>copy</button>
<button className="btn btn-primary input-group-btn" type="button" onClick={() => this.copyPreviousCategories()} disabled={this.state.selectedPreviousDateForCategories === ""}>Copy</button>
</div>
</div>
</div>
Expand All @@ -224,21 +224,21 @@ class CategoryCollection extends Component<Props> {
<div className={`column col-12 text-left`}>
<div className="columns col-gapless">
<div className="column col-12 text-left">
<h2>categories</h2>
<h2>Categories</h2>
</div>
<div className={`column col-8 text-left ${styles['category-input']}`}>
<form onSubmit={() => this.createNewCategory()}>
<div className="input-group">
<input className="form-input input-lg" type="text" placeholder="category" value={this.state.newCategoryName} onChange={this.modifyNewCategoryName} onKeyUp={this.handleEscapeKey}></input>
<button className="btn btn-primary btn-lg input-group-btn" type="submit">add new</button>
<button className="btn btn-primary btn-lg input-group-btn" type="submit">Add new</button>
</div>
</form>
</div>
<div className="column col-2"></div>
<div className={`column col-1 text-center tooltip tooltip-top ${styles["control-parent"]}`} data-tooltip="collapses all categories" onClick={() => this.toggleAllCategoryState(true)}>
<div className={`column col-1 text-center tooltip tooltip-top ${styles["control-parent"]}`} data-tooltip="Collapses all categories" onClick={() => this.toggleAllCategoryState(true)}>
<i className={`fas fa-compress ${styles.control}`}></i>
</div>
<div className={`column col-1 text-center tooltip tooltip-top ${styles["control-parent"]}`} data-tooltip="expands all categories" onClick={() => this.toggleAllCategoryState(false)}>
<div className={`column col-1 text-center tooltip tooltip-top ${styles["control-parent"]}`} data-tooltip="Expands all categories" onClick={() => this.toggleAllCategoryState(false)}>
<i className={`fas fa-expand ${styles.control}`}></i>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions app/components/Date/Date.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Date extends Component<Props> {
<div className="popover-container">
<div className="card">
<div className="card-header" style={{color: "black"}}>
quickly jump to another month
Quickly jump to another month.
</div>
<div className="card-body">
<div className="columns">
Expand All @@ -34,7 +34,7 @@ class Date extends Component<Props> {
<button className="btn btn-primary" onClick={() => this.props.decrement6()}>-6</button>
</div>
<div className="column col-4">
<button className="btn" onClick={() => this.props.now()}>now</button>
<button className="btn" onClick={() => this.props.now()}>Now</button>
</div>
<div className="column col-2">
<button className="btn btn-primary" onClick={() => this.props.increment6()}>+6</button>
Expand Down
40 changes: 20 additions & 20 deletions app/components/Entry/Entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ class Entry extends Component<Props>{

resetData(event){
dialog.showMessageBox({
title: "delete data",
title: "Delete data",
type: "warning",
buttons: ["Yes", "No"],
message: "are you sure you want to delete all data?"
message: "Are you sure you want to delete all data?"
}, (i) => {

// Yes
Expand All @@ -62,7 +62,7 @@ class Entry extends Component<Props>{
passphrase: ""
});

alert("deleted all data");
alert("Deleted all data.");
}
});
}
Expand Down Expand Up @@ -195,10 +195,10 @@ class Entry extends Component<Props>{
console.error(error);

dialog.showMessageBox({
title: "error loading data",
title: "Error loading data",
type: "warning",
buttons: ["Ok"],
message: `wrong passphrase, if you cannot remember your passphrase, reset your data by clicking the button below. you may set a new passphrase after resetting your data.`
message: `Wrong passphrase, if you cannot remember your passphrase, reset your data by clicking the delete button above. You may set a new passphrase after resetting your data.`
}, (i) => {

});
Expand All @@ -224,15 +224,15 @@ class Entry extends Component<Props>{
this.onetimemodal = true;
}
catch (exception){
alert("could not import data")
alert("Could not import data.")
}
}
};
var boundCallback = callback.bind(this);

dialog.showOpenDialog(
{
title: "import data",
title: "Import data",
properties: ["openFile"]
},
boundCallback
Expand Down Expand Up @@ -263,18 +263,18 @@ class Entry extends Component<Props>{
<div className={`modal-container`}>
<div className={`modal-header ${styles.h62}`}>
<a href="javascript:void(0)" className="btn btn-clear float-right" aria-label="Close" onClick={() => this.closeImportModal()}></a>
<div className="modal-title h4">import successful</div>
<div className="modal-title h4">Import successful</div>
</div>
<div className="modal-body">
<div className="content">
<div>
by continuing to use My Budget with your imported data, your passphrase will be reset to the new passphrase you provide. the passphrase is optional if you do not want to set a passphrase.
By continuing to use My Budget with your imported data, your passphrase will be reset to the new passphrase you provide. the passphrase is optional if you do not want to set a passphrase.
</div>
</div>
</div>
<div className="modal-footer">
<div className="text-center">
if you decide not to import existing data, please click the "clear loaded data" button and continue to use My Budget as you have.
If you decide not to import existing data, please click the "clear loaded data" button and continue to use My Budget as you have.
</div>
</div>
</div>
Expand All @@ -292,40 +292,40 @@ class Entry extends Component<Props>{
<div className={`container ${styles.h100}`}>
<div className={`columns ${styles.header} ${styles.h50}`}>
<div className={`column col-8 ${styles["btn-fix"]}`}>
<button onClick={this.importData} className={`btn btn-primary`}>import data</button>
<button onClick={this.emptyImport} disabled={!this.state.dataImported && this.state.dataToImport === ""} className={`btn ${styles["ml"]}`}>clear loaded data</button>
<button onClick={this.importData} className={`btn btn-primary`}>Import data</button>
<button onClick={this.emptyImport} disabled={!this.state.dataImported && this.state.dataToImport === ""} className={`btn ${styles["ml"]}`}>Clear loaded data</button>
</div>
<div className={`column col-4 text-right ${styles["btn-fix"]}`}>
<button onClick={this.resetData} className={`btn btn-error ${styles["ml"]}`}>delete data</button>
<button onClick={this.resetData} className={`btn btn-error ${styles["ml"]}`}>Delete data</button>
</div>
</div>
<div className={`columns text-center ${styles.top}`}>
<div className="column col-4 col-mx-auto">
<h1>My Budget</h1>
<div>
let's start
Let's start
</div>
<div className={`columns ${styles.less}`}>
<div className="column col-12">
<form onSubmit={() => this.go()}>
<div className="input-group">
<input className="form-input input-lg" type="password" placeholder="passphrase" autoFocus value={this.state.passphrase} onChange={this.changePassphrase}></input>
<button className="btn btn-lg btn-primary" type="submit">go</button>
<button className="btn btn-lg btn-primary" type="submit">Go</button>
</div>
</form>
</div>
</div>
<div className={`columns ${styles.smaller}`}>
<div className="column col-12">
<div className="popover popover-top">
<button className="btn">new user?</button>
<button className="btn">New user?</button>
<div className="popover-container">
<div className="card">
<div className="card-body">
If this is your first time using MyBudget, you can choose to encrypt your data with a passphrase. If you do so, you must enter in your passphrase every time you use this app. You cannot change your passphrase once it's been set!
</div>
{/* <div className="card-body">
If this is your first time using MyBudget, you can choose to encrypt your data with a passphrase. If you do so, you must enter in your passphrase every time you use this app. You cannot change your passphrase once it's been set! If you don't choose a passphrase, your data will be saved unencrypted on your computer.
</div> */}
<div className="card-footer" style={{fontStyle: "italic"}}>
If you don't choose a passphrase, your data will be saved unencrypted on your computer.
Please visit the <a target="_blank" href={"https://github.com/reZach/my-budget/wiki/First-time-user-guide"}>new user's guide</a> if you'd like a walkthrough how to use My Budget.
</div>
</div>
</div>
Expand Down
4 changes: 4 additions & 0 deletions app/components/Home/Home.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,8 @@

.h50 {
height: 50px;
}

.middle-separator {
border-right:8px solid #2b2b2b;
}
6 changes: 3 additions & 3 deletions app/components/Home/Home.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ export default class Home extends Component<Props> {
return (
<div className={`container ${styles['app-container']}`}>
<div className={`columns ${styles.header} ${styles.h50}`}>
<div className={`column col-4`}>
<div className={`column col-5`}>
<Save/>
</div>
<div className={`column col-3`}>
<Date />
</div>
<div className={`column col-5`}>
<div className={`column col-4`}>
<Income />
</div>
</div>
<div className={`columns ${styles.h100}`}>
<div className={`column col-7 ${styles.h100}`}>
<div className={`column col-7 ${styles.h100} ${styles["middle-separator"]}`}>
<CategoryCollection />
</div>
<div className={`column col-5 ${styles.h100}`}>
Expand Down
Loading

0 comments on commit f15b860

Please sign in to comment.