diff --git a/src/lib/components/archiveProject.svelte b/src/lib/components/archiveProject.svelte new file mode 100644 index 000000000..7dd72a059 --- /dev/null +++ b/src/lib/components/archiveProject.svelte @@ -0,0 +1,157 @@ + + +{#if projectsToArchive.length > 0} +
+ + + These projects have been archived and are read-only. You can view and migrate their + data. + + +
+ + {#each projectsToArchive as project} + {@const platforms = filterPlatforms( + project.platforms.map((platform) => getPlatformInfo(platform.type)) + )} + + + {project?.platforms?.length ? project?.platforms?.length : 'No'} apps + + {project.name} + + + + { + e.preventDefault(); + e.stopPropagation(); + readOnlyInfoOpen = { + ...readOnlyInfoOpen, + [project.$id]: !readOnlyInfoOpen[project.$id] + }; + }}> + + Read only + + +
  • + + Archived projects are read-only. You can view + and migrate their data, but they no longer + accept edits or requests. + +
  • +
    +
    + + + + Unarchive project + Migrate project + + +
    +
    + {#each platforms.slice(0, 2) as platform} + {@const icon = getIconForPlatform(platform.icon)} + + + + {/each} +
    + {/each} + +

    No archived projects

    +
    +
    +
    +
    +
    +{/if} diff --git a/src/lib/components/gridItem1.svelte b/src/lib/components/gridItem1.svelte index 89b2d3bb2..40c8e66d9 100644 --- a/src/lib/components/gridItem1.svelte +++ b/src/lib/components/gridItem1.svelte @@ -1,6 +1,6 @@ diff --git a/src/lib/components/index.ts b/src/lib/components/index.ts index 3f451a4bf..b1fd3b4c0 100644 --- a/src/lib/components/index.ts +++ b/src/lib/components/index.ts @@ -1,3 +1,4 @@ +export { default as ArchiveProject } from './archiveProject.svelte'; export { default as Arrow } from './arrow.svelte'; export { default as Modal } from './modal.svelte'; export { default as Pagination } from './pagination.svelte'; diff --git a/src/routes/(console)/organization-[organization]/+page.svelte b/src/routes/(console)/organization-[organization]/+page.svelte index 567e99659..b6a21a7eb 100644 --- a/src/routes/(console)/organization-[organization]/+page.svelte +++ b/src/routes/(console)/organization-[organization]/+page.svelte @@ -8,6 +8,7 @@ import { page } from '$app/state'; import { registerCommands } from '$lib/commandCenter'; import { + // ArchiveProject, CardContainer, DropList, DropListItem, @@ -270,6 +271,14 @@

    Create a new project

    + + + + {:else} {/if} - -