mirror of
https://github.com/earthjasonlin/zzz-signal-search-export.git
synced 2024-11-23 05:40:21 +08:00
feat: add the option to copy the URL
This commit is contained in:
parent
a2dcda6be0
commit
82f42e56db
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "star-rail-warp-export",
|
"name": "star-rail-warp-export",
|
||||||
"version": "0.0.16",
|
"version": "0.0.17",
|
||||||
"main": "./dist/electron/main/main.js",
|
"main": "./dist/electron/main/main.js",
|
||||||
"author": "biuuu <https://github.com/biuuu>",
|
"author": "biuuu <https://github.com/biuuu>",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
"ui.button.startProxy": "Proxy mode",
|
"ui.button.startProxy": "Proxy mode",
|
||||||
"ui.button.solution": "Solution",
|
"ui.button.solution": "Solution",
|
||||||
"ui.button.cacheFolder": "Open cache folder",
|
"ui.button.cacheFolder": "Open cache folder",
|
||||||
|
"ui.button.copyUrl": "Copy URL",
|
||||||
"ui.select.newAccount": "New account",
|
"ui.select.newAccount": "New account",
|
||||||
"ui.hint.newAccount": "Export data from other accounts",
|
"ui.hint.newAccount": "Export data from other accounts",
|
||||||
"ui.hint.init": "Please open your warp history inside the game client before clicking on the 'Load data' button",
|
"ui.hint.init": "Please open your warp history inside the game client before clicking on the 'Load data' button",
|
||||||
@ -84,5 +85,6 @@
|
|||||||
"excel.filePrefix": "Star Rail Warp logger",
|
"excel.filePrefix": "Star Rail Warp logger",
|
||||||
"excel.fileType": "Excel file",
|
"excel.fileType": "Excel file",
|
||||||
"ui.extra.cacheClean": "1. Confirm whether the warp history in the game has been opened, and if the error \"User authentication expired\" still appears, try the following steps \n2. Close the game window of Star Rail \n3. Click the \"Open Web Cache Folder\" button above to open the \"Cache\" folder \n4. Delete the \"Cache_ Data\" folder \n5. Start the Star Rail game and open the warp history page in the game \n6. Close this dialog and click the \"Update Data\" button",
|
"ui.extra.cacheClean": "1. Confirm whether the warp history in the game has been opened, and if the error \"User authentication expired\" still appears, try the following steps \n2. Close the game window of Star Rail \n3. Click the \"Open Web Cache Folder\" button above to open the \"Cache\" folder \n4. Delete the \"Cache_ Data\" folder \n5. Start the Star Rail game and open the warp history page in the game \n6. Close this dialog and click the \"Update Data\" button",
|
||||||
"ui.extra.findCacheFolder": "If the \"Open cache folder\" button does not respond, you can manually find the game's web cache folder. The directory is \"Your game installation path/Star Rail/Games/StarRail_Data/webCaches/Cache/\""
|
"ui.extra.findCacheFolder": "If the \"Open cache folder\" button does not respond, you can manually find the game's web cache folder. The directory is \"Your game installation path/Star Rail/Games/StarRail_Data/webCaches/Cache/\"",
|
||||||
|
"ui.extra.urlCopied": "URL Copied"
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
"ui.button.startProxy": "代理模式",
|
"ui.button.startProxy": "代理模式",
|
||||||
"ui.button.solution": "解决办法",
|
"ui.button.solution": "解决办法",
|
||||||
"ui.button.cacheFolder": "打开网页缓存文件夹",
|
"ui.button.cacheFolder": "打开网页缓存文件夹",
|
||||||
|
"ui.button.copyUrl": "复制URL",
|
||||||
"ui.select.newAccount": "新账号",
|
"ui.select.newAccount": "新账号",
|
||||||
"ui.hint.newAccount": "从其它账号导出数据",
|
"ui.hint.newAccount": "从其它账号导出数据",
|
||||||
"ui.hint.init": "请先在游戏里打开任意一个抽卡记录后再点击“加载数据”按钮",
|
"ui.hint.init": "请先在游戏里打开任意一个抽卡记录后再点击“加载数据”按钮",
|
||||||
@ -84,5 +85,6 @@
|
|||||||
"excel.filePrefix": "星穹铁道跃迁记录",
|
"excel.filePrefix": "星穹铁道跃迁记录",
|
||||||
"excel.fileType": "Excel文件",
|
"excel.fileType": "Excel文件",
|
||||||
"ui.extra.cacheClean": "1. 确认是否已经打开游戏内的抽卡历史记录,如果仍然出现“身份认证已过期”的错误,再尝试下面的步骤\n2. 关闭星穹铁道的游戏窗口\n3. 点击上方的“打开缓存文件夹”按钮,打开Cache文件夹\n4. 删除Cache_Data文件夹\n5. 启动星穹铁道游戏,打开游戏内抽卡历史记录页面\n6. 关闭这个对话框,再点击“更新数据”按钮",
|
"ui.extra.cacheClean": "1. 确认是否已经打开游戏内的抽卡历史记录,如果仍然出现“身份认证已过期”的错误,再尝试下面的步骤\n2. 关闭星穹铁道的游戏窗口\n3. 点击上方的“打开缓存文件夹”按钮,打开Cache文件夹\n4. 删除Cache_Data文件夹\n5. 启动星穹铁道游戏,打开游戏内抽卡历史记录页面\n6. 关闭这个对话框,再点击“更新数据”按钮",
|
||||||
"ui.extra.findCacheFolder": "如果点“打开缓存文件夹”按钮没有反应,可以手动找到游戏的网页缓存文件夹,目录为“你的游戏安装路径/Star Rail/Game/StarRail_Data/webCaches/Cache/”"
|
"ui.extra.findCacheFolder": "如果点“打开缓存文件夹”按钮没有反应,可以手动找到游戏的网页缓存文件夹,目录为“你的游戏安装路径/Star Rail/Game/StarRail_Data/webCaches/Cache/”",
|
||||||
|
"ui.extra.urlCopied": "URL已复制"
|
||||||
}
|
}
|
||||||
|
11
src/main/bridge.js
Normal file
11
src/main/bridge.js
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
const { clipboard, ipcMain } = require('electron')
|
||||||
|
const { getUrl } = require('./getData')
|
||||||
|
|
||||||
|
ipcMain.handle('COPY_URL', async () => {
|
||||||
|
const url = await getUrl()
|
||||||
|
if (url) {
|
||||||
|
clipboard.writeText(url)
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
})
|
@ -508,3 +508,5 @@ exports.getData = () => {
|
|||||||
current: config.current
|
current: config.current
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
exports.getUrl = getUrl
|
||||||
|
@ -2,6 +2,7 @@ const { app, BrowserWindow, ipcMain } = require('electron')
|
|||||||
const { initWindow } = require('./utils')
|
const { initWindow } = require('./utils')
|
||||||
const { disableProxy, proxyStatus } = require('./module/system-proxy')
|
const { disableProxy, proxyStatus } = require('./module/system-proxy')
|
||||||
require('./getData')
|
require('./getData')
|
||||||
|
require('./bridge')
|
||||||
require('./excel')
|
require('./excel')
|
||||||
require('./UIGFJson')
|
require('./UIGFJson')
|
||||||
const { getUpdateInfo } = require('./update/index')
|
const { getUpdateInfo } = require('./update/index')
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
<el-dropdown-menu>
|
<el-dropdown-menu>
|
||||||
<el-dropdown-item command="setting" icon="setting">{{ui.button.setting}}</el-dropdown-item>
|
<el-dropdown-item command="setting" icon="setting">{{ui.button.setting}}</el-dropdown-item>
|
||||||
<el-dropdown-item :disabled="!allowClick() || state.status === 'loading'" command="url" icon="link">{{ui.button.url}}</el-dropdown-item>
|
<el-dropdown-item :disabled="!allowClick() || state.status === 'loading'" command="url" icon="link">{{ui.button.url}}</el-dropdown-item>
|
||||||
|
<el-dropdown-item command="copyUrl" icon="DocumentCopy">{{ui.button.copyUrl}}</el-dropdown-item>
|
||||||
<el-dropdown-item :disabled="!allowClick() || state.status === 'loading'" command="proxy" icon="position">{{ui.button.startProxy}}</el-dropdown-item>
|
<el-dropdown-item :disabled="!allowClick() || state.status === 'loading'" command="proxy" icon="position">{{ui.button.startProxy}}</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</template>
|
</template>
|
||||||
@ -80,6 +81,7 @@ import Setting from './components/Setting.vue'
|
|||||||
import gachaDetail from './gachaDetail'
|
import gachaDetail from './gachaDetail'
|
||||||
import { version } from '../../package.json'
|
import { version } from '../../package.json'
|
||||||
import gachaType from '../gachaType.json'
|
import gachaType from '../gachaType.json'
|
||||||
|
import { ElMessage } from 'element-plus'
|
||||||
|
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
status: 'init',
|
status: 'init',
|
||||||
@ -249,6 +251,8 @@ const optionCommand = (type) => {
|
|||||||
state.showUrlDlg = true
|
state.showUrlDlg = true
|
||||||
} else if (type === 'proxy') {
|
} else if (type === 'proxy') {
|
||||||
fetchData('proxy')
|
fetchData('proxy')
|
||||||
|
} else if (type === 'copyUrl') {
|
||||||
|
copyUrl()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -260,6 +264,15 @@ const updateConfig = async () => {
|
|||||||
state.config = await ipcRenderer.invoke('GET_CONFIG')
|
state.config = await ipcRenderer.invoke('GET_CONFIG')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const copyUrl = async () => {
|
||||||
|
const successed = await ipcRenderer.invoke('COPY_URL')
|
||||||
|
if (successed) {
|
||||||
|
ElMessage.success(ui.value.extra.urlCopied)
|
||||||
|
} else {
|
||||||
|
ElMessage.error(state.i18n.log.url.notFound)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await readData()
|
await readData()
|
||||||
await getI18nData()
|
await getI18nData()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user