mirror of
https://github.com/urbit/shrub.git
synced 2024-12-19 08:32:39 +03:00
ux: default terminal sets correct theme onload
also, increase size of Tab click target
This commit is contained in:
parent
438e6d4df9
commit
87ac253b8d
@ -13,6 +13,7 @@ import React from 'react';
|
||||
import { Box, Col } from '@tlon/indigo-react';
|
||||
import { makeTheme } from './lib/theme';
|
||||
import { showBlit, csi } from './lib/blit';
|
||||
import { DEFAULT_SESSION } from './constants';
|
||||
|
||||
const termConfig: ITerminalOptions = {
|
||||
logLevel: 'warn',
|
||||
@ -146,7 +147,7 @@ export default function Buffer({ name, selected, dark }: BufferProps) {
|
||||
const session: Session = useTermState(s => s.sessions[name]);
|
||||
|
||||
const initSession = useCallback(async (name: string, dark: boolean) => {
|
||||
console.log('setting up', name);
|
||||
console.log('setting up', name === DEFAULT_SESSION ? 'default' : name);
|
||||
|
||||
// set up xterm terminal
|
||||
//
|
||||
@ -234,7 +235,7 @@ export default function Buffer({ name, selected, dark }: BufferProps) {
|
||||
if (container.current) {
|
||||
container.current.style.backgroundColor = theme.background || '';
|
||||
}
|
||||
}, [dark]);
|
||||
}, [session, dark]);
|
||||
|
||||
useEffect(() => {
|
||||
if (session && selected && !session.term.isOpen) {
|
||||
|
@ -44,8 +44,8 @@ export const Tab = ( { session, name }: TabProps ) => {
|
||||
}, [session]);
|
||||
|
||||
return (
|
||||
<div className={'tab ' + (isSelected ? 'selected' : '')}>
|
||||
<a className='session-name' onClick={onClick}>
|
||||
<div className={'tab ' + (isSelected ? 'selected' : '')} onClick={onClick}>
|
||||
<a className='session-name'>
|
||||
{session?.hasBell ? '🔔 ' : ''}
|
||||
{name === DEFAULT_SESSION ? 'default' : name}
|
||||
{' '}
|
||||
|
Loading…
Reference in New Issue
Block a user