Skip to content

Commit

Permalink
feat: skip project selection as it is optional
Browse files Browse the repository at this point in the history
you can still select projects in the dropdown
  • Loading branch information
flornkm committed Jan 12, 2024
1 parent 56fa39f commit e4724aa
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions inlang/source-code/manage/src/components/InlangManage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,21 @@ export class InlangManage extends TwLitElement {
this.branches = await repo.getBranches()
this.projects = await listProjects(repo.nodeishFs, "/")

if (!this.url.project && this.url.path === "") {
for (const project of this.projects) {
if (project.projectPath === "/project.inlang") {
this.url.project = project.projectPath
window.history.pushState(
{},
"",
`?repo=${this.url.repo}${this.url.branch ? `&branch=${this.url.branch}` : ""}&project=${
this.url.project
}`
)
}
}
}

if (this.url.project) {
const result = await tryCatch(async () => {
const inlangProjectString = (await repo.nodeishFs.readFile(
Expand Down

0 comments on commit e4724aa

Please sign in to comment.