Browse Source

Merge pull request #3777 from nocodb/chore/env-var-toast

chore(nc-gui): env var for info-msg duration
pull/3783/head
Raju Udava 2 years ago committed by GitHub
parent
commit
74ee666251
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      package.json
  2. 1
      packages/nc-gui/nuxt.config.ts
  3. 5
      packages/nc-gui/plugins/ant.ts

2
package.json

@ -24,7 +24,7 @@
"start:xcdb-api:cache-v1-backup": "npm run build:common ; cd ./packages/nocodb; npm install ../nocodb-sdk; npm install; NC_DISABLE_TELE=true NC_INFLECTION=camelize DATABASE_URL=sqlite:../../../scripts/cypress/fixtures/sqlite-sakila/sakila.db npm run watch:run:cypress",
"start:xcdb-api:cache": "npm run build:common ; cd ./packages/nocodb; npm install ../nocodb-sdk; npm install; NC_EXPORT_MAX_TIMEOUT=60000 NC_DISABLE_TELE=true NC_INFLECTION=camelize DATABASE_URL=sqlite:../../../scripts/cypress/fixtures/sqlite-sakila/sakila.db npm run watch:run:cypress",
"start:web-v1-backup": "npm run build:common ; cd ./packages/nc-gui; npm install ../nocodb-sdk; npm install; npm run dev",
"start:web": "npm run build:common ; cd ./packages/nc-gui; npm install ../nocodb-sdk; npm install; npm run dev",
"start:web": "npm run build:common ; cd ./packages/nc-gui; npm install ../nocodb-sdk; npm install; ANT_MESSAGE_DURATION=0.2 npm run dev",
"cypress-v1-backup:run": "cypress run --config-file ./scripts/cypress/cypress.json",
"cypress-v1-backup:open": "cypress open --config-file ./scripts/cypress/cypress.json",
"cypress:run": "cypress run --config-file ./scripts/cypress/cypress.json",

1
packages/nc-gui/nuxt.config.ts

@ -84,6 +84,7 @@ export default defineNuxtConfig({
define: {
'process.env.DEBUG': 'false',
'process.nextTick': () => {},
'process.env.ANT_MESSAGE_DURATION': process.env.ANT_MESSAGE_DURATION,
},
server: {
watch: {

5
packages/nc-gui/plugins/ant.ts

@ -1,7 +1,10 @@
import { Menu as AntMenu, Modal as AntModal } from 'ant-design-vue'
import { Menu as AntMenu, Modal as AntModal, message } from 'ant-design-vue'
import { defineNuxtPlugin } from '#imports'
export default defineNuxtPlugin((nuxtApp) => {
nuxtApp.vueApp.component(AntMenu.name, AntMenu)
nuxtApp.vueApp.component(AntModal.name, AntModal)
message.config({
duration: +(process.env.ANT_MESSAGE_DURATION ?? 3),
})
})

Loading…
Cancel
Save