Skip to content

Commit

Permalink
add install name to admin header
Browse files Browse the repository at this point in the history
  • Loading branch information
krocheck committed May 22, 2024
1 parent 35be94b commit 149156e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions webui/src/App.scss
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,7 @@
.unstable-warning {
z-index: 10000;
}

.install-name {
color: white;
}
7 changes: 6 additions & 1 deletion webui/src/Layout/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useContext, useEffect, useState } from 'react'
import { CHeader, CHeaderBrand, CHeaderNavItem, CHeaderNav, CHeaderNavLink, CToggler } from '@coreui/react'
import { SocketContext, socketEmitPromise } from '../util.js'
import { SocketContext, UserConfigContext, socketEmitPromise } from '../util.js'
import { faLock } from '@fortawesome/free-solid-svg-icons'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import type { AppUpdateInfo, AppVersionInfo } from '@companion-app/shared/Model/Common.js'
Expand All @@ -13,6 +13,7 @@ interface MyHeaderProps {

export function MyHeader({ toggleSidebar, canLock, setLocked }: MyHeaderProps) {
const socket = useContext(SocketContext)
const userConfig = useContext(UserConfigContext)

const [versionInfo, setVersionInfo] = useState<AppVersionInfo | null>(null)
const [updateData, setUpdateData] = useState<AppUpdateInfo | null>(null)
Expand Down Expand Up @@ -46,6 +47,10 @@ export function MyHeader({ toggleSidebar, canLock, setLocked }: MyHeaderProps) {
</CHeaderBrand>

<CHeaderNav className="d-md-down-none">
{userConfig?.installName !== 'Bitfocus Companion' && (
<CHeaderNavItem className="install-name">{userConfig?.installName}:</CHeaderNavItem>
)}

<CHeaderNavItem>
<CHeaderNavLink target="_new" title="Version Number" href="https://bitfocus.io/companion/">
{versionString}
Expand Down

0 comments on commit 149156e

Please sign in to comment.