mirror of
https://github.com/t8y2/dbx.git
synced 2026-10-28 08:08:02 +00:00
feat: add ssh_expose_lan configuration and localization support
This commit is contained in:
@@ -54,6 +54,7 @@ const defaultForm = (): Omit<ConnectionConfig, "id"> => ({
|
||||
ssh_user: "",
|
||||
ssh_password: "",
|
||||
ssh_key_path: "",
|
||||
ssh_expose_lan: false,
|
||||
ssl: false,
|
||||
connection_string: undefined,
|
||||
});
|
||||
@@ -155,6 +156,7 @@ watch(() => props.editConfig, (config) => {
|
||||
ssh_user: config.ssh_user || "",
|
||||
ssh_password: config.ssh_password || "",
|
||||
ssh_key_path: config.ssh_key_path || "",
|
||||
ssh_expose_lan: config.ssh_expose_lan || false,
|
||||
ssl: config.ssl || false,
|
||||
connection_string: config.connection_string,
|
||||
};
|
||||
@@ -514,6 +516,13 @@ watch([() => editingId.value, () => open.value], () => {
|
||||
<Label class="text-right text-xs">{{ t('connection.sshKeyPath') }}</Label>
|
||||
<Input v-model="form.ssh_key_path" class="col-span-3" placeholder="~/.ssh/id_rsa" />
|
||||
</div>
|
||||
<div class="grid grid-cols-4 items-center gap-4">
|
||||
<span />
|
||||
<label class="col-span-3 flex items-center gap-2 cursor-pointer">
|
||||
<input type="checkbox" v-model="form.ssh_expose_lan" class="mr-0" />
|
||||
<span class="text-xs text-muted-foreground">{{ t('connection.sshExposeLan') }}</span>
|
||||
</label>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
@@ -58,6 +58,7 @@ export default {
|
||||
sshPassword: "SSH Password",
|
||||
sshPasswordPlaceholder: "Leave empty to use key",
|
||||
sshKeyPath: "Key Path",
|
||||
sshExposeLan: "Expose tunnel to LAN",
|
||||
compatible: "Compatible",
|
||||
mainstream: "Popular",
|
||||
color: "Color",
|
||||
|
||||
@@ -60,6 +60,7 @@ export default {
|
||||
sshPassword: "SSH 密码",
|
||||
sshPasswordPlaceholder: "留空则使用密钥",
|
||||
sshKeyPath: "密钥路径",
|
||||
sshExposeLan: "允许局域网访问隧道",
|
||||
compatible: "兼容",
|
||||
mainstream: "主流",
|
||||
color: "颜色",
|
||||
|
||||
@@ -19,6 +19,7 @@ export interface ConnectionConfig {
|
||||
ssh_user?: string;
|
||||
ssh_password?: string;
|
||||
ssh_key_path?: string;
|
||||
ssh_expose_lan?: boolean;
|
||||
ssl?: boolean;
|
||||
connection_string?: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user