Browse Source

refactor: add loader in project load

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/852/head
Pranav C 3 years ago
parent
commit
98b999af1f
  1. 4
      packages/nc-gui/package.json
  2. 16
      packages/nc-gui/pages/projects/index.vue

4
packages/nc-gui/package.json

@ -3,12 +3,12 @@
"version": "0.11.35", "version": "0.11.35",
"scripts": { "scripts": {
"dev": "EE=true nuxt", "dev": "EE=true nuxt",
"build": "nuxt build", "build": "EE=true nuxt build",
"lint": "eslint . --ext .js,.vue --fix --quiet", "lint": "eslint . --ext .js,.vue --fix --quiet",
"start": "EE=true nuxt start", "start": "EE=true nuxt start",
"generate": "nuxt generate", "generate": "nuxt generate",
"build:copy": "EE=true npm run build; rm -rf ../nc-lib-gui/lib/dist/; rsync -rvzh ./dist/ ../nc-lib-gui/lib/dist/", "build:copy": "EE=true npm run build; rm -rf ../nc-lib-gui/lib/dist/; rsync -rvzh ./dist/ ../nc-lib-gui/lib/dist/",
"build:copy:jsdeliver": "EE=true npm run build; rm -rf ../nc-lib-gui/lib/dist/; rsync -rvzh ./dist/ ../nc-lib-gui/lib/dist/ ; npm publish ../nc-lib-gui" "build:copy:jsdeliver": "npm run build; rm -rf ../nc-lib-gui/lib/dist/; rsync -rvzh ./dist/ ../nc-lib-gui/lib/dist/ ; npm publish ../nc-lib-gui"
}, },
"dependencies": { "dependencies": {
"@mdi/font": "^5.9.55", "@mdi/font": "^5.9.55",

16
packages/nc-gui/pages/projects/index.vue

@ -286,6 +286,13 @@
> >
<td data-v-step="2"> <td data-v-step="2">
<div class="d-flex align-center"> <div class="d-flex align-center">
<v-progress-circular
v-if="props.item.loading"
class="mr-2"
size="15"
indeterminate
/>
<template v-else>
<v-icon <v-icon
x-small x-small
class="mr-2" class="mr-2"
@ -322,7 +329,7 @@
: 'mdi-code-json' : 'mdi-code-json'
}} }}
</x-icon> </x-icon>
</template>
<v-tooltip bottom> <v-tooltip bottom>
<template #activator="{on}"> <template #activator="{on}">
<div <div
@ -1091,7 +1098,7 @@ export default {
} }
this.loaded = true this.loaded = true
}, },
projectRouteHandler(project) { async projectRouteHandler(project) {
if (!project.allowed) { if (!project.allowed) {
this.$toast.info(`Contact following owner email to get project access : ${project.owner}`).goAway(5000) this.$toast.info(`Contact following owner email to get project access : ${project.owner}`).goAway(5000)
return return
@ -1105,11 +1112,12 @@ export default {
.goAway(5000) .goAway(5000)
return return
} }
this.$set(project, 'loading', true)
if (!this.deleteBtnClicked) { if (!this.deleteBtnClicked) {
this.$router.push({ await this.$router.push({
path: `/nc/${project.id}` path: `/nc/${project.id}`
}) })
// this.$set(project, 'loading', false)
} }
}, },
async projectEdit(project) { async projectEdit(project) {

Loading…
Cancel
Save