fix: Show version number with card loading spinner (#1825)
- Closes #1818 **Why add this?**: A repeated pattern is that an issue is fixed in the card, a new build is released and users will incorrectly believe it's not yet fixed due to their browser caching the old code. This results in wasting their time, and my time. **But it's obnoxious!**: I'm pretty sensitive to this (hence adding these messages!), so let me know how terrible you find it. You can disable it with: ```yaml performance: features: card_loading_indicator: false ```
This commit is contained in:
@@ -20,7 +20,7 @@ interface IntegrationDiagnostics {
|
||||
version?: string;
|
||||
}
|
||||
|
||||
export const getReleaseVersion = (): string => {
|
||||
export const getReleaseVersion = (short?: boolean): string => {
|
||||
const releaseVersion = '__FRIGATE_CARD_RELEASE_VERSION__';
|
||||
|
||||
/* istanbul ignore if: depends on rollup substitution -- @preserve */
|
||||
@@ -30,7 +30,7 @@ export const getReleaseVersion = (): string => {
|
||||
|
||||
/* istanbul ignore if: depends on rollup substitution -- @preserve */
|
||||
if ((releaseVersion as unknown) === 'dev') {
|
||||
return `${releaseVersion}+${pkg['gitAbbrevHash']} (${pkg['buildDate']})`;
|
||||
return `${releaseVersion}+${pkg['gitAbbrevHash']}${short ? '' : ` (${pkg['buildDate']})`}`;
|
||||
}
|
||||
|
||||
return releaseVersion;
|
||||
|
||||
Reference in New Issue
Block a user