diff --git a/api/src/main/resources/schema.sql b/api/src/main/resources/schema.sql index 704d8a3..fcc52dd 100644 --- a/api/src/main/resources/schema.sql +++ b/api/src/main/resources/schema.sql @@ -24,7 +24,8 @@ create table if not exists applications ( user_id text, extra_data text, status integer, - linked_application text default '' + linked_application text default '', + application_time text default '' ); create table if not exists views ( diff --git a/extensions/background-script.js b/extensions/background-script.js index 2e9a6d6..0b405ef 100644 --- a/extensions/background-script.js +++ b/extensions/background-script.js @@ -78,17 +78,17 @@ async function startup() { title: "Mark Page As the Url target", contexts: ["all"], }); - - browser.menus.onClicked.addListener(async function (e, tab) { - console.log("here") - if (e.menuItemId === "mark-page") { - console.log("set mark-page", tab.id) - await browser.storage.local.set({ - windows: tab.id, - }); - } - }); } browser.runtime.onInstalled.addListener(startup); +browser.runtime.onStartup.addListener(startup); browser.runtime.onConnect.addListener(startup); +browser.menus.onClicked.addListener(async function (e, tab) { + console.log("here") + if (e.menuItemId === "mark-page") { + console.log("set mark-page", tab.id) + await browser.storage.local.set({ + windows: tab.id, + }); + } +}); diff --git a/site/src/lib/ApplicationsStore.svelte.ts b/site/src/lib/ApplicationsStore.svelte.ts index 4d12780..916e34a 100644 --- a/site/src/lib/ApplicationsStore.svelte.ts +++ b/site/src/lib/ApplicationsStore.svelte.ts @@ -11,6 +11,7 @@ export const ApplicationStatus = Object.freeze({ Applyed: 4, Expired: 5, TasksToDo: 6, + LinkedApplication: 7 }); export const ApplicationStatusMaping: Record< @@ -24,6 +25,7 @@ export const ApplicationStatusMaping: Record< 4: 'Applyed', 5: 'Expired', 6: 'Tasks To Do', + 7: 'Linked Application', }); export type View = { diff --git a/site/src/routes/AppliyedList.svelte b/site/src/routes/AppliyedList.svelte index 67b5d1c..92412c4 100644 --- a/site/src/routes/AppliyedList.svelte +++ b/site/src/routes/AppliyedList.svelte @@ -5,19 +5,36 @@ onMount(() => { applicationStore.loadAplyed(); }); + + let filter = $state('');
-

Applied

+

+ Applied +

- {#each applicationStore.applyed as item} + {#each applicationStore.applyed.filter((i) => { + if (!filter) { + return true; + } + const f = new RegExp(filter, 'ig'); + + let x = i.title; + + if (i.company) { + x = `${x} @ ${i.company}`; + } + + return x.match(f); + }) as item}