mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-10-30 16:23:31 +00:00
fix(config): support Redis ACL username
This commit is contained in:
@@ -30,6 +30,7 @@ export interface DatabaseConfig {
|
||||
export interface RedisConfig {
|
||||
host: string
|
||||
port: number
|
||||
username: string
|
||||
password: string
|
||||
db: number
|
||||
enable_tls: boolean
|
||||
|
||||
@@ -215,8 +215,10 @@ export default {
|
||||
description: 'Connect to your Redis server',
|
||||
host: 'Host',
|
||||
port: 'Port',
|
||||
username: 'Username (optional)',
|
||||
password: 'Password (optional)',
|
||||
database: 'Database',
|
||||
usernamePlaceholder: 'Leave empty for default user',
|
||||
passwordPlaceholder: 'Password',
|
||||
enableTls: 'Enable TLS',
|
||||
enableTlsHint: 'Use TLS when connecting to Redis (public CA certs)'
|
||||
|
||||
@@ -215,8 +215,10 @@ export default {
|
||||
description: '连接到您的 Redis 服务器',
|
||||
host: '主机',
|
||||
port: '端口',
|
||||
username: '用户名(可选)',
|
||||
password: '密码(可选)',
|
||||
database: '数据库',
|
||||
usernamePlaceholder: '默认用户留空',
|
||||
passwordPlaceholder: '密码',
|
||||
enableTls: '启用 TLS',
|
||||
enableTlsHint: '连接 Redis 时使用 TLS(公共 CA 证书)'
|
||||
|
||||
@@ -217,6 +217,15 @@
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-2 gap-4">
|
||||
<div>
|
||||
<label class="input-label">{{ t('setup.redis.username') }}</label>
|
||||
<input
|
||||
v-model="formData.redis.username"
|
||||
type="text"
|
||||
class="input"
|
||||
:placeholder="t('setup.redis.usernamePlaceholder')"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<label class="input-label">{{ t('setup.redis.password') }}</label>
|
||||
<input
|
||||
@@ -542,6 +551,7 @@ const formData = reactive<InstallRequest>({
|
||||
redis: {
|
||||
host: 'localhost',
|
||||
port: 6379,
|
||||
username: '',
|
||||
password: '',
|
||||
db: 0,
|
||||
enable_tls: false
|
||||
|
||||
Reference in New Issue
Block a user