mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-25 00:06:32 +08:00
Merge pull request #2480 from ONLYOFFICE/feature/Fix-view-of-recent-files-list
Fix recent files list
This commit is contained in:
@ -421,7 +421,7 @@ 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( Common.Controllers.Desktop.isActive() ){
|
||||
if( Common.Controllers.Desktop.isActive() ) {
|
||||
!this.editorConfig.recent && (this.editorConfig.recent = []);
|
||||
}
|
||||
|
||||
|
||||
@ -405,7 +405,7 @@
|
||||
|
||||
.item {
|
||||
border: none;
|
||||
width: calc(100% - 3px);
|
||||
width: calc(100% - 4px);
|
||||
.box-shadow(none);
|
||||
}
|
||||
|
||||
@ -422,6 +422,7 @@
|
||||
|
||||
.recent-icon {
|
||||
display: inline-block;
|
||||
.float-left();
|
||||
width: 24px;
|
||||
height: 30px;
|
||||
margin-top: 1px;
|
||||
@ -510,7 +511,7 @@
|
||||
|
||||
> div:not(:first-child) {
|
||||
display: block;
|
||||
padding-left: 10px;
|
||||
.padding-left-10();
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -396,7 +396,7 @@
|
||||
|
||||
.item {
|
||||
border: none;
|
||||
width: calc(100% - 3px);
|
||||
width: calc(100% - 4px);
|
||||
.box-shadow(none);
|
||||
}
|
||||
|
||||
@ -415,6 +415,7 @@
|
||||
width: 24px;
|
||||
height: 30px;
|
||||
margin-top: 1px;
|
||||
.float-left();
|
||||
div {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
@ -476,7 +477,7 @@
|
||||
|
||||
> div:not(:first-child) {
|
||||
display: block;
|
||||
padding-left: 10px;
|
||||
.padding-left-10();
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
@ -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'] )
|
||||
|
||||
@ -488,7 +488,7 @@
|
||||
|
||||
.item {
|
||||
border: none;
|
||||
width: calc(100% - 3px);
|
||||
width: calc(100% - 4px);
|
||||
.box-shadow(none);
|
||||
}
|
||||
|
||||
@ -507,6 +507,7 @@
|
||||
width: 24px;
|
||||
height: 30px;
|
||||
margin-top: 1px;
|
||||
.float-left();
|
||||
div {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
@ -565,7 +566,7 @@
|
||||
|
||||
> div:not(:first-child) {
|
||||
display: block;
|
||||
padding-left: 10px;
|
||||
.padding-left-10();
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
Reference in New Issue
Block a user