mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
chore: update dropdown action button style
This commit is contained in:
@ -15,7 +15,6 @@ interface Props extends DialogProps {
|
|||||||
|
|
||||||
const CreateShortcutDialog: React.FC<Props> = (props: Props) => {
|
const CreateShortcutDialog: React.FC<Props> = (props: Props) => {
|
||||||
const { destroy, shortcutId } = props;
|
const { destroy, shortcutId } = props;
|
||||||
|
|
||||||
const [title, setTitle] = useState<string>("");
|
const [title, setTitle] = useState<string>("");
|
||||||
const [filters, setFilters] = useState<Filter[]>([]);
|
const [filters, setFilters] = useState<Filter[]>([]);
|
||||||
const requestState = useLoading(false);
|
const requestState = useLoading(false);
|
||||||
|
@ -155,23 +155,23 @@ const ResourcesDialog: React.FC<Props> = (props: Props) => {
|
|||||||
<span className="field-text">{resource.type}</span>
|
<span className="field-text">{resource.type}</span>
|
||||||
<div className="buttons-container">
|
<div className="buttons-container">
|
||||||
<Dropdown
|
<Dropdown
|
||||||
actionsClassName="!w-32"
|
actionsClassName="!w-28"
|
||||||
actions={
|
actions={
|
||||||
<>
|
<>
|
||||||
<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={() => handlPreviewBtnClick(resource)}
|
onClick={() => handlPreviewBtnClick(resource)}
|
||||||
>
|
>
|
||||||
{t("resources.preview")}
|
{t("resources.preview")}
|
||||||
</button>
|
</button>
|
||||||
<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)}
|
onClick={() => handleCopyResourceLinkBtnClick(resource)}
|
||||||
>
|
>
|
||||||
{t("resources.copy-link")}
|
{t("resources.copy-link")}
|
||||||
</button>
|
</button>
|
||||||
<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)}
|
onClick={() => handleDeleteResourceBtnClick(resource)}
|
||||||
>
|
>
|
||||||
{t("common.delete")}
|
{t("common.delete")}
|
||||||
|
@ -145,7 +145,7 @@ const PreferencesSection = () => {
|
|||||||
<>
|
<>
|
||||||
{user.rowStatus === "NORMAL" ? (
|
{user.rowStatus === "NORMAL" ? (
|
||||||
<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={() => handleArchiveUserClick(user)}
|
onClick={() => handleArchiveUserClick(user)}
|
||||||
>
|
>
|
||||||
{t("common.archive")}
|
{t("common.archive")}
|
||||||
@ -153,13 +153,13 @@ const PreferencesSection = () => {
|
|||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
<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={() => handleRestoreUserClick(user)}
|
onClick={() => handleRestoreUserClick(user)}
|
||||||
>
|
>
|
||||||
{t("common.restore")}
|
{t("common.restore")}
|
||||||
</button>
|
</button>
|
||||||
<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)}
|
onClick={() => handleDeleteUserClick(user)}
|
||||||
>
|
>
|
||||||
{t("common.delete")}
|
{t("common.delete")}
|
||||||
|
@ -29,10 +29,12 @@ const TagList = () => {
|
|||||||
const root: KVObject<any> = {
|
const root: KVObject<any> = {
|
||||||
subTags: [],
|
subTags: [],
|
||||||
};
|
};
|
||||||
|
|
||||||
for (const tag of sortedTags) {
|
for (const tag of sortedTags) {
|
||||||
const subtags = tag.split("/");
|
const subtags = tag.split("/");
|
||||||
let tempObj = root;
|
let tempObj = root;
|
||||||
let tagText = "";
|
let tagText = "";
|
||||||
|
|
||||||
for (let i = 0; i < subtags.length; i++) {
|
for (let i = 0; i < subtags.length; i++) {
|
||||||
const key = subtags[i];
|
const key = subtags[i];
|
||||||
if (i === 0) {
|
if (i === 0) {
|
||||||
@ -62,6 +64,7 @@ const TagList = () => {
|
|||||||
tempObj = obj;
|
tempObj = obj;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setTags(root.subTags as Tag[]);
|
setTags(root.subTags as Tag[]);
|
||||||
}, [tagsText]);
|
}, [tagsText]);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user