Adapt to mobile screen (#246)

This commit is contained in:
Germey authored and GitHub committed 2025-08-05 00:53:59 +08:00
1 parent 2565f1573d
commit ba3c0f31f4
18 files changed
+96 -92

No files matched your search

@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "adapt to mobile",
"packageName": "@acedatacloud/nexior",
"email": "cqc@cuiqingcai.com",
"dependentChangeType": "patch"
}
+8 -2
View File
@@ -1,6 +1,6 @@
<template> <template>
<div class="status"> <div class="status">
<el-dialog v-model="visible" class="mt-12" width="600px"> <el-dialog v-model="visible" class="mt-12" width="450px">
<div v-if="application"> <div v-if="application">
<p class="text-center mb-4"> <p class="text-center mb-4">
{{ $t('application.message.applicationSelection') }} {{ $t('application.message.applicationSelection') }}
@@ -21,7 +21,7 @@
</div> </div>
</div> </div>
</el-dialog> </el-dialog>
<el-button circle @click="visible = true"> <el-button circle class="entry" @click="visible = true">
<font-awesome-icon icon="fa-solid fa-wallet" class="icon" /> <font-awesome-icon icon="fa-solid fa-wallet" class="icon" />
</el-button> </el-button>
</div> </div>
@@ -103,3 +103,9 @@ export default defineComponent({
} }
}); });
</script> </script>
<style lang="scss" scoped>
.entry {
background-color: var(--el-color-black);
}
</style>
+5
View File
@@ -334,6 +334,11 @@ export default defineComponent({
border-color: var(--el-color-black); border-color: var(--el-color-black);
} }
} }
@media (max-width: 767px) {
.edits {
min-width: 350px;
}
}
} }
} }
.content { .content {
+15 -15
View File
@@ -1,7 +1,7 @@
<template> <template>
<div :direction="direction" class="navigator"> <div :direction="direction" class="navigator">
<div class="top"> <div class="top">
<div class="w-full flex justify-center"> <div class="w-full flex justify-center brand">
<logo v-if="direction === 'column'" @click.stop="onHome" /> <logo v-if="direction === 'column'" @click.stop="onHome" />
</div> </div>
<div <div
@@ -9,7 +9,7 @@
:key="linkIndex" :key="linkIndex"
:class="{link: true, active: link.routes.includes($route.name as string)}" :class="{link: true, active: link.routes.includes($route.name as string)}"
> >
<el-tooltip v-if="direction === 'column'" effect="dark" :content="link.displayName" placement="right"> <el-tooltip effect="dark" :content="link.displayName" :placement="direction === 'row' ? 'top' : 'right'">
<el-image v-if="link.logo" :src="link.logo" class="avatar" @click="$router.push(link.route)" /> <el-image v-if="link.logo" :src="link.logo" class="avatar" @click="$router.push(link.route)" />
</el-tooltip> </el-tooltip>
</div> </div>
@@ -249,12 +249,22 @@ export default defineComponent({
align-items: center; align-items: center;
position: relative; position: relative;
.top {
.avatar {
display: block;
margin: auto;
width: 35px;
height: 35px;
border-radius: 50%;
cursor: pointer;
border: 1px solid var(--el-border-color-lighter);
}
}
&[direction='row'] { &[direction='row'] {
flex-direction: row; flex-direction: row;
padding-top: 10px;
border-top: 1px solid var(--el-border-color); border-top: 1px solid var(--el-border-color);
.chevron, .brand {
.logo {
display: none; display: none;
} }
.top { .top {
@@ -280,7 +290,6 @@ export default defineComponent({
} }
&[direction='column'] { &[direction='column'] {
flex-direction: column; flex-direction: column;
.top { .top {
flex: 1; flex: 1;
display: flex; display: flex;
@@ -295,15 +304,6 @@ export default defineComponent({
} }
.link { .link {
width: 100%; width: 100%;
.avatar {
display: block;
margin: auto;
width: 35px;
height: 35px;
border-radius: 50%;
cursor: pointer;
border: 1px solid var(--el-border-color-lighter);
}
} }
} }
+7 -2
View File
@@ -3,7 +3,12 @@
<bot-placeholder /> <bot-placeholder />
</div> </div>
<div v-else-if="tasks?.items?.length && tasks?.items?.length > 0" class="tasks w-full h-full overflow-y-auto"> <div v-else-if="tasks?.items?.length && tasks?.items?.length > 0" class="tasks w-full h-full overflow-y-auto">
<task-preview v-for="(task, taskIndex) in tasks?.items" :key="taskIndex" :model-value="task" /> <task-preview
v-for="(task, taskIndex) in tasks?.items"
:key="taskIndex"
:model-value="task"
@extend="$emit('extend')"
/>
</div> </div>
<div v-if="tasks?.items?.length === 0" class="w-full h-full flex items-center justify-center"> <div v-if="tasks?.items?.length === 0" class="w-full h-full flex items-center justify-center">
<no-tasks /> <no-tasks />
@@ -23,7 +28,7 @@ export default defineComponent({
TaskPreview, TaskPreview,
NoTasks NoTasks
}, },
emits: ['reach-top'], emits: ['reach-top', 'extend'],
data() { data() {
return { return {
job: 0 job: 0
+2
View File
@@ -131,6 +131,7 @@ export default defineComponent({
required: true required: true
} }
}, },
emits: ['extend'],
data() { data() {
return {}; return {};
}, },
@@ -154,6 +155,7 @@ export default defineComponent({
thumbnail_url: response.thumbnail_url, thumbnail_url: response.thumbnail_url,
video_url: response.video_url video_url: response.video_url
}); });
this.$emit('extend');
}, },
onDownload(video_url: string) { onDownload(video_url: string) {
// download url here // download url here
@@ -84,7 +84,6 @@ export default defineComponent({
<style lang="scss" scoped> <style lang="scss" scoped>
.panel { .panel {
border-right: 1px solid var(--el-border-color);
flex: 1; flex: 1;
height: calc(100% - 40px); height: calc(100% - 40px);
} }
+6 -1
View File
@@ -5,7 +5,12 @@
<div v-else-if="tasks && tasks?.length === 0" class="w-full h-full flex items-center justify-center"> <div v-else-if="tasks && tasks?.length === 0" class="w-full h-full flex items-center justify-center">
<no-tasks /> <no-tasks />
</div> </div>
<div v-else-if="tasks.length > 0" ref="panel" class="p-2 flex flex-col overflow-y-auto" @scroll="onHandleScroll"> <div
v-else-if="tasks.length > 0"
ref="panel"
class="p-2 h-full flex flex-col overflow-y-auto"
@scroll="onHandleScroll"
>
<task-item <task-item
v-for="(task, taskKey) in tasks" v-for="(task, taskKey) in tasks"
:key="taskKey" :key="taskKey"
+18 -15
View File
@@ -9,10 +9,10 @@
<slot name="chat" /> <slot name="chat" />
</div> </div>
<el-button round class="menu" @click="drawer = true"> <el-button round class="menu" @click="drawer = true">
<font-awesome-icon icon="fa-solid fa-bars" class="icon-menu" /> <font-awesome-icon icon="fa-solid fa-bars" />
</el-button> </el-button>
<el-drawer v-model="drawer" :with-header="false" size="290px" class="drawer"> <el-drawer v-model="drawer" direction="ltr" :with-header="false" size="290px">
<side-panel /> <side-panel @change-conversation="onChangeConversation" />
</el-drawer> </el-drawer>
</div> </div>
</template> </template>
@@ -75,18 +75,21 @@ export default defineComponent({
} }
@media (max-width: 767px) { @media (max-width: 767px) {
.side { .main {
display: none; .side {
} display: none;
.chat { }
width: 100%; .chat {
} width: 100%;
.menu { padding: 50px 15px 0 10px;
display: block; }
position: fixed; .menu {
right: 20px; display: block;
top: 20px; position: fixed;
z-index: 2000; left: 20px;
top: 50px;
z-index: 2000;
}
} }
} }
</style> </style>
+3 -2
View File
@@ -7,9 +7,9 @@
<slot name="result" /> <slot name="result" />
</div> </div>
<el-button round class="menu" @click="drawer = true"> <el-button round class="menu" @click="drawer = true">
<font-awesome-icon icon="fa-solid fa-gear" class="icon-menu" /> <font-awesome-icon icon="fa-solid fa-magic" />
</el-button> </el-button>
<el-drawer v-model="drawer" :with-header="false" size="340px" class="drawer"> <el-drawer v-model="drawer" direction="ltr" :with-header="false" size="340px" class="drawer">
<slot name="config" /> <slot name="config" />
</el-drawer> </el-drawer>
</div> </div>
@@ -75,6 +75,7 @@ export default defineComponent({
left: 15px; left: 15px;
top: 15px; top: 15px;
z-index: 2000; z-index: 2000;
background-color: var(--el-color-black);
} }
} }
</style> </style>
+3 -2
View File
@@ -7,9 +7,9 @@
<slot name="result" /> <slot name="result" />
</div> </div>
<el-button round class="menu" @click="drawer = true"> <el-button round class="menu" @click="drawer = true">
<font-awesome-icon icon="fa-solid fa-gear" class="icon-menu" /> <font-awesome-icon icon="fa-solid fa-magic" />
</el-button> </el-button>
<el-drawer v-model="drawer" :with-header="false" size="340px" class="drawer"> <el-drawer v-model="drawer" direction="ltr" :with-header="false" size="340px">
<slot name="config" /> <slot name="config" />
</el-drawer> </el-drawer>
</div> </div>
@@ -75,6 +75,7 @@ export default defineComponent({
left: 15px; left: 15px;
top: 15px; top: 15px;
z-index: 2000; z-index: 2000;
background-color: var(--el-color-black);
} }
} }
</style> </style>
+3 -2
View File
@@ -7,9 +7,9 @@
<slot name="result" /> <slot name="result" />
</div> </div>
<el-button round class="menu" @click="drawer = true"> <el-button round class="menu" @click="drawer = true">
<font-awesome-icon icon="fa-solid fa-gear" class="icon-menu" /> <font-awesome-icon icon="fa-solid fa-magic" />
</el-button> </el-button>
<el-drawer v-model="drawer" :with-header="false" size="340px" class="drawer"> <el-drawer v-model="drawer" direction="ltr" :with-header="false" size="350px">
<slot name="config" /> <slot name="config" />
</el-drawer> </el-drawer>
</div> </div>
@@ -75,6 +75,7 @@ export default defineComponent({
left: 15px; left: 15px;
top: 15px; top: 15px;
z-index: 2000; z-index: 2000;
background-color: var(--el-color-black);
} }
} }
</style> </style>
+3 -2
View File
@@ -7,9 +7,9 @@
<slot name="result" /> <slot name="result" />
</div> </div>
<el-button round class="menu" @click="drawer = true"> <el-button round class="menu" @click="drawer = true">
<font-awesome-icon icon="fa-solid fa-gear" class="icon-menu" /> <font-awesome-icon icon="fa-solid fa-magic" />
</el-button> </el-button>
<el-drawer v-model="drawer" :with-header="false" size="340px" class="drawer"> <el-drawer v-model="drawer" direction="ltr" :with-header="false" size="350px" class="drawer">
<slot name="config" /> <slot name="config" />
</el-drawer> </el-drawer>
</div> </div>
@@ -75,6 +75,7 @@ export default defineComponent({
left: 15px; left: 15px;
top: 15px; top: 15px;
z-index: 2000; z-index: 2000;
background-color: var(--el-color-black);
} }
} }
</style> </style>
+5 -35
View File
@@ -7,9 +7,9 @@
<slot name="results" /> <slot name="results" />
</div> </div>
<el-button round class="menu" @click="drawer = true"> <el-button round class="menu" @click="drawer = true">
<font-awesome-icon icon="fa-solid fa-gear" class="icon-menu" /> <font-awesome-icon icon="fa-solid fa-magic" class="icon-menu" />
</el-button> </el-button>
<el-drawer v-model="drawer" :with-header="false" size="300px" class="drawer"> <el-drawer v-model="drawer" direction="ltr" :with-header="false" size="350px" class="drawer">
<slot name="config" /> <slot name="config" />
</el-drawer> </el-drawer>
</div> </div>
@@ -35,19 +35,6 @@ export default defineComponent({
}); });
</script> </script>
<style lang="scss">
.drawer2 {
.el-drawer__header {
margin-bottom: 0;
}
.el-drawer__body {
.tasks {
padding-top: 0;
}
}
}
</style>
<style lang="scss" scoped> <style lang="scss" scoped>
.main { .main {
flex: 1; flex: 1;
@@ -57,14 +44,12 @@ export default defineComponent({
.menu { .menu {
display: none; display: none;
} }
.menu2 {
display: none;
}
.config { .config {
width: 300px; width: 300px;
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
border-right: 1px solid var(--el-border-color);
} }
.results { .results {
flex: 1; flex: 1;
@@ -74,22 +59,6 @@ export default defineComponent({
} }
} }
@media screen and (min-width: 768px) and (max-width: 1060px) {
.main {
position: relative;
.config {
display: none;
}
.menu {
display: block;
position: absolute;
left: 20px;
top: 20px;
z-index: 1000;
}
}
}
@media (max-width: 767px) { @media (max-width: 767px) {
.main { .main {
position: relative; position: relative;
@@ -97,7 +66,7 @@ export default defineComponent({
display: none; display: none;
} }
.results { .results {
display: none; display: block;
} }
.menu { .menu {
display: block; display: block;
@@ -105,6 +74,7 @@ export default defineComponent({
left: 15px; left: 15px;
top: 15px; top: 15px;
z-index: 1000; z-index: 1000;
background-color: var(--el-color-black);
} }
} }
} }
+3 -2
View File
@@ -7,9 +7,9 @@
<slot name="result" /> <slot name="result" />
</div> </div>
<el-button round class="menu" @click="drawer = true"> <el-button round class="menu" @click="drawer = true">
<font-awesome-icon icon="fa-solid fa-gear" class="icon-menu" /> <font-awesome-icon icon="fa-solid fa-magic" />
</el-button> </el-button>
<el-drawer v-model="drawer" :with-header="false" size="340px" class="drawer"> <el-drawer v-model="drawer" :with-header="false" size="350px">
<slot name="config" /> <slot name="config" />
</el-drawer> </el-drawer>
</div> </div>
@@ -75,6 +75,7 @@ export default defineComponent({
left: 15px; left: 15px;
top: 15px; top: 15px;
z-index: 2000; z-index: 2000;
background-color: var(--el-color-black);
} }
} }
</style> </style>
+3 -2
View File
@@ -7,9 +7,9 @@
<slot name="result" /> <slot name="result" />
</div> </div>
<el-button round class="menu" @click="drawer = true"> <el-button round class="menu" @click="drawer = true">
<font-awesome-icon icon="fa-solid fa-gear" class="icon-menu" /> <font-awesome-icon icon="fa-solid fa-magic" />
</el-button> </el-button>
<el-drawer v-model="drawer" :with-header="false" size="340px" class="drawer"> <el-drawer v-model="drawer" direction="ltr" :with-header="false" size="350px">
<slot name="config" /> <slot name="config" />
</el-drawer> </el-drawer>
</div> </div>
@@ -75,6 +75,7 @@ export default defineComponent({
left: 15px; left: 15px;
top: 15px; top: 15px;
z-index: 2000; z-index: 2000;
background-color: var(--el-color-black);
} }
} }
</style> </style>
+3 -8
View File
@@ -10,14 +10,11 @@
<slot name="preview" /> <slot name="preview" />
</div> </div>
<el-button round class="menu" @click="drawer = true"> <el-button round class="menu" @click="drawer = true">
<font-awesome-icon icon="fa-solid fa-gear" class="icon-menu" /> <font-awesome-icon icon="fa-solid fa-magic" />
</el-button> </el-button>
<el-drawer v-model="drawer" :with-header="false" size="340px" class="drawer"> <el-drawer v-model="drawer" direction="ltr" :with-header="false" size="340px" class="drawer">
<slot name="config" /> <slot name="config" />
</el-drawer> </el-drawer>
<!-- <el-drawer v-model="isPlaying" :with-header="false" size="340px" class="preview_drawer">
<slot name="preview" />
</el-drawer> -->
</div> </div>
</template> </template>
@@ -74,9 +71,6 @@ export default defineComponent({
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
.preview_drawer {
display: none;
}
} }
.menu { .menu {
@@ -100,6 +94,7 @@ export default defineComponent({
left: 15px; left: 15px;
top: 15px; top: 15px;
z-index: 2000; z-index: 2000;
background-color: var(--el-color-black);
} }
} }
} }
+2 -1
View File
@@ -4,7 +4,7 @@
<config-panel @generate="onGenerate" /> <config-panel @generate="onGenerate" />
</template> </template>
<template #result> <template #result>
<recent-panel @reach-top="onReachTop" /> <recent-panel @reach-top="onReachTop" @extend="$emit('extend')" />
</template> </template>
</layout> </layout>
</template> </template>
@@ -35,6 +35,7 @@ export default defineComponent({
RecentPanel RecentPanel
}, },
inject: ['initialized'], inject: ['initialized'],
emits: ['extend'],
data(): IData { data(): IData {
return { return {
task: undefined, task: undefined,