Skip to content

Commit

Permalink
remove websocket related code
Browse files Browse the repository at this point in the history
  • Loading branch information
fidelthomet committed Sep 17, 2024
1 parent 75bdbe0 commit 9c7a22b
Show file tree
Hide file tree
Showing 11 changed files with 48 additions and 487 deletions.
80 changes: 0 additions & 80 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"lodash.clonedeep": "^4.5.0",
"lodash.isequal": "^4.5.0",
"pinia": "^2.1.7",
"socket.io-client": "^4.7.5",
"unplugin-icons": "^0.18.5",
"vue": "^3.4.15",
"vue-router": "^4.2.5"
Expand Down
31 changes: 15 additions & 16 deletions src/components/TheList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,11 @@ function createNode() {
<main class="list">
<nav>
<ListWrapper horizontal equal-size>
<InputButton tag="RouterLink" to="projects" v-if="settingsStore.edit">
Projects
</InputButton>
<InputButton tag="RouterLink" to="graph"> Stories </InputButton>
<InputButton tag="RouterLink" to="entity"> Entities </InputButton>
<InputButton tag="RouterLink" to="image"> Images </InputButton>
</ListWrapper>
<ListWrapper horizontal>
<ListWrapper horizontal v-if="settingsStore.edit">
<InputButton @click="createNode" disable-padding title="new"> <IconNew /> </InputButton>
</ListWrapper>
</nav>
Expand All @@ -48,18 +45,20 @@ function createNode() {
:label="node.label"
:meta="dataStore.data.nodes[node.class]?.label"
>
<InputButtonDelete
title="delete"
@click.prevent
@confirmed="dataStore.deleteNode(id, null, true)"
/>
<InputButton
title="edit"
@click.stop.prevent="modalStore.open(id, 'node')"
disable-padding
>
<IconEdit />
</InputButton>
<template v-if="settingsStore.edit">
<InputButtonDelete
title="delete"
@click.prevent
@confirmed="dataStore.deleteNode(id, null, true)"
/>
<InputButton
title="edit"
@click.stop.prevent="modalStore.open(id, 'node')"
disable-padding
>
<IconEdit />
</InputButton>
</template>
</ListItem>
</template>
</div>
Expand Down
161 changes: 0 additions & 161 deletions src/components/TheProjects.vue

This file was deleted.

19 changes: 2 additions & 17 deletions src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ const router = createRouter({
routes: [
{
path: '/',
name: 'home'
// redirect: { name: 'list', params: { type: 'graph' } }
name: 'home',
redirect: { name: 'list', params: { type: 'graph' } }
},
{
path: '/settings',
Expand All @@ -34,11 +34,6 @@ const router = createRouter({
name: 'open'
// redirect: { name: 'list', params: { type: 'graph' } }
},
{
path: '/projects',
name: 'projects',
component: () => import('@/views/ProjectView.vue')
},
{
path: '/video',
name: 'video',
Expand All @@ -54,22 +49,12 @@ router.beforeEach(async (to, from, next) => {
const settingsStore = useSettingsStore()
const dataStore = useDataStore()

if (to.name === 'home') {
return settingsStore.edit
? next({ name: 'projects' })
: next({ name: 'list', params: { type: 'graph' } })
}

if (to.name === 'open') {
if (settingsStore.edit) dataStore.open(to.params.id)
// dataStore.data = null
return next({ name: 'list', params: { type: 'graph' } })
}

if (to.name === 'projects' && !settingsStore.edit) {
return next({ name: 'list', params: { type: 'graph' } })
}

const videoStore = useVideoStore()
if (dataStore.data === null && ['list', 'graph', 'video'].includes(to.name)) {
await dataStore.init()
Expand Down
Loading

0 comments on commit 9c7a22b

Please sign in to comment.