From 66b114ed0b9612740275dd11e09e3173b614aba7 Mon Sep 17 00:00:00 2001
From: userA
Date: Mon, 23 Oct 2023 22:38:44 +0800
Subject: [PATCH 1/6] =?UTF-8?q?LabelManage=E6=8F=92=E4=BB=B6=E9=A1=B5?=
=?UTF-8?q?=E9=9D=A2=20=E6=9C=AA=E6=B3=A8=E5=86=8C=E7=9A=84=E9=A1=B5?=
=?UTF-8?q?=E9=9D=A2=E4=B8=8D=E4=BC=9A=E5=9C=A8=E5=89=8D=E7=AB=AF=E6=98=BE?=
=?UTF-8?q?=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../example/api/LabelManagerPluginApi.java | 44 ++++++
.../org/example/api/OpenAPIPluginApi.java | 4 +
.../core/label/LabelManagerPlugin.java | 26 ++--
.../java/org/example/pojo/VideoLabel.java | 1 +
.../java/org/example/aop/PluginAspect.java | 2 +-
.../example/bean}/section/VideoSection.java | 2 +-
.../plugin/PluginNotRegisterException.java | 10 ++
.../example/controller/AccountController.java | 37 ++++-
.../exception/GlobalExceptionHandler.java | 5 +-
.../org/example/service/AccountService.java | 3 +
.../service/impl/AccountServiceImpl.java | 9 ++
.../auto/video/title/GptTitleGenerator.java | 4 +-
.../core/section/VideoSectionWorkShop.java | 3 +-
config/chopperBotConfig.json | 2 +-
console-ui/src/api/account/labelApi.ts | 26 ++++
.../src/components/navigation/MainMenu.vue | 25 +++-
console-ui/src/configs/menus/apps.menu.ts | 61 +++++----
console-ui/src/locales/en.ts | 2 +-
console-ui/src/locales/zhHans.ts | 3 +-
console-ui/src/router/apps.routes.ts | 14 ++
console-ui/src/utils/request.ts | 50 +++----
console-ui/src/utils/validate.ts | 5 +
.../hot/live_follow/pages/LiveFollowPage.vue | 2 -
.../src/views/app/label/LabelManageView.vue | 126 ++++++++++++++++++
.../src/views/app/label/LabelManagerStore.ts | 48 +++++++
console-ui/src/views/app/label/LabelTypes.ts | 5 +
.../src/views/setting/plugin/pluginStore.ts | 16 ++-
27 files changed, 449 insertions(+), 86 deletions(-)
create mode 100644 chopperbot-account/src/main/java/org/example/api/LabelManagerPluginApi.java
rename {chopperbot-section/src/main/java/org/example/core => chopperbot-common/src/main/java/org/example/bean}/section/VideoSection.java (95%)
create mode 100644 console-ui/src/api/account/labelApi.ts
create mode 100644 console-ui/src/views/app/label/LabelManageView.vue
create mode 100644 console-ui/src/views/app/label/LabelManagerStore.ts
create mode 100644 console-ui/src/views/app/label/LabelTypes.ts
diff --git a/chopperbot-account/src/main/java/org/example/api/LabelManagerPluginApi.java b/chopperbot-account/src/main/java/org/example/api/LabelManagerPluginApi.java
new file mode 100644
index 0000000..0b5484b
--- /dev/null
+++ b/chopperbot-account/src/main/java/org/example/api/LabelManagerPluginApi.java
@@ -0,0 +1,44 @@
+package org.example.api;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import org.example.core.label.LabelManagerPlugin;
+import org.example.pojo.VideoLabel;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
+/**
+ * @author Genius
+ * @date 2023/10/23 17:22
+ **/
+@Component
+public class LabelManagerPluginApi {
+ @Resource
+ LabelManagerPlugin plugin;
+
+ public List labelList(){
+ return plugin.getMapper().selectList(new QueryWrapper<>());
+ }
+
+ public VideoLabel addLabel(VideoLabel label){
+ try {
+ label.setLabelId(UUID.randomUUID().toString());
+ if (plugin.getMapper().insert(label)>0) {
+ return label;
+ }
+ }catch (Exception e){
+ }
+ return null;
+ }
+
+ public boolean deleteLabel(String label){
+ return plugin.getMapper().deleteByMap(Map.of("label",label))>0;
+ }
+
+ public boolean updateLabel(VideoLabel label){
+ return plugin.getMapper().update(label,new QueryWrapper().eq("label_id",label.getLabelId()))>0;
+ }
+}
diff --git a/chopperbot-account/src/main/java/org/example/api/OpenAPIPluginApi.java b/chopperbot-account/src/main/java/org/example/api/OpenAPIPluginApi.java
index 9136e15..b1175dd 100644
--- a/chopperbot-account/src/main/java/org/example/api/OpenAPIPluginApi.java
+++ b/chopperbot-account/src/main/java/org/example/api/OpenAPIPluginApi.java
@@ -8,6 +8,7 @@ import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.List;
+import java.util.Map;
/**
* @Date 2023/10/12
@@ -22,6 +23,9 @@ public class OpenAPIPluginApi {
return plugin.getMapper().update(newKey, new QueryWrapper().eq("function", newKey.getFunction())) == 1;
}
+ public boolean deleteKey(String function){
+ return plugin.getMapper().deleteByMap(Map.of("function",function))==1;
+ }
public boolean addKey(GPTKey key){
return plugin.getMapper().insert(key)==1;
}
diff --git a/chopperbot-account/src/main/java/org/example/core/label/LabelManagerPlugin.java b/chopperbot-account/src/main/java/org/example/core/label/LabelManagerPlugin.java
index 6ccdd6e..80088ce 100644
--- a/chopperbot-account/src/main/java/org/example/core/label/LabelManagerPlugin.java
+++ b/chopperbot-account/src/main/java/org/example/core/label/LabelManagerPlugin.java
@@ -1,6 +1,7 @@
package org.example.core.label;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import lombok.Data;
import org.example.mapper.LabelMapper;
import org.example.plugin.SpringBootPlugin;
import org.example.pojo.VideoLabel;
@@ -11,6 +12,7 @@ import javax.annotation.Resource;
import java.awt.*;
import java.util.List;
import java.util.Map;
+import java.util.UUID;
import java.util.stream.Collectors;
/**
@@ -18,6 +20,7 @@ import java.util.stream.Collectors;
* @date 2023/10/23 00:10
**/
@Component
+@Data
public class LabelManagerPlugin extends SpringBootPlugin {
@Resource
@@ -31,32 +34,19 @@ public class LabelManagerPlugin extends SpringBootPlugin {
@Override
@SQLInit(table = "video_label",tableSQL = "CREATE TABLE \"video_label\" (\n" +
"\t\"id\"\tINTEGER NOT NULL,\n" +
+ "\t\"label_id\"\tTEXT NOT NULL UNIQUE,\n" +
"\t\"label\"\tTEXT NOT NULL UNIQUE,\n" +
"\tPRIMARY KEY(\"id\" AUTOINCREMENT)\n" +
")",mapper = LabelMapper.class)
public List> sqlInit() {
- return List.of(new VideoLabel(null,"搞笑"),
- new VideoLabel(null,"破防"),new VideoLabel(null,"泪目"),
- new VideoLabel(null,"精彩操作"));
+ return List.of(new VideoLabel(null, UUID.randomUUID().toString(),"搞笑"),
+ new VideoLabel(null, UUID.randomUUID().toString(),"破防"),
+ new VideoLabel(null, UUID.randomUUID().toString(),"泪目"),
+ new VideoLabel(null, UUID.randomUUID().toString(),"精彩操作"));
}
public List labelStrList(){
return mapper.selectList(new QueryWrapper<>()).stream().map(VideoLabel::getLabel).collect(Collectors.toList());
}
- public List labelList(){
- return mapper.selectList(new QueryWrapper<>());
- }
-
- public boolean addLabel(VideoLabel label){
- return mapper.insert(label)>0;
- }
-
- public boolean deleteLabel(String label){
- return mapper.deleteByMap(Map.of("label",label))>0;
- }
-
- public boolean updateLabel(VideoLabel label){
- return mapper.update(label,new QueryWrapper().eq("id",label.getId()))>0;
- }
}
diff --git a/chopperbot-account/src/main/java/org/example/pojo/VideoLabel.java b/chopperbot-account/src/main/java/org/example/pojo/VideoLabel.java
index 9142e96..fca4f6e 100644
--- a/chopperbot-account/src/main/java/org/example/pojo/VideoLabel.java
+++ b/chopperbot-account/src/main/java/org/example/pojo/VideoLabel.java
@@ -15,5 +15,6 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor
public class VideoLabel {
private Integer id;
+ private String labelId;
private String label;
}
diff --git a/chopperbot-common/src/main/java/org/example/aop/PluginAspect.java b/chopperbot-common/src/main/java/org/example/aop/PluginAspect.java
index af57ea4..77e789d 100644
--- a/chopperbot-common/src/main/java/org/example/aop/PluginAspect.java
+++ b/chopperbot-common/src/main/java/org/example/aop/PluginAspect.java
@@ -35,7 +35,7 @@ public class PluginAspect {
for (String plugin : annotation.needPlugin()) {
if(!InitPluginRegister.isRegister(plugin)){
- throw new PluginNotRegisterException();
+ throw new PluginNotRegisterException(annotation.needPlugin());
}
}
}
diff --git a/chopperbot-section/src/main/java/org/example/core/section/VideoSection.java b/chopperbot-common/src/main/java/org/example/bean/section/VideoSection.java
similarity index 95%
rename from chopperbot-section/src/main/java/org/example/core/section/VideoSection.java
rename to chopperbot-common/src/main/java/org/example/bean/section/VideoSection.java
index d112e83..7d46e1d 100644
--- a/chopperbot-section/src/main/java/org/example/core/section/VideoSection.java
+++ b/chopperbot-common/src/main/java/org/example/bean/section/VideoSection.java
@@ -1,4 +1,4 @@
-package org.example.core.section;
+package org.example.bean.section;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
diff --git a/chopperbot-common/src/main/java/org/example/exception/plugin/PluginNotRegisterException.java b/chopperbot-common/src/main/java/org/example/exception/plugin/PluginNotRegisterException.java
index f36f9d9..5e80fa2 100644
--- a/chopperbot-common/src/main/java/org/example/exception/plugin/PluginNotRegisterException.java
+++ b/chopperbot-common/src/main/java/org/example/exception/plugin/PluginNotRegisterException.java
@@ -2,14 +2,24 @@ package org.example.exception.plugin;
import org.example.exception.Impl.ResultCode;
+import java.util.Arrays;
+import java.util.stream.Collectors;
+
/**
* @author Genius
* @date 2023/08/02 16:59
**/
public class PluginNotRegisterException extends PluginException{
+ private String pluginName[];
public PluginNotRegisterException() {
super("Error! Plugin Not Register!");
resultCode = ResultCode.PLUGIN_NOT_REGISTER;
}
+
+ public PluginNotRegisterException(String...pluginName) {
+ super(String.format("Error! %s Plugin Not Register!",Arrays.stream(pluginName).collect(Collectors.toList()).toString()));
+ resultCode = ResultCode.PLUGIN_NOT_REGISTER;
+ this.pluginName = pluginName;
+ }
}
diff --git a/chopperbot-console/src/main/java/org/example/controller/AccountController.java b/chopperbot-console/src/main/java/org/example/controller/AccountController.java
index e214af1..6238ddd 100644
--- a/chopperbot-console/src/main/java/org/example/controller/AccountController.java
+++ b/chopperbot-console/src/main/java/org/example/controller/AccountController.java
@@ -1,9 +1,11 @@
package org.example.controller;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.example.pojo.Account;
import org.example.pojo.AccountVO;
import org.example.pojo.GPTKey;
+import org.example.pojo.VideoLabel;
import org.example.service.AccountService;
import org.example.util.Result;
import org.springframework.web.bind.annotation.*;
@@ -47,11 +49,16 @@ public class AccountController {
return Result.success();
}
- @GetMapping(value = "/gpt/key")
+ @GetMapping(value = "/gpt/keys")
public Result getGPT(){
return Result.success(Map.of("list",accountService.chatGptPlugin().getKeys()));
}
+ @GetMapping(value = "/gpt/delete")
+ public Result deleteGPT(@RequestParam String function){
+ return Result.success(Map.of("success",accountService.chatGptPlugin().deleteKey(function)));
+ }
+
@PostMapping(value = "/gpt/add")
public Result addGPT(@RequestBody GPTKey key){
boolean b = accountService.chatGptPlugin().addKey(key);
@@ -63,4 +70,32 @@ public class AccountController {
boolean b = accountService.chatGptPlugin().changeKey(key);
return Result.success(Map.of("success",b));
}
+
+ @GetMapping(value = "/gpt/functions")
+ public Result getFunctions(){
+ return Result.success(Map.of("list",accountService.chatGptPlugin().functions()));
+ }
+
+ @GetMapping(value = "/label/list")
+ public Result labelList(){
+ return Result.success(Map.of("list",accountService.labelManagerPlugin().labelList()));
+ }
+
+ @PostMapping(value = "/label/add")
+ public Result addLabel(@RequestBody VideoLabel label){
+ if (accountService.labelManagerPlugin().addLabel(label)==null) {
+ return Result.error("添加失败");
+ }
+ return Result.success(Map.of("data",label));
+ }
+
+ @GetMapping(value = "/label/delete")
+ public Result deleteLabel(@RequestParam String label){
+ return Result.success(Map.of("success",accountService.labelManagerPlugin().deleteLabel(label)));
+ }
+
+ @PostMapping(value = "/label/update")
+ public Result updateLabel(@RequestBody VideoLabel label){
+ return Result.success(Map.of("success",accountService.labelManagerPlugin().updateLabel(label)));
+ }
}
diff --git a/chopperbot-console/src/main/java/org/example/exception/GlobalExceptionHandler.java b/chopperbot-console/src/main/java/org/example/exception/GlobalExceptionHandler.java
index 7dd8870..00e466a 100644
--- a/chopperbot-console/src/main/java/org/example/exception/GlobalExceptionHandler.java
+++ b/chopperbot-console/src/main/java/org/example/exception/GlobalExceptionHandler.java
@@ -7,6 +7,7 @@ import org.example.exception.plugin.PluginException;
import org.example.exception.plugin.PluginNotRegisterException;
import org.example.log.ChopperLogFactory;
import org.example.log.LoggerType;
+import org.example.util.ExceptionUtil;
import org.example.util.Result;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -32,10 +33,10 @@ public class GlobalExceptionHandler {
@ExceptionHandler(PluginException.class)
public Result handlerPluginException(HttpServletRequest request,PluginException ex){
- logger.error("Handle Exception Request Url:{},Exception:{}", request.getRequestURL(), ex);
+ logger.error("Handle Exception Request Url:{},Exception:{}", request.getRequestURL(), ExceptionUtil.getCause(ex));
if(ex instanceof PluginNotRegisterException){
PluginNotRegisterException exception = (PluginNotRegisterException) ex;
- return Result.error(exception.getResultCode());
+ return Result.error(exception.getResultCode(),ExceptionUtil.getCause(ex));
}else if(ex instanceof PluginDependOnException){
PluginDependOnException exception = (PluginDependOnException) ex;
String msg = "[%s] plugin depend on [%s]!";
diff --git a/chopperbot-console/src/main/java/org/example/service/AccountService.java b/chopperbot-console/src/main/java/org/example/service/AccountService.java
index 4ea0e82..14487ed 100644
--- a/chopperbot-console/src/main/java/org/example/service/AccountService.java
+++ b/chopperbot-console/src/main/java/org/example/service/AccountService.java
@@ -3,6 +3,7 @@ package org.example.service;
import org.example.api.AccountApi;
+import org.example.api.LabelManagerPluginApi;
import org.example.api.OpenAPIPluginApi;
/**
@@ -15,4 +16,6 @@ public interface AccountService {
AccountApi accountPlugin();
OpenAPIPluginApi chatGptPlugin();
+
+ LabelManagerPluginApi labelManagerPlugin();
}
diff --git a/chopperbot-console/src/main/java/org/example/service/impl/AccountServiceImpl.java b/chopperbot-console/src/main/java/org/example/service/impl/AccountServiceImpl.java
index b9ce879..0056fac 100644
--- a/chopperbot-console/src/main/java/org/example/service/impl/AccountServiceImpl.java
+++ b/chopperbot-console/src/main/java/org/example/service/impl/AccountServiceImpl.java
@@ -2,6 +2,7 @@ package org.example.service.impl;
import org.example.api.AccountApi;
+import org.example.api.LabelManagerPluginApi;
import org.example.api.OpenAPIPluginApi;
import org.example.service.AccountService;
@@ -22,6 +23,9 @@ public class AccountServiceImpl implements AccountService {
@Resource
OpenAPIPluginApi openAPIPluginApi;
+ @Resource
+ LabelManagerPluginApi labelManagerPluginApi;
+
@Override
public AccountApi accountPlugin() {
return accountApi;
@@ -31,4 +35,9 @@ public class AccountServiceImpl implements AccountService {
public OpenAPIPluginApi chatGptPlugin() {
return openAPIPluginApi;
}
+
+ @Override
+ public LabelManagerPluginApi labelManagerPlugin() {
+ return labelManagerPluginApi;
+ }
}
diff --git a/chopperbot-section-work/src/main/java/org/example/core/auto/video/title/GptTitleGenerator.java b/chopperbot-section-work/src/main/java/org/example/core/auto/video/title/GptTitleGenerator.java
index e60f886..b1181d2 100644
--- a/chopperbot-section-work/src/main/java/org/example/core/auto/video/title/GptTitleGenerator.java
+++ b/chopperbot-section-work/src/main/java/org/example/core/auto/video/title/GptTitleGenerator.java
@@ -22,7 +22,7 @@ import java.util.List;
public class GptTitleGenerator implements TitleGenerator{
@Resource
- TitleSchemeMapper titleSchemeMapper;
+ TitleSchemeMapper mapper;
private List schemeList;
public GptTitleGenerator() {
@@ -46,7 +46,7 @@ public class GptTitleGenerator implements TitleGenerator{
throw PluginDependOnException.MissingFatherPlugin(PluginName.CHAT_GPT,"");
}
try {
- schemeList = titleSchemeMapper.selectList(new QueryWrapper<>());
+ schemeList = mapper.selectList(new QueryWrapper<>());
}catch (Exception e){
throw new RuntimeException("读取title_scheme表失败");
}
diff --git a/chopperbot-section/src/main/java/org/example/core/section/VideoSectionWorkShop.java b/chopperbot-section/src/main/java/org/example/core/section/VideoSectionWorkShop.java
index bb73e40..48f6e33 100644
--- a/chopperbot-section/src/main/java/org/example/core/section/VideoSectionWorkShop.java
+++ b/chopperbot-section/src/main/java/org/example/core/section/VideoSectionWorkShop.java
@@ -1,8 +1,7 @@
package org.example.core.section;
-import org.apache.coyote.Request;
import org.example.bean.Live;
-import org.example.cache.FileCache;
+import org.example.bean.section.VideoSection;
import org.example.constpool.ConstPool;
import org.example.constpool.FileNameBuilder;
import org.example.constpool.GlobalFileCache;
diff --git a/config/chopperBotConfig.json b/config/chopperBotConfig.json
index 56d3827..f2e1eb2 100644
--- a/config/chopperBotConfig.json
+++ b/config/chopperBotConfig.json
@@ -38,5 +38,5 @@
"OpenAPI":true
}
},
- "updateTime":"2023-10-23 15:10:01"
+ "updateTime":"2023-10-23 22:36:56"
}
\ No newline at end of file
diff --git a/console-ui/src/api/account/labelApi.ts b/console-ui/src/api/account/labelApi.ts
new file mode 100644
index 0000000..50d6007
--- /dev/null
+++ b/console-ui/src/api/account/labelApi.ts
@@ -0,0 +1,26 @@
+import request from "@/utils/request";
+import { Label } from "@/views/app/label/LabelTypes";
+export function list() {
+ return request({
+ url: "/account/label/list/",
+ method: "get",
+ });
+}
+
+export function add(label: string) {
+ return request.post("/account/label/add/", { label: label });
+}
+
+export function remove(label: string) {
+ return request({
+ url: "/account/label/delete/",
+ method: "get",
+ params: {
+ label: label,
+ },
+ });
+}
+
+export function update(Label: Label) {
+ return request.post("/account/label/update/", Label);
+}
diff --git a/console-ui/src/components/navigation/MainMenu.vue b/console-ui/src/components/navigation/MainMenu.vue
index 74634ed..caa6db6 100644
--- a/console-ui/src/components/navigation/MainMenu.vue
+++ b/console-ui/src/components/navigation/MainMenu.vue
@@ -1,7 +1,8 @@
@@ -25,7 +39,7 @@ onMounted(() => {});
{});
v-text="menuItem.key ? $t(menuItem.key) : menuItem.text"
>
-
+
+ import(
+ /* webpackChunkName: "utility-board" */ "@/views/app/label/LabelManageView.vue"
+ ),
+ meta: {
+ requiresAuth: true,
+ title: "Label Manage",
+ layout: "ui",
+ category: "APP",
+ },
+ },
{
path: "/apps/nitori",
meta: {
diff --git a/console-ui/src/utils/request.ts b/console-ui/src/utils/request.ts
index 0015641..0ac7518 100644
--- a/console-ui/src/utils/request.ts
+++ b/console-ui/src/utils/request.ts
@@ -1,47 +1,51 @@
import axios from "axios";
-import {useSnackbarStore} from "@/stores/snackbarStore";
+import { useSnackbarStore } from "@/stores/snackbarStore";
-const snackbarStore = useSnackbarStore();
const request = axios.create({
baseURL: "/appApi",
timeout: 100000,
});
-request.interceptors.request.use(config => {
- //config.headers['Content-Type'] = 'application/json';
- return config
-}, error => {
- return Promise.reject(error)
-});
+request.interceptors.request.use(
+ (config) => {
+ //config.headers['Content-Type'] = 'application/json';
+ return config;
+ },
+ (error) => {
+ return Promise.reject(error);
+ }
+);
// response 拦截器
// 可以在接口响应后统一处理结果
request.interceptors.response.use(
- response => {
- if(response.status!=200){
- snackbarStore.showSuccessMessage("服务异常!")
+ (response) => {
+ const snackbarStore = useSnackbarStore();
+ if (response.status != 200) {
+ snackbarStore.showSuccessMessage("服务异常!");
}
let res = response.data;
- if(res.code === 114514){
- snackbarStore.showErrorMessage("该插件没有启动,请先启动插件!")
+ if (res.code === 114514) {
+ snackbarStore.showErrorMessage(res.msg);
}
// 如果是返回的文件
- if (response.config.responseType === 'blob') {
- return res
+ if (response.config.responseType === "blob") {
+ return res;
}
// 兼容服务端返回的字符串数据
- if (typeof res === 'string') {
- res = res ? JSON.parse(res) : res
+ if (typeof res === "string") {
+ res = res ? JSON.parse(res) : res;
}
return res;
},
- error => {
- console.log('err' + error) // for debug
+ (error) => {
+ const snackbarStore = useSnackbarStore();
+ snackbarStore.showErrorMessage("操作异常!");
+ console.log("err" + error); // for debug
// localStorage.removeItem('token')
//router.replace({path:'/login'})
- return Promise.reject(error)
+ return Promise.reject(error);
}
-)
+);
-
-export default request
+export default request;
diff --git a/console-ui/src/utils/validate.ts b/console-ui/src/utils/validate.ts
index d72879a..c6ddeb5 100644
--- a/console-ui/src/utils/validate.ts
+++ b/console-ui/src/utils/validate.ts
@@ -8,3 +8,8 @@ export const timeRules = [
(v)=> v > 0 || "时间必须大于0",
(v)=> v >= 1000 || "时间必须大于1s",
]
+
+
+export const validate = (rules: [], data: any) =>{
+ return rules.some((rule) => typeof rule(data) === "string")
+}
\ No newline at end of file
diff --git a/console-ui/src/views/app/hot/live_follow/pages/LiveFollowPage.vue b/console-ui/src/views/app/hot/live_follow/pages/LiveFollowPage.vue
index fc7dadf..3e864a0 100644
--- a/console-ui/src/views/app/hot/live_follow/pages/LiveFollowPage.vue
+++ b/console-ui/src/views/app/hot/live_follow/pages/LiveFollowPage.vue
@@ -18,7 +18,6 @@ const headers = [
{ text: "操作", value: "option" },
];
-const open = (item) => {};
const follows = ref([])
follows.value = liveFollowStore.liveFollowList
@@ -32,7 +31,6 @@ onMounted(async () => {
}, 1000);
});
-const keys = ["group","name"]
const deleteLive = async (item) =>{
await unFollow(item.platform,item.liver).then(res=>{
if(res?.data?.success){
diff --git a/console-ui/src/views/app/label/LabelManageView.vue b/console-ui/src/views/app/label/LabelManageView.vue
new file mode 100644
index 0000000..6d761ba
--- /dev/null
+++ b/console-ui/src/views/app/label/LabelManageView.vue
@@ -0,0 +1,126 @@
+
+
+
+ Label Manage
+
+
+
+
+
+ {{ item.label }}
+
+
+
+
+
+
+ 更新Label
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Close
+
+
+ Save
+
+
+
+
+
+
+
+
+
diff --git a/console-ui/src/views/app/label/LabelManagerStore.ts b/console-ui/src/views/app/label/LabelManagerStore.ts
new file mode 100644
index 0000000..f26a897
--- /dev/null
+++ b/console-ui/src/views/app/label/LabelManagerStore.ts
@@ -0,0 +1,48 @@
+import { defineStore } from "pinia";
+import { useSnackbarStore } from "~/src/stores/snackbarStore";
+import { add, remove, update } from "@/api/account/labelApi";
+import { Label } from "@/views/app/label/LabelTypes"
+const snackbarStore = useSnackbarStore();
+
+export const useLabelManageStore = defineStore({
+ id: "labelManage",
+ state: () => ({
+ labels: ref
- English | 简体中文
+ English | 简体中文
@@ -56,22 +56,22 @@
- **Visualization**: Provide a visual management interface to make your user experience more convenient。
# ⚙ Architecture
-
+
# 🎥 Preview
## Plugin Center
-
+
## Task Center
-
-
+
+
## Creeper Library
-
+
## Hot Guard
-
+
## Heat Recommend
-
+
## Hot Live
-
+
**More pages in development....**
# 🕹 ChopperBot Module
@@ -96,14 +96,14 @@
👉 [Developer's Guide](https://969025903.github.io/ChopperBot-Doc/pages/779a67/#chopperbot%E7%B3%BB%E7%BB%9F%E6%9E%B6%E6%9E%84)
-👉 [CHANGE LOG](https://github.com/969025903/ChopperBot/blob/master/CHANGELOG.md)
+👉 [CHANGE LOG](https://github.com/Geniusay/ChopperBot/blob/master/CHANGELOG.md)
# 💬Contact Us
- Email: 969025903@qq.com | geniusssbg@gmail.com
- QQ
-
+
- Wechat
-
+
diff --git a/README.zh-CN.md b/README.zh-CN.md
index b974cf4..d860fcd 100644
--- a/README.zh-CN.md
+++ b/README.zh-CN.md
@@ -1,6 +1,6 @@
-
+
@@ -14,14 +14,14 @@
-
+
-
+
@@ -31,7 +31,7 @@
- 简体中文 | English
+ 简体中文 | English
@@ -53,22 +53,22 @@
- **可视化管理**: 提供可视化管理界面,让您的使用体验更方便。
# ⚙ 系统架构
-
+
# 🎥 项目预览
## 插件中心
-
+
## 爬虫任务中心
-
-
+
+
## 爬虫仓库
-
+
## 平台热门监控
-
+
## 热门直播推荐
-
+
## 多平台热门直播
-
+
**更多页面正在开发中....**
# 🕹 ChopperBot模块介绍
@@ -92,14 +92,14 @@
👉 [项目开发指南](https://969025903.github.io/ChopperBot-Doc/pages/779a67/#chopperbot%E7%B3%BB%E7%BB%9F%E6%9E%B6%E6%9E%84)
-👉 [更新日志](https://github.com/969025903/ChopperBot/blob/master/CHANGELOG.md)
+👉 [更新日志](https://github.com/Geniusay/ChopperBot/blob/master/CHANGELOG.md)
# 💬联系我们
- Email: 969025903@qq.com | geniusssbg@gmail.com
- QQ
-
+
- Wechat
-
+
diff --git a/chopperbot-account/src/main/java/org/example/core/gpt/OpenAPIPlugin.java b/chopperbot-account/src/main/java/org/example/core/gpt/OpenAPIPlugin.java
index 034afb6..1ebb42d 100644
--- a/chopperbot-account/src/main/java/org/example/core/gpt/OpenAPIPlugin.java
+++ b/chopperbot-account/src/main/java/org/example/core/gpt/OpenAPIPlugin.java
@@ -69,7 +69,7 @@ public class OpenAPIPlugin extends SpringBootPlugin {
if (response.body() != null) {
String content = response.body().string();
if(content.contains("error")){
- this.error("OpenAI API 调用错误",String.format("OpenAI API 调用错误,原因:%s", content),true);
+ this.error("OpenAI API 调用错误!",String.format("OpenAI API 调用错误,原因:%s", content),true);
}
return JSONObject.parseObject(content);
}
diff --git a/chopperbot-console/src/main/java/org/example/init/WorldInitMachine.java b/chopperbot-console/src/main/java/org/example/init/WorldInitMachine.java
index 66229d0..9e563ce 100644
--- a/chopperbot-console/src/main/java/org/example/init/WorldInitMachine.java
+++ b/chopperbot-console/src/main/java/org/example/init/WorldInitMachine.java
@@ -20,7 +20,7 @@ import java.util.function.Supplier;
@Component
public class WorldInitMachine extends ModuleInitMachine{
- private static final String githubUrl = "https://github.com/969025903/ChopperBot";
+ private static final String githubUrl = "https://github.com/Geniusay/ChopperBot";
public WorldInitMachine() throws Exception {
super("ChopperBot",ChopperLogFactory.getLogger(LoggerType.System));
diff --git a/console-ui/src/components/navigation/MainSiderbar.vue b/console-ui/src/components/navigation/MainSiderbar.vue
index e531d18..abf4571 100644
--- a/console-ui/src/components/navigation/MainSiderbar.vue
+++ b/console-ui/src/components/navigation/MainSiderbar.vue
@@ -12,7 +12,7 @@ const customizeTheme = useCustomizeThemeStore();
const navigation = ref(configs.navigation);
const openGithubSite = () => {
- window.open("https://github.com/969025903/ChopperBot", "_blank");
+ window.open("https://github.com/Geniusay/ChopperBot", "_blank");
};
diff --git a/doc/docs/.vuepress/config/nav.js b/doc/docs/.vuepress/config/nav.js
index b1fd3bc..a7f83da 100644
--- a/doc/docs/.vuepress/config/nav.js
+++ b/doc/docs/.vuepress/config/nav.js
@@ -23,5 +23,5 @@ module.exports = [
text: "🚀起飞诶~~起飞",
link: "/pages/1fedc1/",
},
- { text: "更新日志", link: "https://github.com/969025903/ChopperBot/blob/master/CHANGELOG.md" },
+ { text: "更新日志", link: "https://github.com/Geniusay/ChopperBot/blob/master/CHANGELOG.md" },
];
diff --git a/doc/docs/.vuepress/config/themeConfig.js b/doc/docs/.vuepress/config/themeConfig.js
index eef87c4..3df7fdd 100644
--- a/doc/docs/.vuepress/config/themeConfig.js
+++ b/doc/docs/.vuepress/config/themeConfig.js
@@ -29,7 +29,7 @@ module.exports = {
author: {
name: "Genius",
- href: "https://github.com/969025903"
+ href: "https://github.com/Geniusay"
},
social: {
@@ -37,7 +37,7 @@ module.exports = {
{
iconClass: "icon-github",
title: "GitHub",
- link: "https://github.com/969025903"
+ link: "https://github.com/Geniusay"
},
{
iconClass: "icon-gitee",
diff --git a/doc/docs/01.指南/01.开发指南/01.快速开发/01.系统架构.md b/doc/docs/01.指南/01.开发指南/01.快速开发/01.系统架构.md
index ff92015..20f3d66 100644
--- a/doc/docs/01.指南/01.开发指南/01.快速开发/01.系统架构.md
+++ b/doc/docs/01.指南/01.开发指南/01.快速开发/01.系统架构.md
@@ -34,7 +34,7 @@ ChopperBot将会创建 **./config根目录**,并在其中安装所有模块的
频繁大量的IO流会使项目性能降低,针对ChopperBot的文件操作我们专门使用了文件缓存技术,来实现项目对文件快速的响应。
## ChopperBot的启动过程
-**代码请见** [InitWorld](https://github.com/969025903/ChopperBot/blob/master/common/src/main/java/org/example/init/InitMachine.java) 👈
+**代码请见** [InitWorld](https://github.com/Geniusay/ChopperBot/blob/master/common/src/main/java/org/example/init/InitMachine.java) 👈

## 项目文件层级关系
diff --git a/doc/docs/05.支持/01.支持.md b/doc/docs/05.支持/01.支持.md
index 7e3b687..b2311f0 100644
--- a/doc/docs/05.支持/01.支持.md
+++ b/doc/docs/05.支持/01.支持.md
@@ -11,7 +11,7 @@ editLink: false
如果您正在使用这个项目并感觉良好,或者是想支持我们继续开发,您可以通过如下`任意`方式支持我们:
-1. Star 并向您的朋友推荐或分享 [ChopperBot](https://github.com/969025903/ChopperBot) 🚀
+1. Star 并向您的朋友推荐或分享 [ChopperBot](https://github.com/Geniusay/ChopperBot) 🚀
2. 轻轻点击一次页面右下角(ad) 🙃
3. 通过以下二维码进行一次性捐款,请我喝一杯可乐 🥤
@@ -36,7 +36,7 @@ editLink: false
- QQ:[Weisir](tencent://message/?uin=1824379011&Site=&Menu=yes)
- QQ:[脑洞大开](tencent://message/?uin=647831033&Site=&Menu=yes)
- 邮件:[geniusssbg@gmail.com](mailto:geniusssbg@gmail.com)
-- Github:[https://github.com/969025903/ChopperBot](https://github.com/969025903/ChopperBot)
+- Github:[https://github.com/Geniusay/ChopperBot](https://github.com/Geniusay/ChopperBot)
## 致谢
diff --git a/doc/docs/06.快速开始/01.快速开始/01.简介.md b/doc/docs/06.快速开始/01.快速开始/01.简介.md
index a9d7b79..37bb7d8 100644
--- a/doc/docs/06.快速开始/01.快速开始/01.简介.md
+++ b/doc/docs/06.快速开始/01.快速开始/01.简介.md
@@ -5,7 +5,7 @@ permalink: /pages/24112f/
article: false
---
-[ChopperBot](https://github.com/969025903/ChopperBot) 一款全自动的主播切片机器人,支持模块热度分析, 主播热度分析,智能爬取,弹幕视频爬取,弹幕分析, 自动切片,切片分类,自动标题,自动封面,账号打造,账号管理, 多平台上传等功能
+[ChopperBot](https://github.com/Geniusay/ChopperBot) 一款全自动的主播切片机器人,支持模块热度分析, 主播热度分析,智能爬取,弹幕视频爬取,弹幕分析, 自动切片,切片分类,自动标题,自动封面,账号打造,账号管理, 多平台上传等功能
::: tip 愿景
ChopperBot 留下每个主播的精彩片段
:::
@@ -29,12 +29,12 @@ ChopperBot 留下每个主播的精彩片段
## 代码托管
-> **[Gitee](https://gitee.com/sbg-genius/ChopperBot)** | **[Github](https://github.com/969025903/ChopperBot)**
+> **[Gitee](https://gitee.com/sbg-genius/ChopperBot)** | **[Github](https://github.com/Geniusay/ChopperBot)**
## 参与贡献
欢迎各路大佬一起来参与完善 ChopperBot捏,我们期待你的 PR!
-- 贡献代码:代码地址 [ChopperBot](https://github.com/969025903/ChopperBot) ,欢迎提交 Issue 或者 Pull Requests
-- 维护文档:文档地址 [ChopperBot-Doc](https://github.com/969025903/ChopperBot-Doc) ,欢迎参与翻译和修订
+- 贡献代码:代码地址 [ChopperBot](https://github.com/Geniusay/ChopperBot) ,欢迎提交 Issue 或者 Pull Requests
+- 维护文档:文档地址 [ChopperBot-Doc](https://github.com/Geniusay/ChopperBot-Doc) ,欢迎参与翻译和修订
diff --git a/doc/docs/07.技术文档/01.模块文档/01.common/01.目录.md b/doc/docs/07.技术文档/01.模块文档/01.common/01.目录.md
index 9c9ff00..fe9cdbf 100644
--- a/doc/docs/07.技术文档/01.模块文档/01.common/01.目录.md
+++ b/doc/docs/07.技术文档/01.模块文档/01.common/01.目录.md
@@ -4,7 +4,7 @@ date: 2023-05-19 02:09:32
permalink: /pages/e3a691/
---
-[👉 源码](https://github.com/969025903/ChopperBot)
+[👉 源码](https://github.com/Geniusay/ChopperBot)
[[toc]]
diff --git a/doc/docs/07.技术文档/01.模块文档/02.FileModule/01.目录.md b/doc/docs/07.技术文档/01.模块文档/02.FileModule/01.目录.md
index 0afa0f5..59d1dd1 100644
--- a/doc/docs/07.技术文档/01.模块文档/02.FileModule/01.目录.md
+++ b/doc/docs/07.技术文档/01.模块文档/02.FileModule/01.目录.md
@@ -5,7 +5,7 @@ permalink: /pages/779a6e/
article: false
---
-[👉 源码](https://github.com/969025903/ChopperBot)
+[👉 源码](https://github.com/Geniusay/ChopperBot)
[[toc]]
@@ -39,7 +39,7 @@ public void testDelete() throws IOException {
```
- `更多例子可查看test包下面的samples`
-- [FileUtilTest](https://github.com/969025903/ChopperBot/blob/master/FileModule/src/test/java/org/example/util/FileUtilTest.java)
+- [FileUtilTest](https://github.com/Geniusay/ChopperBot/blob/master/FileModule/src/test/java/org/example/util/FileUtilTest.java)
## JsonFileUtil
::: tip 说明
Json文件的操作工具类
@@ -77,4 +77,4 @@ public void writeClassInJsonFile() {
```
- `更多例子可查看test包下面的samples`
-- [JsonFileUtilTest](https://github.com/969025903/ChopperBot/blob/master/FileModule/src/test/java/org/example/util/JsonFileUtilTest.java)
+- [JsonFileUtilTest](https://github.com/Geniusay/ChopperBot/blob/master/FileModule/src/test/java/org/example/util/JsonFileUtilTest.java)
diff --git a/doc/docs/07.技术文档/01.模块文档/02.FileModule/02.FileCache.md b/doc/docs/07.技术文档/01.模块文档/02.FileModule/02.FileCache.md
index 24dc309..9d4657f 100644
--- a/doc/docs/07.技术文档/01.模块文档/02.FileModule/02.FileCache.md
+++ b/doc/docs/07.技术文档/01.模块文档/02.FileModule/02.FileCache.md
@@ -128,4 +128,4 @@ ConfigFile的文件缓存池,负责文件内容的缓存与刷入
### GlobalFileCache
- `更多例子可查看test包下面的samples`
-- [FileCacheTest](https://github.com/969025903/ChopperBot/blob/master/FileModule/src/test/java/org/example/cache/FileCacheTest.java)
+- [FileCacheTest](https://github.com/Geniusay/ChopperBot/blob/master/FileModule/src/test/java/org/example/cache/FileCacheTest.java)
diff --git a/doc/docs/index.md b/doc/docs/index.md
index 4656345..ba40c5d 100644
--- a/doc/docs/index.md
+++ b/doc/docs/index.md
@@ -22,7 +22,7 @@ postList: none
-
+