-
- {
- blinko.curMultiSelectIds = blinko.noteList.value?.map(i => i.id).filter(i => i !== undefined) || []
- }}
- className='cursor-pointer hover:opacity-80 transition-all' icon="fluent:select-all-on-16-filled" width="20" height="20" />
- {blinko.noteList.value?.length}/{blinko.curMultiSelectIds.length} {t('items')}
-
-
+ const { t } = useTranslation();
+ const blinko = RootStore.Get(BlinkoStore);
- {
+ const actions = [
+ {
+ icon: "eva:archive-outline",
+ text: t('archive'),
+ onClick: async () => {
await RootStore.Get(ToastPlugin).promise(
api.notes.updateMany.mutate({ ids: blinko.curMultiSelectIds, isArchived: true }),
{
loading: t('in-progress'),
success:
{t('your-changes-have-been-saved')},
error:
{t('operation-failed')},
- })
- blinko.onMultiSelectRest()
- }}>
-
-
{t('archive')}
-
-
- {
+ });
+ blinko.onMultiSelectRest();
+ }
+ },
+ {
+ icon: "solar:tag-outline",
+ text: t('add-tag'),
+ onClick: () => {
ShowUpdateTagDialog({
type: 'select',
onSave: async (tagName) => {
@@ -77,17 +41,17 @@ export const BlinkoMultiSelectPop = observer(() => {
loading: t('in-progress'),
success:
{t('your-changes-have-been-saved')},
error:
{t('operation-failed')},
- })
- blinko.onMultiSelectRest()
+ });
+ blinko.onMultiSelectRest();
}
- })
- }}>
-
-
{t('add-tag')}
-
-
- {
+ });
+ }
+ },
+ {
+ icon: "mingcute:delete-2-line",
+ text: t('delete'),
+ isDeleteButton: true,
+ onClick: () => {
showTipsDialog({
title: t('confirm-to-delete'),
content: t('this-operation-removes-the-associated-label-and-cannot-be-restored-please-confirm'),
@@ -98,24 +62,21 @@ export const BlinkoMultiSelectPop = observer(() => {
loading: t('in-progress'),
success:
{t('your-changes-have-been-saved')},
error:
{t('operation-failed')},
- })
- blinko.curMultiSelectIds.map(i => api.ai.embeddingDelete.mutate({ id: i }))
- blinko.onMultiSelectRest()
- RootStore.Get(DialogStandaloneStore).close()
+ });
+ blinko.curMultiSelectIds.map(i => api.ai.embeddingDelete.mutate({ id: i }));
+ blinko.onMultiSelectRest();
+ RootStore.Get(DialogStandaloneStore).close();
}
- })
-
- }} className={SelectItems + ' text-red-500'}>
-
-
{t('delete')}
-
-
- {
- blinko.onMultiSelectRest()
- }}>
-
-
+ });
+ }
+ }
+ ];
-
-})
\ No newline at end of file
+ return (
+