|
28 | 28 | </svg> |
29 | 29 | </button> |
30 | 30 | </TooltipAnchor> |
31 | | - <div class="dcard-dropdown" |
32 | | - data-test="@UiTestIds.Library.CardMenuDropdown(Card.Id)" |
33 | | - @onclick:stopPropagation="true"> |
34 | | - <button type="button" |
35 | | - @onclick:stopPropagation="true" |
36 | | - @onclick="HandleOpenScriptAsync"> |
37 | | - <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"> |
38 | | - <path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" /> |
39 | | - <path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" /> |
40 | | - </svg> |
41 | | - @Text(UiTextKey.CommonRename) |
42 | | - </button> |
43 | | - <button type="button" |
44 | | - @onclick:stopPropagation="true" |
45 | | - @onclick="HandleDuplicateScriptAsync" |
46 | | - data-test="@UiTestIds.Library.CardDuplicate(Card.Id)"> |
47 | | - <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"> |
48 | | - <rect x="9" y="9" width="13" height="13" rx="2" /> |
49 | | - <path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" /> |
50 | | - </svg> |
51 | | - @Text(UiTextKey.CommonDuplicate) |
52 | | - </button> |
53 | | - <div class="dcard-dropdown-group"> |
54 | | - <div class="dcard-dropdown-label">@Text(UiTextKey.CommonMoveToEllipsis)</div> |
| 31 | + @if (IsMenuOpen) |
| 32 | + { |
| 33 | + <div class="dcard-dropdown" |
| 34 | + data-test="@UiTestIds.Library.CardMenuDropdown(Card.Id)" |
| 35 | + @onclick:stopPropagation="true"> |
55 | 36 | <button type="button" |
56 | | - data-test="@UiTestIds.Library.Move(Card.Id, LibrarySelectionKeys.None)" |
57 | 37 | @onclick:stopPropagation="true" |
58 | | - @onclick="() => HandleMoveScriptAsync(null)"> |
| 38 | + @onclick="HandleOpenScriptAsync"> |
59 | 39 | <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"> |
60 | | - <line x1="6" y1="6" x2="18" y2="18" /> |
61 | | - <line x1="6" y1="18" x2="18" y2="6" /> |
| 40 | + <path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" /> |
| 41 | + <path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" /> |
62 | 42 | </svg> |
63 | | - @Text(UiTextKey.CommonNoFolder) |
| 43 | + @Text(UiTextKey.CommonRename) |
64 | 44 | </button> |
65 | | - @foreach (var folder in FolderOptions) |
66 | | - { |
| 45 | + <button type="button" |
| 46 | + @onclick:stopPropagation="true" |
| 47 | + @onclick="HandleDuplicateScriptAsync" |
| 48 | + data-test="@UiTestIds.Library.CardDuplicate(Card.Id)"> |
| 49 | + <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"> |
| 50 | + <rect x="9" y="9" width="13" height="13" rx="2" /> |
| 51 | + <path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" /> |
| 52 | + </svg> |
| 53 | + @Text(UiTextKey.CommonDuplicate) |
| 54 | + </button> |
| 55 | + <div class="dcard-dropdown-group"> |
| 56 | + <div class="dcard-dropdown-label">@Text(UiTextKey.CommonMoveToEllipsis)</div> |
67 | 57 | <button type="button" |
68 | | - data-test="@UiTestIds.Library.Move(Card.Id, folder.Id)" |
| 58 | + data-test="@UiTestIds.Library.Move(Card.Id, LibrarySelectionKeys.None)" |
69 | 59 | @onclick:stopPropagation="true" |
70 | | - @onclick="() => HandleMoveScriptAsync(folder.Id)"> |
| 60 | + @onclick="() => HandleMoveScriptAsync(null)"> |
71 | 61 | <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"> |
72 | | - <path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z" /> |
| 62 | + <line x1="6" y1="6" x2="18" y2="18" /> |
| 63 | + <line x1="6" y1="18" x2="18" y2="6" /> |
73 | 64 | </svg> |
74 | | - @folder.Label |
| 65 | + @Text(UiTextKey.CommonNoFolder) |
75 | 66 | </button> |
76 | | - } |
| 67 | + @foreach (var folder in FolderOptions) |
| 68 | + { |
| 69 | + <button type="button" |
| 70 | + data-test="@UiTestIds.Library.Move(Card.Id, folder.Id)" |
| 71 | + @onclick:stopPropagation="true" |
| 72 | + @onclick="() => HandleMoveScriptAsync(folder.Id)"> |
| 73 | + <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"> |
| 74 | + <path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z" /> |
| 75 | + </svg> |
| 76 | + @folder.Label |
| 77 | + </button> |
| 78 | + } |
| 79 | + </div> |
| 80 | + <div class="dcard-dropdown-sep"></div> |
| 81 | + <button type="button" |
| 82 | + class="dcard-dropdown-danger" |
| 83 | + @onclick:stopPropagation="true" |
| 84 | + @onclick="HandleDeleteScriptAsync"> |
| 85 | + <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"> |
| 86 | + <polyline points="3,6 5,6 21,6" /> |
| 87 | + <path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" /> |
| 88 | + </svg> |
| 89 | + @Text(UiTextKey.CommonDelete) |
| 90 | + </button> |
77 | 91 | </div> |
78 | | - <div class="dcard-dropdown-sep"></div> |
79 | | - <button type="button" |
80 | | - class="dcard-dropdown-danger" |
81 | | - @onclick:stopPropagation="true" |
82 | | - @onclick="HandleDeleteScriptAsync"> |
83 | | - <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"> |
84 | | - <polyline points="3,6 5,6 21,6" /> |
85 | | - <path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" /> |
86 | | - </svg> |
87 | | - @Text(UiTextKey.CommonDelete) |
88 | | - </button> |
89 | | - </div> |
| 92 | + } |
90 | 93 | </div> |
91 | 94 | <div class="dcard-inner" data-test="@UiTestIds.Library.CardSurface(Card.Id)"> |
92 | 95 | <div class="dcard-cover @Card.CoverClass"> |
|
0 commit comments