mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-10-09 15:58:34 +00:00
1b4e826e15
* fix(#3455): automated AI fix * fix: address Codex review on PR #3456 * fix: address Codex review on PR #3456 * fix: address Codex review on PR #3456 * fix: address Codex review on PR #3456 * fix: address Codex review on PR #3456 * fix: address Codex review on PR #3456 * fix: address Codex review on PR #3456 * fix(terminal): let explicit SFTP auto-open beat the saved layout A JumpServer SFTP deep link or host.autoOpenSftpPanel must still open file transfer when the saved default layout omitted SFTP. * fix(terminal): skip saved layout only when SFTP auto-open is available Telnet/plugin hosts can carry autoOpenSidePanel=sftp even though the protocol cannot serve SFTP. Those sessions should still get the saved default with the SFTP pane pruned. --------- Co-authored-by: netcatty-bot <308658023+netcatty-bot@users.noreply.github.com> Co-authored-by: bincxz <16399091+binaricat@users.noreply.github.com>
19 lines
816 B
TypeScript
19 lines
816 B
TypeScript
import { STORAGE_KEY_WORKSPACE_LAYOUT_PRESET } from '../../infrastructure/config/storageKeys';
|
|
import { localStorageAdapter } from '../../infrastructure/persistence/localStorageAdapter';
|
|
import {
|
|
sanitizeWorkspaceLayoutPreset,
|
|
type WorkspaceLayoutPreset,
|
|
} from '../../domain/workspaceLayoutPreset';
|
|
|
|
/**
|
|
* Saved default workspace side panel layout. Device-local only: it is not
|
|
* part of the sync payload because pane arrangements are client-side chrome.
|
|
*/
|
|
export function readWorkspaceLayoutPreset(): WorkspaceLayoutPreset | null {
|
|
return sanitizeWorkspaceLayoutPreset(localStorageAdapter.read(STORAGE_KEY_WORKSPACE_LAYOUT_PRESET));
|
|
}
|
|
|
|
export function writeWorkspaceLayoutPreset(preset: WorkspaceLayoutPreset): boolean {
|
|
return localStorageAdapter.write(STORAGE_KEY_WORKSPACE_LAYOUT_PRESET, preset);
|
|
}
|