mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Populate doc title, description and thumbnail in app.html
Summary: Fills in the title and description/thumbnail (for templates) in app.html if the page being requested is for a document. Test Plan: Tested manually. Reviewers: paulfitz Reviewed By: paulfitz Subscribers: dsagal Differential Revision: https://phab.getgrist.com/D3544
This commit is contained in:
@@ -128,6 +128,10 @@ function pagePanelsDoc(owner: IDisposableOwner, appModel: AppModel, appObj: App)
|
||||
|
||||
// Set document title to strings like "DocName - Grist"
|
||||
owner.autoDispose(subscribe(pageModel.currentDocTitle, (use, docName) => {
|
||||
// If the document hasn't loaded yet, don't update the title; since the HTML document already has
|
||||
// a title element with the document's name, there's no need for further action.
|
||||
if (!pageModel.currentDoc.get()) { return; }
|
||||
|
||||
document.title = `${docName}${getPageTitleSuffix(getGristConfig())}`;
|
||||
}));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user