File tree Expand file tree Collapse file tree
app/javascript/vue_components Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<template >
2- {{ displayedFolders }}
3- <div class =" breadcrumb-list" >
4- <div v-for =" (path, i) in displayedFolders" >
2+ <ol class =" breadcrumb-list" >
3+ <li v-for =" (path, i) in displayedFolders" @mousedown =" onClickBreadcrumb(path)" >
54 {{ path.name }}
6- {{ path.id }}
7- </div >
8- </div >
5+ </li >
6+ </ol >
97 <div class =" table project-files" >
108 <div class =" file-browser" >
119 <table class =" project-contents" >
@@ -106,6 +104,14 @@ async function onClickCollection(file) {
106104 displayedFolders .value .push ({id: file .id , path: file .path , name: file .name });
107105 isLoadingFiles .value = false ;
108106}
107+
108+ async function onClickBreadcrumb (path ) {
109+ isLoadingFiles .value = true ;
110+ displayedFiles .value = await loadFiles (path .id );
111+ const path_index = displayedFolders .value .indexOf (path);
112+ displayedFolders .value = displayedFolders .value .slice (0 ,path_index+ 1 );
113+ isLoadingFiles .value = false ;
114+ }
109115 </script >
110116<style >
111117.browser-collection {
You can’t perform that action at this time.
0 commit comments