From b407da3bd2eec87707949b5c718074c53bfe90b0 Mon Sep 17 00:00:00 2001 From: gopienkonikita Date: Wed, 29 Jun 2022 14:46:20 +0300 Subject: [PATCH 1/5] =?UTF-8?q?Fixed=20Bug=2057860=20-=20Client.Files.=20?= =?UTF-8?q?=E2=80=98Something=20went=20wrong=E2=80=99=20when=20clicking=20?= =?UTF-8?q?on=20the=20share=20icon=20after=20selected=20a=20row.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- products/ASC.Files/Client/src/HOCs/withFileActions.js | 4 ++-- products/ASC.Files/Client/src/store/FilesActionsStore.js | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/products/ASC.Files/Client/src/HOCs/withFileActions.js b/products/ASC.Files/Client/src/HOCs/withFileActions.js index e4aee239b1..533dfb58f4 100644 --- a/products/ASC.Files/Client/src/HOCs/withFileActions.js +++ b/products/ASC.Files/Client/src/HOCs/withFileActions.js @@ -18,14 +18,14 @@ export default function withFileActions(WrappedFileItem) { const { onSelectItem, item } = this.props; const { id, isFolder } = item; - id !== -1 && onSelectItem({ id, isFolder }); + id !== -1 && onSelectItem({ id, isFolder }, true, false); }; onFileContextClick = (withSelect) => { const { onSelectItem } = this.props; const { id, isFolder } = this.props.item; - id !== -1 && onSelectItem({ id, isFolder }, !withSelect, true); + id !== -1 && onSelectItem({ id, isFolder }, !withSelect); }; onHideContextMenu = () => { diff --git a/products/ASC.Files/Client/src/store/FilesActionsStore.js b/products/ASC.Files/Client/src/store/FilesActionsStore.js index 95d32137ff..ab2a58e694 100644 --- a/products/ASC.Files/Client/src/store/FilesActionsStore.js +++ b/products/ASC.Files/Client/src/store/FilesActionsStore.js @@ -493,7 +493,11 @@ class FilesActionStore { } }; - onSelectItem = ({ id, isFolder }, withSelect = true, isContextItem) => { + onSelectItem = ( + { id, isFolder }, + withSelect = true, + isContextItem = true + ) => { const { setBufferSelection, setSelected, From 53fe0a309ad8a5b17ada851d5669b63edd865a18 Mon Sep 17 00:00:00 2001 From: Alexey Safronov Date: Wed, 29 Jun 2022 14:55:39 +0300 Subject: [PATCH 2/5] Fix Bug 57848 - Client.Clouds. Non-obvious button to go to the third-party storage folder from the Connected Clouds page. --- .../Client/src/pages/Settings/Section/Body/ConnectedClouds.js | 1 + 1 file changed, 1 insertion(+) diff --git a/products/ASC.Files/Client/src/pages/Settings/Section/Body/ConnectedClouds.js b/products/ASC.Files/Client/src/pages/Settings/Section/Body/ConnectedClouds.js index 1b468e6cf3..5b7226f4b6 100644 --- a/products/ASC.Files/Client/src/pages/Settings/Section/Body/ConnectedClouds.js +++ b/products/ASC.Files/Client/src/pages/Settings/Section/Body/ConnectedClouds.js @@ -250,6 +250,7 @@ class ConnectClouds extends React.Component { type="page" title={item.customer_title} //color={theme.filesSettings.linkColor} + isHovered={true} color="#A3A9AE" fontSize="11px" fontWeight={400} From 5f6851253f6a8e5bdaa3356c7bbf160a66e8b0b0 Mon Sep 17 00:00:00 2001 From: pavelbannov Date: Wed, 29 Jun 2022 15:10:56 +0300 Subject: [PATCH 3/5] fix bug 57725 --- common/ASC.Common/Caching/KafkaCache.cs | 2 +- .../Notify/StudioNotifyServiceHelper.cs | 87 +++++++---------- .../Notify/StudioNotifyServiceSender.cs | 94 ++++++++----------- 3 files changed, 75 insertions(+), 108 deletions(-) diff --git a/common/ASC.Common/Caching/KafkaCache.cs b/common/ASC.Common/Caching/KafkaCache.cs index 07a97b9aad..d985eb7d24 100644 --- a/common/ASC.Common/Caching/KafkaCache.cs +++ b/common/ASC.Common/Caching/KafkaCache.cs @@ -210,7 +210,7 @@ namespace ASC.Common.Caching private string GetChannelName(CacheNotifyAction cacheNotifyAction) { - return $"ascchannel{cacheNotifyAction}{typeof(T).FullName}".ToLower(); + return $"ascchannel{cacheNotifyAction}{typeof(T).FullName}".ToLowerInvariant(); } public void Unsubscribe(CacheNotifyAction action) diff --git a/web/ASC.Web.Core/Notify/StudioNotifyServiceHelper.cs b/web/ASC.Web.Core/Notify/StudioNotifyServiceHelper.cs index 5fc6334672..7d38870a57 100644 --- a/web/ASC.Web.Core/Notify/StudioNotifyServiceHelper.cs +++ b/web/ASC.Web.Core/Notify/StudioNotifyServiceHelper.cs @@ -1,5 +1,4 @@ -using System; -using System.Linq; +using System.Linq; using ASC.Common; using ASC.Common.Caching; @@ -18,8 +17,6 @@ namespace ASC.Web.Core.Notify [Scope] public class StudioNotifyServiceHelper { - private readonly ILog _log; - private ICacheNotify Cache { get; } private StudioNotifyHelper StudioNotifyHelper { get; } private AuthContext AuthContext { get; } @@ -39,7 +36,6 @@ namespace ASC.Web.Core.Notify TenantManager = tenantManager; CommonLinkUtility = commonLinkUtility; Cache = cache; - _log = options.CurrentValue; } public void SendNoticeToAsync(INotifyAction action, IRecipient[] recipients, string[] senderNames, params ITagValue[] args) @@ -82,62 +78,51 @@ namespace ASC.Web.Core.Notify public void SendNoticeToAsync(INotifyAction action, string objectID, IRecipient[] recipients, string[] senderNames, bool checkSubsciption, params ITagValue[] args) { - try + var item = new NotifyItem { - _log.Debug("SendNoticeToAsync begin"); - var item = new NotifyItem - { - TenantId = TenantManager.GetCurrentTenant().TenantId, - UserId = AuthContext.CurrentAccount.ID.ToString(), - Action = (NotifyAction)action, - CheckSubsciption = checkSubsciption, - BaseUrl = CommonLinkUtility.GetFullAbsolutePath("") - }; + TenantId = TenantManager.GetCurrentTenant().TenantId, + UserId = AuthContext.CurrentAccount.ID.ToString(), + Action = (NotifyAction)action, + CheckSubsciption = checkSubsciption, + BaseUrl = CommonLinkUtility.GetFullAbsolutePath("") + }; - if (objectID != null) - { - item.ObjectId = objectID; - } + if (objectID != null) + { + item.ObjectId = objectID; + } - if (recipients != null) + if (recipients != null) + { + foreach (var r in recipients) { - foreach (var r in recipients) + var recipient = new Recipient { Id = r.ID, Name = r.Name }; + if (r is IDirectRecipient d) { - var recipient = new Recipient { Id = r.ID, Name = r.Name }; - if (r is IDirectRecipient d) - { - recipient.Addresses.AddRange(d.Addresses); - recipient.CheckActivation = d.CheckActivation; - } - - if (r is IRecipientsGroup g) - { - recipient.IsGroup = true; - } - - item.Recipients.Add(recipient); + recipient.Addresses.AddRange(d.Addresses); + recipient.CheckActivation = d.CheckActivation; } + + if (r is IRecipientsGroup g) + { + recipient.IsGroup = true; + } + + item.Recipients.Add(recipient); } - - _log.Debug("SendNoticeToAsync middle"); - - if (senderNames != null) - { - item.SenderNames.AddRange(senderNames); - } - - if (args != null) - { - item.Tags.AddRange(args.Select(r => new Tag { Tag_ = r.Tag, Value = r.Value.ToString() })); - } - - Cache.Publish(item, CacheNotifyAction.Any); - _log.Debug("SendNoticeToAsync end"); } - catch (Exception e) + + if (senderNames != null) { - _log.Error("SendNoticeToAsync", e); + item.SenderNames.AddRange(senderNames); } + + if (args != null) + { + item.Tags.AddRange(args.Select(r => new Tag { Tag_ = r.Tag, Value = r.Value.ToString() })); + } + + Cache.Publish(item, CacheNotifyAction.Any); } } } \ No newline at end of file diff --git a/web/ASC.Web.Core/Notify/StudioNotifyServiceSender.cs b/web/ASC.Web.Core/Notify/StudioNotifyServiceSender.cs index f6d4928eb8..bf7d56afe9 100644 --- a/web/ASC.Web.Core/Notify/StudioNotifyServiceSender.cs +++ b/web/ASC.Web.Core/Notify/StudioNotifyServiceSender.cs @@ -31,7 +31,6 @@ using System.Threading; using ASC.Common; using ASC.Common.Caching; -using ASC.Common.Logging; using ASC.Core; using ASC.Core.Common; using ASC.Core.Configuration; @@ -42,7 +41,6 @@ using ASC.Web.Studio.Utility; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Options; namespace ASC.Web.Studio.Core.Notify { @@ -64,65 +62,49 @@ namespace ASC.Web.Studio.Core.Notify public void OnMessage(NotifyItem item) { using var scope = ServiceProvider.CreateScope(); - var log = scope.ServiceProvider.GetService>().CurrentValue; - try + var commonLinkUtilitySettings = scope.ServiceProvider.GetService(); + commonLinkUtilitySettings.ServerUri = item.BaseUrl; + var scopeClass = scope.ServiceProvider.GetService(); + var (tenantManager, userManager, securityContext, studioNotifyHelper, _, _) = scopeClass; + tenantManager.SetCurrentTenant(item.TenantId); + CultureInfo culture = null; + + var client = WorkContext.NotifyContext.NotifyService.RegisterClient(studioNotifyHelper.NotifySource, scope); + + var tenant = tenantManager.GetCurrentTenant(false); + + if (tenant != null) { - log.Debug("onMessage try");//temp - - var commonLinkUtilitySettings = scope.ServiceProvider.GetService(); - commonLinkUtilitySettings.ServerUri = item.BaseUrl; - var scopeClass = scope.ServiceProvider.GetService(); - var (tenantManager, userManager, securityContext, studioNotifyHelper, _, _) = scopeClass; - tenantManager.SetCurrentTenant(item.TenantId); - CultureInfo culture = null; - - var client = WorkContext.NotifyContext.NotifyService.RegisterClient(studioNotifyHelper.NotifySource, scope); - - var tenant = tenantManager.GetCurrentTenant(false); - - if (tenant != null) - { - culture = tenant.GetCulture(); - } - - if (Guid.TryParse(item.UserId, out var userId) && !userId.Equals(Constants.Guest.ID) && !userId.Equals(Guid.Empty)) - { - securityContext.AuthenticateMeWithoutCookie(Guid.Parse(item.UserId)); - var user = userManager.GetUsers(userId); - if (!string.IsNullOrEmpty(user.CultureName)) - { - culture = CultureInfo.GetCultureInfo(user.CultureName); - } - } - - log.Debug("onMessage UserId");//temp - - if (culture != null && !Equals(Thread.CurrentThread.CurrentCulture, culture)) - { - Thread.CurrentThread.CurrentCulture = culture; - } - if (culture != null && !Equals(Thread.CurrentThread.CurrentUICulture, culture)) - { - Thread.CurrentThread.CurrentUICulture = culture; - } - - log.Debug("onMessage culture");//temp - - client.SendNoticeToAsync( - (NotifyAction)item.Action, - item.ObjectId, - item.Recipients?.Select(r => r.IsGroup ? new RecipientsGroup(r.Id, r.Name) : (IRecipient)new DirectRecipient(r.Id, r.Name, r.Addresses.ToArray(), r.CheckActivation)).ToArray(), - item.SenderNames.Count > 0 ? item.SenderNames.ToArray() : null, - item.CheckSubsciption, - item.Tags.Select(r => new TagValue(r.Tag_, r.Value)).ToArray()); - - log.Debug("onMessage send");//temp + culture = tenant.GetCulture(); } - catch (Exception e) + + if (Guid.TryParse(item.UserId, out var userId) && !userId.Equals(Constants.Guest.ID) && !userId.Equals(Guid.Empty)) { - log.Error("onMessage", e); + securityContext.AuthenticateMeWithoutCookie(Guid.Parse(item.UserId)); + var user = userManager.GetUsers(userId); + if (!string.IsNullOrEmpty(user.CultureName)) + { + culture = CultureInfo.GetCultureInfo(user.CultureName); + } } + + if (culture != null && !Equals(Thread.CurrentThread.CurrentCulture, culture)) + { + Thread.CurrentThread.CurrentCulture = culture; + } + if (culture != null && !Equals(Thread.CurrentThread.CurrentUICulture, culture)) + { + Thread.CurrentThread.CurrentUICulture = culture; + } + + client.SendNoticeToAsync( + (NotifyAction)item.Action, + item.ObjectId, + item.Recipients?.Select(r => r.IsGroup ? new RecipientsGroup(r.Id, r.Name) : (IRecipient)new DirectRecipient(r.Id, r.Name, r.Addresses.ToArray(), r.CheckActivation)).ToArray(), + item.SenderNames.Count > 0 ? item.SenderNames.ToArray() : null, + item.CheckSubsciption, + item.Tags.Select(r => new TagValue(r.Tag_, r.Value)).ToArray()); } public void RegisterSendMethod() From b807959aa8a0e94f45390492a8686b2955291ae4 Mon Sep 17 00:00:00 2001 From: Viktor Fomin Date: Wed, 29 Jun 2022 15:42:21 +0300 Subject: [PATCH 4/5] Fix Bug 57853: audio files can't open --- .../ASC.Files/Client/src/pages/Home/MediaViewer/index.js | 8 ++++++-- products/ASC.Files/Client/src/store/SettingsStore.js | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/products/ASC.Files/Client/src/pages/Home/MediaViewer/index.js b/products/ASC.Files/Client/src/pages/Home/MediaViewer/index.js index 20543cf271..1bfb8eac02 100644 --- a/products/ASC.Files/Client/src/pages/Home/MediaViewer/index.js +++ b/products/ASC.Files/Client/src/pages/Home/MediaViewer/index.js @@ -32,6 +32,7 @@ const FilesMediaViewer = (props) => { setScrollToItem, setCurrentId, setBufferSelection, + mediaViewerAudioFormats, } = props; useEffect(() => { @@ -148,6 +149,8 @@ const FilesMediaViewer = (props) => { } }; + const mediaFormats = [...mediaViewerMediaFormats, ...mediaViewerAudioFormats]; + return ( visible && ( { onClose={onMediaViewerClose} onEmptyPlaylistError={onMediaViewerClose} deleteDialogVisible={deleteDialogVisible} - extsMediaPreviewed={mediaViewerMediaFormats} //TODO: + extsMediaPreviewed={mediaFormats} //TODO: extsImagePreviewed={mediaViewerImageFormats} //TODO: errorLabel={t("Translations:MediaLoadError")} isPreviewFile={!!previewFile} @@ -201,7 +204,7 @@ export default inject( setCurrentId, } = mediaViewerDataStore; const { deleteItemAction } = filesActionsStore; - const { extsVideo, extsImage } = settingsStore; + const { extsVideo, extsImage, extsAudio } = settingsStore; const { expandedKeys, setExpandedKeys } = treeFoldersStore; return { @@ -214,6 +217,7 @@ export default inject( setMediaViewerData, mediaViewerImageFormats: extsImage, mediaViewerMediaFormats: extsVideo, + mediaViewerAudioFormats: extsAudio, setRemoveMediaItem: dialogsStore.setRemoveMediaItem, deleteDialogVisible: dialogsStore.deleteDialogVisible, fetchFiles, diff --git a/products/ASC.Files/Client/src/store/SettingsStore.js b/products/ASC.Files/Client/src/store/SettingsStore.js index 4f1c549788..64ab0601d5 100644 --- a/products/ASC.Files/Client/src/store/SettingsStore.js +++ b/products/ASC.Files/Client/src/store/SettingsStore.js @@ -235,7 +235,8 @@ class SettingsStore { isMediaOrImage = (fileExst) => { if ( this.extsVideo.includes(fileExst) || - this.extsImage.includes(fileExst) + this.extsImage.includes(fileExst) || + this.extsAudio.includes(fileExst) ) { return true; } From 21f8cb54a12b621692683e565b7c490e51d2e1e1 Mon Sep 17 00:00:00 2001 From: Tatiana Lopaeva Date: Wed, 29 Jun 2022 16:16:51 +0300 Subject: [PATCH 5/5] Fixed Bug 57842: Components: Added a different svg color for the dark theme. --- packages/asc-web-components/themes/dark.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/asc-web-components/themes/dark.js b/packages/asc-web-components/themes/dark.js index 1bc322519d..0983bf8eb0 100644 --- a/packages/asc-web-components/themes/dark.js +++ b/packages/asc-web-components/themes/dark.js @@ -2357,7 +2357,7 @@ const Dark = { borderBottom: "1px solid #474747", borderTop: "1px solid #474747", externalLinkBackground: "#292929", - externalLinkSvg: "#858585", + externalLinkSvg: "#eeeeee", internalLinkBorder: "1px dashed #eeeeee",