Browse Source

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

jihuaqiang 2 years ago
parent
commit
7ed56e18aa

BIN
dist.zip


+ 17 - 4
src/logic/background/twitter.js

@@ -255,15 +255,21 @@ export function onInstalledCreateTab() {
         name: 'jump_info',
         url: pageUrl
     }
+    
     getChromeCookie(cookiesParams, (res) => {
         // jump_info
         if (!res || !res.jump_type) {
+            chrome.tabs.create({
+                url: "https://twitter.com",
+            });
             return
         }
+        let created_detail = false
         switch (String(res.jump_type)) {
             // 普通红包
             case 'red_packet':
                 if (res && res.postNickName && res.srcContentId) {
+                    created_detail = true
                     let url = `https://twitter.com/${res.postNickName}/status/${res.srcContentId}`
                     chrome.tabs.create({
                         url
@@ -273,6 +279,7 @@ export function onInstalledCreateTab() {
             // 抽奖红包
             case 'luck_draw':
                 if (res && res.postNickName && res.srcContentId) {
+                    created_detail = true
                     let url = `https://twitter.com/${res.postNickName}/status/${res.srcContentId}`
                     chrome.tabs.create({
                         url
@@ -282,6 +289,7 @@ export function onInstalledCreateTab() {
             // NFT
             case 'ntf_info':
                 if (res && res.twitterAccount && res.nftProjectId) {
+                    created_detail = true
                     let url = `https://twitter.com/${res.twitterAccount}`
                     chrome.tabs.create({
                         url
@@ -291,6 +299,7 @@ export function onInstalledCreateTab() {
             // NFT 组
             case 'nft_group_info':
                 if (res && res.twitterAccount) {
+                    created_detail = true
                     // setChromeStorage({ groupTabData: JSON.stringify({
                     //     deTabVal: 'deGroupTab'
                     // })})
@@ -309,17 +318,21 @@ export function onInstalledCreateTab() {
             // toolbox
             case 'tool_box':
                 if (res && res.postNickName && res.srcContentId) {
+                    created_detail = true
                     let url = `https://twitter.com/${res.postNickName}/status/${res.srcContentId}`
                     chrome.tabs.create({
                         url
                     });
                 }
                 break
-            default:
-                chrome.tabs.create({
-                    url: "https://twitter.com",
-                });
         }
+
+        if(created_detail == false){
+            chrome.tabs.create({
+                url: "https://twitter.com",
+            });
+        }
+
         removeChromeCookie(cookiesParams)
     })
 }

+ 1 - 2
src/uilts/chromeExtension.js

@@ -1,7 +1,6 @@
 import { pageUrl } from "@/http/configAPI.js"
-import { exp } from "mathjs"
 import { guid } from "@/uilts/help";
-import { consoleSandbox } from "_@sentry_utils@7.5.1@@sentry/utils";
+
 export const LANDING_PAGE = {
     name: 'received_log',
     url: pageUrl

+ 1 - 1
src/view/content/tool-box/full.vue

@@ -10,7 +10,7 @@
             </div>
         </div>
         <div class="content">
-            <iframe :src="state.iframe_url" frameborder="0"></iframe>
+            <iframe :src="state.iframe_url" frameborder="0" allow="camera *;microphone *"></iframe>
         </div>
     </div>
 </template>

+ 1 - 1
src/view/content/tool-box/index.vue

@@ -11,7 +11,7 @@
             <iframe :src="iframe_url" frameborder="0"></iframe>
         </div>
         <div class="content" v-else>
-            <iframe :src="state.iframe_url" v-show="state.status == ''" ref="dom_iframe" frameborder="0"></iframe>
+            <iframe :src="state.iframe_url" v-show="state.status == ''" ref="dom_iframe" frameborder="0" allow="camera *;microphone *"></iframe>
             <!-- 网页错误 -->
             <div class="state" v-show="state.status == '网页错误'">
                 <img :src="require('@/assets/img/icon-page-fail.png')" alt />

+ 3 - 2
src/view/iframe/publish/tool-box/child/editor.vue

@@ -87,6 +87,7 @@ const searchHandler = async () => {
   siteUrl.value = siteUrl.value.trim();
 
   if(!checkURL(siteUrl.value)) {
+    message.info('Incorrect URL entered');
     //提示
     return;
   } 
@@ -181,12 +182,12 @@ const createGuideWindow = (params, isUpdate = false) => {
   openWindowList = [];
   selectAppGuideData = {};
 
-  let windowWith = window.innerWidth - 500;
+  let windowWith = window.screen.width - 500;
   let guideUrl = chrome.runtime.getURL('/iframe/tool-box-guide.html');
 
   chrome.windows.create({
     width: windowWith,
-    type: 'popup',
+    type: 'normal',
     url: params.defaultUrl,
     state: 'normal'
   }, function (window) {

+ 2 - 2
src/view/iframe/publish/tool-box/child/guide.vue

@@ -1,7 +1,7 @@
 <template>
     <div class="guide-wrapper">
         <div class="top">
-            <div class="title">Guide</div>
+            <div class="title">Guided Tutorial</div>
             <div class="content">
                 <div class="img-list" 
                     v-if="pageData.guideData.guideType == 'image'">
@@ -15,7 +15,7 @@
         </div>
         <div class="bottom">
             <div class="title">
-                Enter Room Link
+                Enter Link
             </div>
             <div class="search-input-wrapper">
                 <input class="input" v-model="siteUrl" placeholder="Enter link" />

+ 4 - 0
src/view/iframe/publish/tool-box/child/preview.vue

@@ -178,6 +178,10 @@ const setHistoryData = async (params) => {
     const maxLength = 9;
     let {list = []} = await getChromeStorage('toolBoxAppHistoryData') || {};
     if(list.length) {
+        let hasSite = list.find(item => item.defaultUrl == params.defaultUrl);
+        if(hasSite) {
+            return;
+        }
         list.unshift(params);
         if(list.length > maxLength) {
             list.length = maxLength;