优化前端两个按钮

This commit is contained in:
John Smith 2024-04-06 15:18:33 +08:00
parent 4874fe464b
commit 64f77c5df9
5 changed files with 12 additions and 6 deletions

View File

@ -69,7 +69,7 @@ export default {
roomUrlUpdated: 'The room URL is updated. Remember to copy it again', roomUrlUpdated: 'The room URL is updated. Remember to copy it again',
roomUrl: 'Room URL', roomUrl: 'Room URL',
enterRoom: 'Enter room', enterRoom: 'Enter room',
enterTestRoom: 'Enter test room', copyTestRoomUrl: 'Copy test room URL',
exportConfig: 'Export config', exportConfig: 'Export config',
importConfig: 'Import config', importConfig: 'Import config',
@ -150,6 +150,7 @@ export default {
result: 'Result', result: 'Result',
copy: 'Copy', copy: 'Copy',
editor: 'Editor',
resetConfig: 'Reset config' resetConfig: 'Reset config'
}, },
help: { help: {

View File

@ -69,7 +69,7 @@ export default {
roomUrlUpdated: 'ルームのURLが更新されました。再度コピーすることをお忘れなく', roomUrlUpdated: 'ルームのURLが更新されました。再度コピーすることをお忘れなく',
roomUrl: 'ルームのURL', roomUrl: 'ルームのURL',
enterRoom: 'ルームに入る', enterRoom: 'ルームに入る',
enterTestRoom: 'テストルームに入る', copyTestRoomUrl: 'テストルームのURLをコピーする',
exportConfig: 'コンフィグの導出', exportConfig: 'コンフィグの導出',
importConfig: 'コンフィグの導入', importConfig: 'コンフィグの導入',
@ -150,6 +150,7 @@ export default {
result: '結果', result: '結果',
copy: 'コピー', copy: 'コピー',
editor: 'エディタ',
resetConfig: 'デフォルトに戻す' resetConfig: 'デフォルトに戻す'
}, },
help: { help: {

View File

@ -69,7 +69,7 @@ export default {
roomUrlUpdated: '房间URL已更新记得重新复制', roomUrlUpdated: '房间URL已更新记得重新复制',
roomUrl: '房间URL', roomUrl: '房间URL',
enterRoom: '进入房间', enterRoom: '进入房间',
enterTestRoom: '进入测试房间', copyTestRoomUrl: '复制测试房间URL',
exportConfig: '导出配置', exportConfig: '导出配置',
importConfig: '导入配置', importConfig: '导入配置',
@ -150,6 +150,7 @@ export default {
result: '结果', result: '结果',
copy: '复制', copy: '复制',
editor: '编辑器',
resetConfig: '恢复默认设置' resetConfig: '恢复默认设置'
}, },
help: { help: {

View File

@ -235,7 +235,7 @@
</el-tooltip> </el-tooltip>
<el-form-item> <el-form-item>
<el-button type="primary" :disabled="!roomUrl" @click="enterRoom">{{$t('home.enterRoom')}}</el-button> <el-button type="primary" :disabled="!roomUrl" @click="enterRoom">{{$t('home.enterRoom')}}</el-button>
<el-button @click="enterTestRoom">{{$t('home.enterTestRoom')}}</el-button> <el-button @click="copyTestRoomUrl">{{$t('home.copyTestRoomUrl')}}</el-button>
<el-button @click="exportConfig">{{$t('home.exportConfig')}}</el-button> <el-button @click="exportConfig">{{$t('home.exportConfig')}}</el-button>
<el-button @click="importConfig">{{$t('home.importConfig')}}</el-button> <el-button @click="importConfig">{{$t('home.importConfig')}}</el-button>
</el-form-item> </el-form-item>
@ -378,8 +378,8 @@ export default {
enterRoom() { enterRoom() {
window.open(this.roomUrl, `room ${this.roomKeyValue}`, 'menubar=0,location=0,scrollbars=0,toolbar=0,width=600,height=600') window.open(this.roomUrl, `room ${this.roomKeyValue}`, 'menubar=0,location=0,scrollbars=0,toolbar=0,width=600,height=600')
}, },
enterTestRoom() { copyTestRoomUrl() {
window.open(this.getUnvalidatedRoomUrl(true), 'test room', 'menubar=0,location=0,scrollbars=0,toolbar=0,width=600,height=600') window.navigator.clipboard.writeText(this.getUnvalidatedRoomUrl(true))
}, },
getUnvalidatedRoomUrl(isTestRoom) { getUnvalidatedRoomUrl(isTestRoom) {
// //

View File

@ -18,6 +18,9 @@
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="copyResult">{{ $t('stylegen.copy') }}</el-button> <el-button type="primary" @click="copyResult">{{ $t('stylegen.copy') }}</el-button>
<a target="_blank" href="https://vscode.dev/">
<el-button style="margin: 0 10px">{{ $t('stylegen.editor') }}</el-button>
</a>
<el-button @click="resetConfig">{{ $t('stylegen.resetConfig') }}</el-button> <el-button @click="resetConfig">{{ $t('stylegen.resetConfig') }}</el-button>
</el-form-item> </el-form-item>
</el-card> </el-card>