Web: VDR-lifetime: added changeRoomLifetime, fixed header tooltip
This commit is contained in:
parent
bda0c950a1
commit
eceba70e98
@ -249,7 +249,11 @@ const EditRoomEvent = ({
|
||||
if (withPaging) await updateCurrentFolder(null, currentFolderId);
|
||||
|
||||
if (item.id === currentFolderId) {
|
||||
updateEditedSelectedRoom(editRoomParams.title, tags);
|
||||
updateEditedSelectedRoom(
|
||||
editRoomParams.title,
|
||||
tags,
|
||||
roomParams.lifetime,
|
||||
);
|
||||
if (item.logo.original && !roomParams.icon.uploadedFile) {
|
||||
removeLogoPaths();
|
||||
// updateInfoPanelSelection();
|
||||
|
@ -953,7 +953,7 @@ const SectionHeaderContent = (props) => {
|
||||
|
||||
const titleIcon =
|
||||
(isPublicRoomType && !isPublicRoom && PublicRoomIconUrl) ||
|
||||
(isVirtualDataRoomType && LifetimeRoomIconUrl);
|
||||
(isVirtualDataRoomType && selectedFolder.lifetime && LifetimeRoomIconUrl);
|
||||
|
||||
const titleIconTooltip = selectedFolder.lifetime
|
||||
? t("Files:RoomFilesLifetime", {
|
||||
|
@ -237,6 +237,7 @@ class SelectedFolderStore {
|
||||
this.type = null;
|
||||
this.inRoom = false;
|
||||
this.parentRoomType = null;
|
||||
this.lifetime = null;
|
||||
};
|
||||
|
||||
setParentId = (parentId: number) => {
|
||||
@ -259,9 +260,14 @@ class SelectedFolderStore {
|
||||
this.shared = shared;
|
||||
};
|
||||
|
||||
updateEditedSelectedRoom = (title = this.title, tags = this.tags) => {
|
||||
updateEditedSelectedRoom = (
|
||||
title = this.title,
|
||||
tags = this.tags,
|
||||
lifetime = this.lifetime,
|
||||
) => {
|
||||
this.title = title;
|
||||
this.tags = tags;
|
||||
this.lifetime = lifetime;
|
||||
};
|
||||
|
||||
setInRoom = (inRoom: boolean) => {
|
||||
|
@ -480,14 +480,13 @@ export function resetRoomQuota(roomIds) {
|
||||
|
||||
export function changeRoomLifetime(
|
||||
roomId: string | number,
|
||||
lifetime: TRoomLifetime,
|
||||
lifetime: TRoomLifetime | null,
|
||||
) {
|
||||
const data = lifetime ? { ...lifetime } : null;
|
||||
const options = {
|
||||
method: "put",
|
||||
url: `files/rooms/${roomId}/lifetime`,
|
||||
data: {
|
||||
...lifetime,
|
||||
},
|
||||
data,
|
||||
};
|
||||
|
||||
return request(options);
|
||||
|
@ -541,7 +541,7 @@ export type TSelectorItem = TSelectorItemType & {
|
||||
isSelected?: boolean;
|
||||
isDisabled?: boolean;
|
||||
disabledText?: string;
|
||||
lifetimeTooltip?: string;
|
||||
lifetimeTooltip?: string | null;
|
||||
};
|
||||
|
||||
export type Data = {
|
||||
|
Loading…
Reference in New Issue
Block a user