webterm: account for title oddity for terminal app

This commit is contained in:
fang 2020-11-11 22:00:32 +01:00
parent 32e1235edb
commit f549d16a2e
No known key found for this signature in database
GPG Key ID: EB035760C1BBA972
2 changed files with 12 additions and 3 deletions

View File

@ -117,7 +117,12 @@ export class Omnibox extends Component {
const { props } = this;
this.setState({ results: this.initialResults(), query: '' }, () => {
props.api.local.setOmnibox();
if (defaultApps.includes(app.toLowerCase()) || app === 'profile' || app === 'Links' || app === 'home') {
if (defaultApps.includes(app.toLowerCase())
|| app === 'profile'
|| app === 'Links'
|| app === 'Terminal'
|| app === 'home')
{
props.history.push(link);
} else {
window.location.href = link;

View File

@ -30,8 +30,12 @@ export class OmniboxResult extends Component {
const sigilFill = (this.state.hovered || (selected === link)) ? '#3a8ff7' : '#ffffff';
let graphic = <div />;
if (defaultApps.includes(icon.toLowerCase()) || icon.toLowerCase() === 'links') {
icon = (icon === 'Link') ? 'Links' : icon;
if (defaultApps.includes(icon.toLowerCase())
|| icon.toLowerCase() === 'links'
|| icon.toLowerCase() === 'terminal')
{
icon = (icon === 'Link') ? 'Links' :
(icon === 'Terminal') ? 'Dojo' : icon;
graphic = <Icon display="inline-block" verticalAlign="middle" icon={icon} mr='2' size='16px' color={iconFill} />;
} else if (icon === 'logout') {
graphic = <Icon display="inline-block" verticalAlign="middle" icon='ArrowWest' mr='2' size='16px' color={iconFill} />;