Skip to content

Commit 5dcd1d3

Browse files
committed
fix
1 parent 4701ed5 commit 5dcd1d3

File tree

6 files changed

+25
-35
lines changed

6 files changed

+25
-35
lines changed

options/locale/locale_en-US.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ show_only_public = Showing only public
386386
issues.in_your_repos = In your repositories
387387

388388
guide_title = No Activity
389-
guide_desc = You are currently not following any repositories or users, so there is no content to display; you can explore repositories or users of interest from the links below.
389+
guide_desc = You are currently not following any repositories or users, so there is no content to display. You can explore repositories or users of interest from the links below.
390390
explore_repos = Explore repositories
391391
explore_users = Explore users
392392
empty_org = There are no organizations yet.
Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
1-
<div class="ui center tw-px-8 tw-py-8 guide">
2-
{{svg "octicon-package" 24}}
3-
<h3>{{ctx.Locale.Tr "home.guide_title"}}</h3>
4-
<p>{{ctx.Locale.Tr "home.guide_desc"}}</p>
1+
<div class="tw-text-center tw-p-8">
2+
{{svg "octicon-package" 24 "tw-text-placeholder-text"}}
3+
<h3 class="tw-my-4">{{ctx.Locale.Tr "home.guide_title"}}</h3>
4+
<p class="tw-text-placeholder-text">{{ctx.Locale.Tr "home.guide_desc"}}</p>
55
<div>
6-
<a href="{{AppSubUrl}}/explore/repos">
7-
{{ctx.Locale.Tr "home.explore_repos"}}
8-
</a>
6+
<a href="{{AppSubUrl}}/explore/repos">{{ctx.Locale.Tr "home.explore_repos"}}</a>
97
<span>·</span>
10-
<a href="{{AppSubUrl}}/explore/users">
11-
{{ctx.Locale.Tr "home.explore_users"}}
12-
</a>
8+
<a href="{{AppSubUrl}}/explore/users">{{ctx.Locale.Tr "home.explore_users"}}</a>
139
</div>
1410
</div>

templates/user/dashboard/repolist.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,4 @@ data.organizationId = {{.ContextUser.ID}};
6060
window.config.pageData.dashboardRepoList = data;
6161
</script>
6262

63-
<div id="dashboard-repo-list" class="flex-container-sidebar is-loading"></div>
63+
<div id="dashboard-repo-list" class="flex-container-sidebar"></div>

web_src/css/dashboard.css

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,3 @@
7070
.dashboard .secondary-nav .ui.dropdown {
7171
max-width: 100%;
7272
}
73-
74-
.dashboard .guide > svg, p {
75-
color: var(--color-placeholder-text);
76-
}
77-
78-
.dashboard .guide h3 {
79-
margin: 1rem auto !important;
80-
}

web_src/js/components/DashboardRepoList.vue

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -353,12 +353,13 @@ export default defineComponent({
353353
<svg-icon name="octicon-plus"/>
354354
</a>
355355
</h4>
356-
<div v-if="isLoading && !reposTotalCount" class="ui attached segment" :class="{'is-loading': isLoading}"/>
357-
<div v-if="!isLoading && !reposTotalCount" class="ui attached segment empty-placeholder">
358-
<svg-icon name="octicon-git-branch" :size="24" class="empty-placeholder-icon"/>
359-
<p>{{ textNoRepo }}</p>
356+
<div v-if="!reposTotalCount" class="ui attached segment" :class="{'is-loading': isLoading}">
357+
<div v-if="!isLoading" class="empty-repo-or-org">
358+
<svg-icon name="octicon-git-branch" :size="24"/>
359+
<p>{{ textNoRepo }}</p>
360+
</div>
360361
</div>
361-
<div v-if="reposTotalCount" class="ui attached segment repos-search">
362+
<div v-else class="ui attached segment repos-search">
362363
<div class="ui small fluid action left icon input">
363364
<input type="search" spellcheck="false" maxlength="255" @input="changeReposFilter(reposFilter)" v-model="searchQuery" ref="search" @keydown="reposFilterKeyControl" :placeholder="textSearchRepos">
364365
<i class="icon loading-icon-3px" :class="{'is-loading': isLoading}"><svg-icon name="octicon-search" :size="16"/></i>
@@ -471,12 +472,13 @@ export default defineComponent({
471472
<svg-icon name="octicon-plus"/>
472473
</a>
473474
</h4>
474-
<div v-if="isLoading" class="ui attached segment" :class="{'is-loading': isLoading}"/>
475-
<div v-if="!isLoading && !organizations.length" class="ui attached segment empty-placeholder">
476-
<svg-icon name="octicon-organization" :size="24" class="empty-placeholder-icon"/>
477-
<p>{{ textNoOrg }}</p>
475+
<div v-if="!organizations.length" class="ui attached segment">
476+
<div class="empty-repo-or-org">
477+
<svg-icon name="octicon-organization" :size="24"/>
478+
<p>{{ textNoOrg }}</p>
479+
</div>
478480
</div>
479-
<div v-if="organizations.length" class="ui attached table segment tw-rounded-b">
481+
<div v-else class="ui attached table segment tw-rounded-b">
480482
<ul class="repo-owner-name-list">
481483
<li class="tw-flex tw-items-center tw-py-2" v-for="org in organizations" :key="org.name">
482484
<a class="repo-list-link muted" :href="subUrl + '/' + encodeURIComponent(org.name)">
@@ -556,12 +558,13 @@ ul li:not(:last-child) {
556558
background: var(--color-hover);
557559
}
558560
559-
.empty-placeholder-icon {
561+
.empty-repo-or-org {
562+
margin-top: 1em;
563+
text-align: center;
560564
color: var(--color-placeholder-text);
561565
}
562566
563-
.empty-placeholder p {
564-
margin: 1em auto !important;
565-
color: var(--color-placeholder-text);
567+
.empty-repo-or-org p {
568+
margin: 1em auto;
566569
}
567570
</style>

web_src/js/features/dashboard.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import DashboardRepoList from '../components/DashboardRepoList.vue';
44
export function initDashboardRepoList() {
55
const el = document.querySelector('#dashboard-repo-list');
66
if (el) {
7-
el.classList.remove('is-loading');
87
createApp(DashboardRepoList).mount(el);
98
}
109
}

0 commit comments

Comments
 (0)