mirror of
https://github.com/Qortal/qortal-ui.git
synced 2025-11-02 13:47:55 +00:00
tx join_group notification
This commit is contained in:
@@ -837,7 +837,8 @@
|
||||
"cchange93": "Image copied to clipboard",
|
||||
"cchange94": "loaded",
|
||||
"cchange95": "Only my resources",
|
||||
"cchange96": "Open Group Management"
|
||||
"cchange96": "Open Group Management",
|
||||
"cchange97": "Join group link copied to clipboard"
|
||||
},
|
||||
"welcomepage": {
|
||||
"wcchange1": "Welcome to Q-Chat",
|
||||
@@ -1172,6 +1173,7 @@
|
||||
},
|
||||
"notifications": {
|
||||
"notify1": "Confirming transaction",
|
||||
"notify2": "Transaction confirmed"
|
||||
"notify2": "Transaction confirmed",
|
||||
"explanation": "Your transaction is getting confirmed. To track its progress, click on the bell icon."
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,7 @@ import './login-section.js'
|
||||
import '../qort-theme-toggle.js'
|
||||
|
||||
import settings from '../../functional-components/settings-page.js'
|
||||
import { addAutoLoadImageChat, removeAutoLoadImageChat, addChatLastSeen, allowQAPPAutoAuth, removeQAPPAutoAuth, removeQAPPAutoLists, allowQAPPAutoLists, addTabInfo, setTabNotifications, setNewTab, setNewNotification } from '../../redux/app/app-actions.js'
|
||||
import { addAutoLoadImageChat, removeAutoLoadImageChat, addChatLastSeen, allowQAPPAutoAuth, removeQAPPAutoAuth, removeQAPPAutoLists, allowQAPPAutoLists, addTabInfo, setTabNotifications, setNewTab, setNewNotification, setSideEffectAction } from '../../redux/app/app-actions.js'
|
||||
|
||||
window.reduxStore = store
|
||||
window.reduxAction = {
|
||||
@@ -29,7 +29,8 @@ window.reduxAction = {
|
||||
addTabInfo: addTabInfo,
|
||||
setTabNotifications: setTabNotifications,
|
||||
setNewTab: setNewTab,
|
||||
setNewNotification: setNewNotification
|
||||
setNewNotification: setNewNotification,
|
||||
setSideEffectAction: setSideEffectAction
|
||||
}
|
||||
|
||||
const animationDuration = 0.7 // Seconds
|
||||
|
||||
@@ -9,24 +9,16 @@ import { store } from '../../store.js';
|
||||
import { setNewNotification, setNewTab } from '../../redux/app/app-actions.js';
|
||||
import { routes } from '../../plugins/routes.js';
|
||||
import '@material/mwc-icon';
|
||||
import { translate } from 'lit-translate';
|
||||
import { translate, get } from 'lit-translate';
|
||||
import { repeat } from 'lit/directives/repeat.js';
|
||||
|
||||
import config from '../../notifications/config.js';
|
||||
import '../../../../plugins/plugins/core/components/TimeAgo.js';
|
||||
import './popover.js';
|
||||
|
||||
const currentNotification = {
|
||||
type: 'JOIN_GROUP',
|
||||
timestamp: Date.now(),
|
||||
status: 'confirming',
|
||||
reference: {
|
||||
signature:
|
||||
'5wpPP7ngE13z8x7FKr3tkx5AhMyzWAcFeTmkyefSbddRZ3ieMRcbwt4VDz5bakJzpFaE16NcSofa8w35AGLN4J47',
|
||||
},
|
||||
};
|
||||
|
||||
const notifications = [currentNotification];
|
||||
|
||||
|
||||
class NotificationBellGeneral extends connect(store)(LitElement) {
|
||||
static properties = {
|
||||
notifications: { type: Array },
|
||||
@@ -111,7 +103,7 @@ class NotificationBellGeneral extends connect(store)(LitElement) {
|
||||
<div class="layout">
|
||||
<popover-component
|
||||
for="popover-notification"
|
||||
message="Your transaction is getting confirmed. To see its progress, click on the bell icon."
|
||||
message=${get('notifications.explanation')}
|
||||
></popover-component>
|
||||
<div
|
||||
id="popover-notification"
|
||||
|
||||
@@ -339,6 +339,7 @@ class ShowPlugin extends connect(store)(LitElement) {
|
||||
}
|
||||
|
||||
render() {
|
||||
console.log('this.tabs', this.tabs)
|
||||
const plugSrc = (myPlug) => {
|
||||
return myPlug === undefined ? 'about:blank' : `${window.location.origin}/plugin/${myPlug.domain}/${myPlug.page}${this.linkParam}`
|
||||
}
|
||||
@@ -460,6 +461,8 @@ class ShowPlugin extends connect(store)(LitElement) {
|
||||
id: this.uid.rnd()
|
||||
})
|
||||
this.currentTab = lengthOfTabs
|
||||
this.tabs = [...this.tabs]
|
||||
this.requestUpdate()
|
||||
}}
|
||||
>+</button>
|
||||
</div>
|
||||
@@ -845,6 +848,7 @@ class ShowPlugin extends connect(store)(LitElement) {
|
||||
store.dispatch(setNewTab(null))
|
||||
//clear newTab
|
||||
}
|
||||
this.requestUpdate()
|
||||
}
|
||||
|
||||
if(state.app.isOpenDevDialog){
|
||||
|
||||
@@ -8,6 +8,7 @@ const APP_INFO_STATE = 'app_info_state'
|
||||
const CHAT_HEADS_STREAM_NAME = 'chat_heads'
|
||||
const NODE_CONFIG_STREAM_NAME = 'node_config'
|
||||
const CHAT_LAST_SEEN = 'chat_last_seen'
|
||||
const SIDE_EFFECT_ACTION = 'side_effect_action'
|
||||
|
||||
export const loggedInStream = new EpmlStream(LOGIN_STREAM_NAME, () => store.getState().app.loggedIn)
|
||||
export const configStream = new EpmlStream(CONFIG_STREAM_NAME, () => store.getState().config)
|
||||
@@ -16,6 +17,8 @@ export const appInfoStateStream = new EpmlStream(APP_INFO_STATE, () => store.get
|
||||
export const chatHeadsStateStream = new EpmlStream(CHAT_HEADS_STREAM_NAME, () => store.getState().app.chatHeads)
|
||||
export const nodeConfigStream = new EpmlStream(NODE_CONFIG_STREAM_NAME, () => store.getState().app.nodeConfig)
|
||||
export const chatLastSeenStream = new EpmlStream(CHAT_LAST_SEEN, () => store.getState().app.chatLastSeen)
|
||||
export const sideEffectActionStream = new EpmlStream(SIDE_EFFECT_ACTION, () => store.getState().app.sideEffectAction)
|
||||
|
||||
|
||||
|
||||
let oldState = {
|
||||
@@ -56,6 +59,10 @@ store.subscribe(() => {
|
||||
if (oldState.app.appInfo !== state.app.appInfo) {
|
||||
appInfoStateStream.emit(state.app.appInfo)
|
||||
}
|
||||
if (oldState.app.sideEffectAction !== state.app.sideEffectAction) {
|
||||
sideEffectActionStream.emit(state.app.sideEffectAction)
|
||||
}
|
||||
|
||||
|
||||
oldState = state
|
||||
})
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Core App Actions here...
|
||||
import { UPDATE_BLOCK_INFO, UPDATE_NODE_STATUS, UPDATE_NODE_INFO, CHAT_HEADS, ACCOUNT_INFO, ADD_AUTO_LOAD_IMAGES_CHAT, REMOVE_AUTO_LOAD_IMAGES_CHAT, ALLOW_QAPP_AUTO_AUTH, REMOVE_QAPP_AUTO_AUTH, SET_CHAT_LAST_SEEN, ADD_CHAT_LAST_SEEN, ALLOW_QAPP_AUTO_LISTS, REMOVE_QAPP_AUTO_LISTS, SET_NEW_TAB, ADD_TAB_INFO, SET_TAB_NOTIFICATIONS, IS_OPEN_DEV_DIALOG, SET_NEW_NOTIFICATION } from '../app-action-types.js'
|
||||
import { UPDATE_BLOCK_INFO, UPDATE_NODE_STATUS, UPDATE_NODE_INFO, CHAT_HEADS, ACCOUNT_INFO, ADD_AUTO_LOAD_IMAGES_CHAT, REMOVE_AUTO_LOAD_IMAGES_CHAT, ALLOW_QAPP_AUTO_AUTH, REMOVE_QAPP_AUTO_AUTH, SET_CHAT_LAST_SEEN, ADD_CHAT_LAST_SEEN, ALLOW_QAPP_AUTO_LISTS, REMOVE_QAPP_AUTO_LISTS, SET_NEW_TAB, ADD_TAB_INFO, SET_TAB_NOTIFICATIONS, IS_OPEN_DEV_DIALOG, SET_NEW_NOTIFICATION, SET_SIDE_EFFECT } from '../app-action-types.js'
|
||||
|
||||
export const doUpdateBlockInfo = (blockObj) => {
|
||||
return (dispatch, getState) => {
|
||||
@@ -150,4 +150,11 @@ export const setTabNotifications = (payload) => {
|
||||
type: SET_TAB_NOTIFICATIONS,
|
||||
payload
|
||||
}
|
||||
}
|
||||
|
||||
export const setSideEffectAction = (payload)=> {
|
||||
return {
|
||||
type: SET_SIDE_EFFECT,
|
||||
payload
|
||||
}
|
||||
}
|
||||
@@ -32,3 +32,4 @@ export const ADD_TAB_INFO = 'ADD_TAB_INFO'
|
||||
export const SET_TAB_NOTIFICATIONS = 'SET_TAB_NOTIFICATIONS'
|
||||
export const IS_OPEN_DEV_DIALOG = 'IS_OPEN_DEV_DIALOG'
|
||||
export const SET_NEW_NOTIFICATION = 'SET_NEW_NOTIFICATION'
|
||||
export const SET_SIDE_EFFECT= 'SET_SIDE_EFFECT'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Loading state, login state, isNavDrawOpen state etc. None of this needs to be saved to localstorage.
|
||||
import { loadStateFromLocalStorage, saveStateToLocalStorage } from '../../localStorageHelpers.js'
|
||||
import { LOG_IN, LOG_OUT, NETWORK_CONNECTION_STATUS, INIT_WORKERS, ADD_PLUGIN_URL, ADD_PLUGIN, ADD_NEW_PLUGIN_URL, NAVIGATE, SELECT_ADDRESS, ACCOUNT_INFO, CHAT_HEADS, UPDATE_BLOCK_INFO, UPDATE_NODE_STATUS, UPDATE_NODE_INFO, LOAD_NODE_CONFIG, SET_NODE, ADD_NODE, PAGE_URL, ADD_AUTO_LOAD_IMAGES_CHAT, REMOVE_AUTO_LOAD_IMAGES_CHAT, ALLOW_QAPP_AUTO_AUTH, REMOVE_QAPP_AUTO_AUTH, SET_CHAT_LAST_SEEN, ADD_CHAT_LAST_SEEN, ALLOW_QAPP_AUTO_LISTS, REMOVE_QAPP_AUTO_LISTS, SET_NEW_TAB, ADD_TAB_INFO, SET_TAB_NOTIFICATIONS, IS_OPEN_DEV_DIALOG, REMOVE_NODE, EDIT_NODE, SET_NEW_NOTIFICATION } from './app-action-types.js'
|
||||
import { LOG_IN, LOG_OUT, NETWORK_CONNECTION_STATUS, INIT_WORKERS, ADD_PLUGIN_URL, ADD_PLUGIN, ADD_NEW_PLUGIN_URL, NAVIGATE, SELECT_ADDRESS, ACCOUNT_INFO, CHAT_HEADS, UPDATE_BLOCK_INFO, UPDATE_NODE_STATUS, UPDATE_NODE_INFO, LOAD_NODE_CONFIG, SET_NODE, ADD_NODE, PAGE_URL, ADD_AUTO_LOAD_IMAGES_CHAT, REMOVE_AUTO_LOAD_IMAGES_CHAT, ALLOW_QAPP_AUTO_AUTH, REMOVE_QAPP_AUTO_AUTH, SET_CHAT_LAST_SEEN, ADD_CHAT_LAST_SEEN, ALLOW_QAPP_AUTO_LISTS, REMOVE_QAPP_AUTO_LISTS, SET_NEW_TAB, ADD_TAB_INFO, SET_TAB_NOTIFICATIONS, IS_OPEN_DEV_DIALOG, REMOVE_NODE, EDIT_NODE, SET_NEW_NOTIFICATION, SET_SIDE_EFFECT } from './app-action-types.js'
|
||||
import { initWorkersReducer } from './reducers/init-workers.js'
|
||||
import { loginReducer } from './reducers/login-reducer.js'
|
||||
import { setNode, addNode, removeNode, editNode } from './reducers/manage-node.js'
|
||||
@@ -51,7 +51,8 @@ const INITIAL_STATE = {
|
||||
newTab: null,
|
||||
tabInfo: {},
|
||||
isOpenDevDialog: false,
|
||||
newNotification: null
|
||||
newNotification: null,
|
||||
sideEffectAction: null
|
||||
}
|
||||
|
||||
export default (state = INITIAL_STATE, action) => {
|
||||
@@ -284,6 +285,12 @@ export default (state = INITIAL_STATE, action) => {
|
||||
newNotification: action.payload
|
||||
}
|
||||
}
|
||||
case SET_SIDE_EFFECT: {
|
||||
return {
|
||||
...state,
|
||||
sideEffectAction: action.payload
|
||||
}
|
||||
}
|
||||
|
||||
default:
|
||||
return state
|
||||
|
||||
Reference in New Issue
Block a user