mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
fix(console): disable archived/read-only UI on self-hosted and correct project status checks
This commit is contained in:
1 parent
8d60e38bf5
commit
bda2c4f2da
1 file changed
+6
-4
@@ -81,7 +81,7 @@
|
||||
|
||||
$: projectCreationDisabled =
|
||||
(isCloud && getServiceLimit('projects') <= data.allProjectsCount) ||
|
||||
($readOnly && !GRACE_PERIOD_OVERRIDE) ||
|
||||
(isCloud && $readOnly && !GRACE_PERIOD_OVERRIDE) ||
|
||||
!$canWriteProjects;
|
||||
|
||||
$: $registerCommands([
|
||||
@@ -106,12 +106,14 @@
|
||||
function isSetToArchive(project: Models.Project): boolean {
|
||||
if (!isCloud) return false;
|
||||
if (!project || !project.$id) return false;
|
||||
return project.status !== 'active';
|
||||
return project.status === 'archived';
|
||||
}
|
||||
|
||||
$: projectsToArchive = data.projects.projects.filter((project) => project.status !== 'active');
|
||||
$: projectsToArchive = isCloud
|
||||
? data.projects.projects.filter((project) => project.status === 'archived')
|
||||
: [];
|
||||
|
||||
$: activeProjects = data.projects.projects.filter((project) => project.status === 'active');
|
||||
$: activeProjects = data.projects.projects.filter((project) => project.status !== 'archived');
|
||||
function clearSearch() {
|
||||
searchQuery?.clearInput();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user