Skip to content

Commit

Permalink
handling tag selection
Browse files Browse the repository at this point in the history
  • Loading branch information
Murazaki committed Jun 9, 2024
1 parent 4318622 commit dc50499
Show file tree
Hide file tree
Showing 3 changed files with 243 additions and 38 deletions.
11 changes: 11 additions & 0 deletions assets/styles/configuration.scss
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,8 @@ livechat-tags-input {
}

#tags-searched {
user-select: contain;

&::after {
content: "\1F50D";
flex-grow: 1;
Expand Down Expand Up @@ -370,6 +372,7 @@ livechat-tags-input {
border-radius: 3px;
margin: 0 3px 3px 0;
transition: 0.3s filter;
user-select: all;

.tag-close {
display: block;
Expand All @@ -389,6 +392,14 @@ livechat-tags-input {
}
}

&.selected {
filter: hue-rotate(180deg);
}

&.to-be-removed {
filter: hue-rotate(-45deg);
}

&,
&:active,
&:focus {
Expand Down
16 changes: 7 additions & 9 deletions client/common/configuration/elements/channel-configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,16 @@ export class ChannelConfigurationElement extends LivechatElement {
})
this.requestUpdate('_validationError')
})
.catch(async (error: Error) => {
this._validationError = undefined
if (error instanceof ValidationError) {
.catch((error: Error) => {
if (error.constructor === ValidationError) {
this._validationError = error
this.requestUpdate('_validationError')
}

console.warn(`A validation error occurred in saving configuration. ${error.name}: ${error.message}`)
this.registerClientOptions?.peertubeHelpers.notifier.error(
error.message
? error.message
: await this.registerClientOptions.peertubeHelpers.translate('error')
)
this.requestUpdate('_validationError')
this.registerClientOptions
?.peertubeHelpers.notifier.error(
`An error occurred. ${(error.message) ? `${error.message}` : ''}`)
})
}
}
Expand Down
Loading

0 comments on commit dc50499

Please sign in to comment.