Browse Source

[fix] post editor bug

wenliming 2 years ago
parent
commit
1088673cf0

+ 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;