🎨 Site > Store > Separate into modules
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import Connexion from '@/components/connexion'
|
||||
import ProjectsHub from '@/components/projects-hub'
|
||||
import Projects from '@/components/projects'
|
||||
import Project from '@/components/project'
|
||||
|
||||
export default
|
||||
@@ -9,7 +9,7 @@ export default
|
||||
components:
|
||||
{
|
||||
Connexion,
|
||||
ProjectsHub,
|
||||
Projects,
|
||||
Project
|
||||
},
|
||||
|
||||
@@ -24,12 +24,12 @@ export default
|
||||
{
|
||||
projects()
|
||||
{
|
||||
return this.$store.state.projects
|
||||
return this.$store.state.projects.all
|
||||
},
|
||||
|
||||
project()
|
||||
{
|
||||
return this.$store.state.project
|
||||
return this.$store.state.projects.current
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div id="application">
|
||||
{{ counter }}
|
||||
<connexion></connexion>
|
||||
<projects-hub></projects-hub>
|
||||
<projects></projects>
|
||||
<project v-if="project"></project>
|
||||
</div>
|
||||
@@ -13,12 +13,12 @@ export default
|
||||
{
|
||||
messages()
|
||||
{
|
||||
return this.$store.state.chatMessages
|
||||
return this.$store.state.chat.messages
|
||||
},
|
||||
|
||||
user()
|
||||
{
|
||||
return this.$store.state.user
|
||||
return this.$store.state.chat.user
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -8,12 +8,12 @@ export default
|
||||
{
|
||||
project()
|
||||
{
|
||||
return this.$store.state.project
|
||||
return this.$store.state.projects.current
|
||||
},
|
||||
|
||||
pendingUser()
|
||||
{
|
||||
return this.$store.state.pendingUser
|
||||
return this.$store.state.chat.pendingUser
|
||||
}
|
||||
},
|
||||
|
||||
@@ -101,7 +101,10 @@ export default
|
||||
|
||||
onPendingUser(value)
|
||||
{
|
||||
this.chatSocket.emit('update_user', value)
|
||||
if(value)
|
||||
{
|
||||
this.chatSocket.emit('update_user', value)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,20 +1,5 @@
|
||||
import FilesTreeFile from '@/components/files-tree-file'
|
||||
import FilesTreeFolder from '@/components/files-tree-folder'
|
||||
import FileTree from '@/utils/FileTree'
|
||||
|
||||
// const fileTree = new FileTree({ autoWash: true })
|
||||
// fileTree.addFolder('./toto', { hey: 'hoy' })
|
||||
// fileTree.addFolder('./toto/uhuh', { hey: 'a' })
|
||||
// fileTree.addFolder('./lorem')
|
||||
// fileTree.addFile('./test-1.txt')
|
||||
// fileTree.addFile('./test-2.txt')
|
||||
|
||||
// window.setInterval(() =>
|
||||
// {
|
||||
// fileTree.addFile('./toto/uhuh/' + new Date())
|
||||
// fileTree.removeFolder('./lorem')
|
||||
// fileTree.removeFile('./test-1.txt')
|
||||
// }, 1000)
|
||||
|
||||
export default
|
||||
{
|
||||
@@ -26,24 +11,11 @@ export default
|
||||
FilesTreeFolder
|
||||
},
|
||||
|
||||
data()
|
||||
{
|
||||
return {}
|
||||
},
|
||||
|
||||
computed:
|
||||
{
|
||||
files()
|
||||
{
|
||||
return this.$store.state.files
|
||||
return this.$store.state.files.tree
|
||||
}
|
||||
},
|
||||
|
||||
created()
|
||||
{
|
||||
},
|
||||
|
||||
methods:
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -17,11 +17,12 @@ export default
|
||||
{
|
||||
project()
|
||||
{
|
||||
return this.$store.state.project
|
||||
return this.$store.state.projects.all
|
||||
},
|
||||
|
||||
file()
|
||||
{
|
||||
return this.$store.state.file
|
||||
return this.$store.state.files.current
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ export default
|
||||
{
|
||||
projects()
|
||||
{
|
||||
return this.$store.state.projects
|
||||
return this.$store.state.projects.all
|
||||
}
|
||||
},
|
||||
|
||||
@@ -10,7 +10,7 @@ export default
|
||||
{
|
||||
version()
|
||||
{
|
||||
return this.$store.state.version
|
||||
return this.$store.state.files.currentVersion
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user