Skip to content

Commit

Permalink
fix: 服务器代理修改默认值 (1Panel-dev#5242)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssongliu authored May 31, 2024
1 parent 15be673 commit 9fdbb89
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
4 changes: 3 additions & 1 deletion frontend/src/views/database/mysql/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,9 @@
v-if="mysqlStatus != 'Running' && currentDB && !loading && maskShow && currentDB?.from === 'local'"
class="mask-prompt"
>
<span>{{ $t('commons.service.serviceNotStarted', ['MySQL']) }}</span>
<span>
{{ $t('commons.service.serviceNotStarted', [currentDB.type === 'mysql' ? 'MySQL' : 'Mariadb']) }}
</span>
</el-card>

<div v-if="dbOptionsLocal.length === 0 && dbOptionsRemote.length === 0">
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/views/database/redis/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,8 @@ const loadQuickCmd = async () => {
const quickInput = (val: any) => {
if (val) {
terminalRef.value?.sendMsg(val + '\n');
terminalRef.value?.sendMsg(val);
quickCmd.value = '';
}
};
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/views/database/redis/setting/index.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div v-show="settingShow" v-loading="loading">
<LayoutContent :title="'Redis ' + $t('commons.button.set')" :reload="true">
<LayoutContent :title="database + ' ' + $t('commons.button.set')" :reload="true">
<template #buttons>
<el-button type="primary" :plain="activeName !== 'conf'" @click="changeTab('conf')">
{{ $t('database.confChange') }}
Expand Down Expand Up @@ -201,7 +201,7 @@ const changeTab = (val: string) => {
break;
case 'tuning':
case 'port':
loadform();
loadForm();
break;
case 'status':
statusRef.value!.acceptParams({ status: redisStatus.value, database: database.value });
Expand Down Expand Up @@ -288,7 +288,7 @@ const submitForm = async () => {
loading.value = true;
await updateRedisConf(param)
.then(() => {
loadform();
loadForm();
loading.value = false;
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
})
Expand Down Expand Up @@ -336,7 +336,7 @@ const submitFile = async () => {
});
};
const loadform = async () => {
const loadForm = async () => {
const res = await loadRedisConf(database.value);
form.name = res.data?.name;
form.timeout = Number(res.data?.timeout);
Expand Down
5 changes: 3 additions & 2 deletions frontend/src/views/setting/panel/proxy/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
</el-alert>
<el-form-item :label="$t('setting.proxyType')" prop="proxyType">
<el-select v-model="form.proxyType" clearable>
<el-option value="" :label="$t('commons.button.close')" />
<el-option value="socks5" label="SOCKS5" />
<el-option value="http" label="HTTP" />
<el-option value="https" label="HTTPS" />
Expand Down Expand Up @@ -105,8 +106,8 @@ interface DialogProps {
passwdKeep: string;
}
const acceptParams = (params: DialogProps): void => {
form.proxyUrl = params.url || '127.0.0.1';
form.proxyType = params.type || 'socks5';
form.proxyUrl = params.url;
form.proxyType = params.type;
form.proxyPortItem = params.port ? Number(params.port) : 7890;
form.proxyUser = params.user;
form.proxyPasswd = params.passwd;
Expand Down

0 comments on commit 9fdbb89

Please sign in to comment.