feat: enable infinite nesting always, remove setting
This commit is contained in:
parent
a0e770438d
commit
0f28767acc
@ -23,9 +23,6 @@
|
|||||||
// It has to be the full url, including the last /api/v1 part and port.
|
// It has to be the full url, including the last /api/v1 part and port.
|
||||||
// You can change this if your api is not reachable on the same port as the frontend.
|
// You can change this if your api is not reachable on the same port as the frontend.
|
||||||
window.API_URL = 'http://localhost:3456/api/v1'
|
window.API_URL = 'http://localhost:3456/api/v1'
|
||||||
// If enabled, allows the user to nest projects infinitely, instead of the default 2 levels.
|
|
||||||
// This setting might change in the future or be removed completely.
|
|
||||||
window.PROJECT_INFINITE_NESTING_ENABLED = false
|
|
||||||
// Allow changing the logo and other icons based on various occasions throughout the year.
|
// Allow changing the logo and other icons based on various occasions throughout the year.
|
||||||
window.ALLOW_ICON_CHANGES = true
|
window.ALLOW_ICON_CHANGES = true
|
||||||
// Allow using a custom logo via external URL.
|
// Allow using a custom logo via external URL.
|
||||||
|
@ -74,7 +74,7 @@
|
|||||||
</ProjectSettingsDropdown>
|
</ProjectSettingsDropdown>
|
||||||
</div>
|
</div>
|
||||||
<ProjectsNavigation
|
<ProjectsNavigation
|
||||||
v-if="canNestDeeper && childProjectsOpen && canCollapse"
|
v-if="childProjectsOpen && canCollapse"
|
||||||
:model-value="childProjects"
|
:model-value="childProjects"
|
||||||
:can-edit-order="true"
|
:can-edit-order="true"
|
||||||
:can-collapse="canCollapse"
|
:can-collapse="canCollapse"
|
||||||
@ -95,7 +95,6 @@ import ProjectSettingsDropdown from '@/components/project/project-settings-dropd
|
|||||||
import {getProjectTitle} from '@/helpers/getProjectTitle'
|
import {getProjectTitle} from '@/helpers/getProjectTitle'
|
||||||
import ColorBubble from '@/components/misc/colorBubble.vue'
|
import ColorBubble from '@/components/misc/colorBubble.vue'
|
||||||
import ProjectsNavigation from '@/components/home/ProjectsNavigation.vue'
|
import ProjectsNavigation from '@/components/home/ProjectsNavigation.vue'
|
||||||
import {canNestProjectDeeper} from '@/helpers/canNestProjectDeeper'
|
|
||||||
|
|
||||||
const {
|
const {
|
||||||
project,
|
project,
|
||||||
@ -116,16 +115,10 @@ const currentProject = computed(() => baseStore.currentProject)
|
|||||||
const childProjectsOpen = ref(true)
|
const childProjectsOpen = ref(true)
|
||||||
|
|
||||||
const childProjects = computed(() => {
|
const childProjects = computed(() => {
|
||||||
if (!canNestDeeper.value) {
|
|
||||||
return []
|
|
||||||
}
|
|
||||||
|
|
||||||
return projectStore.getChildProjects(project.id)
|
return projectStore.getChildProjects(project.id)
|
||||||
.filter(p => !p.isArchived)
|
.filter(p => !p.isArchived)
|
||||||
.sort((a, b) => a.position - b.position)
|
.sort((a, b) => a.position - b.position)
|
||||||
})
|
})
|
||||||
|
|
||||||
const canNestDeeper = computed(() => canNestProjectDeeper(level))
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
export function canNestProjectDeeper(level: number) {
|
|
||||||
if (level < 2) {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
return level >= 2 && window.PROJECT_INFINITE_NESTING_ENABLED
|
|
||||||
}
|
|
@ -20,7 +20,6 @@ declare global {
|
|||||||
API_URL: string;
|
API_URL: string;
|
||||||
SENTRY_ENABLED?: boolean;
|
SENTRY_ENABLED?: boolean;
|
||||||
SENTRY_DSN?: string;
|
SENTRY_DSN?: string;
|
||||||
PROJECT_INFINITE_NESTING_ENABLED: boolean;
|
|
||||||
ALLOW_ICON_CHANGES: boolean;
|
ALLOW_ICON_CHANGES: boolean;
|
||||||
CUSTOM_LOGO_URL?: string;
|
CUSTOM_LOGO_URL?: string;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user