mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
UX: add placeholder title for drafts (#30747)
Adds a placeholder title for drafts that don't have a saved title.
This commit is contained in:
@@ -3,6 +3,7 @@ import { tracked } from "@glimmer/tracking";
|
||||
import { fn } from "@ember/helper";
|
||||
import { action } from "@ember/object";
|
||||
import { service } from "@ember/service";
|
||||
import { or } from "truth-helpers";
|
||||
import DButton from "discourse/components/d-button";
|
||||
import DropdownMenu from "discourse/components/dropdown-menu";
|
||||
import DiscourseURL from "discourse/lib/url";
|
||||
@@ -85,7 +86,10 @@ export default class TopicDraftsDropdown extends Component {
|
||||
<DButton
|
||||
@action={{fn this.resumeDraft draft}}
|
||||
@icon={{if draft.topic_id "reply" "layer-group"}}
|
||||
@translatedLabel={{draft.title}}
|
||||
@translatedLabel={{or
|
||||
draft.title
|
||||
(i18n "drafts.dropdown.untitled")
|
||||
}}
|
||||
class="btn-secondary"
|
||||
/>
|
||||
</dropdown.item>
|
||||
|
||||
@@ -499,6 +499,7 @@ en:
|
||||
no_value: "Resume editing"
|
||||
dropdown:
|
||||
title: "Open the latest drafts menu"
|
||||
untitled: "Untitled draft"
|
||||
view_all: "view all"
|
||||
other_drafts:
|
||||
one: "+%{count} other draft"
|
||||
|
||||
Reference in New Issue
Block a user