forked from vhaudiquet/rhema-together
feat(web): open the side pane on Preview
Files was the first tab and the one selected when the pane opened. The preview is what a room looks at while the agent works, so it comes first and is selected on open. Files is second and Terminal last. The panel order in the body follows the tabs, so the tablist, the DOM order, and arrow-key navigation stay in step.
This commit is contained in:
1 parent
4d9530cc34
commit
89aca58364
1 file changed
+5
-5
@@ -8,11 +8,11 @@ type Tab = 'terminal' | 'preview' | 'files'
|
||||
defineProps<{ roomId: string; roomName: string; preview: PreviewTarget | null }>()
|
||||
const emit = defineEmits<{ close: [] }>()
|
||||
|
||||
const tab = ref<Tab>('files')
|
||||
const tab = ref<Tab>('preview')
|
||||
const tabs: Array<{ id: Tab; label: string; icon: typeof Terminal }> = [
|
||||
{ id: 'terminal', label: 'Terminal', icon: Terminal },
|
||||
{ id: 'preview', label: 'Preview', icon: Eye },
|
||||
{ id: 'files', label: 'Files', icon: FolderTree },
|
||||
{ id: 'terminal', label: 'Terminal', icon: Terminal },
|
||||
]
|
||||
</script>
|
||||
|
||||
@@ -48,9 +48,9 @@ const tabs: Array<{ id: Tab; label: string; icon: typeof Terminal }> = [
|
||||
</div>
|
||||
|
||||
<div id="pane-panel" class="pane-body" role="tabpanel" :aria-labelledby="`pane-tab-${tab}`">
|
||||
<FilesPane v-if="tab === 'files'" :room-id="roomId" :room-name="roomName" />
|
||||
<TerminalPane v-else-if="tab === 'terminal'" :room-id="roomId" />
|
||||
<PreviewPane v-else :room-id="roomId" :target="preview" />
|
||||
<PreviewPane v-if="tab === 'preview'" :room-id="roomId" :target="preview" />
|
||||
<FilesPane v-else-if="tab === 'files'" :room-id="roomId" :room-name="roomName" />
|
||||
<TerminalPane v-else :room-id="roomId" />
|
||||
</div>
|
||||
</aside>
|
||||
</template>
|
||||
Reference in new issue
Block a user