File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed
Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change 1212 <oc-spinner v-if =" isLoading" :aria-label =" $gettext('Loading editor content')" />
1313 </div >
1414 <div class =" oc-width-expand oc-text-center" >
15- <span id =" text-editor-file-path" >{{ currentFile }}</span >
15+ <span id =" text-editor-file-path" >{{ fileCleaned }}</span >
1616 </div >
1717 <div class =" oc-width-auto oc-text-right" >
1818 <oc-button id =" text-editor-controls-close" @click =" closeApp" >
@@ -35,20 +35,27 @@ export default {
3535 ' currentFile' ,
3636 ' isPublicLink' ,
3737 ' plToken'
38- ])
38+ ]),
39+ fileCleaned () {
40+
41+ return this .currentFile .split (' /' ).pop ()
42+ }
3943 },
4044 methods: {
4145 ... mapActions (' Text Editor' , [' saveFile' ]),
4246 closeApp () {
43- const folderPath = this .currentFile .substring (0 , this .currentFile .lastIndexOf (' /' ))
44-
4547 if (this .isPublicLink ) {
48+ const folderPath = this .currentFile .substring (0 , this .currentFile .lastIndexOf (' /' ))
4649 this .$router .push ({
47- path: ' /files/public/list /' + this .plToken + folderPath
50+ path: ' /files/public/show /' + this .plToken + folderPath
4851 })
4952 } else {
53+ let folderPath = this .currentFile .split (' /' )
54+ folderPath .splice (0 , 3 )
55+ folderPath .pop ()
56+ folderPath = folderPath .join (' /' )
5057 this .$router .push ({
51- path: ' /files/list/all ' + folderPath
58+ path: ' /files/spaces/personal/home/ ' + folderPath
5259 })
5360 }
5461 },
You can’t perform that action at this time.
0 commit comments