Bläddra i källkod

[edit][图片]

zhangwei 2 år sedan
förälder
incheckning
b04145e070

+ 4 - 0
src/assets/svg/icon-iframe-close.svg

@@ -0,0 +1,4 @@
+<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
+<line y1="-0.8" x2="16.7592" y2="-0.8" transform="matrix(-0.698077 0.716023 -0.698077 -0.716023 15.1914 4)" stroke="white" stroke-width="1.6"/>
+<line y1="-0.8" x2="16.7592" y2="-0.8" transform="matrix(0.698077 0.716022 0.698077 -0.716022 4.79297 4)" stroke="white" stroke-width="1.6"/>
+</svg>

+ 4 - 0
src/assets/svg/icon-iframe-fixed.svg

@@ -0,0 +1,4 @@
+<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
+<rect x="2.65" y="2.65" width="14.7" height="14.7" rx="1.35" fill="#D9D9D9" fill-opacity="0.01" stroke="white" stroke-width="1.3"/>
+<rect x="10" y="5" width="5" height="5" fill="white"/>
+</svg>

+ 3 - 0
src/assets/svg/icon-iframe-full.svg

@@ -0,0 +1,3 @@
+<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M10.6833 4.47102H14.5578L11.2574 7.69281L11.2574 7.6928L11.2561 7.69408C11.1358 7.8144 11.0849 7.98424 11.0849 8.15018C11.0849 8.31752 11.136 8.495 11.2374 8.64706L11.254 8.67202L11.279 8.68867C11.431 8.79004 11.6085 8.84114 11.7759 8.84114C11.9418 8.84114 12.1116 8.79025 12.232 8.66992L15.455 5.44686V9.32757C15.455 9.50364 15.5415 9.66715 15.6581 9.78367C15.7746 9.90019 15.9381 9.98671 16.1142 9.98671C16.2902 9.98671 16.4537 9.90019 16.5703 9.78367C16.6868 9.66715 16.7733 9.50364 16.7733 9.32757V4.66781C16.8166 4.22056 16.7282 3.84424 16.5325 3.57515C16.3336 3.30166 16.0332 3.15273 15.6899 3.15273H10.6833C10.5073 3.15273 10.3437 3.23926 10.2272 3.35577C10.1107 3.47229 10.0242 3.63581 10.0242 3.81188C10.0242 3.98795 10.1107 4.15146 10.2272 4.26798C10.3437 4.38449 10.5073 4.47102 10.6833 4.47102ZM9.32562 15.5418H5.44491L8.66797 12.3188C8.78732 12.1994 8.83919 12.0303 8.83919 11.8733C8.83919 11.7209 8.79038 11.5572 8.67851 11.4386C8.56551 11.2772 8.3951 11.1929 8.21187 11.1929C8.02744 11.1929 7.84237 11.2775 7.69213 11.4278L4.46906 14.6508V10.4307C4.46906 10.2546 4.38254 10.0911 4.26602 9.97461C4.14951 9.85809 3.98599 9.77157 3.80992 9.77157C3.63385 9.77157 3.47034 9.85809 3.35382 9.97461C3.23731 10.0911 3.15078 10.2546 3.15078 10.4307V15.2675C3.15078 15.6409 3.28946 16.054 3.53082 16.3758C3.77294 16.6987 4.13141 16.945 4.57363 16.945H9.32562C9.50169 16.945 9.6652 16.8584 9.78172 16.7419C9.89823 16.6254 9.98476 16.4619 9.98476 16.2858C9.98476 15.8788 9.6775 15.5418 9.32562 15.5418Z" fill="white" stroke="white" stroke-width="0.3"/>
+</svg>

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 6 - 0
src/assets/svg/icon-iframe-small.svg


+ 3 - 2
src/logic/content/ParseCard.js

@@ -244,7 +244,8 @@ class ParseCard {
             _iframe_url = _iframe_url + '&denet_debugger=1'
         }
         _iframe.src = _iframe_url
