Skip to content

Commit

Permalink
🎨 #4567
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed Jan 5, 2023
1 parent c7962f1 commit 15cce2c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/src/dialog/processSystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {Dialog} from "./index";
import {isMobile} from "../util/functions";
import {confirmDialog} from "./confirmDialog";
import {getCurrentWindow} from "@electron/remote";
import {pathPosix} from "../util/pathName";

export const lockFile = (id: string) => {
const html = `<div class="b3-dialog__scrim"></div>
Expand Down Expand Up @@ -262,14 +263,15 @@ export const bootSync = () => {

export const setTitle = (title: string) => {
const dragElement = document.getElementById("drag");
const workspaceName = pathPosix().basename(window.siyuan.config.system.workspaceDir)
if (title === window.siyuan.languages.siyuanNote) {
const versionTitle = title + " v" + Constants.SIYUAN_VERSION;
const versionTitle =`${workspaceName} - ${title} v${Constants.SIYUAN_VERSION}`;
document.title = versionTitle;
dragElement.textContent = versionTitle;
dragElement.setAttribute("title", versionTitle);
} else {
title = title || "Untitled";
document.title = title + " - " + window.siyuan.languages.siyuanNote + " v" + Constants.SIYUAN_VERSION;
document.title =`${workspaceName} - ${title} - ${window.siyuan.languages.siyuanNote} v${Constants.SIYUAN_VERSION}`;
dragElement.textContent = title;
dragElement.setAttribute("title", title);
}
Expand Down

0 comments on commit 15cce2c

Please sign in to comment.