From d09a4e244e4b7158de7cc19a9cc149ee37112339 Mon Sep 17 00:00:00 2001 From: pythongosssss <125205205+pythongosssss@users.noreply.github.com> Date: Fri, 8 Sep 2023 19:15:33 +0100 Subject: [PATCH] Show alias --- web/js/common/autocomplete.css | 4 ++-- web/js/common/autocomplete.js | 10 +++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/web/js/common/autocomplete.css b/web/js/common/autocomplete.css index e58900e..40d06be 100644 --- a/web/js/common/autocomplete.css +++ b/web/js/common/autocomplete.css @@ -25,7 +25,7 @@ text-decoration-color: dodgerblue; } -.pysssss-autocomplete-priority { +.pysssss-autocomplete-pill { margin-left: auto; font-size: 10px; color: #fff; @@ -33,7 +33,7 @@ position: relative; } -.pysssss-autocomplete-priority::after { +.pysssss-autocomplete-pill::after { content: ""; display: block; background: rgba(255, 255, 255, 0.25); diff --git a/web/js/common/autocomplete.js b/web/js/common/autocomplete.js index c7637ce..178c5af 100644 --- a/web/js/common/autocomplete.js +++ b/web/js/common/autocomplete.js @@ -499,12 +499,20 @@ export class TextAreaAutoComplete { if (wordInfo.priority) { parts.push( - $el("span.pysssss-autocomplete-priority", { + $el("span.pysssss-autocomplete-pill", { textContent: wordInfo.priority, }) ); } + if (wordInfo.value && wordInfo.text !== wordInfo.value) { + parts.push( + $el("span.pysssss-autocomplete-pill", { + textContent: wordInfo.value, + }) + ); + } + if (wordInfo.info) { parts.push( $el("a.pysssss-autocomplete-item-info", {