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
c88a9fc7
Commit
c88a9fc7
authored
Jul 14, 2019
by
Markus
Committed by
Nicolas Giard
Jul 14, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: save media asset path on reopen (#919)
parent
5689444a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
9 deletions
+21
-9
editor-modal-media.vue
client/components/editor/editor-modal-media.vue
+6
-7
editor.js
client/store/editor.js
+15
-2
No files found.
client/components/editor/editor-modal-media.vue
View file @
c88a9fc7
...
...
@@ -228,7 +228,7 @@
<
script
>
import
_
from
'lodash'
import
{
sync
}
from
'vuex-pathify'
import
{
get
,
sync
}
from
'vuex-pathify'
import
vueFilePond
from
'vue-filepond'
import
'filepond/dist/filepond.min.css'
...
...
@@ -255,7 +255,6 @@ export default {
data
()
{
return
{
folders
:
[],
folderTree
:
[],
files
:
[],
assets
:
[],
pagination
:
{
}
,
...
...
@@ -268,9 +267,6 @@ export default {
{
text
:
'Absolute Top Right'
,
value
:
'abstopright'
}
],
imageAlignment
:
''
,
currentFolderId
:
0
,
currentFileId
:
null
,
previousFolderId
:
0
,
loading
:
false
,
newFolderDialog
:
false
,
newFolderName
:
''
,
...
...
@@ -289,6 +285,9 @@ export default {
set
(
val
)
{
this
.
$emit
(
'input'
,
val
)
}
}
,
activeModal
:
sync
(
'editor/activeModal'
),
folderTree
:
get
(
'editor/media@folderTree'
),
currentFolderId
:
sync
(
'editor/media@currentFolderId'
),
currentFileId
:
sync
(
'editor/media@currentFileId'
),
pageTotal
()
{
if
(
this
.
pagination
.
rowsPerPage
==
null
||
this
.
pagination
.
totalItems
==
null
)
{
return
0
...
...
@@ -400,12 +399,12 @@ export default {
await
this
.
$apollo
.
queries
.
assets
.
refetch
()
}
,
downFolder
(
folder
)
{
this
.
folderTree
.
push
(
folder
)
this
.
$store
.
commit
(
'editor/pushMediaFolderTree'
,
folder
)
this
.
currentFolderId
=
folder
.
id
this
.
currentFileId
=
null
}
,
upFolder
()
{
this
.
folderTree
.
pop
(
)
this
.
$store
.
commit
(
'editor/popMediaFolderTree'
)
const
parentFolder
=
_
.
last
(
this
.
folderTree
)
this
.
currentFolderId
=
parentFolder
?
parentFolder
.
id
:
0
this
.
currentFileId
=
null
...
...
client/store/editor.js
View file @
c88a9fc7
...
...
@@ -4,11 +4,24 @@ const state = {
editor
:
''
,
content
:
''
,
mode
:
'create'
,
activeModal
:
''
activeModal
:
''
,
media
:
{
folderTree
:
[],
currentFolderId
:
0
,
currentFileId
:
null
}
}
export
default
{
namespaced
:
true
,
state
,
mutations
:
make
.
mutations
(
state
)
mutations
:
{
...
make
.
mutations
(
state
),
pushMediaFolderTree
:
(
state
,
folder
)
=>
{
state
.
media
.
folderTree
=
state
.
media
.
folderTree
.
concat
(
folder
)
},
popMediaFolderTree
:
(
state
)
=>
{
state
.
media
.
folderTree
=
state
.
media
.
folderTree
.
slice
(
0
,
-
1
)
}
}
}
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