|
@@ -502,7 +502,7 @@
|
|
|
<circle cx="12" cy="12" r="10" stroke-dasharray="32" stroke-dashoffset="12"></circle>
|
|
<circle cx="12" cy="12" r="10" stroke-dasharray="32" stroke-dashoffset="12"></circle>
|
|
|
</svg>
|
|
</svg>
|
|
|
</div>
|
|
</div>
|
|
|
- <span class="submenu-label">{{ create_app_loading ? lang.ssCreating : lang.ssNewWebpage }}</span>
|
|
|
|
|
|
|
+ <span class="submenu-label">{{ isExistingWebElement ? lang.ssEditWebpage : create_app_loading ? lang.ssCreating : lang.ssNewWebpage }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="submenu-item" @click="handleToolClick('uploadCode')">
|
|
<div class="submenu-item" @click="handleToolClick('uploadCode')">
|
|
|
<div class="submenu-icon">
|
|
<div class="submenu-icon">
|
|
@@ -581,9 +581,9 @@
|
|
|
<div class="upload-box">
|
|
<div class="upload-box">
|
|
|
<div class="upload-tabs">
|
|
<div class="upload-tabs">
|
|
|
<button class="upload-tab" :class="{ active: uploadTab === 'file' }"
|
|
<button class="upload-tab" :class="{ active: uploadTab === 'file' }"
|
|
|
- @click="switchUploadTab('file')">上传文件</button>
|
|
|
|
|
|
|
+ @click="switchUploadTab('file')">{{ lang.ssUploadFile }}</button>
|
|
|
<button class="upload-tab" :class="{ active: uploadTab === 'code' }"
|
|
<button class="upload-tab" :class="{ active: uploadTab === 'code' }"
|
|
|
- @click="switchUploadTab('code')">粘贴代码</button>
|
|
|
|
|
|
|
+ @click="switchUploadTab('code')">{{ lang.ssPasteCode }}</button>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="uploadFilePanel" v-if="uploadTab === 'file'">
|
|
<div class="uploadFilePanel" v-if="uploadTab === 'file'">
|
|
|
<div class="form-group">
|
|
<div class="form-group">
|
|
@@ -620,7 +620,7 @@
|
|
|
:class="{ 'loading': isLoading, 'disabled': !codeInput || isLoading }"
|
|
:class="{ 'loading': isLoading, 'disabled': !codeInput || isLoading }"
|
|
|
:disabled="!codeInput || isLoading" @click="handleUploadCode"
|
|
:disabled="!codeInput || isLoading" @click="handleUploadCode"
|
|
|
v-else-if="uploadTab === 'code'">
|
|
v-else-if="uploadTab === 'code'">
|
|
|
- {{ isLoading ? lang.ssUploading : !codeInput ? lang.ssWaitingForInput2 : lang.ssStartUpload }}
|
|
|
|
|
|
|
+ {{ isLoading ? lang.ssUploading : !codeInput ? lang.ssStartUpload : lang.ssStartUpload }}
|
|
|
</button>
|
|
</button>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -713,7 +713,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
|
-import { ref, watch } from 'vue'
|
|
|
|
|
|
|
+import { ref, watch, computed } from 'vue'
|
|
|
import { storeToRefs } from 'pinia'
|
|
import { storeToRefs } from 'pinia'
|
|
|
import useCreateElement from '@/hooks/useCreateElement'
|
|
import useCreateElement from '@/hooks/useCreateElement'
|
|
|
import useSlideHandler from '@/hooks/useSlideHandler'
|
|
import useSlideHandler from '@/hooks/useSlideHandler'
|
|
@@ -1356,6 +1356,15 @@ const handleUploadCode = async () => {
|
|
|
isLoading.value = false
|
|
isLoading.value = false
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+const isExistingWebElement = computed(() => {
|
|
|
|
|
+ const elements = currentSlide.value?.elements || []
|
|
|
|
|
+ const existingWebElement = elements.find((el: any) => el.toolType === 73 && el.webId && el.type === 'frame')
|
|
|
|
|
+ return existingWebElement && existingWebElement.webId
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
// AI Web 相关状态
|
|
// AI Web 相关状态
|
|
|
const create_app_loading = ref(false)
|
|
const create_app_loading = ref(false)
|
|
|
const webId = ref('')
|
|
const webId = ref('')
|
|
@@ -1476,15 +1485,15 @@ const addAiWeb = async (code: string) => {
|
|
|
box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
|
|
box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
|
|
|
|
|
|
|
|
&:hover {
|
|
&:hover {
|
|
|
- background: #fff2df !important;
|
|
|
|
|
- border-color: rgba(247, 139, 34, 0.4) !important;
|
|
|
|
|
- box-shadow: 0 14px 28px rgba(247, 139, 34, 0.18) !important;
|
|
|
|
|
|
|
+ box-shadow: #f78b221f 0px 12px 24px !important;
|
|
|
|
|
+ background: #fff8ef !important;
|
|
|
|
|
+ border-color: #f78b2252 !important;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
&.active {
|
|
&.active {
|
|
|
|
|
+ box-shadow: #f78b222e 0px 14px 28px !important;
|
|
|
background: #fff2df !important;
|
|
background: #fff2df !important;
|
|
|
- border-color: rgba(247, 139, 34, 0.4) !important;
|
|
|
|
|
- box-shadow: 0 14px 28px rgba(247, 139, 34, 0.18) !important;
|
|
|
|
|
|
|
+ border-color: #f78b2266 !important;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|