desktop: Prices, Store art, Growth and App info tabs, exports at the top right and in the command palette, studio and fastlane steps in the first-run guide, fix hints on errors; fixtures, screenshots, tests, UX audit in docs/desktop.md
This commit is contained in:
parent
029ef2e2d3
commit
5d09111528
34 changed files with 2572 additions and 67 deletions
|
|
@ -16,6 +16,12 @@ export function share(x: number): string {
|
|||
|
||||
export const num = (n: number, digits = 0): string => new Intl.NumberFormat(loc(), { maximumFractionDigits: digits, minimumFractionDigits: digits }).format(n);
|
||||
|
||||
/** 4.99 USD -> "$4.99" (Turkish: "$4,99"); an unknown currency code keeps the code. */
|
||||
export function money(n: number, currency: string): string {
|
||||
try { return new Intl.NumberFormat(loc(), { style: 'currency', currency, maximumFractionDigits: n % 1 ? 2 : 0, minimumFractionDigits: n % 1 ? 2 : 0 }).format(n); }
|
||||
catch { return `${num(n, n % 1 ? 2 : 0)} ${currency}`; }
|
||||
}
|
||||
|
||||
export function bytes(n: number | null | undefined): string {
|
||||
if (!n) return '–';
|
||||
const mb = n / 1e6;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue