Commit 4914dbde975e9a27ea8e98c31eac743605e09ad6
Merge branch 'ww' into 'main'
feat: update document title display name See merge request huang/thingskit-drawio!43
Showing
3 changed files
with
7 additions
and
3 deletions
@@ -1967,7 +1967,9 @@ App.prototype.updateDocumentTitle = function () { | @@ -1967,7 +1967,9 @@ App.prototype.updateDocumentTitle = function () { | ||
1967 | 1967 | ||
1968 | if (file != null) { | 1968 | if (file != null) { |
1969 | var filename = (file.getTitle() != null) ? file.getTitle() : this.defaultFilename; | 1969 | var filename = (file.getTitle() != null) ? file.getTitle() : this.defaultFilename; |
1970 | - title = filename + ' - ' + title; | 1970 | + // title = filename + ' - ' + title; |
1971 | + // TODO thingskit not display file suffix name | ||
1972 | + title = filename.replace(/\.drawio/g, ''); | ||
1971 | } | 1973 | } |
1972 | 1974 | ||
1973 | if (document.title != title) { | 1975 | if (document.title != title) { |
@@ -20,8 +20,9 @@ | @@ -20,8 +20,9 @@ | ||
20 | 20 | ||
21 | /** | 21 | /** |
22 | * Specifies the app name. Default is document.title. | 22 | * Specifies the app name. Default is document.title. |
23 | + * TODO thingskit delete prefix | ||
23 | */ | 24 | */ |
24 | - Editor.prototype.appName = 'diagrams.net'; | 25 | + Editor.prototype.appName = ''; |
25 | 26 | ||
26 | /** | 27 | /** |
27 | * Known file types. | 28 | * Known file types. |
@@ -3553,7 +3553,8 @@ EditorUi.prototype.updateDocumentTitle = function() | @@ -3553,7 +3553,8 @@ EditorUi.prototype.updateDocumentTitle = function() | ||
3553 | 3553 | ||
3554 | if (this.editor.appName != null) | 3554 | if (this.editor.appName != null) |
3555 | { | 3555 | { |
3556 | - title += ' - ' + this.editor.appName; | 3556 | + // TODO thingskit delete '-' |
3557 | + // title += ' - ' + this.editor.appName; | ||
3557 | } | 3558 | } |
3558 | 3559 | ||
3559 | document.title = title; | 3560 | document.title = title; |