Merge branch 'develop' into feature/split-invite
This commit is contained in:
commit
73118da8f2
@ -51,6 +51,7 @@ const ArticleBodyContent = (props) => {
|
||||
selectedFolderId,
|
||||
showArticleLoader,
|
||||
setIsBurgerLoading,
|
||||
setSelection,
|
||||
} = props;
|
||||
|
||||
const navigate = useNavigate();
|
||||
@ -80,6 +81,8 @@ const ArticleBodyContent = (props) => {
|
||||
|
||||
let withTimer = !!selectedFolderId;
|
||||
|
||||
setSelection && setSelection([]);
|
||||
|
||||
switch (folderId) {
|
||||
case myFolderId:
|
||||
const myFilter = FilesFilter.getDefault();
|
||||
@ -158,6 +161,7 @@ const ArticleBodyContent = (props) => {
|
||||
activeItemId,
|
||||
selectedFolderId,
|
||||
isAccounts,
|
||||
setSelection,
|
||||
]
|
||||
);
|
||||
|
||||
@ -263,7 +267,7 @@ export default inject(
|
||||
selectedFolderStore,
|
||||
clientLoadingStore,
|
||||
}) => {
|
||||
const { clearFiles } = filesStore;
|
||||
const { clearFiles, setSelection } = filesStore;
|
||||
const {
|
||||
showArticleLoader,
|
||||
|
||||
@ -319,6 +323,7 @@ export default inject(
|
||||
clearFiles,
|
||||
selectedFolderId,
|
||||
setIsBurgerLoading,
|
||||
setSelection,
|
||||
};
|
||||
}
|
||||
)(withTranslation([])(observer(ArticleBodyContent)));
|
||||
|
@ -126,14 +126,12 @@ const InfoPanelHeaderContent = (props) => {
|
||||
style={{ width: "100%" }}
|
||||
data={roomsSubmenu}
|
||||
forsedActiveItemId={roomsView}
|
||||
scale={true}
|
||||
/>
|
||||
) : (
|
||||
<Submenu
|
||||
style={{ width: "100%" }}
|
||||
data={personalSubmenu}
|
||||
forsedActiveItemId={fileView}
|
||||
scale={true}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
|
@ -35,7 +35,7 @@ const SingleSignOn = (props) => {
|
||||
setDocumentTitle(t("Settings:SingleSignOn"));
|
||||
}, []);
|
||||
|
||||
if (!isInit) return <SSOLoader />;
|
||||
if (!isInit && isSSOAvailable) return <SSOLoader />;
|
||||
|
||||
return (
|
||||
<StyledSsoPage
|
||||
|
@ -65,7 +65,7 @@ class ConsumerItem extends React.Component {
|
||||
isThirdPartyAvailable,
|
||||
} = this.props;
|
||||
|
||||
const logo = thirdpartiesLogo.get(`${consumer.name.toLowerCase()}.svg`);
|
||||
const logo = thirdpartiesLogo?.get(`${consumer.name.toLowerCase()}.svg`);
|
||||
|
||||
return (
|
||||
<StyledItem isThirdPartyAvailable={isThirdPartyAvailable}>
|
||||
@ -84,11 +84,13 @@ class ConsumerItem extends React.Component {
|
||||
isLinkedIn={consumer.name === "linkedin"}
|
||||
isThirdPartyAvailable={isThirdPartyAvailable}
|
||||
>
|
||||
<ReactSVG
|
||||
src={logo}
|
||||
className={"consumer-icon"}
|
||||
alt={consumer.name}
|
||||
/>
|
||||
{logo && (
|
||||
<ReactSVG
|
||||
src={logo}
|
||||
className={"consumer-icon"}
|
||||
alt={consumer.name}
|
||||
/>
|
||||
)}
|
||||
</StyledBox>
|
||||
<Box onClick={setConsumer} data-consumer={consumer.name}>
|
||||
<ConsumerToggle
|
||||
|
@ -2136,7 +2136,7 @@ class FilesActionStore {
|
||||
};
|
||||
|
||||
onClickBack = () => {
|
||||
const { roomType } = this.selectedFolderStore;
|
||||
const { roomType, ...rest } = this.selectedFolderStore;
|
||||
const { setSelectedNode } = this.treeFoldersStore;
|
||||
const { clearFiles } = this.filesStore;
|
||||
|
||||
@ -2181,19 +2181,19 @@ class FilesActionStore {
|
||||
|
||||
setSelectedNode(["common"]);
|
||||
|
||||
return navigate(path, { replace: true });
|
||||
return window.DocSpace.navigate(path, { replace: true });
|
||||
}
|
||||
|
||||
if (categoryType === CategoryType.Accounts) {
|
||||
const accountsFilter = AccountsFilter.getDefault();
|
||||
params = accountsFilter.toUrlParams();
|
||||
const params = accountsFilter.toUrlParams();
|
||||
const path = getCategoryUrl(CategoryType.Accounts);
|
||||
|
||||
clearFiles();
|
||||
|
||||
setSelectedNode(["accounts", "filter"]);
|
||||
|
||||
return navigate(`${path}?${params}`, { replace: true });
|
||||
return window.DocSpace.navigate(`${path}?${params}`, { replace: true });
|
||||
}
|
||||
};
|
||||
|
||||
@ -2202,13 +2202,22 @@ class FilesActionStore {
|
||||
|
||||
const filter = RoomsFilter.getDefault();
|
||||
|
||||
const path = getCategoryUrl(categoryType);
|
||||
const correctCategoryType =
|
||||
categoryType === CategoryType.SharedRoom
|
||||
? CategoryType.Shared
|
||||
: CategoryType.ArchivedRoom === categoryType
|
||||
? CategoryType.Archive
|
||||
: categoryType;
|
||||
|
||||
const path = getCategoryUrl(correctCategoryType);
|
||||
|
||||
const state = {
|
||||
title:
|
||||
this.selectedFolderStore?.navigationPath[
|
||||
this.selectedFolderStore?.navigationPath.length - 1
|
||||
]?.title || "",
|
||||
(this.selectedFolderStore?.navigationPath &&
|
||||
this.selectedFolderStore?.navigationPath[
|
||||
this.selectedFolderStore?.navigationPath?.length - 1
|
||||
]?.title) ||
|
||||
"",
|
||||
isRoot: true,
|
||||
rootFolderType: this.selectedFolderStore.rootFolderType,
|
||||
};
|
||||
@ -2255,7 +2264,7 @@ class FilesActionStore {
|
||||
setIsSectionFilterLoading(param);
|
||||
};
|
||||
|
||||
let id = this.selectedFolderStore.parentId;
|
||||
const id = this.selectedFolderStore.parentId;
|
||||
|
||||
const { navigationPath, rootFolderType } = this.selectedFolderStore;
|
||||
|
||||
@ -2263,16 +2272,19 @@ class FilesActionStore {
|
||||
|
||||
filter.folder = id;
|
||||
|
||||
const categoryType = getCategoryType(window.DocSpace.location);
|
||||
const path = getCategoryUrl(categoryType, id);
|
||||
|
||||
const state = {
|
||||
title: navigationPath[0]?.title || "",
|
||||
title: (navigationPath && navigationPath[0]?.title) || "",
|
||||
isRoot: navigationPath.length === 1,
|
||||
rootFolderType: rootFolderType,
|
||||
};
|
||||
|
||||
window.DocSpace.navigate(
|
||||
`${window.DocSpace.location.pathname}?${filter.toUrlParams()}`,
|
||||
{ state, replace: true }
|
||||
);
|
||||
window.DocSpace.navigate(`${path}?${filter.toUrlParams()}`, {
|
||||
state,
|
||||
replace: true,
|
||||
});
|
||||
};
|
||||
|
||||
setGroupMenuBlocked = (blocked) => {
|
||||
|
@ -21,7 +21,6 @@ const Submenu = (props) => {
|
||||
startSelect = 0,
|
||||
forsedActiveItemId,
|
||||
onSelect,
|
||||
scale,
|
||||
...rest
|
||||
} = props;
|
||||
if (!data) return null;
|
||||
@ -106,7 +105,7 @@ const Submenu = (props) => {
|
||||
<div className="sticky">
|
||||
<SubmenuRoot>
|
||||
<SubmenuScrollbarSize />
|
||||
<SubmenuScroller scale={scale}>
|
||||
<SubmenuScroller>
|
||||
<StyledSubmenuItems ref={submenuItemsRef} role="list">
|
||||
{data.map((d) => {
|
||||
const isActive =
|
||||
@ -145,10 +144,9 @@ const Submenu = (props) => {
|
||||
);
|
||||
})}
|
||||
</StyledSubmenuItems>
|
||||
{!scale && <StyledSubmenuBottomLine className="bottom-line" />}
|
||||
</SubmenuScroller>
|
||||
</SubmenuRoot>
|
||||
{scale && <StyledSubmenuBottomLine className="bottom-line" />}
|
||||
<StyledSubmenuBottomLine className="bottom-line" />
|
||||
</div>
|
||||
<div className="sticky-indent"></div>
|
||||
|
||||
@ -166,8 +164,6 @@ Submenu.propTypes = {
|
||||
startSelect: PropTypes.oneOfType([PropTypes.object, PropTypes.number]),
|
||||
/** Property that allows explicitly selecting content passed through an external operation */
|
||||
forsedActiveItemId: PropTypes.any,
|
||||
/** Scales the width of the bottom line to 100%. */
|
||||
scale: PropTypes.bool,
|
||||
/** Sets a callback function that is triggered when the submenu item is selected */
|
||||
onSelect: PropTypes.func,
|
||||
};
|
||||
|
@ -128,13 +128,6 @@ export const SubmenuScroller = styled.div`
|
||||
}
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
|
||||
${(props) =>
|
||||
!props.scale &&
|
||||
css`
|
||||
display: grid;
|
||||
flex: 0 1 auto;
|
||||
`}
|
||||
`;
|
||||
|
||||
export const SubmenuRoot = styled.div`
|
||||
|
@ -31,4 +31,6 @@ public class OFormSettings
|
||||
public string Url { get; set; }
|
||||
public int Period { get; set; }
|
||||
public string Ext { get; set; }
|
||||
|
||||
public OFormSettings Upload { get; set; }
|
||||
}
|
||||
|
@ -61,6 +61,8 @@ public class SettingsController : BaseSettingsController
|
||||
private readonly TenantDomainValidator _tenantDomainValidator;
|
||||
private readonly QuotaSyncOperation _quotaSyncOperation;
|
||||
private readonly ExternalShare _externalShare;
|
||||
private readonly ConfigurationExtension _configurationExtension;
|
||||
private readonly IMapper _mapper;
|
||||
|
||||
public SettingsController(
|
||||
ILoggerProvider option,
|
||||
@ -95,8 +97,10 @@ public class SettingsController : BaseSettingsController
|
||||
CustomColorThemesSettingsHelper customColorThemesSettingsHelper,
|
||||
QuotaSyncOperation quotaSyncOperation,
|
||||
QuotaUsageManager quotaUsageManager,
|
||||
TenantDomainValidator tenantDomainValidator,
|
||||
ExternalShare externalShare
|
||||
TenantDomainValidator tenantDomainValidator,
|
||||
ExternalShare externalShare,
|
||||
ConfigurationExtension configurationExtension,
|
||||
IMapper mapper
|
||||
) : base(apiContext, memoryCache, webItemManager, httpContextAccessor)
|
||||
{
|
||||
_log = option.CreateLogger("ASC.Api");
|
||||
@ -129,6 +133,8 @@ public class SettingsController : BaseSettingsController
|
||||
_quotaUsageManager = quotaUsageManager;
|
||||
_tenantDomainValidator = tenantDomainValidator;
|
||||
_externalShare = externalShare;
|
||||
_configurationExtension = configurationExtension;
|
||||
_mapper = mapper;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -225,13 +231,8 @@ public class SettingsController : BaseSettingsController
|
||||
|
||||
settings.Plugins.Allow = _configuration.GetSection("plugins:allow").Get<List<string>>() ?? new List<string>();
|
||||
|
||||
settings.FormGallery = new FormGalleryDto
|
||||
{
|
||||
Url = _configuration["files:oform:url"] ?? "",
|
||||
Ext = _configuration["files:oform:ext"] ?? "",
|
||||
UploadUrl = _configuration["files:oform:upload:url"] ?? "",
|
||||
UploadExt = _configuration["files:oform:upload:ext"] ?? ""
|
||||
};
|
||||
var formGallerySettings = _configurationExtension.GetSetting<OFormSettings>("files:oform");
|
||||
settings.FormGallery = _mapper.Map<FormGalleryDto>(formGallerySettings);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -612,7 +613,7 @@ public class SettingsController : BaseSettingsController
|
||||
catch
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
_semaphore.Release();
|
||||
@ -655,7 +656,7 @@ public class SettingsController : BaseSettingsController
|
||||
if (settings.Selected == id)
|
||||
{
|
||||
settings.Selected = settings.Themes.Min(r => r.Id);
|
||||
await _messageService.SendAsync(MessageAction.ColorThemeChanged);
|
||||
await _messageService.SendAsync(MessageAction.ColorThemeChanged);
|
||||
}
|
||||
|
||||
await _settingsManager.SaveAsync(settings);
|
||||
@ -1067,7 +1068,7 @@ public class SettingsController : BaseSettingsController
|
||||
[HttpGet("telegramisconnected")]
|
||||
public async Task<object> TelegramIsConnectedAsync()
|
||||
{
|
||||
return (int) await _telegramHelper.UserIsConnectedAsync(_authContext.CurrentAccount.ID, Tenant.Id);
|
||||
return (int)await _telegramHelper.UserIsConnectedAsync(_authContext.CurrentAccount.ID, Tenant.Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
namespace ASC.Web.Api.ApiModel.ResponseDto;
|
||||
|
||||
public class FormGalleryDto
|
||||
public class FormGalleryDto : IMapFrom<OFormSettings>
|
||||
{
|
||||
public string Url { get; set; }
|
||||
public string Ext { get; set; }
|
||||
|
@ -98,6 +98,7 @@ global using ASC.Files.Core.EF;
|
||||
global using ASC.Files.Core.Helpers;
|
||||
global using ASC.Files.Core.Resources;
|
||||
global using ASC.Files.Core.Security;
|
||||
global using ASC.Files.Core.Services.OFormService;
|
||||
global using ASC.Files.Core.VirtualRooms;
|
||||
global using ASC.Geolocation;
|
||||
global using ASC.IPSecurity;
|
||||
|
Loading…
Reference in New Issue
Block a user