feat(tasker): localize NODE.DC workspace seed

This commit is contained in:
DCCONSTRUCTIONS
2026-05-10 19:59:03 +03:00
parent e49840341b
commit d55d182648
30 changed files with 196 additions and 123 deletions
@@ -17,6 +17,9 @@ import { useFileSize } from "@/plane-web/hooks/use-file-size";
import { FileService } from "@/services/file.service";
const fileService = new FileService();
const isHttpUrl = (path?: string) => !!path && /^https?:\/\//i.test(path);
const isPublicPath = (path?: string) => !!path && path.startsWith("/") && !path.startsWith("//");
type TArgs = {
projectId?: string;
uploadFile: TFileHandler["upload"];
@@ -44,7 +47,10 @@ export const useEditorConfig = () => {
return res?.exists ?? false;
},
delete: async (src: string) => {
if (src?.startsWith("http")) {
if (isPublicPath(src)) {
return;
}
if (isHttpUrl(src)) {
await fileService.deleteOldWorkspaceAsset(workspaceId, src);
} else {
await fileService.deleteNewAsset(
@@ -58,7 +64,7 @@ export const useEditorConfig = () => {
},
getAssetDownloadSrc: async (path) => {
if (!path) return "";
if (path?.startsWith("http")) {
if (isHttpUrl(path) || isPublicPath(path)) {
return path;
} else {
return (
@@ -72,7 +78,7 @@ export const useEditorConfig = () => {
},
getAssetSrc: async (path) => {
if (!path) return "";
if (path?.startsWith("http")) {
if (isHttpUrl(path) || isPublicPath(path)) {
return path;
} else {
return (
@@ -85,14 +91,17 @@ export const useEditorConfig = () => {
}
},
restore: async (src: string) => {
if (src?.startsWith("http")) {
if (isPublicPath(src)) {
return;
}
if (isHttpUrl(src)) {
await fileService.restoreOldEditorAsset(workspaceId, src);
} else {
await fileService.restoreNewAsset(workspaceSlug, src);
}
},
upload: uploadFile,
duplicate: duplicateFile,
duplicate: async (assetId: string) => (isPublicPath(assetId) ? assetId : duplicateFile(assetId)),
validation: {
maxFileSize,
},
Binary file not shown.

After

Width:  |  Height:  |  Size: 314 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 630 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 347 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 341 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

+14
View File
@@ -5597,6 +5597,20 @@
color: var(--text-color-primary) !important;
}
.editor-callout-component {
border: 0 !important;
outline: none !important;
box-shadow:
inset 0 0 0 1px rgba(var(--nodedc-accent-rgb), 0.18),
inset 0 1px 0 rgba(255, 255, 255, 0.018),
0 10px 28px rgba(0, 0, 0, 0.08) !important;
border-radius: 1.35rem !important;
background:
linear-gradient(180deg, rgba(255, 255, 255, 0.028) 0%, rgba(255, 255, 255, 0.012) 100%),
rgba(255, 255, 255, 0.025) !important;
color: var(--text-color-secondary) !important;
}
.nodedc-attachment-upload[data-drag-reject="true"] {
box-shadow:
inset 0 0 0 1px rgba(var(--nodedc-accent-rgb), 0.4),