Skip to content

Commit

Permalink
add github link
Browse files Browse the repository at this point in the history
  • Loading branch information
Tairraos committed Aug 24, 2023
1 parent a40eafc commit 6685e4e
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sd-prompt-tool",
"version": "1.5.0",
"version": "1.5.1.local",
"license": "MIT",
"type": "module",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/Compoents/PromptEditor/Lib/translate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export async function translate(testList: string[]) {
})

if (reqList.length == 0) return resultList.map((x) => x[1])
let baseurl = "https://prompt.localweb.com/" //minifix: 你访问该工具的URL, 写全域名可以支持 npm run dev 调试,如果不需要调试直接写 / 即可
let baseurl = "/" //minifix: 你访问该工具的URL, 写全域名可以支持 npm run dev 调试时翻译内容,比如 https://prompt.localweb.com/,需要cros插件支持
let host = baseurl.replace(/\/*$/, "") + "/mtproxy.php" //能访问到代理的路径
let data = new URLSearchParams()
data.append("text", reqList.map((req) => `${req[0]}`).join("\n"))
Expand Down
2 changes: 1 addition & 1 deletion src/Compoents/PromptEditor/Lib/translatePrompts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export async function translatePrompts(testList: string[], target = "zh") {
})

if (reqList.length == 0) return resultList.map((x) => x[1])
let baseurl = "https://prompt.localweb.com/" //minifix: 你访问该工具的URL, 写全域名可以支持 npm run dev 调试,如果不需要调试直接写 / 即可
let baseurl = "/" //minifix: 你访问该工具的URL, 写全域名可以支持 npm run dev 调试时翻译内容,比如 https://prompt.localweb.com/,需要cros插件支持
let host = baseurl.replace(/\/*$/, "") + "/mtproxy.php"
let data = new URLSearchParams()
target !== "zh" && data.append("to", "en")
Expand Down
16 changes: 15 additions & 1 deletion src/Pages/Index/Index.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
<template>
<div class="IndexPage">
<nav>
<div class="title">😍🅿𝗋𝗈𝗆𝗉𝗍 小助手😍</div>
<div class="title">
😍🅿𝗋𝗈𝗆𝗉𝗍 小助手😍<a href="https://github.com/Tairraos/SDPromptTool" target="github"
><Icon icon="ri:github-fill" /><span>Github</span></a
>
</div>
<div class="dict-button-box" @click="toggleDictPad()">
提示词词典
<button class="icon dict-button"><Icon icon="mingcute:book-4-fill" /></button>
Expand Down Expand Up @@ -34,6 +38,16 @@
font-size: 24px;
font-weight: 900;
}
.title a,
.title span {
margin-left: 5px;
font-size: 20px;
text-decoration: none;
vertical-align: middle;
}
.title svg{
font-size: 25px;
}
.dict-button-box {
margin-left: auto;
Expand Down
Binary file modified web/public/prompt.xlsx
Binary file not shown.

0 comments on commit 6685e4e

Please sign in to comment.