Merge branch 'release/1.0.0' of github.com:ONLYOFFICE/AppServer into release/1.0.0
This commit is contained in:
commit
81154bd2dd
9
products/ASC.Files/Client/public/images/cursor.palm.svg
Normal file
9
products/ASC.Files/Client/public/images/cursor.palm.svg
Normal file
@ -0,0 +1,9 @@
|
||||
<svg width="22" height="26" viewBox="0 0 22 26" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<rect x="1" width="21" height="26" fill="url(#pattern0)"/>
|
||||
<defs>
|
||||
<pattern id="pattern0" patternContentUnits="objectBoundingBox" width="1" height="1">
|
||||
<use xlink:href="#image0" transform="scale(0.047619 0.0384615)"/>
|
||||
</pattern>
|
||||
<image id="image0" width="21" height="26" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAaCAYAAABYQRdDAAACpklEQVRIibVVz2sTURD+dtMqCilC40H0IvYieNGLLQVJQhMLRaSKtQiepSDiuVjBg+DBP6Ap6EHFnwgiFUlbQy+2lW6kKgUv0RYKFgyEJERj9sfIbN5bnsl22SoODG92M/n2++a9eaMREYJM07psADpRRQtMFKZpGsCgi0uGu0rn3xgIiNokrD8+vMDPQJTUXD9SHX5fS6TOZ4lIm5977b17Oz/XR1RBPv/RZU9UiWzJlr+UTI+q72ZyM49TaEoHA6mx4ziIRPZALYcrWbUm/ajqnuSWmGzbJtM03fjylXGSpWizvwUtl8tUKpWoWWdExD64pofZ0RCm+4BW/xV0h8pWYVqV4Cr7MEo45xCAvQB2QTlSuiLB2WZZOL8hYpVp1IwPnMs+ePT0xDbAVGOGOwF0ukw1rYvEWUwm06NJNVOeURlblgXbtv1AOwRgRNCNkvpn9cB7+hzHdQZkZ3D5HIsddIBqP4AygCKA7+5FkUiN5CTA+MREaECORR07hOteTUfODj1LD12Y5fjM6ZOhAQUoGwe22DTZUejs3n/sq2F8kA3kdU+9XqdareZ1ULFYpM3NTdrY2KCX01k60NP7BcBxAIcBxKAcHfvm9au3rt24HZohx4vvVjCY6F0QDC3JVII65NTuL79fXVs2VkIB8pq58/CbrtffCEBTrFAvWW0yc+/S4KmLgZLX19epUCjQ8xfTUnofgCMA9gHYjZbOIcnWMD4FMuTVyK9K6ZboqIbYrD/bcWxsrM61fZXNBQKyt0hvCPntoLK2U3efrAUB8gdNy9amMpOfBVhD3Si/waXHB0ZmxZDb0vvjw0sAjgLoAdAtet+9UNwZ1TZjmn3MlwSPAl75vvQzZvhD3Jk/5e77TlNRmzoLEclbTU7OY/m/POn/xQD8BpP9ctoIZHyxAAAAAElFTkSuQmCC"/>
|
||||
</defs>
|
||||
</svg>
|
After Width: | Height: | Size: 1.4 KiB |
@ -15,6 +15,7 @@ const AccessComboBox = (props) => {
|
||||
onAccessChange,
|
||||
t,
|
||||
arrowIconColor,
|
||||
disableLink,
|
||||
} = props;
|
||||
const {
|
||||
FullAccess,
|
||||
@ -100,7 +101,8 @@ const AccessComboBox = (props) => {
|
||||
</>
|
||||
);
|
||||
|
||||
const accessIconUrl = getAccessIcon(access);
|
||||
const accessRights = disableLink ? ReadOnly : access;
|
||||
const accessIconUrl = getAccessIcon(accessRights);
|
||||
const selectedOption = arrowIconColor
|
||||
? { key: 0, arrowIconColor }
|
||||
: { key: 0 };
|
||||
|
@ -55,6 +55,7 @@ class LinkRow extends React.Component {
|
||||
onAccessChange={onChangeItemAccess}
|
||||
itemId={item.sharedTo.id}
|
||||
isDisabled={isDisabled}
|
||||
disableLink={disableLink}
|
||||
/>
|
||||
) : (
|
||||
<StyledAccessEditIcon
|
||||
|
@ -13,7 +13,7 @@ import ItemIcon from "../../../../../components/ItemIcon";
|
||||
|
||||
const StyledSimpleFilesRow = styled(Row)`
|
||||
background: ${(props) => props.checked && "#f8f9f9"};
|
||||
cursor: ${(props) => props.checked && "grab"};
|
||||
cursor: ${(props) => props.checked && `url(images/cursor.palm.svg), auto`};
|
||||
margin-top: -2px;
|
||||
${(props) =>
|
||||
!props.contextOptions &&
|
||||
|
@ -25,7 +25,7 @@ const { acceptBackground, background } = Base.dragAndDrop;
|
||||
const StyledTableRow = styled(TableRow)`
|
||||
.table-container_cell {
|
||||
background: ${(props) => props.checked && "#f8f9f9 !important"};
|
||||
cursor: ${(props) => props.checked && "grab"};
|
||||
cursor: ${(props) => props.checked && "url(images/cursor.palm.svg), auto"};
|
||||
}
|
||||
`;
|
||||
|
||||
|
@ -82,7 +82,7 @@ namespace ASC.Web.Files.Services.DocumentService
|
||||
)
|
||||
{
|
||||
Document = serviceProvider.GetService<DocumentConfig<T>>();
|
||||
Document.Info.File = file;
|
||||
Document.Info.SetFile(file);
|
||||
EditorConfig = serviceProvider.GetService<EditorConfiguration<T>>();
|
||||
EditorConfig.SetConfiguration(this);
|
||||
}
|
||||
@ -123,7 +123,7 @@ namespace ASC.Web.Files.Services.DocumentService
|
||||
get
|
||||
{
|
||||
if (_fileTypeCache == FileType.Unknown)
|
||||
_fileTypeCache = FileUtility.GetFileTypeByFileName(Document.Info.File.Title);
|
||||
_fileTypeCache = FileUtility.GetFileTypeByFileName(Document.Info.GetFile().Title);
|
||||
return _fileTypeCache;
|
||||
}
|
||||
}
|
||||
@ -161,7 +161,7 @@ namespace ASC.Web.Files.Services.DocumentService
|
||||
public string FileType
|
||||
{
|
||||
set { }
|
||||
get { return Info.File.ConvertedExtension.Trim('.'); }
|
||||
get { return Info.GetFile().ConvertedExtension.Trim('.'); }
|
||||
}
|
||||
|
||||
public InfoConfig<T> Info { get; set; }
|
||||
@ -177,7 +177,7 @@ namespace ASC.Web.Files.Services.DocumentService
|
||||
public string Title
|
||||
{
|
||||
set { _title = value; }
|
||||
get { return _title ?? Info.File.Title; }
|
||||
get { return _title ?? Info.GetFile().Title; }
|
||||
}
|
||||
|
||||
public string Url
|
||||
@ -188,7 +188,7 @@ namespace ASC.Web.Files.Services.DocumentService
|
||||
if (!string.IsNullOrEmpty(_fileUri))
|
||||
return _fileUri;
|
||||
var last = Permissions.Edit || Permissions.Review || Permissions.Comment;
|
||||
_fileUri = DocumentServiceConnector.ReplaceCommunityAdress(PathProvider.GetFileStreamUrl(Info.File, SharedLinkKey, last));
|
||||
_fileUri = DocumentServiceConnector.ReplaceCommunityAdress(PathProvider.GetFileStreamUrl(Info.GetFile(), SharedLinkKey, last));
|
||||
return _fileUri;
|
||||
}
|
||||
}
|
||||
@ -200,7 +200,10 @@ namespace ASC.Web.Files.Services.DocumentService
|
||||
[Transient]
|
||||
public class InfoConfig<T>
|
||||
{
|
||||
public File<T> File;
|
||||
private File<T> File;
|
||||
|
||||
public File<T> GetFile() => File;
|
||||
public void SetFile(File<T> file) => File = file;
|
||||
|
||||
public EditorType Type = EditorType.Desktop;
|
||||
private string _breadCrumbs;
|
||||
@ -486,7 +489,7 @@ namespace ASC.Web.Files.Services.DocumentService
|
||||
var files = entryManager.GetRecent(filter, false, Guid.Empty, string.Empty, false).Cast<File<int>>();
|
||||
|
||||
var listRecent = from file in files
|
||||
where !Equals(_configuration.Document.Info.File.ID, file.ID)
|
||||
where !Equals(_configuration.Document.Info.GetFile().ID, file.ID)
|
||||
select
|
||||
new RecentConfig
|
||||
{
|
||||
@ -720,8 +723,8 @@ namespace ASC.Web.Files.Services.DocumentService
|
||||
get
|
||||
{
|
||||
return FileUtility.CanForcesave
|
||||
&& !_configuration.Document.Info.File.ProviderEntry
|
||||
&& ThirdPartySelector.GetAppByFileId(_configuration.Document.Info.File.ID.ToString()) == null
|
||||
&& !_configuration.Document.Info.GetFile().ProviderEntry
|
||||
&& ThirdPartySelector.GetAppByFileId(_configuration.Document.Info.GetFile().ID.ToString()) == null
|
||||
&& FilesSettingsHelper.Forcesave;
|
||||
}
|
||||
}
|
||||
@ -744,13 +747,13 @@ namespace ASC.Web.Files.Services.DocumentService
|
||||
var folderDao = DaoFactory.GetFolderDao<T>();
|
||||
try
|
||||
{
|
||||
var parent = folderDao.GetFolder(_configuration.Document.Info.File.FolderID);
|
||||
var parent = folderDao.GetFolder(_configuration.Document.Info.GetFile().FolderID);
|
||||
var fileSecurity = FileSecurity;
|
||||
if (_configuration.Document.Info.File.RootFolderType == FolderType.USER
|
||||
&& !Equals(_configuration.Document.Info.File.RootFolderId, GlobalFolderHelper.FolderMy)
|
||||
if (_configuration.Document.Info.GetFile().RootFolderType == FolderType.USER
|
||||
&& !Equals(_configuration.Document.Info.GetFile().RootFolderId, GlobalFolderHelper.FolderMy)
|
||||
&& !fileSecurity.CanRead(parent))
|
||||
{
|
||||
if (fileSecurity.CanRead(_configuration.Document.Info.File))
|
||||
if (fileSecurity.CanRead(_configuration.Document.Info.GetFile()))
|
||||
{
|
||||
return new GobackConfig
|
||||
{
|
||||
@ -781,8 +784,8 @@ namespace ASC.Web.Files.Services.DocumentService
|
||||
get
|
||||
{
|
||||
return AuthContext.IsAuthenticated
|
||||
&& !_configuration.Document.Info.File.Encrypted
|
||||
&& FileSharing.CanSetAccess(_configuration.Document.Info.File);
|
||||
&& !_configuration.Document.Info.GetFile().Encrypted
|
||||
&& FileSharing.CanSetAccess(_configuration.Document.Info.GetFile());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -206,10 +206,10 @@ namespace ASC.Files.Helpers
|
||||
configuration.EditorType = EditorType.External;
|
||||
if (configuration.EditorConfig.ModeWrite)
|
||||
{
|
||||
configuration.EditorConfig.CallbackUrl = DocumentServiceTracker.GetCallbackUrl(configuration.Document.Info.File.ID.ToString());
|
||||
configuration.EditorConfig.CallbackUrl = DocumentServiceTracker.GetCallbackUrl(configuration.Document.Info.GetFile().ID.ToString());
|
||||
}
|
||||
|
||||
if (configuration.Document.Info.File.RootFolderType == FolderType.Privacy && PrivacyRoomSettings.GetEnabled(SettingsManager))
|
||||
if (configuration.Document.Info.GetFile().RootFolderType == FolderType.Privacy && PrivacyRoomSettings.GetEnabled(SettingsManager))
|
||||
{
|
||||
var keyPair = EncryptionKeyPairHelper.GetKeyPair();
|
||||
if (keyPair != null)
|
||||
@ -222,7 +222,7 @@ namespace ASC.Files.Helpers
|
||||
}
|
||||
}
|
||||
|
||||
if (!configuration.Document.Info.File.Encrypted && !configuration.Document.Info.File.ProviderEntry) EntryManager.MarkAsRecent(configuration.Document.Info.File);
|
||||
if (!configuration.Document.Info.GetFile().Encrypted && !configuration.Document.Info.GetFile().ProviderEntry) EntryManager.MarkAsRecent(configuration.Document.Info.GetFile());
|
||||
|
||||
configuration.Token = DocumentServiceHelper.GetSignature(configuration);
|
||||
return configuration;
|
||||
|
Loading…
Reference in New Issue
Block a user