-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #142 from Tormak9970/dev
chore: bring main to 2.3.0
- Loading branch information
Showing
46 changed files
with
1,657 additions
and
683 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { VFC, CSSProperties } from 'react'; | ||
import { MicroSDeckInstallState } from '../lib/controllers/MicroSDeckInterop'; | ||
|
||
interface MicroSDeckNoticeProps { | ||
intallState: MicroSDeckInstallState, | ||
pluginVersion: string, | ||
libVersion: string, | ||
style?: CSSProperties | ||
} | ||
|
||
export const MicroSDeckNotice: VFC<MicroSDeckNoticeProps> = ({ intallState, pluginVersion, libVersion, style }) => { | ||
let problem = ''; | ||
let recommendation = ''; | ||
|
||
switch (intallState) { | ||
case MicroSDeckInstallState['ver too low']: | ||
case MicroSDeckInstallState['ver too high']: | ||
problem = `a version mismatch was detected. | ||
TabMaster expects version ${libVersion}, but version ${pluginVersion} is installed.` | ||
recommendation = intallState === MicroSDeckInstallState['ver too low'] ? 'Please update MicroSDeck to specified version.' : 'Please update TabMaster if available or install specified version of MicroSDeck.' | ||
break | ||
case MicroSDeckInstallState['ver unknown']: | ||
problem = `TabMaster couldn't correctly determine which version it expects or which version is installed.`; | ||
recommendation = 'Please try updating TabMaster or MicroSDeck.'; | ||
break | ||
case MicroSDeckInstallState['not installed']: | ||
problem = 'it is not installed.'; | ||
recommendation = 'Please install MicroSDeck for these tabs to work.'; | ||
} | ||
|
||
return ( | ||
<div style={style}> | ||
<div>You have some tabs that rely on the MicroSDeck plugin, but {problem}</div> | ||
<div>{recommendation}</div> | ||
<div>Until then, these tabs will not be displayed in the library.</div> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { BiSolidHide } from 'react-icons/bi'; | ||
import { CSSProperties, Fragment, VFC } from 'react'; | ||
import { FaSteam } from 'react-icons/fa6'; | ||
import { FaSdCard } from 'react-icons/fa'; | ||
import { CustomTabContainer } from './CustomTabContainer'; | ||
|
||
interface TabListLabelProps { | ||
tabContainer: TabContainer, | ||
microSDeckDisabled: boolean, | ||
style?: CSSProperties | ||
} | ||
|
||
/** | ||
* Tab name and associated icons, used where tabs are listed in QAM and Library menu. | ||
*/ | ||
export const TabListLabel: VFC<TabListLabelProps> = ({ tabContainer, microSDeckDisabled, style }) => { | ||
|
||
return ( | ||
<div style={{ display: 'flex', alignItems: 'center', width: '100%', ...style }}> | ||
<div style={{ marginRight: '5px' }}>{tabContainer.title}</div> | ||
{tabContainer.filters ? ((tabContainer as CustomTabContainer).dependsOnMicroSDeck ? <FaSdCard fill={microSDeckDisabled ? '#92939b61' : 'currentColor'} /> : <Fragment />) : <FaSteam />} | ||
{tabContainer.position !== -1 && tabContainer.autoHide && (tabContainer as CustomTabContainer).collection.visibleApps.length === 0 && <BiSolidHide style={{ marginLeft: 'auto' }} />} | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.