From 42086aff5e7d9d78a5646f92775a0849bd5a8fa2 Mon Sep 17 00:00:00 2001 From: PhilReact Date: Thu, 9 Nov 2023 15:09:15 +0200 Subject: [PATCH] add qortalrequset for get friends list --- core/language/us.json | 5 +- core/src/components/login-view/login-view.js | 6 +- .../components/settings-view/security-view.js | 16 +++++ core/src/redux/app/actions/app-core.js | 18 ++++- core/src/redux/app/app-action-types.js | 2 + core/src/redux/app/app-reducer.js | 21 +++++- .../core/components/qdn-action-types.js | 5 +- .../plugins/core/qdn/browser/browser.src.js | 66 +++++++++++++++++++ 8 files changed, 134 insertions(+), 5 deletions(-) diff --git a/core/language/us.json b/core/language/us.json index 6d4b10c2..8bb58d8e 100644 --- a/core/language/us.json +++ b/core/language/us.json @@ -736,7 +736,10 @@ "bchange49": "Do you grant this application permission to access the following private information from your profile?", "bchange50": "This app has requested a change to your public profile. Property: ", "bchange51": "To submit the changes don't forget to click on 'Update profile'", - "bchange52": "Do you give this application permission to get your wallet information?" + "bchange52": "Do you give this application permission to get your wallet information?", + "bchange53": "Always allow your friends list to be retrieved automatically by all apps", + "bchange54": "Do you give this application permission to access your friends list?" + }, "datapage": { "dchange1": "Data Management", diff --git a/core/src/components/login-view/login-view.js b/core/src/components/login-view/login-view.js index af03295d..e3a53bd5 100644 --- a/core/src/components/login-view/login-view.js +++ b/core/src/components/login-view/login-view.js @@ -20,9 +20,11 @@ import { addChatLastSeen, addTabInfo, allowQAPPAutoAuth, + allowQAPPAutoFriendsList, allowQAPPAutoLists, removeAutoLoadImageChat, removeQAPPAutoAuth, + removeQAPPAutoFriendsList, removeQAPPAutoLists, setNewNotification, setNewTab, @@ -43,7 +45,9 @@ window.reduxAction = { setTabNotifications: setTabNotifications, setNewTab: setNewTab, setNewNotification: setNewNotification, - setSideEffectAction: setSideEffectAction + setSideEffectAction: setSideEffectAction, + allowQAPPAutoFriendsList: allowQAPPAutoFriendsList, + removeQAPPAutoFriendsList: removeQAPPAutoFriendsList } const animationDuration = 0.7 // Seconds diff --git a/core/src/components/settings-view/security-view.js b/core/src/components/settings-view/security-view.js index 62c82896..bce529a9 100644 --- a/core/src/components/settings-view/security-view.js +++ b/core/src/components/settings-view/security-view.js @@ -3,8 +3,10 @@ import {connect} from 'pwa-helpers' import {store} from '../../store.js' import { allowQAPPAutoAuth, + allowQAPPAutoFriendsList, allowQAPPAutoLists, removeQAPPAutoAuth, + removeQAPPAutoFriendsList, removeQAPPAutoLists, setIsOpenDevDialog } from '../../redux/app/app-actions.js' @@ -146,6 +148,12 @@ class SecurityView extends connect(store)(LitElement) { this.checkForLists(e)} ?checked=${store.getState().app.qAPPAutoLists}> +
+ + this.checkForFriends(e)} ?checked=${store.getState().app.qAPPFriendsList}> +
` : ''} + ${type === actions.GET_FRIENDS_LIST ? ` + + ` : ''} ${type === actions.ADD_LIST_ITEMS ? `