增加后台管理,支持docker部署

This commit is contained in:
ageer
2024-05-17 02:00:31 +08:00
parent ef7434ed04
commit 7fe89a931b
59 changed files with 3911 additions and 1501 deletions

View File

@@ -49,9 +49,10 @@ spring:
driverClassName: com.mysql.cj.jdbc.Driver
# jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
# rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
url: jdbc:mysql://127.0.0.1:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
username: ry-vue
password: ry-vue
url: ${DB_URL}
username: ${DB_USERNAME}
password: ${DB_PASSWORD}
# 从库数据源
# slave:
@@ -103,9 +104,9 @@ spring:
spring.data:
redis:
# 地址
host: localhost
host: ${REDIS_HOST}
# 端口默认为6379
port: 6379
port: ${REDIS_PORT}
# 数据库索引
database: 0
# 密码(如没有密码请注释掉)

View File

@@ -48,7 +48,7 @@ server:
# 日志配置
logging:
level:
com.xmzs: @logging.level@
com.xmzs: '@logging.level@'
org.springframework: warn
config: classpath:logback-plus.xml
@@ -69,7 +69,7 @@ spring:
# 国际化资源文件路径
basename: i18n/messages
profiles:
active: @profiles.active@
active: '@profiles.active@'
# 文件上传
servlet:
multipart:
@@ -332,26 +332,24 @@ keyword:
# ai语音指令(TTS模型 https://platform.openai.com/docs/api-reference/audio)
audio: "ai语音"
#绘画价格配置(元)
mj:
api-secret: 'sk-xx'
task-store:
type: in_memory
timeout: 30d
translate-way: gpt
# proxy:
# host: 127.0.0.1
# port: 10809
ng-discord:
server: 'https://xxx.pandarobot.chat/'
cdn: 'https://xxx.pandarobot.chat/'
wss: 'https://xxx.pandarobot.chat/'
openai:
gpt-api-url: 'https://api.pandarobot.chat/'
gpt-api-key: 'sk-xx'
accounts:
- guild-id: 'xx'
channel-id: 'xx'
user-token: 'xx'
# 放大
upsample: 0.1
# 变化
change: 0.3
# 图生图
blend: 0.3
# 图生文
describe: 0.1
# 文生图
imagine: 0.3
# 局部重绘
inpaint: 0.3
# 提示词分析
shorten: 0.1
# 换脸
faceSwapping: 0.3
--- # mail 邮件发送
mail:
@@ -365,7 +363,7 @@ mail:
# 用户名注意如果使用foxmail邮箱此处user为qq号
user: ageerle@163.com
# 密码(填写授权码)
pass: xx
pass: ${MAIL_PASS}
# 使用 STARTTLS安全连接STARTTLS是对纯文本通信协议的扩展。
starttlsEnable: true
# 使用SSL安全连接
@@ -375,15 +373,14 @@ mail:
# Socket连接超时值单位毫秒缺省值不超时
connectionTimeout: 0
# chatgpt配置信息
# chatgpt和mj共用一个key
chat:
apiKey: 'sk-xxx'
apiHost: 'https://api.pandarobot.chat/'
apiKey: ${CHAT_API_KEY}
apiHost: ${CHAT_API_HOST}
# 支付配置信息
pay:
pid: 'xxx'
key: 'xxx'
pid: ${PAY_PID}
key: ${PAY_KEY}
payUrl: 'https://pay.pandarobot.chat/mapi.php'
notify_url: 'https://www.pandarobot.chat/pay/returnUrl'
return_url: 'https://www.pandarobot.chat/pay/notifyUrl'

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,8 @@
@font-face {font-family: "Engravers' Old English BT";
src: url("https://unpkg.com/dmego-home-page@latest/assets/fonts/d571b52b60b5617399ce8eab62bf3eb3.eot"); /* IE9*/
src: url("https://unpkg.com/dmego-home-page@latest/assets/fonts/d571b52b60b5617399ce8eab62bf3eb3.eot?#iefix") format("embedded-opentype"), /* IE6-IE8 */
url("https://unpkg.com/dmego-home-page@latest/assets/fonts/d571b52b60b5617399ce8eab62bf3eb3.woff2") format("woff2"), /* chrome firefox */
url("https://unpkg.com/dmego-home-page@latest/assets/fonts/d571b52b60b5617399ce8eab62bf3eb3.woff") format("woff"), /* chrome firefox */
url("https://unpkg.com/dmego-home-page@latest/assets/fonts/d571b52b60b5617399ce8eab62bf3eb3.ttf") format("truetype"), /* chrome firefox opera Safari, Android, iOS 4.2+*/
url("https://unpkg.com/dmego-home-page@latest/assets/fonts/d571b52b60b5617399ce8eab62bf3eb3.svg#Engravers' Old English BT") format("svg"); /* iOS 4.1- */
}

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

View File

@@ -0,0 +1,38 @@
const https = require('https')
const fs = require('fs')
const options = {
hostname: 'www.bing.com',
port: 443,
path: '/HPImageArchive.aspx?format=js&idx=0&n=8',
method: 'GET'
}
const req = https.request(options, bing_res => {
let bing_body = [], bing_data = {};
bing_res.on('data', (chunk) => {
bing_body.push(chunk);
});
bing_res.on('end', () => {
bing_body = Buffer.concat(bing_body);
bing_data = JSON.parse(bing_body.toString());
let img_array = bing_data.images;
let img_url = [];
img_array.forEach(img => {
img_url.push(img.url);
});
var jsonpStr = "getBingImages(" + JSON.stringify(img_url) + ")";
fs.writeFile('./assets/json/images.json', jsonpStr, (err) => {
if (err) {
throw err;
}
console.log("JSON data is saved: " + jsonpStr);
});
});
})
req.on('error', error => {
console.error(error)
})
req.end()

