Web: Files: hidden share menu, fixed download icon, fixed socket

This commit is contained in:
Nikita Gopienko 2023-05-24 17:05:30 +03:00
parent 99e9aa852d
commit 4438ec1066
3 changed files with 12 additions and 9 deletions

View File

@ -63,7 +63,8 @@ const QuickButtons = (props) => {
const isAvailableLockFile =
!folderCategory && fileExst && displayBadges && item.security.Lock;
const isAvailableDownloadFile = isPublicRoom && item.security.Download;
const isAvailableDownloadFile =
isPublicRoom && item.security.Download && viewAs === "tile";
return (
<div className="badges additional-badges">

View File

@ -104,12 +104,12 @@ const LinkRow = (props) => {
key: "edit-link-separator",
isSeparator: true,
},
{
key: "share-key",
label: t("Files:Share"),
icon: ShareReactSvgUrl,
// onClick: () => args.onClickLabel("label2"),
},
// {
// key: "share-key",
// label: t("Files:Share"),
// icon: ShareReactSvgUrl,
// // onClick: () => args.onClickLabel("label2"),
// },
{
key: "embedding-settings-key",
label: t("Files:EmbeddingSettings"),

View File

@ -440,10 +440,12 @@ export function createHtmlFileInCommon(title, content) {
return request(options);
}
export function getFileInfo(fileId) {
export function getFileInfo(fileId, publicKey) {
const key = publicKey ? `?share=${publicKey}` : "";
const options = {
method: "get",
url: `/files/file/${fileId}`,
url: `/files/file/${fileId}${key}`,
};
return request(options);