refactor: ♻️ use parent/child selector for attachment
This commit is contained in:
parent
f72120bb9a
commit
d778f6ad77
|
@ -306,34 +306,39 @@ async function openSearchFilters(ev) {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: "ph-file ph-bold ph-lg",
|
type: "parent",
|
||||||
text: i18n.ts._filters.withFile,
|
text: i18n.ts._filters.withFile,
|
||||||
action: () => {
|
icon: "ph-paperclip ph-bold ph-lg",
|
||||||
os.select({
|
children: [
|
||||||
title: i18n.ts._filters.withFile,
|
{
|
||||||
items: [
|
text: i18n.ts.image,
|
||||||
{
|
icon: "ph-image-square ph-bold ph-lg",
|
||||||
text: i18n.ts.image,
|
action: () => {
|
||||||
value: "image",
|
inputValue.value += " has:image";
|
||||||
},
|
},
|
||||||
{
|
},
|
||||||
text: i18n.ts.video,
|
{
|
||||||
value: "video",
|
text: i18n.ts.video,
|
||||||
},
|
icon: "ph-video-camera ph-bold ph-lg",
|
||||||
{
|
action: () => {
|
||||||
text: i18n.ts.audio,
|
inputValue.value += " has:video";
|
||||||
value: "audio",
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: i18n.ts.file,
|
text: i18n.ts.audio,
|
||||||
value: "file",
|
icon: "ph-music-note ph-bold ph-lg",
|
||||||
},
|
action: () => {
|
||||||
],
|
inputValue.value += " has:audio";
|
||||||
}).then((res) => {
|
},
|
||||||
if (res.canceled) return;
|
},
|
||||||
inputValue.value += " has:" + res.result;
|
{
|
||||||
});
|
text: i18n.ts.file,
|
||||||
},
|
icon: "ph-file ph-bold ph-lg",
|
||||||
|
action: () => {
|
||||||
|
inputValue.value += " has:file";
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: "ph-link ph-bold ph-lg",
|
icon: "ph-link ph-bold ph-lg",
|
||||||
|
@ -350,7 +355,8 @@ async function openSearchFilters(ev) {
|
||||||
title: i18n.ts._filters.notesBefore,
|
title: i18n.ts._filters.notesBefore,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.canceled) return;
|
if (res.canceled) return;
|
||||||
inputValue.value += " before:" + formatDateToYYYYMMDD(res.result);
|
inputValue.value +=
|
||||||
|
" before:" + formatDateToYYYYMMDD(res.result);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -362,7 +368,8 @@ async function openSearchFilters(ev) {
|
||||||
title: i18n.ts._filters.notesAfter,
|
title: i18n.ts._filters.notesAfter,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.canceled) return;
|
if (res.canceled) return;
|
||||||
inputValue.value += " after:" + formatDateToYYYYMMDD(res.result);
|
inputValue.value +=
|
||||||
|
" after:" + formatDateToYYYYMMDD(res.result);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue