Compare commits

...

1 Commits

Author SHA1 Message Date
liyasthomas
9ff436316d feat: init vue-toastification 2021-09-11 20:55:33 +05:30
4 changed files with 72 additions and 70 deletions

View File

@@ -339,51 +339,62 @@ input[type="checkbox"] {
@apply text-secondaryLight; @apply text-secondaryLight;
} }
.toasted-container { .Vue-Toastification__progress-bar {
.toasted { background-color: rgba(0, 0, 0, 0.6) !important;
&.toasted-primary { }
@apply bg-tooltip;
@apply text-primary;
@apply justify-start;
@apply shadow;
@apply font-medium;
font-size: var(--body-font-size); .Vue-Toastification__toast {
line-height: var(--body-line-height); @apply !bg-tooltip;
@apply !text-primary;
@apply !justify-start;
@apply !shadow;
@apply !font-medium;
@apply h-auto;
@apply w-auto;
@apply px-4;
@apply py-2;
@apply rounded;
@apply flex;
@apply items-center;
}
.action { .Vue-Toastification__toast-body {
@apply bg-gray-500; @apply !font-sans;
@apply px-4;
@apply bg-opacity-10;
@apply ml-auto;
@apply last:ml-4;
@apply sm:ml-8;
@apply transition;
@apply rounded;
@apply text-current;
@apply normal-case;
@apply hover:(bg-opacity-20 no-underline);
@apply font-medium;
font-size: var(--body-font-size); font-size: var(--body-font-size) !important;
line-height: var(--body-line-height); line-height: var(--body-line-height) !important;
} }
}
&.info { .action {
@apply !bg-accent; @apply bg-gray-500;
} @apply px-4;
@apply bg-opacity-10;
@apply ml-auto;
@apply last:ml-4;
@apply sm:ml-8;
@apply transition;
@apply rounded;
@apply text-current;
@apply normal-case;
@apply hover:(bg-opacity-20 no-underline);
@apply font-medium;
&.error { font-size: var(--body-font-size);
@apply !bg-red-200; line-height: var(--body-line-height);
@apply !text-red-800; }
}
&.success { .Vue-Toastification__toast--info {
@apply !bg-green-200; @apply !bg-accent;
@apply !text-green-800; }
}
} .Vue-Toastification__toast--error {
@apply !bg-red-200;
@apply !text-red-800;
}
.Vue-Toastification__toast--success {
@apply !bg-green-200;
@apply !text-green-800;
} }
.smart-splitter .splitpanes__splitter { .smart-splitter .splitpanes__splitter {

View File

@@ -139,8 +139,8 @@ export default {
modules: [ modules: [
// https://github.com/nuxt-community/axios-module // https://github.com/nuxt-community/axios-module
"@nuxtjs/axios", "@nuxtjs/axios",
// https://github.com/nuxt-community/modules/tree/master/packages/toast // https://github.com/Maronato/vue-toastification
"@nuxtjs/toast", "vue-toastification/nuxt",
// https://github.com/nuxt-community/i18n-module // https://github.com/nuxt-community/i18n-module
"@nuxtjs/i18n", "@nuxtjs/i18n",
// https://github.com/nuxt-community/robots-module // https://github.com/nuxt-community/robots-module
@@ -180,9 +180,12 @@ export default {
// Toast module configuration (https://github.com/nuxt-community/modules/tree/master/packages/toast) // Toast module configuration (https://github.com/nuxt-community/modules/tree/master/packages/toast)
toast: { toast: {
position: "bottom-center", position: "bottom-center",
duration: 3000, toastClassName: "toasted-container",
keepOnHover: true, timeout: 3000,
// singleton: true, closeOnClick: false,
showCloseButtonOnHover: true,
closeButton: "button",
transition: "Vue-Toastification__fade",
}, },
// Google Analytics module configuration (https://github.com/nuxt-community/analytics-module) // Google Analytics module configuration (https://github.com/nuxt-community/analytics-module)

38
package-lock.json generated
View File

@@ -14,7 +14,6 @@
"@nuxtjs/i18n": "^7.0.3", "@nuxtjs/i18n": "^7.0.3",
"@nuxtjs/robots": "^2.5.0", "@nuxtjs/robots": "^2.5.0",
"@nuxtjs/sitemap": "^2.4.0", "@nuxtjs/sitemap": "^2.4.0",
"@nuxtjs/toast": "^3.3.1",
"ace-builds": "^1.4.12", "ace-builds": "^1.4.12",
"acorn": "^8.5.0", "acorn": "^8.5.0",
"acorn-walk": "^8.2.0", "acorn-walk": "^8.2.0",
@@ -41,6 +40,7 @@
"vue-github-button": "^1.3.0", "vue-github-button": "^1.3.0",
"vue-textarea-autosize": "^1.1.1", "vue-textarea-autosize": "^1.1.1",
"vue-tippy": "^4.11.0", "vue-tippy": "^4.11.0",
"vue-toastification": "^1.7.11",
"vuejs-auto-complete": "^0.9.0", "vuejs-auto-complete": "^0.9.0",
"yargs-parser": "^20.2.9" "yargs-parser": "^20.2.9"
}, },
@@ -6613,14 +6613,6 @@
"vue-svg-loader": "^0.16.0" "vue-svg-loader": "^0.16.0"
} }
}, },
"node_modules/@nuxtjs/toast": {
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/@nuxtjs/toast/-/toast-3.3.1.tgz",
"integrity": "sha512-b9JpyjSw5ZOyjskBvNc4NEebe0qxB6LivBlO84gHOnsaF23rLkJoBfVNDcXwGNDl7vm09yM4WqBGTkm/OQ0ZCQ==",
"dependencies": {
"vue-toasted": "^1.1.28"
}
},
"node_modules/@nuxtjs/youch": { "node_modules/@nuxtjs/youch": {
"version": "4.2.3", "version": "4.2.3",
"resolved": "https://registry.npmjs.org/@nuxtjs/youch/-/youch-4.2.3.tgz", "resolved": "https://registry.npmjs.org/@nuxtjs/youch/-/youch-4.2.3.tgz",
@@ -34181,10 +34173,13 @@
"vue": "^2.5.9" "vue": "^2.5.9"
} }
}, },
"node_modules/vue-toasted": { "node_modules/vue-toastification": {
"version": "1.1.28", "version": "1.7.11",
"resolved": "https://registry.npmjs.org/vue-toasted/-/vue-toasted-1.1.28.tgz", "resolved": "https://registry.npmjs.org/vue-toastification/-/vue-toastification-1.7.11.tgz",
"integrity": "sha512-UUzr5LX51UbbiROSGZ49GOgSzFxaMHK6L00JV8fir/CYNJCpIIvNZ5YmS4Qc8Y2+Z/4VVYRpeQL2UO0G800Raw==" "integrity": "sha512-CT/DYttb/VtWDNdhJG0BskLVfveZq5rGOgO/u3qTX+RPQQzX0WSai8VVxxUuvR8UpxfSGPS+JQleR33bo3Vadg==",
"peerDependencies": {
"vue": "^2.0.0"
}
}, },
"node_modules/vuejs-auto-complete": { "node_modules/vuejs-auto-complete": {
"version": "0.9.0", "version": "0.9.0",
@@ -40826,14 +40821,6 @@
"vue-svg-loader": "^0.16.0" "vue-svg-loader": "^0.16.0"
} }
}, },
"@nuxtjs/toast": {
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/@nuxtjs/toast/-/toast-3.3.1.tgz",
"integrity": "sha512-b9JpyjSw5ZOyjskBvNc4NEebe0qxB6LivBlO84gHOnsaF23rLkJoBfVNDcXwGNDl7vm09yM4WqBGTkm/OQ0ZCQ==",
"requires": {
"vue-toasted": "^1.1.28"
}
},
"@nuxtjs/youch": { "@nuxtjs/youch": {
"version": "4.2.3", "version": "4.2.3",
"resolved": "https://registry.npmjs.org/@nuxtjs/youch/-/youch-4.2.3.tgz", "resolved": "https://registry.npmjs.org/@nuxtjs/youch/-/youch-4.2.3.tgz",
@@ -62407,10 +62394,11 @@
"tippy.js": "^4.3.5" "tippy.js": "^4.3.5"
} }
}, },
"vue-toasted": { "vue-toastification": {
"version": "1.1.28", "version": "1.7.11",
"resolved": "https://registry.npmjs.org/vue-toasted/-/vue-toasted-1.1.28.tgz", "resolved": "https://registry.npmjs.org/vue-toastification/-/vue-toastification-1.7.11.tgz",
"integrity": "sha512-UUzr5LX51UbbiROSGZ49GOgSzFxaMHK6L00JV8fir/CYNJCpIIvNZ5YmS4Qc8Y2+Z/4VVYRpeQL2UO0G800Raw==" "integrity": "sha512-CT/DYttb/VtWDNdhJG0BskLVfveZq5rGOgO/u3qTX+RPQQzX0WSai8VVxxUuvR8UpxfSGPS+JQleR33bo3Vadg==",
"requires": {}
}, },
"vuejs-auto-complete": { "vuejs-auto-complete": {
"version": "0.9.0", "version": "0.9.0",

View File

@@ -30,7 +30,6 @@
"@nuxtjs/i18n": "^7.0.3", "@nuxtjs/i18n": "^7.0.3",
"@nuxtjs/robots": "^2.5.0", "@nuxtjs/robots": "^2.5.0",
"@nuxtjs/sitemap": "^2.4.0", "@nuxtjs/sitemap": "^2.4.0",
"@nuxtjs/toast": "^3.3.1",
"ace-builds": "^1.4.12", "ace-builds": "^1.4.12",
"acorn": "^8.5.0", "acorn": "^8.5.0",
"acorn-walk": "^8.2.0", "acorn-walk": "^8.2.0",
@@ -57,6 +56,7 @@
"vue-github-button": "^1.3.0", "vue-github-button": "^1.3.0",
"vue-textarea-autosize": "^1.1.1", "vue-textarea-autosize": "^1.1.1",
"vue-tippy": "^4.11.0", "vue-tippy": "^4.11.0",
"vue-toastification": "^1.7.11",
"vuejs-auto-complete": "^0.9.0", "vuejs-auto-complete": "^0.9.0",
"yargs-parser": "^20.2.9" "yargs-parser": "^20.2.9"
}, },