mirror of
https://github.com/samsonjs/vibetunnel.git
synced 2026-03-25 09:25:50 +00:00
Apply path formatting to remaining frontend components
- Add formatPathForDisplay to session-create-form working directory input - Add formatPathForDisplay to file-browser path display - Users now see ~/Documents instead of /Users/username/Documents everywhere - Maintains raw paths for editing and API calls, only formats for display
This commit is contained in:
parent
039f27112e
commit
836db22a5e
2 changed files with 4 additions and 3 deletions
|
|
@ -20,7 +20,7 @@ import {
|
|||
UIIcons,
|
||||
} from '../utils/file-icons.js';
|
||||
import { createLogger } from '../utils/logger.js';
|
||||
import { copyToClipboard } from '../utils/path-utils.js';
|
||||
import { copyToClipboard, formatPathForDisplay } from '../utils/path-utils.js';
|
||||
import type { Session } from './session-list.js';
|
||||
import './monaco-editor.js';
|
||||
|
||||
|
|
@ -562,7 +562,7 @@ export class FileBrowser extends LitElement {
|
|||
} (click to edit)"
|
||||
@click=${this.handlePathClick}
|
||||
>
|
||||
${this.currentFullPath || this.currentPath || 'File Browser'}
|
||||
${formatPathForDisplay(this.currentFullPath || this.currentPath || 'File Browser')}
|
||||
</div>
|
||||
`
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ import { customElement, property, state } from 'lit/decorators.js';
|
|||
import './file-browser.js';
|
||||
import type { AuthClient } from '../services/auth-client.js';
|
||||
import { createLogger } from '../utils/logger.js';
|
||||
import { formatPathForDisplay } from '../utils/path-utils.js';
|
||||
import type { Session } from './session-list.js';
|
||||
|
||||
const logger = createLogger('session-create-form');
|
||||
|
|
@ -389,7 +390,7 @@ export class SessionCreateForm extends LitElement {
|
|||
<input
|
||||
type="text"
|
||||
class="input-field"
|
||||
.value=${this.workingDir}
|
||||
.value=${formatPathForDisplay(this.workingDir)}
|
||||
@input=${this.handleWorkingDirChange}
|
||||
placeholder="~/"
|
||||
?disabled=${this.disabled || this.isCreating}
|
||||
|
|
|
|||
Loading…
Reference in a new issue