-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/assets/icons/broom.svg b/src/assets/icons/broom.svg
deleted file mode 100644
index 238b12d..0000000
--- a/src/assets/icons/broom.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
diff --git a/src/assets/icons/chevron.svg b/src/assets/icons/chevron.svg
deleted file mode 100644
index a888fd9..0000000
--- a/src/assets/icons/chevron.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/assets/icons/chunk.svg b/src/assets/icons/chunk.svg
deleted file mode 100644
index e36f53a..0000000
--- a/src/assets/icons/chunk.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
diff --git a/src/assets/icons/day.svg b/src/assets/icons/day.svg
deleted file mode 100644
index d6f21c9..0000000
--- a/src/assets/icons/day.svg
+++ /dev/null
@@ -1,256 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- image/svg+xml
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/assets/icons/edit_rule.svg b/src/assets/icons/edit_rule.svg
deleted file mode 100644
index e820e0f..0000000
--- a/src/assets/icons/edit_rule.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/src/assets/icons/edit_rule_dark.svg b/src/assets/icons/edit_rule_dark.svg
deleted file mode 100644
index c7f864a..0000000
--- a/src/assets/icons/edit_rule_dark.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/src/assets/icons/nav.svg b/src/assets/icons/nav.svg
deleted file mode 100644
index 4873c41..0000000
--- a/src/assets/icons/nav.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/src/assets/icons/night.svg b/src/assets/icons/night.svg
deleted file mode 100644
index ab6a2b8..0000000
--- a/src/assets/icons/night.svg
+++ /dev/null
@@ -1,298 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- image/svg+xml
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/assets/icons/osx-dark.png b/src/assets/icons/osx-dark.png
deleted file mode 100644
index 910f9a7..0000000
Binary files a/src/assets/icons/osx-dark.png and /dev/null differ
diff --git a/src/assets/icons/osx-light.png b/src/assets/icons/osx-light.png
deleted file mode 100644
index 830a586..0000000
Binary files a/src/assets/icons/osx-light.png and /dev/null differ
diff --git a/src/assets/icons/scan.svg b/src/assets/icons/scan.svg
deleted file mode 100644
index b9439aa..0000000
--- a/src/assets/icons/scan.svg
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/assets/icons/success.png b/src/assets/icons/success.png
deleted file mode 100644
index a8b7b25..0000000
Binary files a/src/assets/icons/success.png and /dev/null differ
diff --git a/src/assets/icons/titlebar.svg b/src/assets/icons/titlebar.svg
deleted file mode 100644
index af1f13f..0000000
--- a/src/assets/icons/titlebar.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
diff --git a/src/assets/icons/warning.svg b/src/assets/icons/warning.svg
deleted file mode 100644
index 31e91d1..0000000
--- a/src/assets/icons/warning.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
diff --git a/src/assets/icons/win-dark.png b/src/assets/icons/win-dark.png
deleted file mode 100644
index d1a3aa4..0000000
Binary files a/src/assets/icons/win-dark.png and /dev/null differ
diff --git a/src/assets/icons/win-light.png b/src/assets/icons/win-light.png
deleted file mode 100644
index 73994a0..0000000
Binary files a/src/assets/icons/win-light.png and /dev/null differ
diff --git a/src/assets/img/active-listener-dark.png b/src/assets/img/active-listener-dark.png
new file mode 100644
index 0000000..a9ac671
Binary files /dev/null and b/src/assets/img/active-listener-dark.png differ
diff --git a/src/assets/img/active-listener-light.png b/src/assets/img/active-listener-light.png
new file mode 100644
index 0000000..043df00
Binary files /dev/null and b/src/assets/img/active-listener-light.png differ
diff --git a/src/assets/img/alert-circle.svg b/src/assets/img/alert-circle.svg
new file mode 100644
index 0000000..c8e659a
--- /dev/null
+++ b/src/assets/img/alert-circle.svg
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/src/assets/img/chevron.svg b/src/assets/img/chevron.svg
new file mode 100644
index 0000000..c253fec
--- /dev/null
+++ b/src/assets/img/chevron.svg
@@ -0,0 +1,3 @@
+
+
+
diff --git a/src/assets/img/close.svg b/src/assets/img/close.svg
new file mode 100644
index 0000000..eac81ba
--- /dev/null
+++ b/src/assets/img/close.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/src/assets/img/copy.svg b/src/assets/img/copy.svg
new file mode 100644
index 0000000..fd298c5
--- /dev/null
+++ b/src/assets/img/copy.svg
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/assets/img/dashboard.svg b/src/assets/img/dashboard.svg
new file mode 100644
index 0000000..7cba106
--- /dev/null
+++ b/src/assets/img/dashboard.svg
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/src/assets/img/edit.svg b/src/assets/img/edit.svg
new file mode 100644
index 0000000..4014633
--- /dev/null
+++ b/src/assets/img/edit.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/src/assets/img/empty-state.png b/src/assets/img/empty-state.png
new file mode 100644
index 0000000..d90ef7e
Binary files /dev/null and b/src/assets/img/empty-state.png differ
diff --git a/src/assets/img/filter.svg b/src/assets/img/filter.svg
new file mode 100644
index 0000000..d122028
--- /dev/null
+++ b/src/assets/img/filter.svg
@@ -0,0 +1,3 @@
+
+
+
diff --git a/src/assets/img/inactive-listener-dark.png b/src/assets/img/inactive-listener-dark.png
new file mode 100644
index 0000000..7fe76b5
Binary files /dev/null and b/src/assets/img/inactive-listener-dark.png differ
diff --git a/src/assets/img/inactive-listener-light.png b/src/assets/img/inactive-listener-light.png
new file mode 100644
index 0000000..13bc6f6
Binary files /dev/null and b/src/assets/img/inactive-listener-light.png differ
diff --git a/src/assets/img/info.svg b/src/assets/img/info.svg
new file mode 100644
index 0000000..f44a737
--- /dev/null
+++ b/src/assets/img/info.svg
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/src/assets/img/journal.svg b/src/assets/img/journal.svg
new file mode 100644
index 0000000..9665a52
--- /dev/null
+++ b/src/assets/img/journal.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/src/assets/img/light.svg b/src/assets/img/light.svg
new file mode 100644
index 0000000..52ae3b7
--- /dev/null
+++ b/src/assets/img/light.svg
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/assets/img/listenerdetail.png b/src/assets/img/listenerdetail.png
new file mode 100644
index 0000000..89dcd80
Binary files /dev/null and b/src/assets/img/listenerdetail.png differ
diff --git a/src/assets/img/log-error.svg b/src/assets/img/log-error.svg
new file mode 100644
index 0000000..ced4b50
--- /dev/null
+++ b/src/assets/img/log-error.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/src/assets/img/log-success.svg b/src/assets/img/log-success.svg
new file mode 100644
index 0000000..3cf4d1b
--- /dev/null
+++ b/src/assets/img/log-success.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/src/assets/img/log-warn.svg b/src/assets/img/log-warn.svg
new file mode 100644
index 0000000..bf88686
--- /dev/null
+++ b/src/assets/img/log-warn.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/src/assets/img/logo.svg b/src/assets/img/logo.svg
new file mode 100644
index 0000000..f7ab36f
--- /dev/null
+++ b/src/assets/img/logo.svg
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/assets/img/macos.png b/src/assets/img/macos.png
new file mode 100644
index 0000000..1910c37
Binary files /dev/null and b/src/assets/img/macos.png differ
diff --git a/src/assets/img/macos.svg b/src/assets/img/macos.svg
new file mode 100644
index 0000000..329c6d5
--- /dev/null
+++ b/src/assets/img/macos.svg
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/assets/img/maximize.svg b/src/assets/img/maximize.svg
new file mode 100644
index 0000000..dd9572d
--- /dev/null
+++ b/src/assets/img/maximize.svg
@@ -0,0 +1,3 @@
+
+
+
diff --git a/src/assets/img/minimize.svg b/src/assets/img/minimize.svg
new file mode 100644
index 0000000..24aff95
--- /dev/null
+++ b/src/assets/img/minimize.svg
@@ -0,0 +1,3 @@
+
+
+
diff --git a/src/assets/img/monitor-path-icon.png b/src/assets/img/monitor-path-icon.png
new file mode 100644
index 0000000..16cca9d
Binary files /dev/null and b/src/assets/img/monitor-path-icon.png differ
diff --git a/src/assets/img/open-modal.svg b/src/assets/img/open-modal.svg
new file mode 100644
index 0000000..bd2a6a5
--- /dev/null
+++ b/src/assets/img/open-modal.svg
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/src/assets/img/overlay.png b/src/assets/img/overlay.png
new file mode 100644
index 0000000..1230e48
Binary files /dev/null and b/src/assets/img/overlay.png differ
diff --git a/src/assets/img/plus.svg b/src/assets/img/plus.svg
new file mode 100644
index 0000000..734e840
--- /dev/null
+++ b/src/assets/img/plus.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/src/assets/img/remove-circle.svg b/src/assets/img/remove-circle.svg
new file mode 100644
index 0000000..eccdf06
--- /dev/null
+++ b/src/assets/img/remove-circle.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/assets/img/search.svg b/src/assets/img/search.svg
new file mode 100644
index 0000000..b6b5b33
--- /dev/null
+++ b/src/assets/img/search.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/src/assets/img/settings.svg b/src/assets/img/settings.svg
new file mode 100644
index 0000000..edcd5f6
--- /dev/null
+++ b/src/assets/img/settings.svg
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/assets/img/sort.svg b/src/assets/img/sort.svg
new file mode 100644
index 0000000..21883cd
--- /dev/null
+++ b/src/assets/img/sort.svg
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/assets/img/statistics.svg b/src/assets/img/statistics.svg
new file mode 100644
index 0000000..d6d799f
--- /dev/null
+++ b/src/assets/img/statistics.svg
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/src/assets/img/stats_file.svg b/src/assets/img/stats_file.svg
new file mode 100644
index 0000000..47e23df
--- /dev/null
+++ b/src/assets/img/stats_file.svg
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/src/assets/img/stats_folder.svg b/src/assets/img/stats_folder.svg
new file mode 100644
index 0000000..4ce538d
--- /dev/null
+++ b/src/assets/img/stats_folder.svg
@@ -0,0 +1,3 @@
+
+
+
diff --git a/src/assets/img/trash.svg b/src/assets/img/trash.svg
new file mode 100644
index 0000000..7ff0fef
--- /dev/null
+++ b/src/assets/img/trash.svg
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/src/assets/img/unlock.svg b/src/assets/img/unlock.svg
new file mode 100644
index 0000000..7106b1b
--- /dev/null
+++ b/src/assets/img/unlock.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/src/assets/img/windows.png b/src/assets/img/windows.png
new file mode 100644
index 0000000..053c954
Binary files /dev/null and b/src/assets/img/windows.png differ
diff --git a/src/assets/img/windows.svg b/src/assets/img/windows.svg
new file mode 100644
index 0000000..87d5919
--- /dev/null
+++ b/src/assets/img/windows.svg
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/src/chart-utils.ts b/src/chart-utils.ts
deleted file mode 100644
index 7b2e599..0000000
--- a/src/chart-utils.ts
+++ /dev/null
@@ -1,134 +0,0 @@
-import { Listener } from "./store/modules/listener";
-import dataLabels from "chartjs-plugin-datalabels";
-
-const MONTHS = [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December",
-];
-
-const defaultObject = (obj: any, key: string, value: number) => {
- if (obj[key] === undefined) obj[key] = value;
- else {
- obj[key] = obj[key] + value;
- }
-};
-
-interface ChartData {
- labels: Array
;
- data: Array;
-}
-
-const generateChartData = (
- chartType: string,
- listeners: Listener[]
-): ChartData => {
- if (chartType == "line") {
- let dataset: Record = {};
- let upperBoundMonth: number = 0;
-
- listeners.forEach((listener) => {
- listener.logs.forEach((log) => {
- const date = new Date(log.timestamp);
- defaultObject(dataset, MONTHS[date.getMonth()], 1);
- });
- });
-
- let data: Array = [];
-
- MONTHS.forEach((month) => {
- if (Object.keys(dataset).indexOf(month) < 0) data.push(0);
- else data.push(dataset[month]);
- });
-
- data.forEach((d, idx) => {
- if (d > 0) upperBoundMonth = idx + 1;
- });
-
- return {
- labels: MONTHS.slice(0, upperBoundMonth),
- data,
- };
- } else {
- let labels: Array = [];
- let data: Array = [];
-
- for (let i = 0; i < listeners.length; i++) {
- labels.push(listeners[i].title);
- data.push(listeners[i].logs.length);
- }
- return {
- labels,
- data,
- };
- }
-};
-
-export const generateChart = (chartType: string, listeners: Listener[]) => {
- const { labels, data } = generateChartData(chartType, listeners);
- if (chartType == "line") {
- return {
- type: chartType,
- plugins: [dataLabels],
-
- data: {
- labels,
- datasets: [
- {
- label: "Monthly Activity",
- data,
- fill: false,
- borderColor: "#41B883",
- tension: 0.5,
- backgroundColor: "#555",
- },
- ],
- },
- options: {
- fill: false,
- maintainAspectRatio: false,
- interaction: {
- intersect: false,
- },
- radius: 0,
- plugins: {
- datalabels: {
- backgroundColor: function (context: any) {
- return context.dataset.backgroundColor;
- },
- borderRadius: 4,
- color: "white",
- font: {
- weight: "bold",
- },
- formatter: Math.round,
- padding: 6,
- },
- },
- },
- };
- } else if (chartType == "doughnut") {
- return {
- type: chartType,
- options: { responsive: true, maintainAspectRatio: false },
- data: {
- labels,
- datasets: [
- {
- backgroundColor: ["#41B883", "#E46651", "#00D8FF", "#DD1B16"],
- data,
- },
- ],
- },
- };
- }
-};
diff --git a/src/components/ActionItem.vue b/src/components/ActionItem.vue
deleted file mode 100644
index bef4e94..0000000
--- a/src/components/ActionItem.vue
+++ /dev/null
@@ -1,163 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/components/Broom.vue b/src/components/Broom.vue
deleted file mode 100644
index 780a40d..0000000
--- a/src/components/Broom.vue
+++ /dev/null
@@ -1,71 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/components/Chart.vue b/src/components/Chart.vue
deleted file mode 100644
index 086942e..0000000
--- a/src/components/Chart.vue
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
-
diff --git a/src/components/DetailCard.vue b/src/components/DetailCard.vue
deleted file mode 100644
index f9503fc..0000000
--- a/src/components/DetailCard.vue
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
Header here
-
-
Content here
-
-
diff --git a/src/components/Grammar.vue b/src/components/Grammar.vue
deleted file mode 100644
index b82d131..0000000
--- a/src/components/Grammar.vue
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
-
- If
- {{
- search_type
- }}
- {{
- condition
- }}
- {{ text }}
- Then...
-
-
diff --git a/src/components/Icon.vue b/src/components/Icon.vue
deleted file mode 100644
index 1c500e2..0000000
--- a/src/components/Icon.vue
+++ /dev/null
@@ -1,192 +0,0 @@
-
-
-
-
-
-
-
diff --git a/src/components/Listener.vue b/src/components/Listener.vue
deleted file mode 100644
index 81c1878..0000000
--- a/src/components/Listener.vue
+++ /dev/null
@@ -1,160 +0,0 @@
-
-
-
-
-
- {{ !enabled ? "Listener Not enabled" : "" }}
-
-
-
-
-
-
-
-
-
- {{ title }}
-
- Has been organized {{ logs?.length }} times
-
-
-
-
-
Last Updated {{ isToday || isYesterday ? "" : "At" }}
-
{{ formatDate }}
-
-
-
- {{ paths.length }}
-
-
-
diff --git a/src/components/ListenerDetail.vue b/src/components/ListenerDetail.vue
deleted file mode 100644
index 07af291..0000000
--- a/src/components/ListenerDetail.vue
+++ /dev/null
@@ -1,199 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
- Close
-
-
- Save
-
-
-
-
-
-
-
-
-
diff --git a/src/components/ListenerUsage.vue b/src/components/ListenerUsage.vue
deleted file mode 100644
index b270ed2..0000000
--- a/src/components/ListenerUsage.vue
+++ /dev/null
@@ -1,54 +0,0 @@
-
-
-
-
-
-
-
-
- {{ listener.title }}
- {{ calcPercentage }}%
-
-
-
-
-
diff --git a/src/components/Log.vue b/src/components/Log.vue
deleted file mode 100644
index 68a615e..0000000
--- a/src/components/Log.vue
+++ /dev/null
@@ -1,159 +0,0 @@
-
-
-
-
-
-
- {{ detail }}
-
-
-
-
-
-
-
-
-
- Updated At:
- {{
- new Date(timestamp).toLocaleString("en-US", {
- year: "numeric",
- month: "numeric",
- day: "numeric",
- hour: "numeric",
- minute: "numeric",
- second: "numeric",
- })
- }}
-
-
-
- UNDO
-
-
-
-
-
-
-
-
-
-
- {{ path }}
-
-
-
-
- {{ action }}
-
-
-
-
- {{ destination ? destination : "No Directory Required For Operation" }}
-
-
-
-
- {{ timestamp }}
-
-
-
-
-
-
-
diff --git a/src/components/Modal.vue b/src/components/Modal.vue
deleted file mode 100644
index 5e45a76..0000000
--- a/src/components/Modal.vue
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
- This is the header
-
-
-
-
diff --git a/src/components/Navbar.vue b/src/components/Navbar.vue
deleted file mode 100644
index e09b1f9..0000000
--- a/src/components/Navbar.vue
+++ /dev/null
@@ -1,145 +0,0 @@
-
-
-
-
-
-
-
-
-
- Smart Organizer
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Toggle Theme
-
-
-
-
-
diff --git a/src/components/Navlink.vue b/src/components/Navlink.vue
deleted file mode 100644
index 6462ed3..0000000
--- a/src/components/Navlink.vue
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
-
-
-
- {{ name }}
-
-
diff --git a/src/components/Path.vue b/src/components/Path.vue
deleted file mode 100644
index 186e585..0000000
--- a/src/components/Path.vue
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
- {{ path }}
- {{ dir_len }} Files or Folders
-
diff --git a/src/components/RouterLink.vue b/src/components/RouterLink.vue
deleted file mode 100644
index 33638ae..0000000
--- a/src/components/RouterLink.vue
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
-
diff --git a/src/components/RulesPopup.vue b/src/components/RulesPopup.vue
deleted file mode 100644
index a5ab9e3..0000000
--- a/src/components/RulesPopup.vue
+++ /dev/null
@@ -1,230 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- Close
-
-
- Save
-
-
-
-
-
-
- Type of Search
-
-
-
-
-
-
-
-
-
- Conditions
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/components/SettingTile.vue b/src/components/SettingTile.vue
deleted file mode 100644
index 0916d4c..0000000
--- a/src/components/SettingTile.vue
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-
- onclick?.()"
- :class="`Tile bg-l_white dark:text-gray-200 dark:bg-d_secondary px-2 pt-4 ${
- isExpanded ? '' : 'pb-4 '
- } font-comfortaa relative mb-2 flex flex-col`"
- >
-
-
-
-
-
-
-
- {{ caption }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/components/Settings.vue b/src/components/Settings.vue
deleted file mode 100644
index 9fc5ab9..0000000
--- a/src/components/Settings.vue
+++ /dev/null
@@ -1,217 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
- Close
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Macintosh Style
-
-
-
-
-
-
-
Windows Style
-
-
-
-
-
-
-
-
-
- updateConfig(e, 'interval')"
- :value="config.scanningInterval / 100"
- class="w-[70%] ml-16 mr-1"
- />
-
- {{ config.scanningInterval }}ms
-
-
-
-
- updateConfig(e, 'chunks')"
- :value="config.chunks"
- class="w-[70%] ml-16 mr-1"
- />
-
- {{ config.chunks }} chunk(s)
-
-
-
-
-
-
-
-
-
diff --git a/src/components/Switch.vue b/src/components/Switch.vue
deleted file mode 100644
index 6e4765c..0000000
--- a/src/components/Switch.vue
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-
-
-
diff --git a/src/components/ThemeSwitch.vue b/src/components/ThemeSwitch.vue
deleted file mode 100644
index 0d58405..0000000
--- a/src/components/ThemeSwitch.vue
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/components/Titlebar.vue b/src/components/Titlebar.vue
deleted file mode 100644
index 780e0ab..0000000
--- a/src/components/Titlebar.vue
+++ /dev/null
@@ -1,130 +0,0 @@
-
-
-
-
-
- {{ isCleaning && route.name != "Journal" ? "Path: " + log?.path : "" }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ isCleaning && route.name != "" ? "Path: " + log?.path : "" }}
-
-
-
diff --git a/src/components/common/ContextMenu.vue b/src/components/common/ContextMenu.vue
new file mode 100644
index 0000000..191a50d
--- /dev/null
+++ b/src/components/common/ContextMenu.vue
@@ -0,0 +1,51 @@
+
+
+
+
+
diff --git a/src/components/common/Dot.vue b/src/components/common/Dot.vue
new file mode 100644
index 0000000..fb30a62
--- /dev/null
+++ b/src/components/common/Dot.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/components/common/Dropdown.vue b/src/components/common/Dropdown.vue
new file mode 100644
index 0000000..c6b2b83
--- /dev/null
+++ b/src/components/common/Dropdown.vue
@@ -0,0 +1,93 @@
+
+
+
+
+
+
+ {{ currentOpt?.label }}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ option.label }}
+
+
+
+
+
+
+
diff --git a/src/components/common/Logo.vue b/src/components/common/Logo.vue
new file mode 100644
index 0000000..c7afc29
--- /dev/null
+++ b/src/components/common/Logo.vue
@@ -0,0 +1,84 @@
+
+
+
+
+
+
+
+ SMART
+ ORGANIZATION
+
+
+
+
+
+
diff --git a/src/components/common/Switch.vue b/src/components/common/Switch.vue
new file mode 100644
index 0000000..6fae9b4
--- /dev/null
+++ b/src/components/common/Switch.vue
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+ {{ first }}
+ /
+ {{ second }}
+
+
+
diff --git a/src/components/layout/AppLayout.vue b/src/components/layout/AppLayout.vue
new file mode 100644
index 0000000..5116a5f
--- /dev/null
+++ b/src/components/layout/AppLayout.vue
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/listener/Listener.vue b/src/components/listener/Listener.vue
new file mode 100644
index 0000000..d7baa85
--- /dev/null
+++ b/src/components/listener/Listener.vue
@@ -0,0 +1,80 @@
+
+
+
+
+
+
+
+
+
+ {{ title }}
+
+ {{ status }}
+
+
+
+
+
+ {{ action }}
+
+
+ Organized
+ {{ organized }}
+ item(s)
+
+
+ Last updated:
+ {{ lastUpdated }} |
+ Created:
+ {{ createdDate }}
+
+
+
+
+
+
+
+
diff --git a/src/components/listenerModal/Action.vue b/src/components/listenerModal/Action.vue
new file mode 100644
index 0000000..2d515dc
--- /dev/null
+++ b/src/components/listenerModal/Action.vue
@@ -0,0 +1,66 @@
+
+
+
+
+
+ Please select actions to perform: {{ path }}
+
+
+
+
+
+
diff --git a/src/components/listenerModal/Chips.vue b/src/components/listenerModal/Chips.vue
new file mode 100644
index 0000000..8747453
--- /dev/null
+++ b/src/components/listenerModal/Chips.vue
@@ -0,0 +1,40 @@
+
+
+
+
+
+
diff --git a/src/components/listenerModal/ListenerModal.vue b/src/components/listenerModal/ListenerModal.vue
new file mode 100644
index 0000000..77e5ae3
--- /dev/null
+++ b/src/components/listenerModal/ListenerModal.vue
@@ -0,0 +1,322 @@
+
+
+
+
+
+
+
+
+ Are you absolutely sure?
+
+ This action cannot be undone. You will permanently lose any changes made to this listener.
+
+
+
+ Cancel
+ Continue
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Listener
+ /
+
+
+
+
+ {{ setOpt(opt) }}
+
+ {{ opt?.label }}
+
+
+
+
+
+
+
+
+
+
+ {{hint}}
+
+
+
+
+
+
+
+
+
+
+ Add New
+
+
{{ amount }} {{ route + "(s)" }}
+
+
+
+
+
+
+
+ Are you absolutely sure?
+
+ This action cannot be undone. This will permanently delete this listener without the possibilty of retrieval.
+
+
+
+ Cancel
+ Continue
+
+
+
+
+
+
+
+
+
+
+ Apply all of the following
+
+
+
+
+ Apply any of the following
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PREV. STEP
+ ADDING {{ step.prev.toUpperCase() + "S" }}
+
+
+
+
+
+ NEXT STEP
+ ADDING {{ step.next.toUpperCase() + "S" }}
+
+
+
+
+
+ Close w/o saving
+
+
+ Save
+
+
+
+
+
+
+
+
+
diff --git a/src/components/listenerModal/Monitor.vue b/src/components/listenerModal/Monitor.vue
new file mode 100644
index 0000000..7936de7
--- /dev/null
+++ b/src/components/listenerModal/Monitor.vue
@@ -0,0 +1,111 @@
+
+
+
+
+
+
+
+
+
+
{{ path }}
+
+ {{ counts[idx]?.files }}
+ files |
+ {{ counts[idx]?.folders }}
+ folders
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/listenerModal/Rule.vue b/src/components/listenerModal/Rule.vue
new file mode 100644
index 0000000..6fa292f
--- /dev/null
+++ b/src/components/listenerModal/Rule.vue
@@ -0,0 +1,73 @@
+
+
+
+
If
+
+
update(e, idx, 'search')" :options="searchOpts" />
+
+ update(e, idx, 'condition')"
+ :options="conditionOpts" />
+
+
+
+
+ update([+(e.target as HTMLInputElement).value, size[1]], idx, 'data.size')" />
+
+ update([size[0], e], idx, 'data.size')"
+ :options="sizeOpts" />
+
+
+
+
+
+
+
diff --git a/src/components/navbar/NavItem.vue b/src/components/navbar/NavItem.vue
new file mode 100644
index 0000000..d03ea5c
--- /dev/null
+++ b/src/components/navbar/NavItem.vue
@@ -0,0 +1,57 @@
+
+
+
+
+
+
+
+
+
+
+
+ {{ name }}
+
+
+
+
+ {{ tooltipText }}
+
+
+
+
+
diff --git a/src/components/navbar/Navbar.vue b/src/components/navbar/Navbar.vue
new file mode 100644
index 0000000..9ec81b2
--- /dev/null
+++ b/src/components/navbar/Navbar.vue
@@ -0,0 +1,177 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Dashboard
+
+
+
+
+
+
+
+ Journal
+
+
+
+
+
+
+
+ Statistics
+
+
+
+
+
+
+
+
+
+
+
+
+ Add New Organizer
+
+
+
+
+
+
+ Settings
+
+
+
+
+
+
+
+
+
+
+
+ LIGHT
+ /
+ DARK
+
+
+
+
+
+
+
+
diff --git a/src/components/routes/Action.vue b/src/components/routes/Action.vue
deleted file mode 100644
index d8935ad..0000000
--- a/src/components/routes/Action.vue
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-
-
Actions
-
openPath(action[1])"
- v-for="(action, idx) in getActions"
- :action="action"
- :idx="idx"
- />
-
-
diff --git a/src/components/routes/Monitor.vue b/src/components/routes/Monitor.vue
deleted file mode 100644
index 7f3fde4..0000000
--- a/src/components/routes/Monitor.vue
+++ /dev/null
@@ -1,64 +0,0 @@
-
-
-
-
-
Monitor Location
-
-
openPath(path)"
- class="ml-8 mr-8 dark:text-gray-300 hover:cursor-pointer"
- v-for="(path, idx) in getPaths"
- >
-
-
-
-
-
-
-
-
-
-
diff --git a/src/components/routes/Rules.vue b/src/components/routes/Rules.vue
deleted file mode 100644
index 2c1f46e..0000000
--- a/src/components/routes/Rules.vue
+++ /dev/null
@@ -1,171 +0,0 @@
-
-// TODO: Add icon for text to filter for on Modal
-
-
-
Rules
-
-
-
-
-
-
-
-
-
Selection
-
-
-
-
-
-
- Any of the following
-
-
-
- All of the following
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/components/setting/SettingPanel.vue b/src/components/setting/SettingPanel.vue
new file mode 100644
index 0000000..62adb88
--- /dev/null
+++ b/src/components/setting/SettingPanel.vue
@@ -0,0 +1,83 @@
+
+
+
+
+
+
+
+ Settings
+
+
+
+
+ TITLE BAR
+
+
+
+
+
+
+ Macintosh Style
+
+
+
+
+
+
+
+
+
+
+
+ Windows Style
+
+
+
+
+
+
+
+
+
+
+ PIN SIDEBAR
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/titlebar/Titlebar.vue b/src/components/titlebar/Titlebar.vue
new file mode 100644
index 0000000..af282a9
--- /dev/null
+++ b/src/components/titlebar/Titlebar.vue
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
diff --git a/src/components/titlebar/tauri-controls/WindowControls.vue b/src/components/titlebar/tauri-controls/WindowControls.vue
new file mode 100644
index 0000000..8259c2e
--- /dev/null
+++ b/src/components/titlebar/tauri-controls/WindowControls.vue
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+
diff --git a/src/components/titlebar/tauri-controls/WindowTitlebar.vue b/src/components/titlebar/tauri-controls/WindowTitlebar.vue
new file mode 100644
index 0000000..a246b74
--- /dev/null
+++ b/src/components/titlebar/tauri-controls/WindowTitlebar.vue
@@ -0,0 +1,64 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/titlebar/tauri-controls/components/Button.vue b/src/components/titlebar/tauri-controls/components/Button.vue
new file mode 100644
index 0000000..ecabe9e
--- /dev/null
+++ b/src/components/titlebar/tauri-controls/components/Button.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/components/titlebar/tauri-controls/components/Icons.vue b/src/components/titlebar/tauri-controls/components/Icons.vue
new file mode 100644
index 0000000..4feab80
--- /dev/null
+++ b/src/components/titlebar/tauri-controls/components/Icons.vue
@@ -0,0 +1,141 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/titlebar/tauri-controls/controls/MacOs.vue b/src/components/titlebar/tauri-controls/controls/MacOs.vue
new file mode 100644
index 0000000..0836579
--- /dev/null
+++ b/src/components/titlebar/tauri-controls/controls/MacOs.vue
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/titlebar/tauri-controls/controls/Windows.vue b/src/components/titlebar/tauri-controls/controls/Windows.vue
new file mode 100644
index 0000000..377728c
--- /dev/null
+++ b/src/components/titlebar/tauri-controls/controls/Windows.vue
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/titlebar/tauri-controls/controls/linux/Gnome.vue b/src/components/titlebar/tauri-controls/controls/linux/Gnome.vue
new file mode 100644
index 0000000..4f9b125
--- /dev/null
+++ b/src/components/titlebar/tauri-controls/controls/linux/Gnome.vue
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/titlebar/tauri-controls/index.css b/src/components/titlebar/tauri-controls/index.css
new file mode 100644
index 0000000..b5c61c9
--- /dev/null
+++ b/src/components/titlebar/tauri-controls/index.css
@@ -0,0 +1,3 @@
+@tailwind base;
+@tailwind components;
+@tailwind utilities;
diff --git a/src/components/titlebar/tauri-controls/index.ts b/src/components/titlebar/tauri-controls/index.ts
new file mode 100644
index 0000000..606243c
--- /dev/null
+++ b/src/components/titlebar/tauri-controls/index.ts
@@ -0,0 +1,7 @@
+import "./index.css";
+import WindowControls from "./WindowControls.vue";
+import WindowTitlebar from "./WindowTitlebar.vue";
+
+export type { WindowControlsProps, WindowTitlebarProps } from "./types";
+
+export { WindowControls, WindowTitlebar };
diff --git a/src/components/titlebar/tauri-controls/types.ts b/src/components/titlebar/tauri-controls/types.ts
new file mode 100644
index 0000000..690710d
--- /dev/null
+++ b/src/components/titlebar/tauri-controls/types.ts
@@ -0,0 +1,83 @@
+/**
+ * Interface for window controls.
+ * If the `platform` property is not specified, the library will automatically detect
+ * the operating system the app is running on and display the appropriate elements.
+ */
+export interface WindowControlsProps {
+ /**
+ * Specifies which platform's window controls to display.
+ * It can be one of "windows", "macos", or "gnome".
+ * If the `platform` property is not specified, the library will automatically detect
+ * the operating system the app is running on and display the appropriate elements.
+ */
+ platform?: "windows" | "macos" | "gnome";
+
+ /**
+ * Indicates whether the window controls should be shown or hidden.
+ * @default false
+ */
+ hide?: boolean;
+
+ /**
+ * - "display": "display: none;" making them completely invisible and not taking up any space.
+ * - "visibility": "visibility: hidden;" making them invisible but still occupying the same space.
+ * @default "display"
+ */
+ hideMethod?: "display" | "visibility";
+
+ /**
+ * Justify/Snap WindowControls
+ *
+ * @default false, (if not defined in WindowTitlebar automatically assigned)
+ */
+ justify?: boolean;
+
+ /**
+ * Specifies the Linux desktop environment for which the window controls are intended.
+ * This property is applicable only when the platform is set to "linux".
+ * @default "gnome"
+ */
+ // linuxDesktop?: "gnome" | "kde" | "budgie"
+
+ /**
+ * Indicates whether to prevent the right-click context menu.
+ * When set to true, it will prevent the default right-click behavior.
+ * (only in production, default false)
+ */
+ // preventRightClickMenu?: "always" | "production"
+
+ /** `data-tauri-drag-region` */
+ // "data-tauri-drag-region"?: boolean
+
+ /**
+ * to add custom class to window controls
+ */
+ className?: string;
+}
+
+/**
+ * Interface for titlebar
+ */
+export interface WindowTitlebarProps {
+ /**
+ * The `controlsOrder` property is an optional property used in the `WindowControls` interface.
+ * It allows you to specify the order in which the window controls should be rendered relative to the children.
+ * (default: system)
+ *
+ * When `controlsOrder` is not specified or set to `system`, the default behavior will be as follows:
+ * - For platforms other than macOS, the controls will be on the right side of the children.
+ * - For macOS, the controls will be on the left side of the children (similar to "left" option).
+ *
+ * Possible values for `controlsOrder`:
+ * - "right": The window controls will be rendered to the right of the children.
+ * - "left": The window controls will be rendered to the left of the children. This order applies only when the platform is macOS (macOS window controls are usually located on the left side of the title bar).
+ * - "platform": for OS-based positioning specified in `windowControlsProps`
+ * @default "system"
+ */
+ controlsOrder?: "right" | "left" | "platform" | "system";
+
+ /**
+ * `WindowControls` props
+ */
+ windowControlsProps?: WindowControlsProps;
+}
diff --git a/src/components/titlebar/tauri-controls/utils/os.ts b/src/components/titlebar/tauri-controls/utils/os.ts
new file mode 100644
index 0000000..09ef8ba
--- /dev/null
+++ b/src/components/titlebar/tauri-controls/utils/os.ts
@@ -0,0 +1,24 @@
+import type { OsType } from "@tauri-apps/api/os";
+
+let osType: OsType | undefined = undefined;
+let osTypePromise: Promise | null = null;
+
+if (typeof window !== "undefined") {
+ osTypePromise = import("@tauri-apps/api/os").then((module) => {
+ return module.type().then((x) => {
+ osType = x; // Assign the value of osType here
+ return x; // Return the value to the promise chain
+ });
+ });
+}
+
+// A helper function to get the OS type, which returns a Promise
+export function getOsType(): Promise {
+ if (!osTypePromise) {
+ // If the module was already loaded, just return the result
+ return Promise.resolve(osType!); // Use non-null assertion
+ }
+
+ // If the module is still loading, wait for it to finish and return the result
+ return osTypePromise;
+}
diff --git a/src/components/titlebar/tauri-controls/utils/window.ts b/src/components/titlebar/tauri-controls/utils/window.ts
new file mode 100644
index 0000000..fe37b99
--- /dev/null
+++ b/src/components/titlebar/tauri-controls/utils/window.ts
@@ -0,0 +1,26 @@
+import { getCurrent } from "@tauri-apps/api/window";
+import { ref } from "vue";
+
+export const appWindow = getCurrent();
+export const isWindowMaximized = ref(false)
+
+export const minimizeWindow = async () => {
+ await appWindow.minimize()
+}
+
+export const maximizeWindow = async () => {
+ await appWindow.toggleMaximize();
+ isWindowMaximized.value = !isWindowMaximized.value;
+}
+
+export const fullscreenWindow = async () => {
+ const window = appWindow;
+ if (window) {
+ const fullscreen = await window.isFullscreen();
+ await window.setFullscreen(!fullscreen);
+ }
+}
+
+export const closeWindow = async () => {
+ await appWindow.close()
+}
diff --git a/src/components/ui/alert-dialog/AlertDialog.vue b/src/components/ui/alert-dialog/AlertDialog.vue
new file mode 100644
index 0000000..f0c5e07
--- /dev/null
+++ b/src/components/ui/alert-dialog/AlertDialog.vue
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
diff --git a/src/components/ui/alert-dialog/AlertDialogAction.vue b/src/components/ui/alert-dialog/AlertDialogAction.vue
new file mode 100644
index 0000000..f82508f
--- /dev/null
+++ b/src/components/ui/alert-dialog/AlertDialogAction.vue
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
diff --git a/src/components/ui/alert-dialog/AlertDialogCancel.vue b/src/components/ui/alert-dialog/AlertDialogCancel.vue
new file mode 100644
index 0000000..bbbd5a3
--- /dev/null
+++ b/src/components/ui/alert-dialog/AlertDialogCancel.vue
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
diff --git a/src/components/ui/alert-dialog/AlertDialogContent.vue b/src/components/ui/alert-dialog/AlertDialogContent.vue
new file mode 100644
index 0000000..caad77f
--- /dev/null
+++ b/src/components/ui/alert-dialog/AlertDialogContent.vue
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/ui/alert-dialog/AlertDialogDescription.vue b/src/components/ui/alert-dialog/AlertDialogDescription.vue
new file mode 100644
index 0000000..7ff155e
--- /dev/null
+++ b/src/components/ui/alert-dialog/AlertDialogDescription.vue
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
diff --git a/src/components/ui/alert-dialog/AlertDialogFooter.vue b/src/components/ui/alert-dialog/AlertDialogFooter.vue
new file mode 100644
index 0000000..de4af93
--- /dev/null
+++ b/src/components/ui/alert-dialog/AlertDialogFooter.vue
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
diff --git a/src/components/ui/alert-dialog/AlertDialogHeader.vue b/src/components/ui/alert-dialog/AlertDialogHeader.vue
new file mode 100644
index 0000000..a350b71
--- /dev/null
+++ b/src/components/ui/alert-dialog/AlertDialogHeader.vue
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
diff --git a/src/components/ui/alert-dialog/AlertDialogTitle.vue b/src/components/ui/alert-dialog/AlertDialogTitle.vue
new file mode 100644
index 0000000..9b6491f
--- /dev/null
+++ b/src/components/ui/alert-dialog/AlertDialogTitle.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
diff --git a/src/components/ui/alert-dialog/AlertDialogTrigger.vue b/src/components/ui/alert-dialog/AlertDialogTrigger.vue
new file mode 100644
index 0000000..4f5e2fd
--- /dev/null
+++ b/src/components/ui/alert-dialog/AlertDialogTrigger.vue
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
diff --git a/src/components/ui/alert-dialog/index.ts b/src/components/ui/alert-dialog/index.ts
new file mode 100644
index 0000000..91d138a
--- /dev/null
+++ b/src/components/ui/alert-dialog/index.ts
@@ -0,0 +1,9 @@
+export { default as AlertDialog } from './AlertDialog.vue'
+export { default as AlertDialogTrigger } from './AlertDialogTrigger.vue'
+export { default as AlertDialogContent } from './AlertDialogContent.vue'
+export { default as AlertDialogHeader } from './AlertDialogHeader.vue'
+export { default as AlertDialogTitle } from './AlertDialogTitle.vue'
+export { default as AlertDialogDescription } from './AlertDialogDescription.vue'
+export { default as AlertDialogFooter } from './AlertDialogFooter.vue'
+export { default as AlertDialogAction } from './AlertDialogAction.vue'
+export { default as AlertDialogCancel } from './AlertDialogCancel.vue'
diff --git a/src/components/ui/button/Button.vue b/src/components/ui/button/Button.vue
new file mode 100644
index 0000000..d721b1a
--- /dev/null
+++ b/src/components/ui/button/Button.vue
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
diff --git a/src/components/ui/button/index.ts b/src/components/ui/button/index.ts
new file mode 100644
index 0000000..382c4f4
--- /dev/null
+++ b/src/components/ui/button/index.ts
@@ -0,0 +1,32 @@
+import { cva } from 'class-variance-authority'
+
+export { default as Button } from './Button.vue'
+
+export const buttonVariants = cva(
+ 'inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50',
+ {
+ variants: {
+ variant: {
+ default: 'bg-primary text-primary-foreground hover:bg-primary/90',
+ destructive:
+ 'bg-destructive text-destructive-foreground hover:bg-destructive/90',
+ outline:
+ 'border border-input bg-background hover:bg-accent hover:text-accent-foreground',
+ secondary:
+ 'bg-secondary text-secondary-foreground hover:bg-secondary/80',
+ ghost: 'hover:bg-accent hover:text-accent-foreground',
+ link: 'text-primary underline-offset-4 hover:underline',
+ },
+ size: {
+ default: 'h-10 px-4 py-2',
+ sm: 'h-9 rounded-md px-3',
+ lg: 'h-11 rounded-md px-8',
+ icon: 'h-10 w-10',
+ },
+ },
+ defaultVariants: {
+ variant: 'default',
+ size: 'default',
+ },
+ },
+)
diff --git a/src/components/ui/dialog/Dialog.vue b/src/components/ui/dialog/Dialog.vue
new file mode 100644
index 0000000..65d92c8
--- /dev/null
+++ b/src/components/ui/dialog/Dialog.vue
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
diff --git a/src/components/ui/dialog/DialogContent.vue b/src/components/ui/dialog/DialogContent.vue
new file mode 100644
index 0000000..2f86366
--- /dev/null
+++ b/src/components/ui/dialog/DialogContent.vue
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+
+ Close
+
+
+
+
diff --git a/src/components/ui/dialog/DialogDescription.vue b/src/components/ui/dialog/DialogDescription.vue
new file mode 100644
index 0000000..0501822
--- /dev/null
+++ b/src/components/ui/dialog/DialogDescription.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
diff --git a/src/components/ui/dialog/DialogFooter.vue b/src/components/ui/dialog/DialogFooter.vue
new file mode 100644
index 0000000..734623f
--- /dev/null
+++ b/src/components/ui/dialog/DialogFooter.vue
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
diff --git a/src/components/ui/dialog/DialogHeader.vue b/src/components/ui/dialog/DialogHeader.vue
new file mode 100644
index 0000000..ad3340b
--- /dev/null
+++ b/src/components/ui/dialog/DialogHeader.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
diff --git a/src/components/ui/dialog/DialogTitle.vue b/src/components/ui/dialog/DialogTitle.vue
new file mode 100644
index 0000000..5e748aa
--- /dev/null
+++ b/src/components/ui/dialog/DialogTitle.vue
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
diff --git a/src/components/ui/dialog/DialogTrigger.vue b/src/components/ui/dialog/DialogTrigger.vue
new file mode 100644
index 0000000..ee0c12f
--- /dev/null
+++ b/src/components/ui/dialog/DialogTrigger.vue
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
diff --git a/src/components/ui/dialog/index.ts b/src/components/ui/dialog/index.ts
new file mode 100644
index 0000000..5cffe9e
--- /dev/null
+++ b/src/components/ui/dialog/index.ts
@@ -0,0 +1,7 @@
+export { default as Dialog } from './Dialog.vue'
+export { default as DialogTrigger } from './DialogTrigger.vue'
+export { default as DialogHeader } from './DialogHeader.vue'
+export { default as DialogTitle } from './DialogTitle.vue'
+export { default as DialogDescription } from './DialogDescription.vue'
+export { default as DialogContent } from './DialogContent.vue'
+export { default as DialogFooter } from './DialogFooter.vue'
diff --git a/src/components/ui/tooltip/Tooltip.vue b/src/components/ui/tooltip/Tooltip.vue
new file mode 100644
index 0000000..b55bd64
--- /dev/null
+++ b/src/components/ui/tooltip/Tooltip.vue
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
diff --git a/src/components/ui/tooltip/TooltipContent.vue b/src/components/ui/tooltip/TooltipContent.vue
new file mode 100644
index 0000000..c06b932
--- /dev/null
+++ b/src/components/ui/tooltip/TooltipContent.vue
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/components/ui/tooltip/TooltipProvider.vue b/src/components/ui/tooltip/TooltipProvider.vue
new file mode 100644
index 0000000..816505d
--- /dev/null
+++ b/src/components/ui/tooltip/TooltipProvider.vue
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
diff --git a/src/components/ui/tooltip/TooltipTrigger.vue b/src/components/ui/tooltip/TooltipTrigger.vue
new file mode 100644
index 0000000..f5b0e57
--- /dev/null
+++ b/src/components/ui/tooltip/TooltipTrigger.vue
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
diff --git a/src/components/ui/tooltip/index.ts b/src/components/ui/tooltip/index.ts
new file mode 100644
index 0000000..82049b4
--- /dev/null
+++ b/src/components/ui/tooltip/index.ts
@@ -0,0 +1,4 @@
+export { default as Tooltip } from './Tooltip.vue'
+export { default as TooltipContent } from './TooltipContent.vue'
+export { default as TooltipTrigger } from './TooltipTrigger.vue'
+export { default as TooltipProvider } from './TooltipProvider.vue'
diff --git a/src/composables/index.ts b/src/composables/index.ts
new file mode 100644
index 0000000..b8d2ffc
--- /dev/null
+++ b/src/composables/index.ts
@@ -0,0 +1,32 @@
+import { ref, computed, onMounted, onUnmounted } from 'vue';
+
+export function useMouse() {
+ const x = ref(0);
+ const y = ref(0);
+
+ function update(event: MouseEvent) {
+ x.value = event.pageX;
+ y.value = event.pageY;
+ }
+
+ onMounted(() => window.addEventListener('mousemove', update));
+ onUnmounted(() => window.removeEventListener('mousemove', update));
+
+ return { x, y };
+}
+
+
+export function useStatus(listener: IListener) {
+ return computed(() => {
+ let listenerStatus = listener.enabled ? "ACTIVE" : "INACTIVE";
+ if (
+ listener.monitors.length < 1 ||
+ listener.rules.length < 1 ||
+ listener.actions.length < 1 ||
+ listener.selection.length < 1
+ )
+ listenerStatus = "DRAFT";
+
+ return listenerStatus;
+ })
+}
diff --git a/src/data.ts b/src/data.ts
new file mode 100644
index 0000000..5dea698
--- /dev/null
+++ b/src/data.ts
@@ -0,0 +1,381 @@
+//@ts-nocheck
+export const Logs: ILog[] = [
+ {
+ id: "1",
+ name: "Listener 1",
+ path: "/path/to/file1",
+ action: "MOVE",
+ parentId: "parent1",
+ timestamp: "2023-06-01T10:00:00Z",
+ destination: "/path/to/destination1",
+ message: "log message 1",
+ level: "WARN",
+ },
+ {
+ id: "2",
+ name: "Listener 2",
+ path: "/path/to/file2",
+ action: "COPY",
+ parentId: "parent2",
+ timestamp: "2023-06-01T11:00:00Z",
+ destination: "/path/to/destination2",
+ message: "log message 2",
+ level: "SUCCESS",
+ },
+ {
+ id: "3",
+ name: "Listener 1",
+ path: "/path/to/file3",
+ action: "UNLINK",
+ parentId: "parent3",
+ timestamp: "2023-06-01T12:00:00Z",
+ destination: "/path/to/destination3",
+ message: "log message 3",
+ level: "INFO",
+ },
+ // {
+ // id: "4",
+ // path: "/path/to/file4",
+ // action: "DELETE",
+ // parentId: "parent4",
+ // timestamp: "2023-06-01T13:00:00Z",
+ // destination: "/path/to/destination4",
+ // message: "error:log message 4",
+ // },
+ // {
+ // id: "5",
+ // path: "/path/to/file5",
+ // action: "RENAME",
+ // parentId: "parent5",
+ // timestamp: "2023-06-01T14:00:00Z",
+ // destination: "/path/to/destination5",
+ // message: "warn:log message 5",
+ // },
+ // {
+ // id: "6",
+ // path: "/path/to/file6",
+ // action: "COPY",
+ // parentId: "parent6",
+ // timestamp: "2023-06-01T15:00:00Z",
+ // destination: "/path/to/destination6",
+ // message: "error:log message 6",
+ // },
+ // {
+ // id: "7",
+ // path: "/path/to/file7",
+ // action: "MOVE",
+ // parentId: "parent7",
+ // timestamp: "2023-06-01T16:00:00Z",
+ // destination: "/path/to/destination7",
+ // message: "success:log message 7",
+ // },
+ // {
+ // id: "8",
+ // path: "/path/to/file8",
+ // action: "DELETE",
+ // parentId: "parent8",
+ // timestamp: "2023-06-01T17:00:00Z",
+ // destination: "/path/to/destination8",
+ // message: "warn:log message 8",
+ // },
+ // {
+ // id: "9",
+ // path: "/path/to/file9",
+ // action: "RENAME",
+ // parentId: "parent9",
+ // timestamp: "2023-06-01T18:00:00Z",
+ // destination: "/path/to/destination9",
+ // message: "error:log message 9",
+ // },
+ // {
+ // id: "10",
+ // path: "/path/to/file10",
+ // action: "UNLINK",
+ // parentId: "parent10",
+ // timestamp: "2023-06-01T19:00:00Z",
+ // destination: "/path/to/destination10",
+ // message: "success:log message 10",
+ // },
+ // {
+ // id: "11",
+ // path: "/path/to/file11",
+ // action: "COPY",
+ // parentId: "parent11",
+ // timestamp: "2023-06-01T20:00:00Z",
+ // destination: "/path/to/destination11",
+ // message: "warn:log message 11",
+ // },
+ // {
+ // id: "12",
+ // path: "/path/to/file12",
+ // action: "MOVE",
+ // parentId: "parent12",
+ // timestamp: "2023-06-01T21:00:00Z",
+ // destination: "/path/to/destination12",
+ // message: "Log message 12",
+ // },
+ // {
+ // id: "13",
+ // path: "/path/to/file13",
+ // action: "RENAME",
+ // parentId: "parent13",
+ // timestamp: "2023-06-01T22:00:00Z",
+ // destination: "/path/to/destination13",
+ // message: "error:log message 13",
+ // },
+ // {
+ // id: "14",
+ // path: "/path/to/file14",
+ // action: "MOVE",
+ // parentId: "parent14",
+ // timestamp: "2023-06-01T23:00:00Z",
+ // destination: "/path/to/destination14",
+ // message: "warn:log message 14",
+ // },
+ // {
+ // id: "15",
+ // path: "/path/to/file15",
+ // action: "COPY",
+ // parentId: "parent15",
+ // timestamp: "2023-06-02T00:00:00Z",
+ // destination: "/path/to/destination15",
+ // message: "success:log message 15",
+ // },
+];
+
+export const Listeners: IListener[] = [
+ {
+ id: "parent1",
+ deep: true,
+ title: "Listener 1",
+ enabled: true,
+ monitors: [],
+ selection: "Any",
+ rules: [
+ {
+ condition: "Includes",
+ search: "FileName",
+ data: {
+ size: [0, "B"],
+ text: ["py", "rs"],
+ },
+ },
+ ],
+ actions: [
+ {
+ action: "MOVE" as TActionOpts,
+ path: "/path/to/destination1",
+ },
+ ],
+ },
+ {
+ id: "parent2",
+ deep: true,
+ title: "Listener 2",
+ enabled: true,
+ monitors: [],
+ selection: "Any",
+ rules: [],
+ actions: [
+ {
+ action: "MOVE",
+ path: "/path/to/destination2",
+ },
+ ],
+ },
+ {
+ id: "parent3",
+ deep: true,
+ title: "Listener 3",
+ enabled: true,
+ monitors: [],
+ selection: "Any",
+ rules: [],
+ actions: [
+ {
+ action: "MOVE",
+ path: "/path/to/destination2",
+ },
+ ],
+ },
+ {
+ id: "parent4",
+ deep: true,
+ title: "Listener 4",
+ enabled: true,
+ monitors: [],
+ selection: "Any",
+ rules: [],
+ actions: [
+ {
+ action: "MOVE",
+ path: "/path/to/destination2",
+ },
+ ],
+ },
+ {
+ id: "parent5",
+ deep: true,
+ title: "Listener 5",
+ enabled: true,
+ monitors: [],
+ selection: "Any",
+ rules: [],
+ actions: [
+ {
+ action: "MOVE",
+ path: "/path/to/destination2",
+ },
+ ],
+ },
+ {
+ id: "parent6",
+ deep: true,
+ title: "Listener 6",
+ enabled: true,
+ monitors: [],
+ selection: "Any",
+ rules: [],
+ actions: [
+ {
+ action: "MOVE",
+ path: "/path/to/destination2",
+ },
+ ],
+ },
+ {
+ id: "parent7",
+ deep: true,
+ title: "Listener 7",
+ enabled: true,
+ monitors: [],
+ selection: "Any",
+ rules: [],
+ actions: [
+ {
+ action: "MOVE",
+ path: "/path/to/destination2",
+ },
+ ],
+ },
+ {
+ id: "parent8",
+ deep: true,
+ title: "Listener 8",
+ enabled: true,
+ monitors: [],
+ selection: "Any",
+ rules: [],
+ actions: [
+ {
+ action: "MOVE",
+ path: "/path/to/destination2",
+ },
+ ],
+ },
+ {
+ id: "parent9",
+ deep: true,
+ title: "Listener 9",
+ enabled: true,
+ monitors: [],
+ selection: "Any",
+ rules: [],
+ actions: [
+ {
+ action: "MOVE",
+ path: "/path/to/destination2",
+ },
+ ],
+ },
+ {
+ id: "parent10",
+ deep: true,
+ title: "Listener 10",
+ enabled: true,
+ monitors: [],
+ selection: "Any",
+ rules: [],
+ actions: [
+ {
+ action: "MOVE",
+ path: "/path/to/destination2",
+ },
+ ],
+ },
+ {
+ id: "parent11",
+ deep: true,
+ title: "Listener 11",
+ enabled: true,
+ monitors: [],
+ selection: "Any",
+ rules: [],
+ actions: [
+ {
+ action: "MOVE",
+ path: "/path/to/destination2",
+ },
+ ],
+ },
+ {
+ id: "parent12",
+ deep: true,
+ title: "Listener 12",
+ enabled: true,
+ monitors: [],
+ selection: "Any",
+ rules: [],
+ actions: [
+ {
+ action: "MOVE",
+ path: "/path/to/destination2",
+ },
+ ],
+ },
+ {
+ id: "parent13",
+ deep: true,
+ title: "Listener 13",
+ enabled: true,
+ monitors: ["/path/to/file13"],
+ selection: "Any",
+ rules: [],
+ actions: [
+ {
+ action: "MOVE",
+ path: "/path/to/destination2",
+ },
+ ],
+ },
+ {
+ id: "parent14",
+ deep: true,
+ title: "Listener 14",
+ enabled: true,
+ monitors: [],
+ selection: "Any",
+ rules: [],
+ actions: [
+ {
+ action: "MOVE",
+ path: "/path/to/destination2",
+ },
+ ],
+ },
+ {
+ id: "parent15",
+ deep: true,
+ title: "Listener 15",
+ enabled: true,
+ monitors: ["/path/to/file15"],
+ selection: "Any",
+ rules: [],
+ actions: [
+ {
+ action: "MOVE",
+ path: "/path/to/destination2",
+ },
+ ],
+ },
+];
diff --git a/src/decs.d.ts b/src/decs.d.ts
deleted file mode 100644
index 25d40a0..0000000
--- a/src/decs.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-declare module "@j-t-mcc/vue3-chartjs";
diff --git a/src/env.d.ts b/src/env.d.ts
deleted file mode 100644
index d27eb5a..0000000
--- a/src/env.d.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-///
-
-declare module '*.vue' {
- import { DefineComponent } from 'vue'
- // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
- const component: DefineComponent<{}, {}, any>
- export default component
-}
diff --git a/src/icons/index.ts b/src/icons/index.ts
new file mode 100644
index 0000000..86b1b9a
--- /dev/null
+++ b/src/icons/index.ts
@@ -0,0 +1,17 @@
+export { default as SearchIcon } from "~icons/search";
+export { default as LogWarnIcon } from "~icons/log_warn";
+export { default as OpenModalIcon } from "~icons/open_modal";
+export { default as SortIcon } from "~icons/sort";
+export { default as CopyIcon } from "~icons/copy";
+export { default as CloseIcon } from "~icons/close";
+export { default as SettingIcon } from "~icons/settings";
+export { default as LightIcon } from "~icons/light";
+export { default as JournalIcon } from "~icons/journal";
+export { default as DashboardIcon } from "~icons/dashboard";
+export { default as StatisticsIcon } from "~icons/statistics";
+export { default as PlusIcon } from "~icons/plus";
+export { default as EditIcon } from "~icons/edit";
+export { default as TrashIcon } from "~icons/trash";
+export { default as InfoIcon } from "~icons/info";
+
+// export remainding icons below in this file
diff --git a/src/index.css b/src/index.css
deleted file mode 100644
index 78f4394..0000000
--- a/src/index.css
+++ /dev/null
@@ -1,181 +0,0 @@
-@tailwind base;
-@tailwind components;
-@tailwind utilities;
-
-@layer base {
- @font-face {
- font-family: Comfortaa;
- src: url("/fonts/Comfortaa-Regular.ttf");
- }
-
- @font-face {
- font-family: Adine;
- src: url("/fonts/AdineKirnberg-Alternate.ttf");
- }
-}
-
-* {
- user-select: none;
-}
-
-/* width */
-::-webkit-scrollbar {
- width: 8px;
-}
-
-/* Track */
-::-webkit-scrollbar-track {
- background: #b9b9b9;
- box-shadow: inset 0 0 5px #b9b9b9;
- border-radius: 10px;
-}
-
-/* Handle */
-::-webkit-scrollbar-thumb {
- background: rgb(145, 145, 145);
- border-radius: 10px;
-}
-
-/* Handle on hover */
-::-webkit-scrollbar-thumb:hover {
- background: #757575;
-}
-
-.pointer {
- transition: width 0.1s ease-in;
- height: 100%;
- clip-path: polygon(100% 50%, 0 0, 0 100%);
-}
-
-.center {
- @apply flex items-center justify-center;
-}
-.link {
- @apply hover:bg-gray-400 h-[70px] w-full flex items-center;
-}
-
-.floating--button {
- @apply absolute rounded-full flex justify-center items-center bg-l_primary dark:bg-d_primary p-5 w-14 h-14;
-}
-
-.floating--button button {
- box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
-}
-
-.nav {
- @apply min-w-[60px] w-[60px] pt-5;
- transition: all 0.08s ease-in;
-}
-
-.nav.show {
- @apply w-[280px];
-}
-
-.status--bar {
- @apply w-full h-1 absolute top-0;
- border-radius: 5px 5px 0px 0px;
-}
-
-input[type="radio"],
-label {
- @apply hover:cursor-pointer;
-}
-
-.listener {
- box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.251);
- user-select: none;
-}
-
-.delete {
- @apply px-1 py-1 text-[#ff0303] text-sm hover:text-white dark:hover:text-gray-200 dark:text-[#ff5757] dark:border-[#ff5757] hover:bg-[#e92929];
- transition: 0.1s ease-in;
- border: 1px solid #ff0303;
- box-sizing: border-box;
- border-radius: 5px;
-}
-
-.knob {
- @apply right-0 absolute bg-[#424242] w-9 h-9 center rounded-full;
- transition: 0.2s ease-in;
-}
-
-.fill {
- transition: 0.2s ease-in-out;
-}
-
-.indicator {
- transition: 0.1s ease-in;
-}
-
-.bg--filter {
- backdrop-filter: blur(3px);
- background: rgba(0, 0, 0, 0.4);
-}
-
-.options--grid {
- @apply grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4;
-}
-
-td {
- text-overflow: ellipsis;
- white-space: nowrap;
- overflow: hidden;
- width: 28px;
-}
-
-th {
- width: 10px;
-}
-
-.cont {
- flex: 1;
-}
-.log--card {
- @apply overflow-hidden hover:cursor-pointer px-4 whitespace-nowrap overflow-ellipsis rounded-full bg-opacity-30 relative;
-}
-
-.dot {
- @apply absolute left-[5px] rounded-full w-2 h-2 bottom-[7.5px];
-}
-
-@responsive {
- .grid-view {
- display: grid;
- gap: 5px;
- grid-template-columns: 30% 12% 30% 25%;
- }
-
- .grid-view-md {
- display: grid;
- gap: 5px;
- grid-template-columns: 30% 10% 33% 25%;
- }
-
- .grid-view-lg {
- display: grid;
- gap: 5px;
- grid-template-columns: 35% 10% 35% 25%;
- }
-}
-
-.log {
- box-shadow: 2px 2px 4px 2px rgba(0, 0, 0, 0.25);
-}
-
-.detail--card {
- box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
-}
-
-.progress {
- width: 0px;
- border-radius: 8px;
- background: linear-gradient(
- 90deg,
- #5096ff 7.05%,
- rgba(80, 150, 255, 0.4) 106.41%
- );
-}
-
-.action--radio {
- @apply m-1 hover:cursor-pointer;
-}
diff --git a/src/lib/utils.ts b/src/lib/utils.ts
new file mode 100644
index 0000000..d32b0fe
--- /dev/null
+++ b/src/lib/utils.ts
@@ -0,0 +1,6 @@
+import { type ClassValue, clsx } from 'clsx'
+import { twMerge } from 'tailwind-merge'
+
+export function cn(...inputs: ClassValue[]) {
+ return twMerge(clsx(inputs))
+}
diff --git a/src/main.ts b/src/main.ts
index 8531b0a..ebcc1a6 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -1,26 +1,15 @@
-import { createApp } from "vue";
import App from "./App.vue";
-import Router from "./router";
-import Store from "./store";
-import Toast, { PluginOptions, POSITION } from "vue-toastification";
-import "vue-toastification/dist/index.css";
+import router from "./router";
+import { createApp } from "vue";
+import { createPinia } from "pinia";
+import PrimeVue from "primevue/config";
-import "./index.css";
+import "primevue/resources/themes/lara-light-indigo/theme.css";
+import "primevue/resources/primevue.min.css";
+import "./style.css";
const app = createApp(App);
-const options: PluginOptions = {
- position: POSITION.TOP_LEFT,
- timeout: 3000,
- closeOnClick: true,
- pauseOnFocusLoss: true,
- pauseOnHover: true,
- draggable: true,
- draggablePercent: 0.6,
- showCloseButtonOnHover: false,
- hideProgressBar: true,
- closeButton: "button",
- icon: true,
- rtl: false,
-};
-app.use(Store).use(Toast, options).use(Router).mount("#app");
+app.use(PrimeVue).use(createPinia()).use(router);
+
+app.mount("#app");
diff --git a/src/models/index.ts b/src/models/index.ts
new file mode 100644
index 0000000..73304bc
--- /dev/null
+++ b/src/models/index.ts
@@ -0,0 +1,67 @@
+export type TLogLevel = "WARN" | "INFO" | "SUCCESS" | "ERROR";
+export type TUnitOpts = "GB" | "KB" | "MB" | "TB" | "B";
+export type TSelection = "Any" | "All";
+export type TActionOpts = "MOVE" | "COPY" | "DELETE" | "UNLINK" | "RENAME";
+
+export type TitlebarStyle = "macos" | "windows" | "gnome" | "system";
+
+export type TSearch =
+ | "FileName"
+ | "FileContent"
+ | "FileSize"
+ | "PathName"
+ | "FileExtension"
+ | "FolderName";
+
+export type TCondition =
+ | "Includes"
+ | "NotIncludes"
+ | "ExactMatch"
+ | "IsNot"
+ | "Greater"
+ | "IsEqual"
+ | "Less";
+
+interface IData {
+ text: string[];
+ size: [number, TUnitOpts];
+}
+
+export interface IRule {
+ search: TSearch;
+ condition: TCondition;
+ data: IData;
+}
+
+interface IAction {
+ action: TActionOpts;
+ path: string;
+}
+
+export interface ILog {
+ id: string;
+ name: string; // listener name
+ path: string;
+ action: string;
+ parentId: string;
+ timestamp: string;
+ destination: string;
+ level: TLogLevel; // log level: INFO | WARN | SUCCESS
+ message: string;
+}
+
+export interface IListener {
+ id: string;
+ created: string;
+ deep: boolean;
+ title: string;
+ enabled: boolean;
+ monitors: string[];
+ selection: TSelection;
+ rules: IRule[];
+ actions: IAction[];
+}
+
+export interface ListenerState {
+ listeners: IListener[];
+}
diff --git a/src/models/types.d.ts b/src/models/types.d.ts
new file mode 100644
index 0000000..53a53a2
--- /dev/null
+++ b/src/models/types.d.ts
@@ -0,0 +1,71 @@
+type TLogLevel = "WARN" | "INFO" | "SUCCESS" | "ERROR";
+type TUnitOpts = "GB" | "KB" | "MB" | "TB" | "B";
+type TSelection = "Any" | "All";
+type TActionOpts = "MOVE" | "COPY" | "DELETE" | "UNLINK" | "RENAME";
+
+type TSearch =
+ | "FileName"
+ | "FileContent"
+ | "FileSize"
+ | "PathName"
+ | "FileExtension"
+ | "FolderName";
+
+type TCondition =
+ | "Includes"
+ | "NotIncludes"
+ | "ExactMatch"
+ | "IsNot"
+ | "Greater"
+ | "IsEqual"
+ | "Less";
+
+interface IData {
+ text: string[];
+ size: [number, TUnitOpts];
+}
+
+interface IRule {
+ search: TSearch;
+ condition: TCondition;
+ data: IData;
+}
+
+interface IAction {
+ action: TActionOpts;
+ path: string;
+}
+
+interface ILog {
+ id: string;
+ name: string; // listener name
+ path: string;
+ action: string;
+ parentId: string;
+ destination: string;
+ timestamp: string;
+ level: TLogLevel; // log level: INFO | WARN | SUCCESS
+ message: string;
+}
+
+interface IListener {
+ id: string;
+ created: string;
+ deep: boolean;
+ title: string;
+ enabled: boolean;
+ monitors: string[];
+ selection: TSelection;
+ rules: IRule[];
+ actions: IAction[];
+}
+
+type TDropdownOpts = {
+ label: string;
+ value: string;
+ component?: any;
+};
+
+interface ListenerState {
+ listeners: IListener[];
+}
diff --git a/src/pages/Dashboard.vue b/src/pages/Dashboard.vue
new file mode 100644
index 0000000..3d1953a
--- /dev/null
+++ b/src/pages/Dashboard.vue
@@ -0,0 +1,192 @@
+
+
+
+
+
+
+ {{ value }}
+
+ {{ key }}
+ LISTENERS
+
+
+
+
+
+
+
+
+
+
+ { listener.toggleEnabled(lId); contextMenu?.close() }">
+
+ {{ enabled ? "Disable" : "Enable" }}
+
+
+ edit(lId)">
+
+ Edit
+
+
+ deleteListener()">
+
+ Delete
+
+
+
+
+
+ showContextMenu(lst.id)" v-bind="lst" @set-active-id="setId"
+ v-for="lst in filter" :key="lst.id" />
+
+
+
+
+
+
There's no
+
ORGANIZER(S)
+
+
+
+ Oh, you currently have created no organizer(s). You can do so by clicking the
+
+ + Add New Listener
+
+ in the side bar.
+
+
+
“Getting your files in order one folder at a time”
+
+
+
+
+
+
diff --git a/src/pages/Journal.vue b/src/pages/Journal.vue
new file mode 100644
index 0000000..7a2cb6a
--- /dev/null
+++ b/src/pages/Journal.vue
@@ -0,0 +1,287 @@
+
+
+
+
+
+
+ Listener Name
+ Action
+ Time
+ Message
+
+
+
+
+
+
+ {{ log.name }}
+
+
+
+ {{ log.action }}
+
+
+ {{ format(new Date(log.timestamp), "PPpp") }}
+ ({{
+ formatDistance(new Date(log.timestamp), new Date(), {
+ addSuffix: true,
+ includeSeconds: true,
+ })
+ }})
+
+
+
+
+ {{ log.message }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Listener Info
+
+
+
+
+ Name
+ {{ activeLog?.name }}
+
+
+
+ Monitoring Path
+ {{ activeLog?.path }}
+
+
+
+ Status
+ {{
+ logStatus
+ }}
+
+
+
+ Event Info
+
+
+
+ Action performed
+ {{ activeLog?.action }}
+
+
+
+ Timestamp
+
+ {{ format(new Date(activeLog!.timestamp), "PPpp") }}
+
+
+
+
+ Audit Info
+
+
+
+ Log level
+ {{ activeLog?.level }}
+
+
+
+
Log Message
+
+
+
+ COPY TO CLIPBOARD
+
+ Log Level: {{ activeLog?.level }}
+ Timestamp: {{ activeLog?.timestamp }}
+ Message: {{ activeLog?.message }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/Statistics.vue b/src/pages/Statistics.vue
new file mode 100644
index 0000000..94966f4
--- /dev/null
+++ b/src/pages/Statistics.vue
@@ -0,0 +1,127 @@
+
+
+
+
+
+
+ Files affected for listener per day
+
+
+
+
+
+
Keys for listeners
+
+
+
+
+ {{ l.title }} #{{ idx + 1 }}
+
+
+
+
+
+
+
+
+
+
+
Folders Affected
+
0
+
+
+
+
+
Files Organized
+
{{ listener.logs.length }}
+
+
+
+
Listener Highlights
+
+
+ Folder/File
+ Actions
+ Time
+
+
+
+
+ {{ log.path.split("/").at(-1)
+ }}
+ {{ log.action }}
+ {{ format(new Date(log.timestamp), "PPpp") }}
+
+
+
+
+
+
+
+
diff --git a/src/router/index.ts b/src/router/index.ts
index a3797e4..5140ed3 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -1,29 +1,28 @@
-import { createWebHistory, createRouter } from "vue-router";
+import { createRouter, createWebHistory } from "vue-router";
-import Dashboard from "../views/Dashboard.vue";
-import Journal from "../views/Journal.vue";
-import Statistics from "../views/Statistics.vue";
+import Dashboard from "../pages/Dashboard.vue";
+import Journal from "../pages/Journal.vue";
+import Statistics from "../pages/Statistics.vue";
-import Action from "../components/routes/Action.vue";
-import Monitor from "../components/routes/Monitor.vue";
-import Rules from "../components/routes/Rules.vue";
-
-export default createRouter({
- history: createWebHistory(),
+const router = createRouter({
+ history: createWebHistory(import.meta.env.BASE_URL),
routes: [
{
path: "/",
- component: Dashboard,
name: "Dashboard",
-
- children: [
- { path: "/monitor", component: Monitor, name: "Monitor" },
- { path: "/actions", component: Action, name: "Action" },
- { path: "/rules", component: Rules, name: "Rules" },
- ],
+ component: Dashboard,
+ },
+ {
+ path: "/journal",
+ name: "Journal",
+ component: Journal,
+ },
+ {
+ path: "/statistics",
+ name: "Statistics",
+ component: Statistics,
},
-
- { path: "/statistics", component: Statistics, name: "Statistics" },
- { path: "/journal", component: Journal, name: "Journal" },
],
});
+
+export default router;
diff --git a/src/static/index.ts b/src/static/index.ts
new file mode 100644
index 0000000..2ae4dee
--- /dev/null
+++ b/src/static/index.ts
@@ -0,0 +1,142 @@
+import Monitor from "../components/listenerModal/Monitor.vue";
+import Action from "../components/listenerModal/Action.vue";
+import Rule from "../components/listenerModal/Rule.vue";
+
+import { nanoid } from "nanoid";
+
+export const WARN = "#FF8E3C";
+export const SUCCESS = "#1EF127";
+export const ERROR = "#DC4343";
+export const INFO = "#6C8DFF";
+
+export const defaultListener = (): IListener => ({
+ id: nanoid(),
+ created: (new Date()).toUTCString(),
+ enabled: false,
+ monitors: [],
+ selection: "Any",
+ deep: false,
+ title: "",
+ actions: [],
+ rules: [],
+});
+
+export const ALLOWED = {
+ COPY: ["MOVE", "DELETE", "RENAME", "UNLINK", "COPY"],
+ MOVE: ["COPY"],
+ RENAME: ["COPY"],
+ UNLINK: ["COPY"],
+ DELETE: ["COPY"],
+};
+
+export const STATUSCOLORS: Record = {
+ DRAFT: WARN,
+ INACTIVE: "#E5C36A",
+ ACTIVE: SUCCESS,
+};
+
+export const HINTS: Record = {
+ Monitor: "`Monitors` are the paths that are subscribed to for events",
+ Rule: "`Rules` are a set of conditions that must apply to a file/folder detected by an event",
+ Action:
+ "`Actions` are the list of actions that should take place if a file/folder matches a `Rule`",
+};
+
+export const routeOpts: TDropdownOpts[] = [
+ {
+ label: "Monitors",
+ value: "Monitor",
+ component: Monitor,
+ },
+ {
+ label: "Rules",
+ value: "Rule",
+ component: Rule,
+ },
+ {
+ label: "Actions",
+ value: "Action",
+ component: Action,
+ },
+];
+
+export const sizeOpts: TDropdownOpts[] = [
+ {
+ value: "B",
+ label: "Byte(s)",
+ },
+ {
+ value: "Kb",
+ label: "Kilobyte(s)",
+ },
+ {
+ value: "Mb",
+ label: "Megabyte(s)",
+ },
+ {
+ value: "Gb",
+ label: "Gigabyte(s)",
+ },
+ {
+ value: "Tb",
+ label: "Terabyte(s)",
+ },
+];
+
+export const conditionOpts: TDropdownOpts[] = [
+ {
+ value: "Includes",
+ label: "does include",
+ },
+ {
+ value: "NotIncludes",
+ label: "does not include",
+ },
+ {
+ value: "ExactMatch",
+ label: "matches",
+ },
+ {
+ value: "IsNot",
+ label: "does not match",
+ },
+ {
+ value: "Less",
+ label: "less than",
+ },
+ {
+ value: "IsEqual",
+ label: "is equal to",
+ },
+ {
+ value: "Greater",
+ label: "greater than",
+ },
+];
+
+export const searchOpts: TDropdownOpts[] = [
+ {
+ label: "File Size",
+ value: "FileSize",
+ },
+ {
+ label: "File Name",
+ value: "FileName",
+ },
+ {
+ label: "Folder Name",
+ value: "FolderName",
+ },
+ {
+ label: "File Content",
+ value: "FileContent",
+ },
+ {
+ label: "File Extension",
+ value: "FileExtension",
+ },
+ {
+ label: "Path Name",
+ value: "PathName",
+ },
+];
diff --git a/src/store/index.ts b/src/store/index.ts
index 351936f..fe01d21 100644
--- a/src/store/index.ts
+++ b/src/store/index.ts
@@ -1,59 +1,6 @@
-import { createStore } from "vuex";
-import * as listener from "./modules/listener";
-import * as modal from "./modules/modal";
-import * as config from "./modules/config";
+export const LISTENERDETAILSTORE = "listenerDetailStore";
+export const CONTEXTMENUSTORE = "contextMenuStore";
-const store = createStore({
- modules: {
- listener,
- modal,
- config,
- },
- state: {
- dashboardSearch: "",
- logSearch: "",
- triggerClean: false,
- isSettingsOpen: false,
- },
- getters: {
- triggerClean: (state) => state.triggerClean,
- dashboardSearch: (state) => state.dashboardSearch,
- logSearch: (state) => state.logSearch,
- isSettingsOpen: (state) => state.isSettingsOpen,
- },
+export * from "./listener";
+export * from "./settings";
- mutations: {
- updateDashboardSearch: (state, payload: string) =>
- (state.dashboardSearch = payload),
- triggerClean: (state, payload: boolean) => (state.triggerClean = payload),
- updateLogSearch: (state, payload: string) => (state.logSearch = payload),
- toggleSettings: (state, payload: boolean) =>
- (state.isSettingsOpen = payload),
- },
- actions: {
- setCurrentPage({ commit }, payload: string) {
- commit("setCurrentPage", payload);
- },
-
- updateDashboardSearch({ commit }, payload: string) {
- commit("updateDashboardSearch", payload);
- },
-
- triggerClean({ commit }, payload: boolean) {
- commit("triggerClean", payload);
- },
-
- setListenerRect({ commit }, payload: DOMRect) {
- commit("setListenerRect", payload);
- },
-
- updateLogSearch({ commit }, payload: string) {
- commit("updateLogSearch", payload);
- },
-
- toggleSettings: ({ commit }, payload: boolean) =>
- commit("toggleSettings", payload),
- },
-});
-
-export default store;
diff --git a/src/store/journal.ts b/src/store/journal.ts
new file mode 100644
index 0000000..e69de29
diff --git a/src/store/listener.ts b/src/store/listener.ts
new file mode 100644
index 0000000..5bda826
--- /dev/null
+++ b/src/store/listener.ts
@@ -0,0 +1,102 @@
+//@ts-nocheck
+import { defineStore } from "pinia";
+import { InjectionKey } from "vue";
+
+import { Listeners, Logs } from "../data";
+import { invoke } from "@tauri-apps/api";
+
+export const LISTENERSTORE = "listenerStore";
+
+export const useListenerStore = defineStore(LISTENERSTORE, {
+ state: () => ({
+ search: "",
+ activeId: "",
+ logs: [] as ILog[],
+ listeners: [] as IListener[],
+ }),
+
+ getters: {
+ activeListener(state) {
+ let listener = state.listeners.find((lst) => lst.id == state.activeId);
+ return listener;
+ },
+
+ getListeners(state) {
+ return state.listeners;
+ },
+ },
+
+ actions: {
+ async addLog(log: ILog) {
+ let isSaved = await invoke("save_log", { log });
+ if (isSaved) this.logs.push(log);
+ else console.log("Unable to save log: ", isSaved);
+ },
+
+ setActiveId(id: string = "") {
+ this.activeId = id;
+ },
+
+ async deleteListener(id: string) {
+ const deleted = await invoke("remove_listener", {
+ listener: this.findById(id),
+ });
+ const idx = this.findIdxById(deleted.id);
+ if (idx > -1) this.listeners.splice(idx, 1);
+ },
+
+ toggleEnabled(id: string) {
+ let found = this.findById(id);
+ if (found) this.updateById(id, { ...found, enabled: !found.enabled });
+ },
+
+ async updateById(id: string, state: IListener) {
+ await invoke("update_listener", {
+ listener: state,
+ });
+ let idx = this.findIdxById(id);
+ if (idx > -1) this.listeners[idx] = state;
+ },
+
+ async setListenerState(listeners: IListener[]) {
+ this.listeners = listeners;
+ },
+
+ async setLogState(logs: ILog[]) {
+ this.logs = logs;
+ },
+
+ async addListener(listener: IListener) {
+ let id = await invoke("add_listener", { listener });
+ if (id == listener.id) this.listeners.push(listener);
+ },
+
+ findIdxById(id: string) {
+ return this.listeners.findIndex((lst) => lst.id == id);
+ },
+
+ findById(id: string) {
+ return this.listeners.find((lst) => lst.id == id);
+ },
+
+ setSearch(v: string) {
+ this.search = v;
+ },
+ },
+});
+
+interface ModalOpts {
+ interactOutside: boolean,
+ escapeKeyDown: boolean
+}
+
+export type TListenerStore = ReturnType;
+export const ListenerModalKey = Symbol() as InjectionKey<{
+ open: (id: string) => void,
+ close: () => void,
+ remove: (id: string) => void,
+ modalOpts: ModalOpts
+}>;
+export const ListenerStoreKey = Symbol() as InjectionKey<{
+ listener: TListenerStore;
+}>;
diff --git a/src/store/modules/config.ts b/src/store/modules/config.ts
deleted file mode 100644
index 88a05eb..0000000
--- a/src/store/modules/config.ts
+++ /dev/null
@@ -1,91 +0,0 @@
-import { Store } from "tauri-plugin-store-api";
-
-const config = new Store(".config");
-
-const loadState: Array<[string, unknown]> = await config.entries();
-
-const initialState: State = loadState.reduce(
- (v, item) => Object.assign(v, { [item[0]]: item[1] }),
- {
- isDark: false,
- titlebar: "macos",
- pinNavbar: "pin",
- scanningInterval: 5000,
- chunks: 30,
- }
-);
-
-type OS = "win32" | "macos" | "auto";
-
-interface State {
- isDark: boolean;
- titlebar: OS;
- pinNavbar: "pin" | "unpin";
- scanningInterval: number;
- chunks: number;
-}
-
-export const namespaced = true;
-
-export const state: State = {
- ...initialState,
-};
-
-export const getters = {
- titlebar: (state: State) => state.titlebar,
- isDark: (state: State) => state.isDark,
- scanningInterval: (state: State) => state.scanningInterval,
- pinNavbar: (state: State) => state.pinNavbar,
- chunks: (state: State) => state.chunks,
- config: (state: State) => state,
-};
-
-export const mutations = {
- setTheme: (state: State, theme: boolean) => {
- state.isDark = theme;
- config.set("isDark", theme);
- config.save();
- },
- setState: (state: State, loadedState: State) => {
- state = loadedState;
- console.log("Setting state: ", loadedState);
- },
- setTitlebar: (state: State, titlebar: OS) => {
- state.titlebar = titlebar;
- config.set("titlebar", titlebar);
- config.save();
- },
- setChunks: (state: State, chunk: number) => {
- state.chunks = chunk;
- config.set("chunks", chunk);
- config.save();
- },
- setInterval: (state: State, interval: number) => {
- state.scanningInterval = interval;
- config.set("scanningInterval", interval);
- config.save();
- },
- setPinNavbar: (state: State, option: "pin" | "unpin") => {
- state.pinNavbar = option;
- config.set("pinNavbar", option);
- config.save();
- },
-};
-
-export const actions = {
- setTheme: ({ commit }: any, theme: boolean) => commit("setTheme", theme),
-
- setState: ({ commit }: any, loaded_state: State) =>
- commit("setState", loaded_state),
-
- setTitlebar: ({ commit }: any, titlebar: OS) =>
- commit("setTitlebar", titlebar),
-
- setChunks: ({ commit }: any, chunk: number) => commit("setChunks", chunk),
-
- setInterval: ({ commit }: any, interval: number) =>
- commit("setInterval", interval),
-
- setPinNavbar: ({ commit }: any, option: "pin" | "unpin") =>
- commit("setPinNavbar", option),
-};
diff --git a/src/store/modules/listener.ts b/src/store/modules/listener.ts
deleted file mode 100644
index de5184a..0000000
--- a/src/store/modules/listener.ts
+++ /dev/null
@@ -1,163 +0,0 @@
-import { invoke } from "@tauri-apps/api/tauri";
-import { Store } from "tauri-plugin-store-api";
-import { v4 } from "uuid";
-
-const store = new Store(".data");
-
-export interface Rule {
- search_type: string;
- condition: string;
- text: string;
-}
-
-export interface Log {
- id: string;
- path: string;
- action: string;
- parent_id: string;
- timestamp: string;
- destination: string;
-}
-
-export type Action = [string, string];
-
-export interface Listener {
- id: string;
- deep: boolean;
- title: string;
- enabled: boolean;
- paths: Array;
- selection: string;
- rules: Array;
- actions: Array;
- logs: Array;
-}
-
-export interface State {
- listeners: Array;
-}
-
-export const initialListener: Listener = {
- id: v4(),
- deep: false,
- enabled: false,
- title: "",
- paths: [],
- selection: "Any of the following",
- rules: [],
- actions: [],
- logs: [],
-};
-
-export const namespaced = true;
-
-export const state = {
- listeners: [],
-};
-
-export const getters = {
- listeners(state: State) {
- return state.listeners;
- },
-
- getById: (state: State) => (id: string) => {
- return state.listeners.find((listener) => listener.id === id);
- },
-
- allLogs(state: State) {
- let initialValue: Log[] = [];
- return state.listeners.reduce(
- (acc, val) => acc.concat(...val.logs),
- initialValue
- );
- },
-
- getNumOfLogs(state: State) {
- let total = state.listeners.reduce((prev, curr) => {
- return prev + curr.logs.length;
- }, 0);
-
- return total;
- },
-};
-
-export const mutations = {
- addListener({ listeners }: State, payload: Listener) {
- listeners.push(payload);
- store.set(payload.id, payload);
- store.save();
- },
-
- updateListener(state: State, payload: Listener) {
- let idx = state.listeners.findIndex((item) => {
- if (item.id == payload.id) return true;
- return false;
- });
-
- if (idx != -1) {
- state.listeners[idx] = payload;
- invoke("update_listener", { listener: payload });
- store.set(payload.id, payload);
- store.save();
- }
- },
-
- deleteListener(state: State, id: string) {
- let idx = state.listeners.findIndex((item) => {
- if (item.id == id) return true;
- return false;
- });
-
- let listener = state.listeners.splice(idx, 1);
- invoke("delete_listener", { listener: listener[0] });
- store.delete(listener[0].id);
- store.save();
- },
-
- setState(state: State, loaded_state: State) {
- state.listeners = loaded_state.listeners;
- },
-
- addLog(state: State, log: Log) {
- let idx = (state.listeners as Listener[]).findIndex((item) => {
- if (log.parent_id == item.id) return true;
- return false;
- });
-
- if (idx != -1) {
- state.listeners[idx].logs.push(log);
- store.set(state.listeners[idx].id, state.listeners[idx]);
- store.save();
- }
- },
-};
-
-export const actions = {
- addListener({ commit, dispatch }: any, payload: Listener) {
- commit("addListener", payload);
- dispatch("modal/setListener", JSON.parse(JSON.stringify(payload)), {
- root: true,
- });
- },
-
- updateListener({ commit }: any, payload: Listener) {
- commit("updateListener", payload);
- },
-
- deleteListener({ commit }: any, id: string) {
- commit("deleteListener", id);
- },
-
- setState({ commit }: any, loaded_state: State) {
- commit("setState", loaded_state);
- },
-
- addLog({ commit, dispatch }: any, log: Log) {
- commit("addLog", log);
- dispatch("modal/addLog", log, { root: true });
- },
-
- getById({ commit }: any, id: string) {
- commit("getById", id);
- },
-};
diff --git a/src/store/modules/modal.ts b/src/store/modules/modal.ts
deleted file mode 100644
index b1812e5..0000000
--- a/src/store/modules/modal.ts
+++ /dev/null
@@ -1,151 +0,0 @@
-import { Listener, Log, Rule } from "./listener";
-
-interface State {
- listener: Listener | {};
- currentRule: {} | (Rule & { idx: number });
-}
-
-export const namespaced = true;
-
-export const state: State = {
- listener: {},
- currentRule: {},
-};
-
-export const mutations = {
- toggleActive(_state: State) {
- let c = _state.listener as Listener;
- _state.listener = {
- ..._state.listener,
- enabled: !(_state.listener as Listener).enabled,
- };
- },
-
- setListener(state: State, payload: Listener) {
- state.listener = payload;
- },
-
- closeListenerDetail(state: State) {
- state.listener = {};
- },
-
- updateTitle(state: State, payload: string) {
- (state.listener as Listener).title = payload;
- },
-
- removePath(state: State, idx: number) {
- (state.listener as Listener).paths.splice(idx, 1);
- },
-
- addMonitorPath(state: State, path: string) {
- (state.listener as Listener).paths.push(path);
- },
-
- removeRule(state: State, idx: number) {
- (state.listener as Listener).rules.splice(idx, 1);
- },
-
- setCurrentRule(state: State, payload: Rule & { idx: number }) {
- state.currentRule = payload;
- },
-
- updateRuleByIdx(state: State, payload: Rule & { idx: number }) {
- const { idx, ...rule } = payload;
- (state.listener as Listener).rules[payload.idx] = rule;
- },
-
- addRule(state: State, rule: Rule) {
- (state.listener as Listener).rules.push(rule);
- },
-
- setSelection(state: State, payload: string) {
- (state.listener as Listener).selection = payload;
- },
-
- setAction(state: State, [action, idx, path]: [string, number, string]) {
- (state.listener as Listener).actions[idx][0] = action;
- (state.listener as Listener).actions[idx][1] = path;
- },
-
- createAction(state: State) {
- (state.listener as Listener).actions.push(["", ""]);
- },
-
- addLog(state: State, log: Log) {
- (state.listener as Listener).logs.push(log);
- },
-
- removeAction: (state: State, idx: number) =>
- (state.listener as Listener).actions.splice(idx, 1),
-};
-
-export const actions = {
- toggleActive({ commit }: any) {
- commit("toggleActive");
- },
-
- setListener({ commit }: any, payload: Listener) {
- commit("setListener", payload);
- },
-
- closeListenerDetail({ commit }: any) {
- commit("closeListenerDetail");
- },
-
- saveOptions({ dispatch, commit }: any, payload: Listener) {
- dispatch("listener/updateListener", payload, { root: true });
- commit("closeListenerDetail");
- },
-
- updateTitle({ commit }: any, payload: string) {
- commit("updateTitle", payload);
- },
-
- removePath({ commit }: any, idx: number) {
- commit("removePath", idx);
- },
-
- addMonitorPath({ commit }: any, path: string) {
- commit("addMonitorPath", path);
- },
-
- removeRule({ commit }: any, idx: number) {
- commit("removeRule", idx);
- },
-
- setCurrentRule({ commit }: any, payload: Rule & { idx: number }) {
- commit("setCurrentRule", payload);
- },
-
- updateRuleByIdx({ commit }: any, payload: Rule & { idx: number }) {
- commit("updateRuleByIdx", payload);
- },
-
- setAction({ commit }: any, payload: [string, number, string]) {
- commit("setAction", payload);
- },
-
- async addRule({ commit }: any) {
- commit("addRule", {
- search_type: "",
- condition: "",
- text: "",
- });
- },
- setSelection({ commit }: any, payload: string) {
- commit("setSelection", payload);
- },
-
- createAction({ commit }: any) {
- commit("createAction");
- },
-
- addLog({ commit, state }: any, log: Log) {
- if (((state as State).listener as Listener).id == log.id)
- commit("addLog", log);
- },
-
- removeAction: ({ commit }: any, idx: number) => {
- commit("removeAction", idx);
- },
-};
diff --git a/src/store/settings.ts b/src/store/settings.ts
new file mode 100644
index 0000000..719ba02
--- /dev/null
+++ b/src/store/settings.ts
@@ -0,0 +1,105 @@
+//@ts-nocheck
+import { defineStore } from "pinia";
+import { InjectionKey, ComputedRef } from "vue";
+import type { TitlebarStyle } from "../models";
+import { invoke } from "@tauri-apps/api";
+
+export const SETTINGSTORE = "settingStore";
+
+export type AppTheme = "dark" | "light";
+
+export const useSettingStore = defineStore(SETTINGSTORE, {
+ state: () => ({
+ pin: true,
+ titlebarStyle: "windows" as TitlebarStyle,
+ theme: "dark" as AppTheme,
+ rounded: 15,
+ }),
+
+ actions: {
+ setState(state) {
+ this.$patch(state)
+ console.log(this.$state)
+ },
+
+ async toggleTheme() {
+ let theme = this.theme == "dark" ? "light" : "dark";
+
+ if (theme === 'dark') {
+ document.documentElement.classList.add('dark')
+ } else {
+ document.documentElement.classList.remove('dark')
+ }
+
+ let saved = await invoke("save_settings", {
+ settings: {
+ pin: this.pin,
+ titlebarStyle: this.titlebarStyle,
+ theme: theme,
+ rounded: this.rounded
+ }
+ })
+
+ if (!saved) return;
+
+ this.theme = theme;
+ },
+
+ async setTitlebarStyle(style: TitlebarStyle) {
+ let saved = await invoke("save_settings", {
+ settings: {
+ pin: this.pin,
+ titlebarStyle: style,
+ theme: this.theme,
+ rounded: this.rounded
+ }
+ })
+
+ if (!saved) return;
+ this.titlebarStyle = style;
+ },
+
+ async setTheme(theme: AppTheme) {
+ let saved = await invoke("save_settings", {
+ settings: {
+ pin: this.pin,
+ titlebarStyle: this.titlebarStyle,
+ theme,
+ rounded: this.rounded
+ }
+ })
+
+ if (!saved) return;
+ this.theme = theme;
+ },
+
+ async setPin(pin: boolean) {
+ let saved = await invoke("save_settings", {
+ settings: {
+ pin,
+ titlebarStyle: this.titlebarStyle,
+ theme: this.theme,
+ rounded: this.rounded
+ }
+ })
+
+ if (!saved) return;
+ this.pin = pin;
+ },
+ },
+
+ getters: {
+ isDark(state) {
+ return state.theme == "dark";
+ },
+ },
+});
+
+export type TSettingStore = ReturnType;
+export const SettingStoreKey = Symbol() as InjectionKey<{
+ settings: TSettingStore;
+}>;
+export const ThemeKey = Symbol() as InjectionKey<{
+ isDark: ComputedRef;
+ theme: ComputedRef;
+}>;
diff --git a/src/store/statistics.ts b/src/store/statistics.ts
new file mode 100644
index 0000000..e69de29
diff --git a/src/style.css b/src/style.css
new file mode 100644
index 0000000..47f68d5
--- /dev/null
+++ b/src/style.css
@@ -0,0 +1,125 @@
+@tailwind base;
+@tailwind components;
+@tailwind utilities;
+
+* {
+ padding: 0px;
+ margin: 0px;
+ box-sizing: border-box;
+ user-select: none;
+}
+
+.adaptive--darker {
+ @apply dark:!bg-darker !bg-lighter dark:!text-gray-300 !text-gray-800;
+}
+
+.adaptive--dark {
+ @apply dark:!bg-dark !bg-light;
+}
+
+.adaptive--dark--invert {
+ @apply dark:!bg-darker !bg-lighter;
+}
+
+.debug {
+ @apply absolute h-full w-full z-10 bg-red-200;
+}
+
+::-webkit-scrollbar {
+ width: 5px;
+ height: 5px;
+ background-color: #aaa; /* or add it to the track */
+ border-radius: 5px;
+}
+
+::-webkit-scrollbar-thumb {
+ background: #555;
+ border-radius: 5px;
+}
+
+::-webkit-scrollbar-thumb {
+ background: #555;
+ border-radius: 5px;
+ height: 5px;
+}
+
+@layer base {
+ :root {
+ --background: 0 0% 100%;
+ --foreground: 222.2 84% 4.9%;
+
+ --muted: 210 40% 96.1%;
+ --muted-foreground: 215.4 16.3% 46.9%;
+
+ --popover: 0 0% 100%;
+ --popover-foreground: 222.2 84% 4.9%;
+
+ --card: 0 0% 100%;
+ --card-foreground: 222.2 84% 4.9%;
+
+ --border: 214.3 31.8% 91.4%;
+ --input: 214.3 31.8% 91.4%;
+
+ /* --primary: 222.2 47.4% 11.2%; */
+ --primary: 226.531, 100%, 71%;
+ --primary-foreground: 210 40% 98%;
+
+ --secondary: 210 40% 96.1%;
+ --secondary-foreground: 222.2 47.4% 11.2%;
+
+ --accent: 210 40% 96.1%;
+ --accent-foreground: 222.2 47.4% 11.2%;
+
+ --destructive: 0 84.2% 60.2%;
+ --destructive-foreground: 210 40% 98%;
+
+ --ring: 222.2 84% 4.9%;
+
+ --radius: 0.5rem;
+ }
+
+ .dark {
+ --background: 230 6% 20%;
+ --foreground: 210 40% 98%;
+
+ --muted: 217.2 32.6% 17.5%;
+ --muted-foreground: 215 20.2% 65.1%;
+
+ --popover: 222.2 84% 4.9%;
+ --popover-foreground: 210 40% 98%;
+
+ --card: 222.2 84% 4.9%;
+ --card-foreground: 210 40% 98%;
+
+ --border: 217.2 32.6% 17.5%;
+ /* --border: 230 6% 20%; */
+ --input: 217.2 32.6% 17.5%;
+
+ /* --primary: 210 40% 98%; */
+ --primary: 226.531 100% 71%;
+ /* --primary-foreground: 222.2 47.4% 11.2%; */
+ --primary-foreground: 230, 6%, 20%;
+
+ --secondary: 217.2 32.6% 17.5%;
+ --secondary-foreground: 210 40% 98%;
+
+ /* --accent: 217.2 32.6% 17.5%; */
+ --accent: 230, 6%, 20%;
+ --accent-foreground: 230, 6%, 20%;
+ /* --accent-foreground: 210 40% 98%; */
+
+ --destructive: 0 62.8% 30.6%;
+ --destructive-foreground: 210 40% 98%;
+
+ --ring: 212.7 26.8% 83.9%;
+ }
+}
+
+@layer base {
+ * {
+ @apply border-border;
+ }
+ body {
+ @apply bg-background text-foreground;
+ }
+}
diff --git a/src/utils/index.ts b/src/utils/index.ts
index 9f27827..5224301 100644
--- a/src/utils/index.ts
+++ b/src/utils/index.ts
@@ -1,79 +1,64 @@
-import { computed, reactive, ref } from "vue";
-import { appWindow } from "@tauri-apps/api/window";
+import { defaultListener } from "../static";
+import isEqual from "lodash.isequal";
+import omit from "lodash.omit";
-export const FILENAME = "File Name";
-export const FILEEXTENSION = "File Extension";
-export const FOLDERNAME = "Folder Name";
-export const FILECONTENT = "File Content";
-export const FILESIZE = "File Size";
-export const PATHNAME = "Path Name";
+export const sclone = structuredClone;
-export const MOVE = "MOVE";
-export const COPY = "COPY";
-export const RENAME = "RENAME";
-export const UNLINK = "UNLINK";
-export const DELETE = "DELETE";
-
-export const useFetchList = (
- arr: Array,
- low: number = 0,
- high: number = 10
-) => {
- let flatten = arr.reduce((acc, val) => {
- return acc.concat(...val.logs);
- }, []);
-
- return { slice: flatten.slice(low, high), len: flatten.length };
-};
+export function lower(a: string) {
+ return a.toLowerCase();
+}
-interface ResizeEvent {
- event: string;
- id: number;
- payload: {
- width: number;
- height: number;
- };
- windowLabel: string;
+export function isDefault(listener: IListener) {
+ return isEqual(omit(listener, "id", "created"), omit(defaultListener(), "id", "created"));
}
-const resizeCallers = {
- count: 0,
-};
+export function unitMap(val: string, kind: "" | "metric" = ""): string {
+ let returnv: string = "";
-let { width, height } = await appWindow.innerSize();
+ if (kind == "metric")
+ switch (val as TUnitOpts) {
+ case "B":
+ return "Byte(s)";
+ case "KB":
+ return "Kilobyte(s)";
+ case "MB":
+ return "Megabyte(s)";
+ case "GB":
+ return "Gigabyte(s)";
+ case "TB":
+ return "Terabyte(s)";
+ }
+ else
+ switch (val) {
+ case "Byte(s)":
+ returnv = "B";
+ break;
+ case "Kilobyte(s)":
+ returnv = "KB";
+ break;
+ case "Megabyte(s)":
+ returnv = "MB";
+ break;
+ case "Gigabyte(s)":
+ returnv = "GB";
+ break;
+ case "Terabyte(s)":
+ returnv = "TB";
+ }
-console.log("Recalling this package");
-const dimensions = reactive({
- appWindow,
- width: width,
- event: "tauri://resize",
- windowLabel: "",
- height: height,
- id: 0,
- isMaximized: false,
- unlisten: (): void => {},
-});
+ return returnv;
+}
-export const useDimensions = () => {
- if (resizeCallers.count <= 0) {
- // limits the amount of resize event listener to 1
- appWindow
- .listen("tauri://resize", async (e: ResizeEvent) => {
- dimensions.isMaximized = await appWindow.isMaximized();
- dimensions.width = e.payload.width;
- dimensions.height = e.payload.height;
- dimensions.windowLabel = e.windowLabel;
- dimensions.event = e.event;
- dimensions.id = e.id;
- })
- .then(
- (unlisten) =>
- (dimensions.unlisten = () => {
- unlisten();
- })
- );
- resizeCallers.count = 1;
+export function stringToColour(str: string) {
+ let hash = 0;
+ for (let i = 0; i < str.length; i++) {
+ hash = str.charCodeAt(i) + ((hash << 5) - hash);
+ }
+ let colour = "#";
+ for (let i = 0; i < 3; i++) {
+ let value = (hash >> (i * 8)) & 0xff;
+ colour += ("00" + value.toString(16)).substr(-2);
}
- return dimensions;
-};
+ return colour;
+}
diff --git a/src/views/Dashboard.vue b/src/views/Dashboard.vue
deleted file mode 100644
index e0422c2..0000000
--- a/src/views/Dashboard.vue
+++ /dev/null
@@ -1,89 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/Journal.vue b/src/views/Journal.vue
deleted file mode 100644
index ee8ab8f..0000000
--- a/src/views/Journal.vue
+++ /dev/null
@@ -1,67 +0,0 @@
-
-
-
-
- {{ `${high}/${fetchList.len}` }}
-
-
-
-
diff --git a/src/views/Statistics.vue b/src/views/Statistics.vue
deleted file mode 100644
index 4fbe378..0000000
--- a/src/views/Statistics.vue
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
diff --git a/src/vite-env.d.ts b/src/vite-env.d.ts
new file mode 100644
index 0000000..11f02fe
--- /dev/null
+++ b/src/vite-env.d.ts
@@ -0,0 +1 @@
+///
diff --git a/tailwind.config.js b/tailwind.config.js
index 926e216..685f24f 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -1,20 +1,86 @@
+/** @type {import('tailwindcss').Config} */
module.exports = {
- darkMode: "class",
- content: ["./index.html", "./src/**/*.{vue,js,ts,jsx,tsx}"],
+ darkMode: ["class"],
+
+ content: [
+ './pages/**/*.{ts,tsx,vue}',
+ './components/**/*.{ts,tsx,vue}',
+ './app/**/*.{ts,tsx,vue}',
+ './src/**/*.{ts,tsx,vue}',
+ ],
+
theme: {
+ container: {
+ center: true,
+ padding: "2rem",
+ screens: {
+ "2xl": "1400px",
+ },
+ },
extend: {
colors: {
- l_white: "#FFFFFF",
- l_primary: "#CBCBCB",
- l_secondary: "#999999",
- d_primary: "#242429",
- d_secondary: "#303136",
+ dark: "#303136",
+ darker: "#242429",
+ dark_hl: "",
+ light: "#DBDADA",
+ lighter: "#F9F9F9",
+ light_hl: "#EAEAEA",
+
+
+ border: "hsl(var(--border))",
+ input: "hsl(var(--input))",
+ ring: "hsl(var(--ring))",
+ background: "hsl(var(--background))",
+ foreground: "hsl(var(--foreground))",
+ primary: {
+ DEFAULT: "hsl(var(--primary))",
+ foreground: "hsl(var(--primary-foreground))",
+ },
+ secondary: {
+ DEFAULT: "hsl(var(--secondary))",
+ foreground: "hsl(var(--secondary-foreground))",
+ },
+ destructive: {
+ DEFAULT: "hsl(var(--destructive))",
+ foreground: "hsl(var(--destructive-foreground))",
+ },
+ muted: {
+ DEFAULT: "hsl(var(--muted))",
+ foreground: "hsl(var(--muted-foreground))",
+ },
+ accent: {
+ DEFAULT: "hsl(var(--accent))",
+ foreground: "hsl(var(--accent-foreground))",
+ },
+ popover: {
+ DEFAULT: "hsl(var(--popover))",
+ foreground: "hsl(var(--popover-foreground))",
+ },
+ card: {
+ DEFAULT: "hsl(var(--card))",
+ foreground: "hsl(var(--card-foreground))",
+ },
+ },
+ borderRadius: {
+ lg: "var(--radius)",
+ md: "calc(var(--radius) - 2px)",
+ sm: "calc(var(--radius) - 4px)",
+ },
+ keyframes: {
+ "accordion-down": {
+ from: { height: 0 },
+ to: { height: "var(--radix-accordion-content-height)" },
+ },
+ "accordion-up": {
+ from: { height: "var(--radix-accordion-content-height)" },
+ to: { height: 0 },
+ },
},
- fontFamily: {
- comfortaa: ["Comfortaa"],
- adine: ["Adine", "ui-serif"],
+ animation: {
+ "accordion-down": "accordion-down 0.2s ease-out",
+ "accordion-up": "accordion-up 0.2s ease-out",
},
},
},
- plugins: [],
-};
+ plugins: [require("tailwindcss-animate")],
+}
diff --git a/tsconfig.json b/tsconfig.json
index aae5cdc..6bee1e1 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -1,15 +1,50 @@
{
"compilerOptions": {
- "target": "esnext",
+ "plugins": [
+ {
+ "name": "typescript-vue-plugin"
+ }
+ ],
+ "target": "ES2020",
"useDefineForClassFields": true,
- "module": "esnext",
- "moduleResolution": "node",
- "strict": true,
- "jsx": "preserve",
- "sourceMap": true,
+ "module": "ESNext",
+ "lib": [
+ "ES2020",
+ "DOM",
+ "DOM.Iterable"
+ ],
+ "skipLibCheck": true,
+ "types": [
+ "unplugin-icons/types/vue",
+ "node"
+ ],
+ "baseUrl": ".",
+ "paths": {
+ "@/*": [
+ "./src/*"
+ ]
+ },
+ /* Bundler mode */
+ "moduleResolution": "bundler",
+ "allowImportingTsExtensions": true,
"resolveJsonModule": true,
- "esModuleInterop": true,
- "lib": ["esnext", "dom"]
+ "isolatedModules": true,
+ "noEmit": true,
+ "jsx": "preserve",
+ /* Linting */
+ "strict": true,
+ "noUnusedLocals": true,
+ "noUnusedParameters": true,
+ "noFallthroughCasesInSwitch": true
},
- "include": ["src/**/*.ts", "src/**/*.js", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"]
+ "include": [
+ "src/**/*.ts",
+ "src/**/*.d.ts",
+ "src/**/*.vue"
+ ],
+ "references": [
+ {
+ "path": "./tsconfig.node.json"
+ }
+ ]
}
diff --git a/tsconfig.node.json b/tsconfig.node.json
index e993792..42872c5 100644
--- a/tsconfig.node.json
+++ b/tsconfig.node.json
@@ -1,8 +1,10 @@
{
"compilerOptions": {
"composite": true,
- "module": "esnext",
- "moduleResolution": "node"
+ "skipLibCheck": true,
+ "module": "ESNext",
+ "moduleResolution": "bundler",
+ "allowSyntheticDefaultImports": true
},
"include": ["vite.config.ts"]
}
diff --git a/vite.config.ts b/vite.config.ts
index 446db4a..dc64737 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -1,10 +1,165 @@
-import { defineConfig } from "vite";
-import vue from "@vitejs/plugin-vue";
+import { defineConfig } from 'vite'
+import vue from '@vitejs/plugin-vue'
+import path from "path";
+
+import UnpluginIcons from "unplugin-icons/vite";
+
+import { promises as fs } from "fs";
// https://vitejs.dev/config/
export default defineConfig({
- plugins: [vue()],
- build: {
- target: "esnext",
+ resolve: {
+ alias: {
+ "@": path.resolve(__dirname, "./src"),
+ },
},
+ plugins: [
+ vue(),
+ UnpluginIcons({
+ compiler: "vue3",
+ customCollections: {
+
+ alertcircle: async () =>
+ await fs.readFile("./src/assets/img/alert-circle.svg", "utf-8"),
+
+ trash: async () =>
+ await fs.readFile("./src/assets/img/trash.svg", "utf-8"),
+
+ settings: async () =>
+ await fs.readFile("./src/assets/img/settings.svg", "utf-8"),
+
+ unlock: async () =>
+ await fs.readFile("./src/assets/img/unlock.svg", "utf-8"),
+
+ search: async () =>
+ await fs.readFile("./src/assets/img/search.svg", "utf-8"),
+
+ statistics: async () =>
+ await fs.readFile("./src/assets/img/statistics.svg", "utf-8"),
+
+ plus: async () =>
+ await fs.readFile("./src/assets/img/plus.svg", "utf-8"),
+
+ chevron: async () =>
+ await fs.readFile("./src/assets/img/chevron.svg", "utf-8"),
+
+ dashboard: async () =>
+ await fs.readFile("./src/assets/img/dashboard.svg", "utf-8"),
+
+ edit: async () =>
+ await fs.readFile("./src/assets/img/edit.svg", "utf-8"),
+
+ journal: async () =>
+ await fs.readFile("./src/assets/img/journal.svg", "utf-8"),
+
+ light: async () =>
+ await fs.readFile("./src/assets/img/light.svg", "utf-8"),
+
+ close: async () =>
+ await fs.readFile("./src/assets/img/close.svg", "utf-8"),
+
+ maximize: async () =>
+ await fs.readFile("./src/assets/img/maximize.svg", "utf-8"),
+
+ minimize: async () =>
+ await fs.readFile("./src/assets/img/minimize.svg", "utf-8"),
+
+ logo: async () =>
+ await fs.readFile("./src/assets/img/logo.svg", "utf-8"),
+
+ removeCircle: async () =>
+ await fs.readFile("./src/assets/img/remove-circle.svg", "utf-8"),
+
+ log_error: async () => await fs.readFile("./src/assets/img/log-error.svg", "utf-8"),
+
+ log_success: async () => await fs.readFile("./src/assets/img/log-success.svg", "utf-8"),
+
+ log_warn: async () => await fs.readFile("./src/assets/img/log-warn.svg", "utf-8"),
+
+ open_modal: async () => await fs.readFile("./src/assets/img/open-modal.svg", "utf-8"),
+
+ filter: async () => await fs.readFile("./src/assets/img/filter.svg", "utf-8"),
+
+ sort: async () => await fs.readFile("./src/assets/img/sort.svg", "utf-8"),
+
+ copy: async () => await fs.readFile("./src/assets/img/copy.svg", "utf-8"),
+
+ stats_folder: async () => await fs.readFile("./src/assets/img/stats_folder.svg", "utf-8"),
+
+ stats_file: async () => await fs.readFile("./src/assets/img/stats_file.svg", "utf-8"),
+
+ info: async () => await fs.readFile("./src/assets/img/info.svg", "utf-8"),
+ },
+
+ transform(svg, collection, _) {
+ let strokes: string[] = [
+ "trash",
+ "dashboard",
+ "journal",
+ "edit",
+ "light",
+ "unlock",
+ "statistics",
+ "plus",
+ "settings",
+ "search",
+ "chevron",
+ "removeCircle",
+ "log_error",
+ "log_success",
+ "info",
+ "log_warn",
+ "open_modal",
+ "filter",
+ "sort",
+ "copy",
+ "stats_file",
+ "stats_folder",
+ ];
+
+ let fills = [
+ "minimize",
+ "close",
+ "maximize"
+ ]
+
+ if (strokes.includes(collection)) return replace(svg, Replace.Stroke);
+ if (fills.includes(collection)) return replace(svg, Replace.Fill)
+ if (collection == "logo") return removeWxH(svg);
+ return svg;
+ },
+ })
+ ],
});
+
+
+export enum Replace {
+ Stroke,
+ Fill,
+ Both,
+}
+
+export function removeWxH(svg: string) {
+ return svg.replace(/ width="\d+"/, " ").replace(/ height="\d+"/, "");
+}
+
+export function replace(svg: string, r: Replace): string {
+ let adjusted_svg = removeWxH(svg);
+
+ if (r == Replace.Fill)
+ adjusted_svg = adjusted_svg.replace(
+ /fill="[#\d\w]*"/g,
+ "fill='currentColor'"
+ );
+ else if (r == Replace.Stroke)
+ adjusted_svg = adjusted_svg.replace(
+ /stroke="[#\d\w]*"/g,
+ "stroke='currentColor'"
+ );
+ else if (r == Replace.Both)
+ adjusted_svg = adjusted_svg
+ .replace(/fill="[#\d\w]*"/g, "fill='currentColor'")
+ .replace(/stroke="[#\d\w]*"/g, "stroke='currentColor'");
+
+ return adjusted_svg;
+}