mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Add document usage banners
Summary: This also enables the new Usage section for all sites. Currently, it shows metrics for document row count, but only if the user has full document read access. Otherwise, a message about insufficient access is shown. Test Plan: Browser tests. Reviewers: jarek Reviewed By: jarek Subscribers: alexmojaki Differential Revision: https://phab.getgrist.com/D3377
This commit is contained in:
@@ -50,6 +50,11 @@ export function capitalize(str: string): string {
|
||||
return str.replace(/\b[a-z]/gi, c => c.toUpperCase());
|
||||
}
|
||||
|
||||
// Capitalizes the first word in a string.
|
||||
export function capitalizeFirstWord(str: string): string {
|
||||
return str.replace(/\b[a-z]/i, c => c.toUpperCase());
|
||||
}
|
||||
|
||||
// Returns whether the string n represents a valid number.
|
||||
// http://stackoverflow.com/questions/18082/validate-numbers-in-javascript-isnumeric
|
||||
export function isNumber(n: string): boolean {
|
||||
|
||||
Reference in New Issue
Block a user