Skip to content

Commit

Permalink
Add icon to draft projects
Browse files Browse the repository at this point in the history
  • Loading branch information
SeongHo Park committed Jun 11, 2024
1 parent ca712eb commit e54a167
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
11 changes: 8 additions & 3 deletions frontend/src/lib/components/ProjectList.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script lang="ts">
import t from '$lib/i18n';
import Icon from '$lib/icons/Icon.svelte';
import { Badge } from './Badges';
import { getProjectTypeIcon } from './ProjectType';
import type { ProjectItemWithDraftStatus } from './Projects';
Expand All @@ -17,17 +18,21 @@
<h2 class="card-title overflow-hidden text-ellipsis" title={project.name}>
<span class="text-primary inline-flex gap-2 items-center">
{project.name}
<span
class="tooltip text-warning text-xl shrink-0 leading-0"
data-tip={$t('projectlist.is_draft')}>
<Icon icon="i-mdi-script" />
</span>
</span>
</h2>
<p>{project.code}</p>

<Badge variant="badge-warning" outline>
<Icon icon="i-mdi-progress-clock" />
Awaiting approval
</Badge>

<p class="flex items-end">
{$t('projectlist.requested', {
lastChange: new Date(),
requested: new Date(project.createdDate),
})}
</p>
</div>
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/lib/components/Projects/ProjectTable.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@
</span>
{:else if !project.isDraft}
{$date(project.lastCommit)}
{:else}
{'Awaiting approval'}
{/if}
</td>
{/if}
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/lib/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,8 @@ If you don't see a dialog or already closed it, click the button below:",
"last_change": "Last Change: {lastChange, date, short} {lastChange, time, short}",
"no_changes": "New",
"shared_with": "Shared with {memberCount, plural, one {no one} other {# people} }",
"requested": "Requested: {lastChange, date, short} {lastChange, time, short}",
"requested": "Requested: {requested, date, short} {requested, time, short}",
"is_draft": "Draft",
},
"register": {
"title": "Register",
Expand Down

0 comments on commit e54a167

Please sign in to comment.