Merge pull request #2480 from ONLYOFFICE/feature/Fix-view-of-recent-files-list

Fix recent files list
This commit is contained in:
maxkadushkin
2023-07-11 16:22:55 -04:00
committed by GitHub
8 changed files with 22 additions and 15 deletions

View File

@ -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 = []);
}

View File

@ -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;

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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'] )

View File

@ -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;