View File

@@ -0,0 +1,104 @@
var iUp = (function () {
var time = 0,
duration = 150,
clean = function () {
time = 0;
},
up = function (element) {
setTimeout(function () {
element.classList.add("up");
}, time);
time += duration;
},
down = function (element) {
element.classList.remove("up");
},
toggle = function (element) {
setTimeout(function () {
element.classList.toggle("up");
}, time);
time += duration;
};
return {
clean: clean,
up: up,
down: down,
toggle: toggle
};
})();
function getBingImages(imgUrls) {
/**
* 获取Bing壁纸
* 先使用 GitHub Action 每天获取 Bing 壁纸 URL 并更新 images.json 文件
* 然后读取 images.json 文件中的数据
*/
var indexName = "bing-image-index";
var index = sessionStorage.getItem(indexName);
var panel = document.querySelector('#panel');
if (isNaN(index) || index == 7) index = 0;
else index++;
var imgUrl = imgUrls[index];
var url = "https://www.cn.bing.com" + imgUrl;
panel.style.background = "url('" + url + "') center center no-repeat #666";
panel.style.backgroundSize = "cover";
sessionStorage.setItem(indexName, index);
}
function decryptEmail(encoded) {
var address = atob(encoded);
window.location.href = "mailto:" + address;
}
document.addEventListener('DOMContentLoaded', function () {
// 获取一言数据
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function () {
if (this.readyState == 4 && this.status == 200) {
var res = JSON.parse(this.responseText);
document.getElementById('description').innerHTML = res.hitokoto + "<br/> -「<strong>" + res.from + "</strong>」";
}
};
xhr.open("GET", "https://v1.hitokoto.cn", true);
xhr.send();
var iUpElements = document.querySelectorAll(".iUp");
iUpElements.forEach(function (element) {
iUp.up(element);
});
var avatarElement = document.querySelector(".js-avatar");
avatarElement.addEventListener('load', function () {
avatarElement.classList.add("show");
});
});
var btnMobileMenu = document.querySelector('.btn-mobile-menu__icon');
var navigationWrapper = document.querySelector('.navigation-wrapper');
btnMobileMenu.addEventListener('click', function () {
if (navigationWrapper.style.display == "block") {
navigationWrapper.addEventListener('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function () {
navigationWrapper.classList.toggle('visible');
navigationWrapper.classList.toggle('animated');
navigationWrapper.classList.toggle('bounceOutUp');
navigationWrapper.removeEventListener('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', arguments.callee);
});
navigationWrapper.classList.toggle('animated');
navigationWrapper.classList.toggle('bounceInDown');
navigationWrapper.classList.toggle('animated');
navigationWrapper.classList.toggle('bounceOutUp');
} else {
navigationWrapper.classList.toggle('visible');
navigationWrapper.classList.toggle('animated');
navigationWrapper.classList.toggle('bounceInDown');
}
btnMobileMenu.classList.toggle('social');
btnMobileMenu.classList.toggle('iconfont');
btnMobileMenu.classList.toggle('icon-list');
btnMobileMenu.classList.toggle('social');
btnMobileMenu.classList.toggle('iconfont');
btnMobileMenu.classList.toggle('icon-angleup');
btnMobileMenu.classList.toggle('animated');
btnMobileMenu.classList.toggle('fadeIn');
});

View File

@@ -0,0 +1 @@
getBingImages(["/th?id=OHR.TheRoachesPeakDistrict_EN-US9733115206_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp","/th?id=OHR.SanMiguelAllende_EN-US9621237021_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp","/th?id=OHR.JediMonastery_EN-US9398447907_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp","/th?id=OHR.SonoranSpring_EN-US9207877073_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp","/th?id=OHR.CratersOfTheMoon_EN-US6516727783_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp","/th?id=OHR.HawaiianLei_EN-US6290126556_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp","/th?id=OHR.CheetahRain_EN-US6179670004_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp","/th?id=OHR.TulouFujian_EN-US6009679228_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp"])

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1714852590465" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1571" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M263.1 844.8h497.7c22.9 0 41.5 18.6 41.5 41.5s-18.6 41.5-41.5 41.5H263.1c-22.9 0-41.5-18.6-41.5-41.5s18.6-41.5 41.5-41.5zM138.7 98.2h746.6c22.9 0 41.5 18.6 41.5 41.5v580.7c0 11-4.4 21.6-12.1 29.3-7.8 7.8-18.3 12.1-29.3 12.1H138.7c-11 0-21.6-4.4-29.3-12.1-7.8-7.8-12.1-18.3-12.1-29.3V139.7c-0.1-22.9 18.5-41.5 41.4-41.5z m331.8 478.9v60.4h83v-60.3c8.5-5.8 17.4-12.8 26.5-20.5l49.4 49.4 58.7-58.7-49.5-49.4c7.7-9 14.6-18 20.5-26.5h60.3v-83h-60.3c-6.4-9.1-13.3-18-20.5-26.5l49.4-49.4-58.7-58.6-49.4 49.4c-8.5-7.3-17.3-14.1-26.5-20.5v-60.3h-83V283c-8.5 5.8-17.4 12.8-26.5 20.5l-49.4-49.4-58.5 58.6 49.4 49.4c-7.2 8.5-14.1 17.3-20.5 26.5h-60.3v83h60.3c5.8 8.5 12.8 17.4 20.5 26.5L336 547.3l58.7 58.7 49.4-49.4c9.1 7.7 18 14.6 26.4 20.5z m0 0" p-id="1572"></path></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

File diff suppressed because it is too large Load Diff