Browse Source

Merge branch 'dev_1.1.1' of https://git.yishihui.com/DeNet/de-net into dev_1.1.1

zhangwei 2 years ago
parent
commit
a3cc23a0eb

+ 2 - 7
src/logic/content/nft.js

@@ -1,7 +1,7 @@
 import { getOffsetRect, nextTick } from '@/uilts/help'
 import { listJoinNftGroup } from '@/http/nft';
 import { getChromeStorage } from '@/uilts/chromeExtension.js'
-import { _setPublishContent } from './twitter';
+import { _setPublishContent, publishNFTTweetEvent } from './twitter';
 
 var ifShowNftGroup = false;
 var tempNftGroupPost = null;
@@ -194,11 +194,6 @@ function _addTweetButtonListen() {
 }
 function _postTweetContent() {
     if (tempNftGroupPost && tempNftGroupPost.groupId) {
-        chrome.runtime.sendMessage({
-            actionType: "CONTENT_GET_TWITTER_NFT_POST_PRE",
-            data: {
-                groupId: tempNftGroupPost.groupId
-            }
-        }, () => { });
+        publishNFTTweetEvent(tempNftGroupPost)
     }
 }

+ 28 - 5
src/logic/content/twitter.js

@@ -1302,7 +1302,7 @@ export const showTwitterPost = (data) => {
     // addPublishTipsIframe({ type: 'nft' })
 }
 
-function publishNFTTweetEvent({ groupId, postId, srcContent }) {
+export function publishNFTTweetEvent({ groupId, postId, srcContent }) {
     setTimeout(() => {
         let publishTweetBtn;
         let dialog = document.querySelector('div[role="dialog"]');
@@ -1347,7 +1347,12 @@ function publishNFTTweetEvent({ groupId, postId, srcContent }) {
             }, () => { });
 
             setTimeout(() => {
-                document.querySelector('a[data-testid="AppTabBar_Profile_Link"]').click()
+                document.querySelector('a[data-testid="AppTabBar_Profile_Link"]').click();
+                setGroupTabSelfStyle({
+                    groupColor: 'rgb(83, 100, 113)',
+                    groupFontWeight: '500',
+                    lineDisplay: 'none'
+                });
             }, 2000);
         });
     }, 800)
@@ -1730,6 +1735,20 @@ const addGroupTab = () => {
                 groupTab.style.background = 'none'
             });
 
+            setTimeout(() => {
+                let tab = getMaskWeb3Tab();
+                if(tab) {
+                    tab.style.display = 'none'
+                } else {
+                    setTimeout(() => {
+                        tab = getMaskWeb3Tab();
+                        if(tab) {
+                            tab.style.display = 'none'
+                        }
+                    }, 1500)
+                }
+            }, 2000)
+
             addGroupTabEventListener({ groupTab });
         }
 
@@ -1913,10 +1932,12 @@ const setTabContentStyle = (params) => {
             if (visibility == 'hidden') {
                 tweetTabContent.style.visibility = 'visible';
                 tweetTabContent.style.height = 'auto';
+                tweetTabContent.style.overflow = 'auto';
             }
         } else {
             tweetTabContent.style.visibility = 'hidden';
             tweetTabContent.style.height = '0px';
+            tweetTabContent.style.overflow = 'hidden';
         }
     }
 
@@ -1977,11 +1998,13 @@ export const setTabGroupIframeStyle = (params) => {
 }
 
 /**
+ * mask Tab
  * 
-document.querySelector('div[data-testid="ScrollSnap-nextButtonWrapper"]').nextElementSibling.addEventListener('click', function() {
-    console.log('1')
-})
  */
+const getMaskWeb3Tab = () => {
+    let tab = document.querySelector('div[data-testid="ScrollSnap-nextButtonWrapper"] + span');
+    return tab;
+}
 
 export const pageJumpHandler = (params) => {
     let { url } = params

+ 1 - 1
src/view/iframe/tab-group/joined-group-list.vue

@@ -18,7 +18,7 @@
 import { onMounted, ref, nextTick } from "vue";
 import NftGroupList from '@/view/components/nft-group-list.vue';
 
-import { sendChromeTabMessage } from '@/uilts/chromeExtension.js';
+import { sendChromeTabMessage, setChromeStorage } from '@/uilts/chromeExtension.js';
 
 let groupListDom = ref(null);
 

+ 1 - 1
src/view/iframe/tab-group/tab-group.vue

@@ -329,7 +329,7 @@ html, body, #app {
 
 .tab-group-page {
     height: 100%;
-    overflow-y: auto;
+    overflow-y: hidden;
 
     &::-webkit-scrollbar {
         width: 2px;