-
Notifications
You must be signed in to change notification settings - Fork 319
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e9440f1
commit 1008c98
Showing
129 changed files
with
569 additions
and
281 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
import { ProductType } from 'app/enums/product-type.enum'; | ||
import { getCopyrightText } from 'app/helpers/copyright-text.helper'; | ||
|
||
describe('getCopyrightText', () => { | ||
it('should return the correct copyright text', () => { | ||
expect(getCopyrightText(false, 2024)).toBe('TrueNAS ® © 2024'); | ||
expect(getCopyrightText(ProductType.Scale, 2024)).toBe('TrueNAS Community Edition ® © 2024'); | ||
}); | ||
|
||
it('should return the correct enterprise copyright text', () => { | ||
expect(getCopyrightText(true, 2024)).toBe('TrueNAS ENTERPRISE ® © 2024'); | ||
expect(getCopyrightText(ProductType.ScaleEnterprise, 2024)).toBe('TrueNAS Enterprise ® © 2024'); | ||
}); | ||
}); |
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 |
---|---|---|
@@ -1,6 +1,8 @@ | ||
export function getCopyrightText(isEnterprise: boolean, buildYear: number): string { | ||
if (isEnterprise) { | ||
return `TrueNAS ENTERPRISE ® © ${buildYear}`; | ||
} | ||
return `TrueNAS ® © ${buildYear}`; | ||
import { ProductType, productTypeLabels } from 'app/enums/product-type.enum'; | ||
|
||
export function getCopyrightText( | ||
productType: ProductType, | ||
buildYear: number, | ||
): string { | ||
return `TrueNAS ${productTypeLabels.get(productType)} ® © ${buildYear}`; | ||
} |
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
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
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
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.