mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-06 12:43:06 +08:00
Merge pull request #7347 from wandji20/wb-SCI-10499
Truncate long names in dropdown tags view [SCI-10499]
This commit is contained in:
commit
b06aa9006b
3 changed files with 8 additions and 8 deletions
|
@ -183,13 +183,13 @@ export default {
|
|||
tagsRenderer(tag) {
|
||||
return `<div class="flex items-center gap-2">
|
||||
<span class="w-4 h-4 rounded-full" style="background-color: ${tag[2]}"></span>
|
||||
${tag[1]}
|
||||
<span title="${tag[1]}" class="truncate">${tag[1]}</span>
|
||||
</div>`;
|
||||
},
|
||||
usersRenderer(user) {
|
||||
return `<div class="flex items-center gap-2">
|
||||
return `<div class="flex items-center gap-2 truncate">
|
||||
<img class="w-6 h-6 rounded-full" src="${user[2]}">
|
||||
${user[1]}
|
||||
<span title="${user[1]}" class="truncate">${user[1]}</span>
|
||||
</div>`;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
:placeholder="label || placeholder || this.i18n.t('general.select_dropdown.placeholder')"
|
||||
class="w-full border-0 outline-none pl-0 placeholder:text-sn-grey" />
|
||||
</template>
|
||||
<div v-else class="flex items-center gap-1 flex-wrap">
|
||||
<div v-for="tag in tags" class="px-2 py-1 rounded-sm bg-sn-super-light-grey flex items-center gap-1">
|
||||
<div v-else class="flex items-center gap-1 flex-wrap max-w-[calc(100%-24px)]">
|
||||
<div v-for="tag in tags" class=" truncate px-2 py-1 rounded-sm bg-sn-super-light-grey flex items-center gap-1">
|
||||
<div class="truncate" v-if="labelRenderer" v-html="tag.label"></div>
|
||||
<div class="truncate" v-else>{{ tag.label }}</div>
|
||||
<i @click="removeTag(tag.value)" class="sn-icon mini ml-auto sn-icon-close cursor-pointer"></i>
|
||||
|
@ -48,7 +48,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<i v-if="canClear" @click="clear" class="sn-icon ml-auto sn-icon-close"></i>
|
||||
<i v-else class="sn-icon ml-auto"
|
||||
<i v-else class="sn-icon ml-auto self-start"
|
||||
:class="{ 'sn-icon-down': !isOpen, 'sn-icon-up': isOpen, 'text-sn-grey': disabled}"></i>
|
||||
</div>
|
||||
<template v-if="isOpen">
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
actions-url="<%= actions_toolbar_projects_path %>"
|
||||
users-filter-url="<%= users_filter_projects_path %>"
|
||||
data-source="<%= projects_path(project_folder_id: current_folder&.id, format: :json) %>"
|
||||
active-page-url="<%= projects_path(roject_folder_id: current_folder&.id, view_mode: :active) %>"
|
||||
archived-page-url="<%= projects_path(roject_folder_id: current_folder&.id, view_mode: :archived) %>"
|
||||
active-page-url="<%= projects_path(project_folder_id: current_folder&.id, view_mode: :active) %>"
|
||||
archived-page-url="<%= projects_path(project_folder_id: current_folder&.id, view_mode: :archived) %>"
|
||||
current-view-mode="<%= params[:view_mode] || :active %>"
|
||||
current-folder-id="<%= current_folder&.id %>"
|
||||
create-url="<%= projects_path if can_create_projects?(current_team) %>"
|
||||
|
|
Loading…
Reference in a new issue