mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 10:20:58 -06:00
UX: hide settings btn when disabled
Also sets lighter border on hover
This commit is contained in:
parent
64971e5972
commit
74f01b8cbd
@ -2,8 +2,8 @@
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
padding: 0.5rem;
|
||||
border-radius: 6px;
|
||||
background-color: var(--d-selected);
|
||||
border-radius: 4px;
|
||||
background-color: var(--primary-very-low);
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
.touch & {
|
||||
&:active {
|
||||
background-color: var(--d-hover);
|
||||
border: 1px solid var(--primary-medium);
|
||||
border: 1px solid var(--primary-300);
|
||||
}
|
||||
}
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
&:hover,
|
||||
&:active {
|
||||
background-color: var(--d-hover);
|
||||
border: 1px solid var(--primary-medium);
|
||||
border: 1px solid var(--primary-300);
|
||||
}
|
||||
}
|
||||
|
||||
@ -41,6 +41,10 @@
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
&__settings[disabled] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
&__open-button {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
@ -14,7 +14,7 @@
|
||||
flex-direction: column;
|
||||
|
||||
.chat-thread-list-item {
|
||||
margin: 0.5rem 0.25rem 0.5rem 0.5rem;
|
||||
margin: 0.75rem 0.25rem 0.75rem 0.5rem;
|
||||
|
||||
& + .chat-thread-list-item {
|
||||
margin-top: 0;
|
||||
|
@ -108,12 +108,12 @@ describe "Thread list in side panel | full page", type: :system, js: true do
|
||||
it "does not allow updating if user is neither admin nor original message user" do
|
||||
thread_1.update!(original_message_user: other_user)
|
||||
thread_1.original_message.update!(user: other_user)
|
||||
|
||||
open_thread_list
|
||||
expect(
|
||||
thread_list_page.item_by_id(thread_1.id).find(".chat-thread-list-item__settings")[
|
||||
:disabled
|
||||
],
|
||||
).to eq("true")
|
||||
|
||||
expect(thread_list_page.item_by_id(thread_1.id)).to have_no_css(
|
||||
".chat-thread-list-item__settings",
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user