summaryrefslogtreecommitdiffstats
path: root/web_src/js
diff options
context:
space:
mode:
authoryp05327 <576951401@qq.com>2023-04-26 11:25:29 +0900
committerGitHub <noreply@github.com>2023-04-25 22:25:29 -0400
commit5f21e0f8eb66791fc86c07baac80b485fd5965fc (patch)
tree055518a0e438e72b65e403ca10572ffb99cbe84b /web_src/js
parent2ec2d065316a488c4748061fe7b19f0b57f3546f (diff)
downloadgitea-5f21e0f8eb66791fc86c07baac80b485fd5965fc.tar.gz
gitea-5f21e0f8eb66791fc86c07baac80b485fd5965fc.zip
Automatically select the org when click create repo from org dashboard (#24325)
![image](https://user-images.githubusercontent.com/18380374/234209941-d661b07f-e963-427b-a673-78c46043a792.png) In org dashboard, the create repo link will be `repo/create?org={orgId}`
Diffstat (limited to 'web_src/js')
-rw-r--r--web_src/js/components/DashboardRepoList.vue3
1 files changed, 2 insertions, 1 deletions
diff --git a/web_src/js/components/DashboardRepoList.vue b/web_src/js/components/DashboardRepoList.vue
index 1af53aac90..33b312aa6e 100644
--- a/web_src/js/components/DashboardRepoList.vue
+++ b/web_src/js/components/DashboardRepoList.vue
@@ -10,7 +10,7 @@
{{ textMyRepos }}
<span class="ui grey label gt-ml-3">{{ reposTotalCount }}</span>
</div>
- <a :href="subUrl + '/repo/create'" :data-tooltip-content="textNewRepo">
+ <a :href="subUrl + '/repo/create' + (isOrganization ? '?org=' + organizationId : '')" :data-tooltip-content="textNewRepo">
<svg-icon name="octicon-plus"/>
<span class="sr-only">{{ textNewRepo }}</span>
</a>
@@ -199,6 +199,7 @@ const sfc = {
isOrganization: true,
canCreateOrganization: false,
organizationsTotalCount: 0,
+ organizationId: 0,
subUrl: appSubUrl,
...pageData.dashboardRepoList,