chd 1 bulan lalu
induk
melakukan
88623c27e8

+ 1 - 1
src/entrypoints/sidepanel/AdvancedMode.vue

@@ -54,7 +54,7 @@
       <ScrollToBottom :target="scrollbar" ref="scrollToBottomRef" />
     </div>
 
-    <Tools  />
+    <!-- <Tools  /> -->
 
     <div class="w-full max-w-[720px] p-[0_12px_12px]">
       <!-- 输入区域 -->

+ 7 - 242
src/entrypoints/sidepanel/component/StepsDisplay.vue

@@ -3,11 +3,11 @@
     <div  class="steps-content">
       <div class="mb-2">
         <div class="text-x" v-for="step,i in props.steps" :key="step.id">
-        {{ `步骤${i + 1}:` +  step.description }}
+        {{ `步骤${i + 1}:`  +  step.description }}
       </div>
       </div>
-      <div class="ml-6">
-        <div class="text-xs break-all" v-for="action,index in props.content" :key="index">
+      <div class="my-4 ml-8">
+        <div class="text-xs break-all mb-0.5" v-for="action,index in props.content" :key="index">
         {{ actionMap[action.action]?.text && actionMap[action.action].text + ':'+ action[actionMap[action.action].valueKey]}} 
       </div>
       </div>
@@ -15,23 +15,19 @@
       <el-progress v-else :show-text="false" class="w-full !h-0.5 overflow-hidden"  :percentage="100"
       :indeterminate="true"
       :duration="2"/>
- 
     </div>
   </div>
 </template>
-
+  
 <script lang="js" setup>
-import { ref, computed, onMounted, watch, onBeforeUnmount } from 'vue'
+import { onMounted } from 'vue'
 import { actionMap } from '@/utils/actionMap'
 
-
 onMounted(() => {
-  chrome.runtime.onMessage.addListener(async (request, sender, sendResponse) => {
+    chrome.runtime.onMessage.addListener(async (request, sender, sendResponse) => {
+    })
 })
-})
-
 
