Browse Source

chore(nc-gui): env var for info-msg duration

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/3777/head
Raju Udava 2 years ago
parent
commit
b711b0920e
  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-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: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-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:run": "cypress run --config-file ./scripts/cypress/cypress.json",
"cypress-v1-backup:open": "cypress open --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", "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: { define: {
'process.env.DEBUG': 'false', 'process.env.DEBUG': 'false',
'process.nextTick': () => {}, 'process.nextTick': () => {},
'process.env.ANT_MESSAGE_DURATION': process.env.ANT_MESSAGE_DURATION,
}, },
server: { server: {
watch: { 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' import { defineNuxtPlugin } from '#imports'
export default defineNuxtPlugin((nuxtApp) => { export default defineNuxtPlugin((nuxtApp) => {
nuxtApp.vueApp.component(AntMenu.name, AntMenu) nuxtApp.vueApp.component(AntMenu.name, AntMenu)
nuxtApp.vueApp.component(AntModal.name, AntModal) nuxtApp.vueApp.component(AntModal.name, AntModal)
message.config({
duration: +(process.env.ANT_MESSAGE_DURATION ?? 3),
})
}) })

Loading…
Cancel
Save