Browse Source

Merge pull request #1672 from nocodb/fix/error-handling-msgs

fix: toast error corrections & cache flush on delete
pull/1679/head
navi 3 years ago committed by GitHub
parent
commit
6a73eaa680
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 13
      packages/nc-gui/components/createOrEditProject.vue
  2. 2
      packages/nc-gui/pages/project/xcdb.vue
  3. 4
      packages/nocodb/src/lib/noco-models/Project.ts

13
packages/nc-gui/components/createOrEditProject.vue

@ -87,12 +87,8 @@
:height="20" :height="20"
:label="$t('placeholder.projName')" :label="$t('placeholder.projName')"
autofocus autofocus
> />
</v-text-field>
</div> </div>
</v-col> </v-col>
<v-col <v-col
@ -631,11 +627,8 @@
</v-col> </v-col>
</v-expansion-panel-content> </v-expansion-panel-content>
</v-expansion-panel> </v-expansion-panel>
</v-expansion-panels> </v-expansion-panels>
</v-col> </v-col>
</v-row> </v-row>
</v-container> </v-container>
</div> </div>
@ -1154,7 +1147,6 @@ export default {
}, },
selectFile(db, obj, key, index) { selectFile(db, obj, key, index) {
this.$refs[key][index].click() this.$refs[key][index].click()
}, },
onPanelToggle(panelIndex, envKey) { onPanelToggle(panelIndex, envKey) {
this.$nextTick(() => { this.$nextTick(() => {
@ -1289,7 +1281,6 @@ export default {
}, },
constructProjectJsonFromProject(project) { constructProjectJsonFromProject(project) {
const p = project // JSON.parse(JSON.stringify(project.projectJson)); const p = project // JSON.parse(JSON.stringify(project.projectJson));
p.ui = { p.ui = {
@ -1403,6 +1394,7 @@ export default {
this.projectCreated = true this.projectCreated = true
} catch (e) { } catch (e) {
this.$toast.error(await this._extractSdkResponseErrorMsg(e)).goAway(3000) this.$toast.error(await this._extractSdkResponseErrorMsg(e)).goAway(3000)
toast.goAway(0)
} }
this.projectReloading = false this.projectReloading = false
@ -1882,7 +1874,6 @@ export default {
} }
} }
} }
} }
}, },
beforeMount() { beforeMount() {

2
packages/nc-gui/pages/project/xcdb.vue

@ -156,7 +156,7 @@ export default {
} }
}) })
} catch (e) { } catch (e) {
this.$toast.error(e.message).goAway(3000) this.$toast.error(await this._extractSdkResponseErrorMsg(e)).goAway(3000)
} }
this.loading = false this.loading = false
} else { } else {

4
packages/nocodb/src/lib/noco-models/Project.ts

@ -184,6 +184,10 @@ export default class Project implements ProjectType {
} }
if (o) await NocoCache.del(`${CacheScope.PROJECT}:${projectId}`); if (o) await NocoCache.del(`${CacheScope.PROJECT}:${projectId}`);
if (o?.title) {
await NocoCache.del(`${CacheScope.PROJECT}:${o.title}`);
}
// remove item in cache list // remove item in cache list
await NocoCache.deepDel( await NocoCache.deepDel(
CacheScope.PROJECT, CacheScope.PROJECT,

Loading…
Cancel
Save