mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-12-26 10:05:57 +08:00
micro fixs, update database SQL file
This commit is contained in:
@@ -128,30 +128,6 @@
|
||||
|
||||
<div class="input-box">
|
||||
<div class="input-box-inner">
|
||||
<!-- <span class="tool-item" @click="realtimeChat">
|
||||
<el-tooltip
|
||||
class="box-item"
|
||||
effect="dark"
|
||||
content="实时语音对话"
|
||||
>
|
||||
<i class="iconfont icon-mic-bold"></i>
|
||||
</el-tooltip>
|
||||
</span> -->
|
||||
|
||||
<!-- <span class="tool-item" v-if="isLogin">
|
||||
<el-tooltip
|
||||
class="box-item"
|
||||
effect="dark"
|
||||
content="上传附件"
|
||||
>
|
||||
<file-select
|
||||
v-if="isLogin"
|
||||
:user-id="loginUser.id"
|
||||
@selected="insertFile"
|
||||
/>
|
||||
</el-tooltip>
|
||||
</span> -->
|
||||
|
||||
<div class="input-body">
|
||||
<div ref="textHeightRef" class="hide-div">{{ prompt }}</div>
|
||||
<div class="input-border">
|
||||
@@ -172,15 +148,6 @@
|
||||
</textarea>
|
||||
</div>
|
||||
<div class="flex-between">
|
||||
<!-- <div @click="_newChat" class="flex-center add-new">
|
||||
<el-tooltip
|
||||
class="box-item"
|
||||
effect="dark"
|
||||
content="新建会话"
|
||||
>
|
||||
<el-icon><CirclePlusFilled /></el-icon>
|
||||
</el-tooltip>
|
||||
</div> -->
|
||||
<div class="flex little-btns">
|
||||
<span class="tool-item-btn" @click="realtimeChat">
|
||||
<el-tooltip class="box-item" effect="dark" :content="'实时语音对话,每次消耗' + config.advance_voice_power + '算力'">
|
||||
@@ -188,9 +155,9 @@
|
||||
</el-tooltip>
|
||||
</span>
|
||||
|
||||
<span class="tool-item-btn" v-if="isLogin">
|
||||
<span class="tool-item-btn">
|
||||
<el-tooltip class="box-item" effect="dark" content="上传附件">
|
||||
<file-select v-if="isLogin" :user-id="loginUser.id" @selected="insertFile" />
|
||||
<file-select :user-id="loginUser?.id" @selected="insertFile" />
|
||||
</el-tooltip>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
<el-button type="primary" :dark="false" round @click="generate"> 立即生成 </el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="task-list-box pl-6 pr-6 pb-4 pt-4">
|
||||
<div class="task-list-box pl-6 pr-6 pb-4 pt-4 h-dvh">
|
||||
<div class="task-list-inner" :style="{ height: listBoxHeight + 'px' }">
|
||||
<div class="job-list-box">
|
||||
<h2 class="text-xl">任务列表</h2>
|
||||
@@ -318,6 +318,8 @@ onMounted(() => {
|
||||
httpGet("/api/dall/models")
|
||||
.then((res) => {
|
||||
models.value = res.data;
|
||||
selectedModel.value = models.value[0];
|
||||
params.value.model_id = selectedModel.value.id;
|
||||
})
|
||||
.catch((e) => {
|
||||
showMessageError("获取模型列表失败:" + e.message);
|
||||
@@ -393,9 +395,6 @@ const fetchFinishJobs = () => {
|
||||
// 创建绘图任务
|
||||
const promptRef = ref(null);
|
||||
const generate = () => {
|
||||
if (!params.value.model_id) {
|
||||
return ElMessage.error("请选择生图模型!");
|
||||
}
|
||||
if (params.value.prompt === "") {
|
||||
promptRef.value.focus();
|
||||
return ElMessage.error("请输入绘画提示词!");
|
||||
|
||||
@@ -82,9 +82,6 @@
|
||||
</template>
|
||||
<template #default>
|
||||
<ul class="more-menus setting-menus">
|
||||
<li>
|
||||
<img :src="loginUser.avatar ? loginUser.avatar : avatarImg" />
|
||||
</li>
|
||||
<li>
|
||||
<div @click="showConfigDialog = true" class="flex">
|
||||
<el-icon>
|
||||
@@ -207,11 +204,11 @@ watch(
|
||||
}
|
||||
);
|
||||
|
||||
// 监听路由变化
|
||||
// router.beforeEach((to, from, next) => {
|
||||
// curPath.value = to.path;
|
||||
// next();
|
||||
// });
|
||||
// 监听路由变化;
|
||||
router.beforeEach((to, from, next) => {
|
||||
curPath.value = to.path;
|
||||
next();
|
||||
});
|
||||
|
||||
if (curPath.value === "/external") {
|
||||
curPath.value = router.currentRoute.value.query.url;
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="task-list-box pl-6 pr-6 pb-4">
|
||||
<div class="task-list-box pl-6 pr-6 pb-4 h-dvh">
|
||||
<div class="task-list-inner" :style="{ height: listBoxHeight + 'px' }">
|
||||
<div class="extra-params">
|
||||
<el-form>
|
||||
|
||||
@@ -235,7 +235,7 @@
|
||||
<el-button type="primary" :dark="false" round @click="generate">立即生成</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="task-list-box pl-6 pr-6 pb-4 pt-4">
|
||||
<div class="task-list-box pl-6 pr-6 pb-4 pt-4 h-dvh">
|
||||
<div class="task-list-inner" :style="{ height: listBoxHeight + 'px' }">
|
||||
<div class="job-list-box">
|
||||
<h2 class="text-xl">任务列表</h2>
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
<div class="menu-box">
|
||||
<el-menu mode="horizontal" :ellipsis="false">
|
||||
<div class="menu-item">
|
||||
<!-- <el-image :src="logo" class="logo" alt="Geek-AI" /> -->
|
||||
<img :src="logo" class="logo" alt="" />
|
||||
<img :src="logo" class="logo" alt="Geek-AI" />
|
||||
</div>
|
||||
<div class="menu-item">
|
||||
<span v-if="!license.de_copy">
|
||||
|
||||
@@ -54,8 +54,6 @@ import Captcha from "@/components/Captcha.vue";
|
||||
|
||||
const router = useRouter();
|
||||
const title = ref("Geek-AI");
|
||||
const username = ref(process.env.VUE_APP_USER);
|
||||
const password = ref(process.env.VUE_APP_PASS);
|
||||
|
||||
const logo = ref("");
|
||||
const licenseConfig = ref({});
|
||||
@@ -132,8 +130,8 @@ const login = async function () {
|
||||
const store = useSharedStore();
|
||||
const doLogin = (verifyData) => {
|
||||
httpPost("/api/user/login", {
|
||||
username: username.value,
|
||||
password: password.value,
|
||||
username: ruleForm.username,
|
||||
password: ruleForm.password,
|
||||
key: verifyData.key,
|
||||
dots: verifyData.dots,
|
||||
x: verifyData.x,
|
||||
|
||||
@@ -78,6 +78,10 @@
|
||||
<div class="wechat-card">
|
||||
<el-image :src="wxImg" />
|
||||
</div>
|
||||
|
||||
<div class="mt-3">
|
||||
<el-button type="primary" @click="router.push('/')"><i class="iconfont icon-home mr-1"></i> 返回首页</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-result>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<!-- :style="{ height: winHeight + 'px' }" -->
|
||||
<div class="page-suno" :style="{ height: winHeight + 'px' }">
|
||||
<div class="page-suno">
|
||||
<div class="left-bar">
|
||||
<div class="bar-top">
|
||||
<el-tooltip content="定义模式" placement="top">
|
||||
@@ -135,7 +134,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right-box" v-loading="loading" element-loading-background="rgba(100,100,100,0.3)">
|
||||
<div class="right-box h-dvh" v-loading="loading" element-loading-background="rgba(100,100,100,0.3)">
|
||||
<div class="list-box" v-if="!noData">
|
||||
<div v-for="item in list" :key="item.id">
|
||||
<div class="item" v-if="item.progress === 100">
|
||||
@@ -289,9 +288,6 @@ import Compressor from "compressorjs";
|
||||
import Generating from "@/components/ui/Generating.vue";
|
||||
import { useSharedStore } from "@/store/sharedata";
|
||||
|
||||
// const winHeight = ref(window.innerHeight - 50);
|
||||
const winHeight = ref(window.innerHeight - 20);
|
||||
|
||||
const custom = ref(false);
|
||||
const models = ref([
|
||||
{ label: "v3.0", value: "chirp-v3-0" },
|
||||
|
||||
@@ -209,7 +209,7 @@
|
||||
签到赠送算力
|
||||
<el-tooltip effect="dark" content="每日签到赠送算力" raw-content placement="right">
|
||||
<el-icon>
|
||||
<InfoFilled/>
|
||||
<InfoFilled />
|
||||
</el-icon>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
@@ -249,10 +249,9 @@
|
||||
<template #label>
|
||||
<div class="label-title">
|
||||
MJ操作算力
|
||||
<el-tooltip effect="dark" content="主要用户函数调用 DALL-E-3 进行绘画" raw-content
|
||||
placement="right">
|
||||
<el-tooltip effect="dark" content="主要用户函数调用 DALL-E-3 进行绘画" raw-content placement="right">
|
||||
<el-icon>
|
||||
<InfoFilled/>
|
||||
<InfoFilled />
|
||||
</el-icon>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
@@ -388,7 +387,9 @@
|
||||
|
||||
<!-- <el-text type="danger">请注意:在修复数据前,请先备份好数据库,以免数据丢失!</el-text>-->
|
||||
|
||||
<p><el-button type="primary" @click="fixData">立即修复</el-button></p>
|
||||
<div class="mt-3">
|
||||
<el-button type="primary" @click="fixData">立即修复</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
@@ -396,17 +397,17 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {onMounted, reactive, ref} from "vue";
|
||||
import {httpGet, httpPost} from "@/utils/http";
|
||||
import { onMounted, reactive, ref } from "vue";
|
||||
import { httpGet, httpPost } from "@/utils/http";
|
||||
import Compressor from "compressorjs";
|
||||
import {ElMessage, ElMessageBox} from "element-plus";
|
||||
import {CloseBold, InfoFilled, Select, UploadFilled} from "@element-plus/icons-vue";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import { CloseBold, InfoFilled, Select, UploadFilled } from "@element-plus/icons-vue";
|
||||
import MdEditor from "md-editor-v3";
|
||||
import "md-editor-v3/lib/style.css";
|
||||
import Menu from "@/views/admin/Menu.vue";
|
||||
import {copyObj, dateFormat} from "@/utils/libs";
|
||||
import { copyObj, dateFormat } from "@/utils/libs";
|
||||
import ItemsInput from "@/components/ui/ItemsInput.vue";
|
||||
import {useSharedStore} from "@/store/sharedata";
|
||||
import { useSharedStore } from "@/store/sharedata";
|
||||
|
||||
const activeName = ref("basic");
|
||||
const system = ref({ models: [] });
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
<div class="login flex w-full flex-col place-content-center h-lvh">
|
||||
<el-image src="/images/logo.png" class="w-1/2 mx-auto logo" />
|
||||
<div class="title text-center text-3xl font-bold mt-8">{{ title }}</div>
|
||||
<login-dialog @success="loginSuccess" />
|
||||
<div class="w-full p-8">
|
||||
<login-dialog @success="loginSuccess" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -152,11 +152,22 @@ const qualities = [
|
||||
{ text: "标准", value: "standard" },
|
||||
{ text: "高清", value: "hd" },
|
||||
];
|
||||
const sizes = [
|
||||
const fluxSizes = [
|
||||
{ text: "1024x1024", value: "1024x1024" },
|
||||
{ text: "1024x768", value: "1024x768" },
|
||||
{ text: "768x1024", value: "768x1024" },
|
||||
{ text: "1280x960", value: "1280x960" },
|
||||
{ text: "960x1280", value: "960x1280" },
|
||||
{ text: "1366x768", value: "1366x768" },
|
||||
{ text: "768x1366", value: "768x1366" },
|
||||
];
|
||||
const dalleSizes = [
|
||||
{ text: "1024x1024", value: "1024x1024" },
|
||||
{ text: "1792x1024", value: "1792x1024" },
|
||||
{ text: "1024x1792", value: "1024x1792" },
|
||||
];
|
||||
|
||||
let sizes = dalleSizes;
|
||||
const styles = [
|
||||
{ text: "生动", value: "vivid" },
|
||||
{ text: "自然", value: "natural" },
|
||||
@@ -223,7 +234,7 @@ onMounted(() => {
|
||||
httpGet("/api/dall/models")
|
||||
.then((res) => {
|
||||
for (let i = 0; i < res.data.length; i++) {
|
||||
models.value.push({ text: res.data[i].name, value: res.data[i].id });
|
||||
models.value.push({ text: res.data[i].name, value: res.data[i].id, name: res.data[i].value });
|
||||
}
|
||||
selectedModel.value = models.value[0]?.text;
|
||||
params.value.model_id = models.value[0]?.value;
|
||||
@@ -415,6 +426,11 @@ const modelConfirm = (item) => {
|
||||
params.value.model_id = item.selectedOptions[0].value;
|
||||
selectedModel.value = item.selectedOptions[0].text;
|
||||
showModelPicker.value = false;
|
||||
if (item.selectedOptions[0].name.startsWith("dall")) {
|
||||
sizes = dalleSizes;
|
||||
} else {
|
||||
sizes = fluxSizes;
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user