mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-07-13 22:13:11 +02:00
web: allow custom app title
This commit is contained in:
committed by
Abdullah Atta
parent
77eb661b0e
commit
a5d39a18a7
1
apps/web/src/global.d.ts
vendored
1
apps/web/src/global.d.ts
vendored
@@ -29,6 +29,7 @@ declare global {
|
||||
var IS_TESTING: boolean;
|
||||
var PLATFORM: "web" | "desktop";
|
||||
var IS_BETA: boolean;
|
||||
var APP_TITLE: string;
|
||||
|
||||
interface Window {
|
||||
os?: () => NodeJS.Platform | "mas";
|
||||
|
||||
@@ -18,6 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export const setDocumentTitle = (title?: string) => {
|
||||
if (!title) document.title = "Notesnook";
|
||||
else document.title = `${title} - Notesnook`;
|
||||
if (!title) document.title = APP_TITLE;
|
||||
else document.title = `${title} - ${APP_TITLE}`;
|
||||
};
|
||||
|
||||
@@ -64,6 +64,7 @@ export default defineConfig({
|
||||
}
|
||||
},
|
||||
define: {
|
||||
APP_TITLE: `"${isThemeBuilder ? "Notesnook Theme Builder" : "Notesnook"}"`,
|
||||
GIT_HASH: `"${gitHash}"`,
|
||||
APP_VERSION: `"${appVersion}"`,
|
||||
PUBLIC_URL: `"${process.env.PUBLIC_URL || ""}"`,
|
||||
|
||||
Reference in New Issue
Block a user