Skip to content

Commit 23676fc

Browse files
committed
Fixed a bug with setting name on new file, improved styling, changed default size of window. bumped version to 0.2.0
1 parent d9880f5 commit 23676fc

File tree

5 files changed

+24
-12
lines changed

5 files changed

+24
-12
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "stickynoteapp",
3-
"version": "0.1.0",
3+
"version": "0.2.0",
44
"private": true,
55
"scripts": {
66
"serve": "vue-cli-service serve",

public/style.css

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,23 +54,32 @@ body {
5454
background: none;
5555
color: white;
5656
width:20%;
57+
text-overflow: ellipsis;
58+
white-space: nowrap;
59+
overflow: hidden;
5760
}
5861

5962
#NavBar select {
60-
border-top: none;
61-
border-left: none;
62-
border-right: none;
63-
border-bottom: 3px dashed lightblue;
64-
background: none;
63+
border:none;
64+
background: #2c3e50;
6565
color: white;
66+
border-bottom: 3px solid lightblue;
6667
width:20%;
68+
text-overflow: ellipsis;
69+
white-space: nowrap;
70+
overflow: hidden;
71+
left: 0;
6772
}
6873

6974
#NavBar option{
75+
border:none;
7076
background:#2c3e50;
77+
outline: none;
7178
}
7279

73-
textarea:focus,
74-
input:focus {
80+
#NavBar textarea:focus,
81+
#NavBar input:focus,
82+
#NavBar select:focus,
83+
#NavBar option:focus{
7584
outline: none;
7685
}

src/background.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function createWindow () {
1717
// Create the browser window.
1818
win = new BrowserWindow({
1919
minWidth:230,
20-
width:300,
20+
width:400,
2121
height:400,
2222
minHeight:400,
2323
autoHideMenuBar: true,

src/components/Editor.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ export default class Editor extends Vue {
4343
console.log("this.filePath: " + this.filePath);
4444
readFile(this.filePath(), { encoding: "utf8" }, (e: any, d: any) => {
4545
console.log(e);
46-
this.configureEditor(d);
4746
this.emitFileLoaded();
47+
this.configureEditor(d);
4848
});
4949
}
5050
@@ -97,13 +97,15 @@ export default class Editor extends Vue {
9797
}
9898
9999
private configureEditor(defaultValue) {
100+
console.log(this.config.editorConfig)
101+
console.log(defaultValue)
100102
if (!this.internalEditor) {
101103
this.internalEditor = HyperMD.fromTextArea(
102104
document.getElementById("input-area"),
103105
this.config.editorConfig
104106
);
105107
}
106-
this.internalEditor.setValue(defaultValue);
108+
this.internalEditor.setValue(defaultValue.toString());
107109
this.internalEditor.markClean();
108110
this.StartSaveWatch();
109111
}

src/components/NavBar.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,9 @@ export default class NavBar extends Vue {
8383
8484
newNote(){
8585
let FileName = `${Date.now()}.md`
86-
fs.writeFile(path.join(new Configuration().notePath,FileName),"# Welcome to your new note!\n","",_=>{
86+
fs.writeFile(path.join(new Configuration().notePath,FileName),"# Welcome to your new note!\nLet's write something awesome.","",_=>{
8787
this.SelectedFile = FileName;
88+
this.fileName = FileName;
8889
this.$root.$emit("fileChange", this.SelectedFile);
8990
});
9091
}

0 commit comments

Comments
 (0)