mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-24 05:30:15 +08:00
[all] debug
This commit is contained in:
@ -421,10 +421,8 @@ define([
|
||||
this.appOptions.user.anonymous && Common.localStorage.setItem("guest-id", this.appOptions.user.id);
|
||||
|
||||
this.appOptions.isDesktopApp = this.editorConfig.targetApp == 'desktop' || Common.Controllers.Desktop.isActive();
|
||||
if( this.appOptions.isDesktopApp ){
|
||||
var desktopRecent = Common.Controllers.Desktop.recentFiles();
|
||||
if (desktopRecent && desktopRecent.length > 0)
|
||||
this.editorConfig.recent = !this.editorConfig.recent ? desktopRecent : this.editorConfig.recent = this.editorConfig.recent.concat(desktopRecent);
|
||||
if( Common.Controllers.Desktop.isActive() ) {
|
||||
!this.editorConfig.recent && (this.editorConfig.recent = []);
|
||||
}
|
||||
|
||||
this.appOptions.canCreateNew = this.editorConfig.canRequestCreateNew || !_.isEmpty(this.editorConfig.createUrl) || this.editorConfig.templates && this.editorConfig.templates.length;
|
||||
|
||||
@ -378,10 +378,8 @@ define([
|
||||
this.appOptions.user.anonymous && Common.localStorage.setItem("guest-id", this.appOptions.user.id);
|
||||
|
||||
this.appOptions.isDesktopApp = this.editorConfig.targetApp == 'desktop' || Common.Controllers.Desktop.isActive();
|
||||
if(this.appOptions.isDesktopApp){
|
||||
var desktopRecent = Common.Controllers.Desktop.recentFiles();
|
||||
if (desktopRecent && desktopRecent.length > 0)
|
||||
this.editorConfig.recent = !this.editorConfig.recent ? desktopRecent : this.editorConfig.recent = this.editorConfig.recent.concat(desktopRecent);
|
||||
if( Common.Controllers.Desktop.isActive() ) {
|
||||
!this.editorConfig.recent && (this.editorConfig.recent = []);
|
||||
}
|
||||
|
||||
this.appOptions.canCreateNew = this.editorConfig.canRequestCreateNew || !_.isEmpty(this.editorConfig.createUrl) || this.editorConfig.templates && this.editorConfig.templates.length;
|
||||
|
||||
@ -333,6 +333,10 @@ define([
|
||||
}
|
||||
this.applyMode();
|
||||
|
||||
if ( Common.Controllers.Desktop.isActive() ) {
|
||||
Common.NotificationCenter.trigger('update:recents', Common.Controllers.Desktop.recentFiles());
|
||||
}
|
||||
|
||||
if ( !!this.api ) {
|
||||
this.panels['info'].setApi(this.api);
|
||||
if (this.panels['opts']) this.panels['opts'].setApi(this.api);
|
||||
|
||||
@ -423,10 +423,8 @@ define([
|
||||
this.appOptions.user.anonymous && Common.localStorage.setItem("guest-id", this.appOptions.user.id);
|
||||
|
||||
this.appOptions.isDesktopApp = this.editorConfig.targetApp == 'desktop' || Common.Controllers.Desktop.isActive();
|
||||
if(this.appOptions.isDesktopApp){
|
||||
var desktopRecent = Common.Controllers.Desktop.recentFiles();
|
||||
if (desktopRecent && desktopRecent.length > 0)
|
||||
this.editorConfig.recent = !this.editorConfig.recent ? desktopRecent : this.editorConfig.recent = this.editorConfig.recent.concat(desktopRecent);
|
||||
if( Common.Controllers.Desktop.isActive() ){
|
||||
!this.editorConfig.recent && (this.editorConfig.recent = []);
|
||||
}
|
||||
|
||||
this.appOptions.canCreateNew = this.editorConfig.canRequestCreateNew || !_.isEmpty(this.editorConfig.createUrl) || this.editorConfig.templates && this.editorConfig.templates.length;
|
||||
|
||||
@ -315,6 +315,10 @@ define([
|
||||
}
|
||||
this.applyMode();
|
||||
|
||||
if ( Common.Controllers.Desktop.isActive() ) {
|
||||
Common.NotificationCenter.trigger('update:recents', Common.Controllers.Desktop.recentFiles());
|
||||
}
|
||||
|
||||
if ( !!this.api ) {
|
||||
this.panels['info'].setApi(this.api);
|
||||
if ( this.panels['protect'] )
|
||||
|
||||
Reference in New Issue
Block a user