-// 定义props
 const props = defineProps({
   content: {
     type:Array,
@@ -51,238 +47,7 @@ const props = defineProps({
   }
 })
 
-// 定义事件
-const emit = defineEmits(['step-change', 'complete'])
-
-watch(() => props.content, () => {
- 
-}, { deep: true })
-
 </script>
 
 <style scoped>
-.steps-display-container {
-  padding: 20px;
-  background-color: #fff;
-  border-radius: 8px;
-  
-  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
-}
-
-.steps-title {
-  font-size: 18px;
-  font-weight: bold;
-  margin-bottom: 8px;
-  color: #303133;
-}
-
-.steps-id {
-  font-size: 14px;
-  color: #909399;
-  margin-bottom: 20px;
-}
-
-.custom-steps {
-  margin: 20px 0;
-}
-
-.steps-controls {
-  display: flex;
-  gap: 10px;
-  margin-top: 20px;
-  justify-content: flex-end;
-}
-
-.error-message {
-  margin: 20px 0;
-}
-
-:deep(.el-step__title) {
-  font-weight: bold;
-}
-
-:deep(.el-step__description) {
-  font-size: 14px;
-  white-space: pre-wrap;
-  word-break: break-word;
-}
-
-:deep(.el-step__icon) {
-  background-color: #f5f7fa;
-}
-.timestamp {
-  display: flex;
-  justify-content: space-between;
-  font-size: 12px;
-  color: #909399;
-  margin-top: 6px;
-}
-:deep(.el-step.is-success .el-step__icon) {
-  background-color: #67c23a;
-  color: white;
-}
-
-:deep(.el-step.is-process .el-step__icon) {
-  background-color: #409eff;
-  color: white;
-}
-
-/* 步骤标题容器 */
-.step-title-container {
-  display: flex;
-  align-items: center;
-  justify-content: space-between;
-  width: 100%;
-  cursor: pointer;
-}
-
-/* 折叠按钮 */
-.collapse-button {
-  margin-left: 8px;
-  padding: 2px;
-  font-size: 12px;
-}
-
-/* 步骤描述 */
-.step-description {
-  transition: all 0.3s ease;
-  transform-origin: top center;
-  overflow: hidden;
-}
-
-.collapsed {
-  height: 0;
-  /* overflow: hidden; */
-}
-
-/* 步骤内容 */
-.step-content {
-  padding: 8px 0;
-}
-
-/* 步骤进度条样式 */
-.step-progress {
-  margin-top: 10px;
-  display: flex;
-  align-items: center;
-}
-
-.progress-text {
-  margin-left: 8px;
-  font-size: 12px;
-  color: #409eff;
-  font-weight: bold;
-  transition: all 0.3s;
-}
-
-/* 自定义步骤图标 */
-.step-icon-container {
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  width: 100%;
-  height: 100%;
-}
-
-.step-icon {
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  width: 24px;
-  height: 24px;
-  border-radius: 50%;
-  background-color: #f5f7fa;
-  color: #909399;
-}
-
-.step-icon.current {
-  background-color: #409eff;
-  color: white;
-  animation: rotate 2s linear infinite, pulse 1.5s infinite;
-}
-
-.step-icon.completed {
-  background-color: #67c23a;
-  color: white;
-}
-
-/* 自定义进度条 */
-.progress-bar-container {
-  position: relative;
-  width: 100%;
-  height: 8px;
-  background-color: #f5f7fa;
-  border-radius: 4px;
-  overflow: hidden;
-  margin-right: 10px;
-  flex-grow: 1;
-}
-
-.progress-bar-background {
-  position: absolute;
-  top: 0;
-  left: 0;
-  width: 100%;
-  height: 100%;
-  background: linear-gradient(90deg, #f5f7fa 0%, #e4e7ed 100%);
-  opacity: 0.5;
-}
-
-.progress-bar-fill {
-  position: absolute;
-  top: 0;
-  left: 0;
-  height: 100%;
-  background: linear-gradient(90deg, #409eff 0%, #95d0ff 100%);
-  border-radius: 4px;
-  transition: width 0.2s ease-out;
-  box-shadow: 0 0 5px rgba(64, 158, 255, 0.5);
-}
-
-.progress-bar-glow {
-  position: absolute;
-  top: 0;
-  width: 20px;
-  height: 100%;
-  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.8) 50%, rgba(255, 255, 255, 0) 100%);
-  transform: translateX(-50%);
-  animation: shimmer 1.5s infinite;
-}
-
-@keyframes pulse {
-  0% {
-    box-shadow: 0 0 0 0 rgba(64, 158, 255, 0.4);
-  }
-  70% {
-    box-shadow: 0 0 0 10px rgba(64, 158, 255, 0);
-  }
-  100% {
-    box-shadow: 0 0 0 0 rgba(64, 158, 255, 0);
-  }
-}
-
-@keyframes rotate {
-  0% {
-   transform: rotate(0);
-  }
-  100% {
-    transform: rotate(360deg);
-  }
-}
-
-@keyframes shimmer {
-  0% {
-    opacity: 0.3;
-  }
-  50% {
-    opacity: 0.7;
-  }
-  100% {
-    opacity: 0.3;
-  }
-}
-
-:deep(.el-step__icon) {
-  border-radius: 50%;
-}
 </style>

+ 1 - 1
src/entrypoints/sidepanel/component/UserDropdown.vue

@@ -66,7 +66,7 @@ const handleCommand = (command: string) => {
 .avatar-container {
   display: flex;
   align-items: center;
-  padding: 6px 12px;
+  /* padding: 6px 12px; */
   cursor: pointer;
   border-radius: 6px;
   transition: all 0.3s;

+ 1 - 1
src/entrypoints/sidepanel/component/tools.vue

@@ -99,7 +99,7 @@ onMounted(async () => {
         </el-button>
       </el-tooltip> -->
 
-    </div>111
+    </div>
     <div class="flex items-center">
       <el-tooltip effect="dark" content="历史记录" placement="top">
   

+ 2 - 1
src/utils/navigator.js

@@ -317,9 +317,10 @@ export const navigator = () => {
                 console.log('完成11111');
                 
                 sendResponse({status:'1'})
-            }).catch(res => {
+            }).catch(async res => {
                 console.log('错误信息'+ res);
                 sendResponse({ status: '0' })
+                if (browser) await browser.disconnect();
             })
             return true
         }