mirror of
https://github.com/usememos/memos.git
synced 2025-01-01 10:01:54 +08:00
chore: update dropdown action button style
This commit is contained in:
parent
a2180f177f
commit
0c80654cc2
4 changed files with 10 additions and 8 deletions
|
@ -15,7 +15,6 @@ interface Props extends DialogProps {
|
|||
|
||||
const CreateShortcutDialog: React.FC<Props> = (props: Props) => {
|
||||
const { destroy, shortcutId } = props;
|
||||
|
||||
const [title, setTitle] = useState<string>("");
|
||||
const [filters, setFilters] = useState<Filter[]>([]);
|
||||
const requestState = useLoading(false);
|
||||
|
|
|
@ -155,23 +155,23 @@ const ResourcesDialog: React.FC<Props> = (props: Props) => {
|
|||
<span className="field-text">{resource.type}</span>
|
||||
<div className="buttons-container">
|
||||
<Dropdown
|
||||
actionsClassName="!w-32"
|
||||
actionsClassName="!w-28"
|
||||
actions={
|
||||
<>
|
||||
<button
|
||||
className="w-full px-3 text-left leading-10 cursor-pointer rounded hover:bg-gray-100"
|
||||
className="w-full text-left text-sm leading-6 py-1 px-3 cursor-pointer rounded hover:bg-gray-100"
|
||||
onClick={() => handlPreviewBtnClick(resource)}
|
||||
>
|
||||
{t("resources.preview")}
|
||||
</button>
|
||||
<button
|
||||
className="w-full px-3 text-left leading-10 cursor-pointer rounded hover:bg-gray-100"
|
||||
className="w-full text-left text-sm leading-6 py-1 px-3 cursor-pointer rounded hover:bg-gray-100"
|
||||
onClick={() => handleCopyResourceLinkBtnClick(resource)}
|
||||
>
|
||||
{t("resources.copy-link")}
|
||||
</button>
|
||||
<button
|
||||
className="w-full px-3 text-left leading-10 cursor-pointer rounded text-red-600 hover:bg-gray-100"
|
||||
className="w-full text-left text-sm leading-6 py-1 px-3 cursor-pointer rounded text-red-600 hover:bg-gray-100"
|
||||
onClick={() => handleDeleteResourceBtnClick(resource)}
|
||||
>
|
||||
{t("common.delete")}
|
||||
|
|
|
@ -145,7 +145,7 @@ const PreferencesSection = () => {
|
|||
<>
|
||||
{user.rowStatus === "NORMAL" ? (
|
||||
<button
|
||||
className="w-full px-3 text-left leading-10 cursor-pointer rounded hover:bg-gray-100"
|
||||
className="w-full text-left text-sm leading-6 py-1 px-3 cursor-pointer rounded hover:bg-gray-100"
|
||||
onClick={() => handleArchiveUserClick(user)}
|
||||
>
|
||||
{t("common.archive")}
|
||||
|
@ -153,13 +153,13 @@ const PreferencesSection = () => {
|
|||
) : (
|
||||
<>
|
||||
<button
|
||||
className="w-full px-3 text-left leading-10 cursor-pointer rounded hover:bg-gray-100"
|
||||
className="w-full text-left text-sm leading-6 py-1 px-3 cursor-pointer rounded hover:bg-gray-100"
|
||||
onClick={() => handleRestoreUserClick(user)}
|
||||
>
|
||||
{t("common.restore")}
|
||||
</button>
|
||||
<button
|
||||
className="w-full px-3 text-left leading-10 cursor-pointer rounded text-red-600 hover:bg-gray-100"
|
||||
className="w-full text-left text-sm leading-6 py-1 px-3 cursor-pointer rounded text-red-600 hover:bg-gray-100"
|
||||
onClick={() => handleDeleteUserClick(user)}
|
||||
>
|
||||
{t("common.delete")}
|
||||
|
|
|
@ -29,10 +29,12 @@ const TagList = () => {
|
|||
const root: KVObject<any> = {
|
||||
subTags: [],
|
||||
};
|
||||
|
||||
for (const tag of sortedTags) {
|
||||
const subtags = tag.split("/");
|
||||
let tempObj = root;
|
||||
let tagText = "";
|
||||
|
||||
for (let i = 0; i < subtags.length; i++) {
|
||||
const key = subtags[i];
|
||||
if (i === 0) {
|
||||
|
@ -62,6 +64,7 @@ const TagList = () => {
|
|||
tempObj = obj;
|
||||
}
|
||||
}
|
||||
|
||||
setTags(root.subTags as Tag[]);
|
||||
}, [tagsText]);
|
||||
|
||||
|
|
Loading…
Reference in a new issue