From 2f826ac35155eda883773d840b76116c4bcc9630 Mon Sep 17 00:00:00 2001 From: AtuyL Date: Thu, 22 Nov 2018 19:40:39 +0900 Subject: [PATCH 1/2] fix: changing title still keep on the next session. --- app/actions/dat-middleware.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/actions/dat-middleware.js b/app/actions/dat-middleware.js index de301f1a..f0b6f3b5 100644 --- a/app/actions/dat-middleware.js +++ b/app/actions/dat-middleware.js @@ -88,10 +88,10 @@ export default class DatMiddleware { this.listeners.forEach(listener => listener(action)) } - async updateTitle ({ key, editValue }) { + async updateTitle ({ key, title }) { const dat = this.dats[key] const filePath = joinPath(dat.path, 'dat.json') - const metadata = { ...dat.dat.metadata, title: editValue } + const metadata = { ...dat.dat.metadata, title: title } try { await writeFile(filePath, JSON.stringify(metadata)) From c3698de98c63341489291fcbe723dc45db7dc88f Mon Sep 17 00:00:00 2001 From: AtuyL Date: Fri, 23 Nov 2018 18:09:47 +0900 Subject: [PATCH 2/2] fix: overlay to be not enough filled the. --- app/components/title-field.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/app/components/title-field.js b/app/components/title-field.js index 8d96ceec..bf65d620 100644 --- a/app/components/title-field.js +++ b/app/components/title-field.js @@ -5,12 +5,13 @@ import Icon from './icon' import { Plain as PlainButton, Green as GreenButton } from './button' const Overlay = styled.div` - position: absolute; + position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background-color: rgba(0, 0, 0, 0.2); + z-index: 1; ` const EditableFieldWrapper = styled.div` @@ -36,6 +37,10 @@ const EditableFieldWrapper = styled.div` } ` +const ActiveEditableFieldWrapper = styled(EditableFieldWrapper)` + z-index: 1; +` + const InputFieldStyle = styled.input` :focus { outline: none; @@ -109,7 +114,7 @@ class TitleField extends Component { return (
e.stopPropagation()}> this.cancel()} /> - + {/* why innerRef in following component? check here - styled-components/styled-components#102 */} this.cancel()}>Save )} - +
) }