diff --git a/app/client/models/gristUrlState.ts b/app/client/models/gristUrlState.ts index d3c18be2..d15cb0f9 100644 --- a/app/client/models/gristUrlState.ts +++ b/app/client/models/gristUrlState.ts @@ -44,6 +44,9 @@ export function docUrl(doc: Document): IGristUrlState { // Returns the home page for the current org. export function getMainOrgUrl(): string { return urlState().makeUrl({}); } +// When on a document URL, returns the URL with just the doc ID, omitting other bits (like page). +export function getCurrentDocUrl(): string { return urlState().makeUrl({docPage: undefined}); } + // Get url for the login page, which will then redirect to nextUrl (current page by default). export function getLoginUrl(nextUrl: string = _getCurrentUrl()): string { return _getLoginLogoutUrl('login', nextUrl); diff --git a/app/client/ui2018/IconList.ts b/app/client/ui2018/IconList.ts index 7e2db309..fd614961 100644 --- a/app/client/ui2018/IconList.ts +++ b/app/client/ui2018/IconList.ts @@ -1,3 +1,179 @@ -// tslint:disable:max-line-length -export type IconName = "ChartArea" | "ChartBar" | "ChartKaplan" | "ChartLine" | "ChartPie" | "TypeCard" | "TypeCardList" | "TypeCell" | "TypeChart" | "TypeCustom" | "TypeDetails" | "TypeTable" | "FieldAny" | "FieldAttachment" | "FieldCheckbox" | "FieldChoice" | "FieldColumn" | "FieldDate" | "FieldDateTime" | "FieldFunction" | "FieldFunctionEqual" | "FieldInteger" | "FieldLink" | "FieldNumeric" | "FieldReference" | "FieldSpinner" | "FieldSwitcher" | "FieldTable" | "FieldText" | "FieldTextbox" | "FieldToggle" | "GristLogo" | "ThumbPreview" | "CenterAlign" | "Code" | "Collapse" | "Convert" | "CrossBig" | "CrossSmall" | "Dots" | "Download" | "DragDrop" | "Dropdown" | "DropdownUp" | "Expand" | "EyeHide" | "EyeShow" | "Feedback" | "Filter" | "FilterSimple" | "Folder" | "FunctionResult" | "Help" | "Home" | "Idea" | "Import" | "LeftAlign" | "Log" | "Mail" | "Minus" | "NewNotification" | "Notification" | "Offline" | "Page" | "PanelLeft" | "PanelRight" | "PinBig" | "PinSmall" | "Pivot" | "Plus" | "Public" | "PublicFilled" | "Redo" | "Remove" | "Repl" | "ResizePanel" | "RightAlign" | "Search" | "Settings" | "Share" | "Sort" | "Tick" | "Undo" | "Validation" | "Widget" | "Wrap" | "Zoom"; -export const IconList: IconName[] = ["ChartArea", "ChartBar", "ChartKaplan", "ChartLine", "ChartPie", "TypeCard", "TypeCardList", "TypeCell", "TypeChart", "TypeCustom", "TypeDetails", "TypeTable", "FieldAny", "FieldAttachment", "FieldCheckbox", "FieldChoice", "FieldColumn", "FieldDate", "FieldDateTime", "FieldFunction", "FieldFunctionEqual", "FieldInteger", "FieldLink", "FieldNumeric", "FieldReference", "FieldSpinner", "FieldSwitcher", "FieldTable", "FieldText", "FieldTextbox", "FieldToggle", "GristLogo", "ThumbPreview", "CenterAlign", "Code", "Collapse", "Convert", "CrossBig", "CrossSmall", "Dots", "Download", "DragDrop", "Dropdown", "DropdownUp", "Expand", "EyeHide", "EyeShow", "Feedback", "Filter", "FilterSimple", "Folder", "FunctionResult", "Help", "Home", "Idea", "Import", "LeftAlign", "Log", "Mail", "Minus", "NewNotification", "Notification", "Offline", "Page", "PanelLeft", "PanelRight", "PinBig", "PinSmall", "Pivot", "Plus", "Public", "PublicFilled", "Redo", "Remove", "Repl", "ResizePanel", "RightAlign", "Search", "Settings", "Share", "Sort", "Tick", "Undo", "Validation", "Widget", "Wrap", "Zoom"]; +export type IconName = "ChartArea" | + "ChartBar" | + "ChartKaplan" | + "ChartLine" | + "ChartPie" | + "TypeCard" | + "TypeCardList" | + "TypeCell" | + "TypeChart" | + "TypeCustom" | + "TypeDetails" | + "TypeTable" | + "FieldAny" | + "FieldAttachment" | + "FieldCheckbox" | + "FieldChoice" | + "FieldColumn" | + "FieldDate" | + "FieldDateTime" | + "FieldFunction" | + "FieldFunctionEqual" | + "FieldInteger" | + "FieldLink" | + "FieldNumeric" | + "FieldReference" | + "FieldSpinner" | + "FieldSwitcher" | + "FieldTable" | + "FieldText" | + "FieldTextbox" | + "FieldToggle" | + "GristLogo" | + "ThumbPreview" | + "CenterAlign" | + "Code" | + "Collapse" | + "Convert" | + "Copy" | + "CrossBig" | + "CrossSmall" | + "Dots" | + "Download" | + "DragDrop" | + "Dropdown" | + "DropdownUp" | + "Expand" | + "EyeHide" | + "EyeShow" | + "Feedback" | + "Filter" | + "FilterSimple" | + "Folder" | + "FunctionResult" | + "Help" | + "Home" | + "Idea" | + "Import" | + "LeftAlign" | + "Log" | + "Mail" | + "Minus" | + "NewNotification" | + "Notification" | + "Offline" | + "Page" | + "PanelLeft" | + "PanelRight" | + "PinBig" | + "PinSmall" | + "Pivot" | + "Plus" | + "Public" | + "PublicFilled" | + "Redo" | + "Remove" | + "Repl" | + "ResizePanel" | + "RightAlign" | + "Search" | + "Settings" | + "Share" | + "Sort" | + "Tick" | + "Undo" | + "Validation" | + "Video" | + "Widget" | + "Wrap" | + "Zoom"; + +export const IconList: IconName[] = ["ChartArea", + "ChartBar", + "ChartKaplan", + "ChartLine", + "ChartPie", + "TypeCard", + "TypeCardList", + "TypeCell", + "TypeChart", + "TypeCustom", + "TypeDetails", + "TypeTable", + "FieldAny", + "FieldAttachment", + "FieldCheckbox", + "FieldChoice", + "FieldColumn", + "FieldDate", + "FieldDateTime", + "FieldFunction", + "FieldFunctionEqual", + "FieldInteger", + "FieldLink", + "FieldNumeric", + "FieldReference", + "FieldSpinner", + "FieldSwitcher", + "FieldTable", + "FieldText", + "FieldTextbox", + "FieldToggle", + "GristLogo", + "ThumbPreview", + "CenterAlign", + "Code", + "Collapse", + "Convert", + "Copy", + "CrossBig", + "CrossSmall", + "Dots", + "Download", + "DragDrop", + "Dropdown", + "DropdownUp", + "Expand", + "EyeHide", + "EyeShow", + "Feedback", + "Filter", + "FilterSimple", + "Folder", + "FunctionResult", + "Help", + "Home", + "Idea", + "Import", + "LeftAlign", + "Log", + "Mail", + "Minus", + "NewNotification", + "Notification", + "Offline", + "Page", + "PanelLeft", + "PanelRight", + "PinBig", + "PinSmall", + "Pivot", + "Plus", + "Public", + "PublicFilled", + "Redo", + "Remove", + "Repl", + "ResizePanel", + "RightAlign", + "Search", + "Settings", + "Share", + "Sort", + "Tick", + "Undo", + "Validation", + "Video", + "Widget", + "Wrap", + "Zoom"];