diff --git a/app/javascript/dashboard/App.vue b/app/javascript/dashboard/App.vue index 147e1d525..502d8bda1 100644 --- a/app/javascript/dashboard/App.vue +++ b/app/javascript/dashboard/App.vue @@ -8,6 +8,7 @@ :has-accounts="hasAccounts" /> + @@ -15,6 +16,7 @@ import { mapGetters } from 'vuex'; import AddAccountModal from '../dashboard/components/layout/sidebarComponents/AddAccountModal'; import WootSnackbarBox from './components/SnackbarContainer'; +import NetworkNotification from './components/NetworkNotification'; import { accountIdFromPathname } from './helper/URLHelper'; export default { @@ -23,6 +25,7 @@ export default { components: { WootSnackbarBox, AddAccountModal, + NetworkNotification, }, data() { diff --git a/app/javascript/dashboard/assets/scss/_animations.scss b/app/javascript/dashboard/assets/scss/_animations.scss index 3a26d5bf2..ebb20a35e 100644 --- a/app/javascript/dashboard/assets/scss/_animations.scss +++ b/app/javascript/dashboard/assets/scss/_animations.scss @@ -93,3 +93,17 @@ /* .slide-fade-leave-active for <2.1.8 */ { opacity: 0; } + +.network-notification-fade-enter-active { + transition: all .1s $ease-in-sine; +} + +.network-notification-fade-leave-active { + transition: all .1s $ease-out-sine; +} + +.network-notification-fade-enter, +.network-notification-fade-leave-to { + transform: translateY(-$space-small); + opacity: 0; +} diff --git a/app/javascript/dashboard/components/NetworkNotification.vue b/app/javascript/dashboard/components/NetworkNotification.vue new file mode 100644 index 000000000..efd6b273e --- /dev/null +++ b/app/javascript/dashboard/components/NetworkNotification.vue @@ -0,0 +1,123 @@ + + + + + + + + + {{ $t('NETWORK.NOTIFICATION.TEXT') }} + + + {{ $t('NETWORK.BUTTON.REFRESH') }} + + + + + + + + + + + + diff --git a/app/javascript/dashboard/i18n/locale/en/generalSettings.json b/app/javascript/dashboard/i18n/locale/en/generalSettings.json index d5e8bd50b..223a4688e 100644 --- a/app/javascript/dashboard/i18n/locale/en/generalSettings.json +++ b/app/javascript/dashboard/i18n/locale/en/generalSettings.json @@ -71,5 +71,13 @@ "assigned_conversation_new_message": "New Message", "conversation_mention": "Mention" } + }, + "NETWORK": { + "NOTIFICATION": { + "TEXT": "Disconnected from Chatwoot" + }, + "BUTTON": { + "REFRESH": "Refresh" + } } }
+ {{ $t('NETWORK.NOTIFICATION.TEXT') }} +