compose: Remove "Drafts" button.

Now that this is in the left sidebar, we can remove the now-redundant
compose area button for it.  This also changes where the "Saved as
draft" tooltip appears.
This commit is contained in:
Wesley Aptekar-Cassels 2021-07-04 15:06:50 -07:00 committed by Tim Abbott
parent df8f0b2afe
commit fe89dee284
3 changed files with 3 additions and 11 deletions

View File

@ -20,7 +20,7 @@ async function get_drafts_count(page: Page): Promise<number> {
return await page.$$eval(".draft-row", (drafts) => drafts.length);
}
const drafts_button = ".compose_drafts_button";
const drafts_button = ".top_left_drafts";
const drafts_overlay = "#draft_overlay";
const drafts_button_in_compose = "#below-compose-content .drafts-link";

View File

@ -26,9 +26,6 @@ import * as ui_util from "./ui_util";
import * as util from "./util";
function set_count(count) {
const draft_count = count.toString();
const text = $t({defaultMessage: "Drafts ({draft_count})"}, {draft_count});
$(".compose_drafts_button").text(text);
const drafts_li = $(".top_left_drafts");
ui_util.update_unread_count_in_dom(drafts_li, count);
}
@ -147,10 +144,10 @@ export function restore_message(draft) {
function draft_notify() {
// Display a tooltip to notify the user about the saved draft.
const instance = tippy(".compose_drafts_button", {
const instance = tippy(".top_left_drafts .unread_count", {
content: $t({defaultMessage: "Saved as draft"}),
arrow: true,
placement: "top",
placement: "right",
})[0];
instance.show();
function remove_instance() {

View File

@ -36,11 +36,6 @@
{{t 'Log in to send messages' }}
</a>
</span>
<span class="new_message_button hidden-for-spectators">
<a class="drafts-link no-underline button small rounded compose_drafts_button" href="#drafts" title="{{t 'Drafts' }} (d)">
{{t 'Drafts' }}
</a>
</span>
</div>
</div>
<div class="message_comp">