mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Optimize the dashboard (#32990)
before:  after:  -----  ----- Optimize the dashboard by adding welcoming messages or quick action entry points (such as adding a new repository or organization) to ensure that new users are not greeted by a blank page upon logging in. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -5,7 +5,11 @@
|
||||
<div class="flex-container-main">
|
||||
{{template "base/alert" .}}
|
||||
{{template "user/heatmap" .}}
|
||||
{{template "user/dashboard/feeds" .}}
|
||||
{{if .Feeds}}
|
||||
{{template "user/dashboard/feeds" .}}
|
||||
{{else}}
|
||||
{{template "user/dashboard/guide" .}}
|
||||
{{end}}
|
||||
</div>
|
||||
{{template "user/dashboard/repolist" .}}
|
||||
</div>
|
||||
|
10
templates/user/dashboard/guide.tmpl
Normal file
10
templates/user/dashboard/guide.tmpl
Normal file
@@ -0,0 +1,10 @@
|
||||
<div class="tw-text-center tw-p-8">
|
||||
{{svg "octicon-package" 24 "tw-text-placeholder-text"}}
|
||||
<h3 class="tw-my-4">{{ctx.Locale.Tr "home.guide_title"}}</h3>
|
||||
<p class="tw-text-placeholder-text">{{ctx.Locale.Tr "home.guide_desc"}}</p>
|
||||
<div>
|
||||
<a href="{{AppSubUrl}}/explore/repos">{{ctx.Locale.Tr "home.explore_repos"}}</a>
|
||||
<span>·</span>
|
||||
<a href="{{AppSubUrl}}/explore/users">{{ctx.Locale.Tr "home.explore_users"}}</a>
|
||||
</div>
|
||||
</div>
|
@@ -5,6 +5,10 @@ const data = {
|
||||
isMirrorsEnabled: {{.MirrorsEnabled}},
|
||||
isStarsEnabled: {{not .IsDisableStars}},
|
||||
|
||||
canCreateMigrations: {{not .DisableMigrations}},
|
||||
|
||||
textNoOrg: {{ctx.Locale.Tr "home.empty_org"}},
|
||||
textNoRepo: {{ctx.Locale.Tr "home.empty_repo"}},
|
||||
textRepository: {{ctx.Locale.Tr "repository"}},
|
||||
textOrganization: {{ctx.Locale.Tr "organization"}},
|
||||
textMyRepos: {{ctx.Locale.Tr "home.my_repos"}},
|
||||
|
Reference in New Issue
Block a user