2023-03-14 12:09:06 +08:00
|
|
|
<script type="module">
|
|
|
|
const data = {
|
|
|
|
...window.config.pageData.dashboardRepoList, // it only contains searchLimit and uid
|
2022-10-01 22:26:38 +08:00
|
|
|
|
2023-05-05 16:41:21 +08:00
|
|
|
isMirrorsEnabled: {{.MirrorsEnabled}},
|
2023-03-14 12:09:06 +08:00
|
|
|
isStarsEnabled: {{not .IsDisableStars}},
|
|
|
|
|
2023-09-25 16:56:50 +08:00
|
|
|
textRepository: {{ctx.Locale.Tr "repository"}},
|
|
|
|
textOrganization: {{ctx.Locale.Tr "organization"}},
|
|
|
|
textMyRepos: {{ctx.Locale.Tr "home.my_repos"}},
|
|
|
|
textNewRepo: {{ctx.Locale.Tr "new_repo"}},
|
2024-03-15 07:24:59 +08:00
|
|
|
textSearchRepos: {{ctx.Locale.Tr "search.repo_kind"}},
|
2023-09-25 16:56:50 +08:00
|
|
|
textFilter: {{ctx.Locale.Tr "home.filter"}},
|
|
|
|
textShowArchived: {{ctx.Locale.Tr "home.show_archived"}},
|
|
|
|
textShowPrivate: {{ctx.Locale.Tr "home.show_private"}},
|
|
|
|
|
|
|
|
textShowBothArchivedUnarchived: {{ctx.Locale.Tr "home.show_both_archived_unarchived"}},
|
|
|
|
textShowOnlyUnarchived: {{ctx.Locale.Tr "home.show_only_unarchived"}},
|
|
|
|
textShowOnlyArchived: {{ctx.Locale.Tr "home.show_only_archived"}},
|
|
|
|
|
|
|
|
textShowBothPrivatePublic: {{ctx.Locale.Tr "home.show_both_private_public"}},
|
|
|
|
textShowOnlyPublic: {{ctx.Locale.Tr "home.show_only_public"}},
|
|
|
|
textShowOnlyPrivate: {{ctx.Locale.Tr "home.show_only_private"}},
|
|
|
|
|
|
|
|
textAll: {{ctx.Locale.Tr "all"}},
|
|
|
|
textSources: {{ctx.Locale.Tr "sources"}},
|
|
|
|
textForks: {{ctx.Locale.Tr "forks"}},
|
|
|
|
textMirrors: {{ctx.Locale.Tr "mirrors"}},
|
|
|
|
textCollaborative: {{ctx.Locale.Tr "collaborative"}},
|
|
|
|
|
|
|
|
textFirstPage: {{ctx.Locale.Tr "admin.first_page"}},
|
|
|
|
textPreviousPage: {{ctx.Locale.Tr "repo.issues.previous"}},
|
|
|
|
textNextPage: {{ctx.Locale.Tr "repo.issues.next"}},
|
|
|
|
textLastPage: {{ctx.Locale.Tr "admin.last_page"}},
|
|
|
|
|
|
|
|
textMyOrgs: {{ctx.Locale.Tr "home.my_orgs"}},
|
|
|
|
textNewOrg: {{ctx.Locale.Tr "new_org"}},
|
|
|
|
|
|
|
|
textOrgVisibilityLimited: {{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}},
|
|
|
|
textOrgVisibilityPrivate: {{ctx.Locale.Tr "org.settings.visibility.private_shortname"}},
|
2023-03-14 12:09:06 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
{{if .Team}}
|
|
|
|
data.teamId = {{.Team.ID}};
|
|
|
|
{{end}}
|
|
|
|
|
|
|
|
{{if not .ContextUser.IsOrganization}}
|
2023-05-07 08:33:43 +08:00
|
|
|
data.organizations = [{{range .Orgs}}{'name': {{.Name}}, 'num_repos': {{.NumRepos}}, 'org_visibility': {{.Visibility}}},{{end}}];
|
2023-03-14 12:09:06 +08:00
|
|
|
data.isOrganization = false;
|
2023-04-26 10:25:29 +08:00
|
|
|
data.organizationsTotalCount = {{.UserOrgsCount}};
|
|
|
|
data.canCreateOrganization = {{.SignedUser.CanCreateOrganization}};
|
|
|
|
{{else}}
|
|
|
|
data.organizationId = {{.ContextUser.ID}};
|
2023-03-14 12:09:06 +08:00
|
|
|
{{end}}
|
|
|
|
|
|
|
|
window.config.pageData.dashboardRepoList = data;
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<div id="dashboard-repo-list" class="six wide column"></div>
|