2023-06-23 10:52:03 +00:00
|
|
|
import {Setting, type SettingProps} from "./index.js";
|
2022-02-23 13:52:06 +00:00
|
|
|
|
2023-06-23 10:52:03 +00:00
|
|
|
export function UserLabelsSetting(props: SettingProps) {
|
|
|
|
return (
|
|
|
|
<Setting {...props}>
|
2022-02-23 13:52:06 +00:00
|
|
|
<p class="info">
|
|
|
|
Adds a way to create customizable labels to users. Wherever a link to a
|
|
|
|
person's profile is available, a <code>[+]</code> will be put next to
|
|
|
|
it. Clicking on that will bring up a dialog to add a new label and
|
|
|
|
clicking on existing labels will bring up the same dialog to edit them.
|
2022-02-27 14:37:11 +00:00
|
|
|
<br />
|
2023-06-23 10:52:03 +00:00
|
|
|
Or you can use the dedicated{" "}
|
|
|
|
<a href="/options/user-label-editor.html">User Label Editor</a> to add,
|
|
|
|
edit, or remove user labels.
|
2022-02-23 13:52:06 +00:00
|
|
|
</p>
|
|
|
|
|
|
|
|
<details>
|
|
|
|
<summary>View Customizable Values</summary>
|
|
|
|
<ul class="user-label-values">
|
2023-06-23 10:52:03 +00:00
|
|
|
<li>
|
|
|
|
<b>Username</b>: who to apply the label to.
|
|
|
|
</li>
|
2022-02-23 13:52:06 +00:00
|
|
|
<li>
|
|
|
|
<b>Priority</b>: determines the order of labels. If multiple labels
|
|
|
|
have the same priority they will be sorted alphabetically. In the
|
|
|
|
topic listing only the highest priority label will be shown.
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<b>Color</b>: will set the background color of the label. The
|
|
|
|
foreground color is calculated to be black or white depending on the
|
|
|
|
brightness of the background color.
|
|
|
|
<br />
|
|
|
|
Valid values are hex colors or <code>transparent</code>.
|
|
|
|
<br />
|
|
|
|
Colors based on your current Tildes theme are also available in the
|
|
|
|
dropdown menu.
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<b>Text</b>: the text to go in the label. If left empty the label
|
|
|
|
will show as a 12 by 12 pixel square instead.
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</details>
|
2023-06-23 10:52:03 +00:00
|
|
|
</Setting>
|
|
|
|
);
|
2022-02-23 13:52:06 +00:00
|
|
|
}
|