Skip to content

Commit

Permalink
新增:工单反馈功能,便于解决问题
Browse files Browse the repository at this point in the history
  • Loading branch information
modstart committed Dec 31, 2024
1 parent 3e786b7 commit 9e4ae96
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 14 deletions.
9 changes: 6 additions & 3 deletions electron/lib/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,13 @@ export const EncodeUtil = {
}

export const IconvUtil = {
convert(str: string, from: string, to: string) {
convert(str: string, to?: string, from?: string) {
if (!from) {
from = chardet.detect(Buffer.from(str))
}
to = to || 'utf8'
const fromEncoding = chardet.detect(Buffer.from(str))
return iconvLite.decode(Buffer.from(str), fromEncoding).toString()
const buffer = iconvLite.encode(str, from);
return iconvLite.decode(buffer, to)
},
bufferToUtf8(buffer: Buffer) {
const encoding = chardet.detect(buffer)
Expand Down
11 changes: 5 additions & 6 deletions src/components/Setting/SettingAbout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {AppConfig} from "../../config";
import {t} from "../../lang";
import UpdaterButton from "../common/UpdaterButton.vue";
import {useSettingStore} from "../../store/modules/setting";
import FeedbackTicketButton from "../common/FeedbackTicketButton.vue";
const setting = useSettingStore()
const licenseYear = new Date().getFullYear()
Expand Down Expand Up @@ -34,13 +35,11 @@ const doOpenLog = async () => {
class="text-link">
{{ AppConfig.website }}
</a>
<a :href="AppConfig.feedbackUrl"
target="_blank"
class="align-top arco-btn arco-btn-secondary arco-btn-shape-square arco-btn-size-medium arco-btn-status-normal ml-3">
<icon-customer-service class="mr-1"/>
{{ t('工单反馈') }}
</a>
<div class="inline-block ml-3">
<FeedbackTicketButton/>
</div>
<a-button class="ml-3"
size="mini"
@click="doOpenLog">
<template #icon>
<icon-file/>
Expand Down
11 changes: 6 additions & 5 deletions src/lang/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@
"000c8f6a": "Hint",
"000c9ba9": "Zoom In",
"000ca601": "Desc",
"000caa60": "明亮",
"000caa60": "Light",
"000cb692": "Log",
"000cc4dc": "Undo",
"000ccd34": "Service",
"000ccf01": "Collapse",
"000d0b1a": "暗黑",
"000d0b1a": "Dark",
"000d249f": "ID",
"000d318a": "Model",
"000d5f35": "Normal",
"000da405": "Add",
"000e3de4": "Version",
"000ec627": "目录",
"000ec627": "Folder",
"000ef0ec": "Confirm",
"000f36d4": "Port",
"000f6a70": "Type",
Expand Down Expand Up @@ -101,7 +101,7 @@
"259ff066": "Download Failed",
"25a0c8e1": "Download Successful",
"25aba9c4": "View Code",
"25d99435": "主题样式",
"25d99435": "Theme",
"25e596a4": "Feedback",
"2615bdd6": "Where to find model files?",
"26276a3a": "Stop Service",
Expand All @@ -125,6 +125,7 @@
"2ba171ec": "Leave empty to use a random port",
"2ba96070": "Install App",
"2be4d86f": "Actual Size",
"2bf22d6b": "Feedback",
"2bf347f6": "Leave empty to use the default start command",
"2c3ba30e": "No models available yet, please add one~",
"2c8ac2a6": "Start Clone",
Expand Down Expand Up @@ -171,7 +172,7 @@
"4148da61": "Request Error",
"41dff64a": "Extracting {name}",
"41e0472e": "TTS",
"42c281d4": "跟随系统",
"42c281d4": "Auto",
"42ed4ed0": "Connect Device",
"42fa058a": "Select Model",
"42fe06e0": "Select character",
Expand Down
1 change: 1 addition & 0 deletions src/lang/source.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"官网": "000b96b9",
"实际大小": "2be4d86f",
"小时": "000b8bc7",
"工单反馈": "2bf22d6b",
"已停止": "016acff8",
"已启动 {time}": "09e64baa",
"已经是最新版本": "26aa0dba",
Expand Down
1 change: 1 addition & 0 deletions src/lang/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@
"2ba171ec": "留空会检测使用随机端口",
"2ba96070": "安装应用",
"2be4d86f": "实际大小",
"2bf22d6b": "工单反馈",
"2bf347f6": "留空使用默认启动命令",
"2c3ba30e": "暂时还没有模型,请添加模型~",
"2c8ac2a6": "开始克隆",
Expand Down

0 comments on commit 9e4ae96

Please sign in to comment.