Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wiki-js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
wiki-js
Commits
a75ead44
Commit
a75ead44
authored
Jun 01, 2020
by
NGPixel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: update saved state for page meta
parent
144950ea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
5 deletions
+26
-5
editor.vue
client/components/editor.vue
+26
-5
No files found.
client/components/editor.vue
View file @
a75ead44
...
...
@@ -144,7 +144,15 @@ export default {
dialogEditorSelector
:
false
,
dialogUnsaved
:
false
,
exitConfirmed
:
false
,
initContentParsed
:
''
initContentParsed
:
''
,
savedState
:
{
description
:
''
,
isPublished
:
false
,
publishEndDate
:
''
,
publishStartDate
:
''
,
tags
:
''
,
title
:
''
}
}
},
computed
:
{
...
...
@@ -159,10 +167,10 @@ export default {
this
.
initContentParsed
!==
this
.
$store
.
get
(
'editor/content'
),
this
.
locale
!==
this
.
$store
.
get
(
'page/locale'
),
this
.
path
!==
this
.
$store
.
get
(
'page/path'
),
this
.
title
!==
this
.
$store
.
get
(
'page/title'
),
this
.
description
!==
this
.
$store
.
get
(
'page/description'
),
this
.
tags
!==
this
.
$store
.
get
(
'page/tags'
),
this
.
isPublished
!==
this
.
$store
.
get
(
'page/isPublished'
)
this
.
savedState
.
title
!==
this
.
$store
.
get
(
'page/title'
),
this
.
savedState
.
description
!==
this
.
$store
.
get
(
'page/description'
),
this
.
savedState
.
tags
!==
this
.
$store
.
get
(
'page/tags'
),
this
.
savedState
.
isPublished
!==
this
.
$store
.
get
(
'page/isPublished'
)
],
Boolean
)
}
},
...
...
@@ -186,6 +194,8 @@ export default {
this
.
$store
.
commit
(
'page/SET_MODE'
,
'edit'
)
this
.
setCurrentSavedState
()
this
.
checkoutDateActive
=
this
.
checkoutDate
},
mounted
()
{
...
...
@@ -336,6 +346,7 @@ export default {
}
this
.
initContentParsed
=
this
.
$store
.
get
(
'editor/content'
)
this
.
setCurrentSavedState
()
}
catch
(
err
)
{
this
.
$store
.
commit
(
'showNotification'
,
{
message
:
err
.
message
,
...
...
@@ -383,6 +394,16 @@ export default {
window
.
location
.
assign
(
`/
${
this
.
$store
.
get
(
'page/locale'
)}
/
${
this
.
$store
.
get
(
'page/path'
)}
`
)
}
},
500
)
},
setCurrentSavedState
()
{
this
.
savedState
=
{
description
:
this
.
$store
.
get
(
'page/description'
),
isPublished
:
this
.
$store
.
get
(
'page/isPublished'
),
publishEndDate
:
this
.
$store
.
get
(
'page/publishEndDate'
)
||
''
,
publishStartDate
:
this
.
$store
.
get
(
'page/publishStartDate'
)
||
''
,
tags
:
this
.
$store
.
get
(
'page/tags'
),
title
:
this
.
$store
.
get
(
'page/title'
)
}
}
},
apollo
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment