Merge pull request #1087 from makeplane/sync/ce-ee

sync: community changes
This commit is contained in:
pushya22
2024-09-10 14:30:05 +05:30
committed by GitHub
6 changed files with 16 additions and 7 deletions

View File

@@ -146,7 +146,7 @@ export const insertImageCommand = (
if (range) editor.chain().focus().deleteRange(range).run();
const input = document.createElement("input");
input.type = "file";
input.accept = ".jpeg, .jpg, .png, .webp, .svg";
input.accept = ".jpeg, .jpg, .png, .webp";
input.onchange = async () => {
if (input.files?.length) {
const file = input.files[0];

View File

@@ -4,9 +4,9 @@ export function isFileValid(file: File): boolean {
return false;
}
const allowedTypes = ["image/jpeg", "image/jpg", "image/png", "image/webp", "image/svg+xml"];
const allowedTypes = ["image/jpeg", "image/jpg", "image/png", "image/webp"];
if (!allowedTypes.includes(file.type)) {
alert("Invalid file type. Please select a JPEG, JPG, PNG, WEBP, or SVG image file.");
alert("Invalid file type. Please select a JPEG, JPG, PNG, or WEBP image file.");
return false;
}

View File

@@ -19,7 +19,7 @@ export const CyclesList: FC<ICyclesList> = observer((props) => {
const { completedCycleIds, upcomingCycleIds, cycleIds, workspaceSlug, projectId, isArchived = false } = props;
return (
<ContentWrapper variant={ERowVariant.HUGGING}>
<ContentWrapper variant={ERowVariant.HUGGING} className="flex-row">
<ListLayout>
{isArchived ? (
<>

View File

@@ -27,6 +27,7 @@ type Props = TDropdownProps & {
showCount?: boolean;
onClose?: () => void;
renderByDefault?: boolean;
itemClassName?: string;
} & (
| {
multiple: false;
@@ -51,6 +52,7 @@ type ButtonContentProps = {
showCount: boolean;
showTooltip?: boolean;
value: string | string[] | null;
className?: string;
};
const ButtonContent: React.FC<ButtonContentProps> = (props) => {
@@ -65,6 +67,7 @@ const ButtonContent: React.FC<ButtonContentProps> = (props) => {
showCount,
showTooltip = false,
value,
className,
} = props;
// store hooks
const { getModuleById } = useModule();
@@ -87,13 +90,16 @@ const ButtonContent: React.FC<ButtonContentProps> = (props) => {
)}
</div>
) : value.length > 0 ? (
<div className="flex max-w-full flex-grow flex-wrap items-center gap-2 truncate py-0.5">
<div className="flex max-w-full flex-grow flex-wrap items-center gap-2 truncate py-0.5 ">
{value.map((moduleId) => {
const moduleDetails = getModuleById(moduleId);
return (
<div
key={moduleId}
className="flex max-w-full items-center gap-1 rounded bg-custom-background-80 py-1 text-custom-text-200"
className={cn(
"flex max-w-full items-center gap-1 rounded bg-custom-background-80 py-1 text-custom-text-200",
className
)}
>
{!hideIcon && <DiceIcon className="h-2.5 w-2.5 flex-shrink-0" />}
{!hideText && (
@@ -159,6 +165,7 @@ export const ModuleDropdown: React.FC<Props> = observer((props) => {
const {
button,
buttonClassName,
itemClassName = "",
buttonContainerClassName,
buttonVariant,
className = "",
@@ -270,6 +277,7 @@ export const ModuleDropdown: React.FC<Props> = observer((props) => {
showTooltip={showTooltip}
value={value}
onChange={onChange as any}
className={itemClassName}
/>
</DropdownButton>
</button>

View File

@@ -69,6 +69,7 @@ export const IssueModuleSelect: React.FC<TIssueModuleSelect> = observer((props)
dropdownArrow
dropdownArrowClassName="h-3.5 w-3.5 hidden group-hover:inline"
multiple
itemClassName="px-2"
/>
</div>
);

View File

@@ -1,6 +1,6 @@
import update from "lodash/update";
import isEmpty from "lodash/isEmpty";
import set from "lodash/set";
import update from "lodash/update";
import { action, makeObservable, observable, runInAction } from "mobx";
import { computedFn } from "mobx-utils";
// types