mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 06:59:31 +01:00
fix topic not adding
This commit is contained in:
@@ -6,6 +6,7 @@
|
|||||||
<style>
|
<style>
|
||||||
.app-body {
|
.app-body {
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
|
overflow:hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.floating-toolbar {
|
.floating-toolbar {
|
||||||
@@ -1055,7 +1056,7 @@
|
|||||||
#titlebar input {
|
#titlebar input {
|
||||||
font-family: "DM Serif Text", sans-serif;
|
font-family: "DM Serif Text", sans-serif;
|
||||||
font-weight: 400 !important;
|
font-weight: 400 !important;
|
||||||
width: 100vw;
|
width: 100%;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
border: none;
|
border: none;
|
||||||
height: 50;
|
height: 50;
|
||||||
@@ -1619,16 +1620,15 @@
|
|||||||
break;
|
break;
|
||||||
case "nomenu":
|
case "nomenu":
|
||||||
let isenabled = value;
|
let isenabled = value;
|
||||||
let width = window.innerWidth;
|
|
||||||
let titleIn = document.getElementById('titlebar');
|
let titleIn = document.getElementById('titlebar');
|
||||||
if (isenabled) {
|
if (isenabled) {
|
||||||
titleIn.style.width = width - 72;
|
|
||||||
titleIn.style['margin-left'] = 12;
|
titleIn.style['padding-left'] = 12;
|
||||||
titleIn.style['margin-right'] = 60;
|
titleIn.style['padding-right'] = 60;
|
||||||
} else {
|
} else {
|
||||||
titleIn.style.width = width - 120;
|
|
||||||
titleIn.style['margin-left'] = 60;
|
titleIn.style['padding-left'] = 60;
|
||||||
titleIn.style['margin-right'] = 60;
|
titleIn.style['padding-right'] = 60;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "title":
|
case "title":
|
||||||
|
|||||||
@@ -113,12 +113,20 @@ export class AddNotebookDialog extends React.Component {
|
|||||||
addNewNotebook = async () => {
|
addNewNotebook = async () => {
|
||||||
setTimeout(async () => {
|
setTimeout(async () => {
|
||||||
let {topics} = this.state;
|
let {topics} = this.state;
|
||||||
|
let edit = this.props.toEdit;
|
||||||
|
|
||||||
let toEdit = db.notebooks.notebook(this.props.toEdit.id).data;
|
console.log(this.title, "ELO");
|
||||||
if (!this.title || this.title.trim().length === 0)
|
if (!this.title || this.title.trim().length === 0)
|
||||||
return ToastEvent.show('Title is required', 'error', 'local');
|
return ToastEvent.show('Title is required', 'error', 'local');
|
||||||
|
|
||||||
let id = toEdit && toEdit.id ? toEdit.id : null;
|
let id = edit && edit.id ? edit.id : null;
|
||||||
|
|
||||||
|
let toEdit;
|
||||||
|
if (id) {
|
||||||
|
toEdit = db.notebooks.notebook(edit.id).data;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
let prevTopics = [...topics];
|
let prevTopics = [...topics];
|
||||||
|
|
||||||
if (
|
if (
|
||||||
|
|||||||
Reference in New Issue
Block a user