-        _iframe.style.cssText = 'border:medium none; width:505px; min-height:544px;     filter: drop-shadow(rgba(0, 0, 0, 0.2) 0px 4px 20px);'
+        _iframe.scrolling = 'no'
+        _iframe.style.cssText = 'border:medium none; width:505px; height:544px; max-height:544px;     filter: drop-shadow(rgba(0, 0, 0, 0.2) 0px 4px 20px);'
         return _iframe
     }
     createIframe({ post_Id = '', tweet_Id = '', tweet_author = '', page_type = '' }, if_center = false) {
@@ -417,7 +418,7 @@ class ParseCard {
             dom = dom_card.querySelector('div[lang][dir=auto]').parentElement
         }
 
-        dom.style = 'min-height:500px'
+        dom.style = 'min-height:544px'
         if (dom) {
             // debugger mode
             if (window.location.href.includes('denet_debugger')) {

+ 16 - 10
src/view/iframe/tool-box/card.vue

@@ -3,18 +3,18 @@
         <div class="head">
             <span></span>
             <div v-show="state.show_btn && state.status == ''">
-                <icon-svg :icon="'固定'" @clickStop="clickFixed" :class="'fixed'"></icon-svg>
-                <icon-svg :icon="'放大'" @clickStop="clickFull" :class="'full'"></icon-svg>
+                <img :src="require('@/assets/svg/icon-iframe-fixed.svg')" alt class="fixed" @click="clickFixed" />
+                <img :src="require('@/assets/svg/icon-iframe-full.svg')" alt class="full" @click="clickFull" />
             </div>
         </div>
         <div class="content" v-if="pre_view">
             <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 :src="state.iframe_url" v-if="state.status == ''" ref="dom_iframe" frameborder="0" scrolling="yes"
                 allow="camera *;microphone *"></iframe>
             <!-- 网页错误 -->
-            <div class="state" v-show="state.status == '网页错误'">
+            <div class="state" v-if="state.status == '网页错误'">
                 <img :src="state.cover_url" alt="" class="cover">
                 <div class="info">
                     <img :src="require('@/assets/svg/icon-iframe-error.svg')" alt />
@@ -23,16 +23,16 @@
             </div>
 
             <!-- 加载 -->
-            <div class="state" v-show="state.status == '加载'">
+            <div class="state" v-if="state.status == '加载'">
                 <img :src="require('@/assets/svg/icon-iframe-loading.svg')" alt class="icon-loading" />
             </div>
 
             <!-- 关闭 -->
-            <div class="state" v-show="state.status == '关闭'">
+            <div class="state" v-if="state.status == '关闭'">
 
             </div>
             <!-- 固定右上角 -->
-            <div class="state" v-show="state.status == '固定右上角'">
+            <div class="state" v-if="state.status == '固定右上角'">
                 <div class="info">
                     <img :src="require('@/assets/svg/icon-iframe-pinned.svg')" alt />
                     <div class="pinned">Pinned to the top right</div>
@@ -62,7 +62,6 @@ import { getChromeStorage, setChromeStorage, defineProps, sendChromeTabMessage }
 import { getPostDetail } from '@/http/redPacket.js'
 import { guid, getQueryString } from "@/uilts/help";
 import { onMounted, reactive, ref } from "vue";
-import IconSvg from '@/view/components/icon-svg.vue'
 let dom_iframe = ref(null)
 let state = reactive({
     status: '', //
@@ -130,7 +129,12 @@ onMounted(() => {
         if (res == state.tweetId) {
             state.status = '固定右上角'
         } else {
+            // state.tweetId == '1547587354935713792' || state.tweetId == '1547550675810525186' ||
+            // if (state.tweetId == '1547550154894745600') {
             getDetail()
+            // } else {
+            // state.status = '加载'
+            // }
         }
     })
 
@@ -356,7 +360,7 @@ const clickFull = () => {
             margin-left: 16px;
         }
 
-        svg {
+        img {
             width: 20px;
             height: 20px;
             cursor: pointer;
@@ -381,8 +385,10 @@ const clickFull = () => {
         justify-content: center;
 
         iframe {
+            background: #fff;
             width: 100%;
-            height: 100%;
+            height: 504px;
+            border: medium none;
         }
 
         .state {

+ 4 - 5
src/view/iframe/tool-box/full.vue

@@ -4,11 +4,11 @@
             <span></span>
             <div>
                 <!-- 缩小 -->
-                <icon-svg v-if="state.status == '全屏'" :icon="'缩小'" @clickStop="clickFull" :class="'full'"></icon-svg>
-                <icon-svg v-else :icon="'放大'" @clickStop="clickFull" :class="'full'"></icon-svg>
-
+                <img v-if="state.status == '全屏'" :src="require('@/assets/svg/icon-iframe-small.svg')" alt class="full"
+                    @click="clickFull" />
+                <img v-else :src="require('@/assets/svg/icon-iframe-full.svg')" alt class="full" @click="clickFull" />
                 <!-- 关闭 -->
-                <icon-svg :icon="'关闭'" @clickStop="clickClose" :class="'fixed'"></icon-svg>
+                <img :src="require('@/assets/svg/icon-iframe-close.svg')" alt class="fixed" @click="clickClose" />
             </div>
         </div>
         <div class="content">
@@ -19,7 +19,6 @@
 <script setup>
 import { reactive } from "vue";
 import { sendChromeTabMessage } from "@/uilts/chromeExtension";
-import IconSvg from '@/view/components/icon-svg.vue'
 
 let state = reactive({
     status: '固定右上角', // 全屏

Vissa filer visades inte eftersom för många filer har ändrats