diff --git a/README.md b/README.md
index d95a3ac..10e2632 100644
--- a/README.md
+++ b/README.md
@@ -57,9 +57,9 @@ _Important: If you delete this file, all notes and tags of this project will be
So far the application has only been tested on macOS Sonoma!
-🍏 [Download for macOS](https://github.com/aofn/Ableton-Live-Manager/releases/download/app-v0.6.0/Ableton.Live.Manager_0.6.0_x64.dmg)
+🍏 [Download for macOS](https://github.com/aofn/Ableton-Live-Manager/releases/download/app-v0.6.2b/Ableton.Live.Manager_0.6.2b_x64.dmg)
-🪟 [Download for Windows](https://github.com/aofn/Ableton-Live-Manager/releases/download/app-v0.6.0/Ableton.Live.Manager_0.6.0_x64_en-US.msi)
+🪟 [Download for Windows](https://github.com/aofn/Ableton-Live-Manager/releases/download/app-v0.6.2b/Ableton.Live.Manager_0.6.2b_x64_en-US.msi)
You can find all releases here: https://github.com/aofn/Ableton-Live-Manager/releases/tag/app-v0.6.0
diff --git a/src-tauri/icons/128x128.png b/src-tauri/icons/128x128.png
index 4e114a9..e091c11 100644
Binary files a/src-tauri/icons/128x128.png and b/src-tauri/icons/128x128.png differ
diff --git a/src-tauri/icons/128x128@2x.png b/src-tauri/icons/128x128@2x.png
index 5ab61da..70ada5d 100644
Binary files a/src-tauri/icons/128x128@2x.png and b/src-tauri/icons/128x128@2x.png differ
diff --git a/src-tauri/icons/32x32.png b/src-tauri/icons/32x32.png
index fdce606..eccb475 100644
Binary files a/src-tauri/icons/32x32.png and b/src-tauri/icons/32x32.png differ
diff --git a/src-tauri/icons/Square107x107Logo.png b/src-tauri/icons/Square107x107Logo.png
index 6a5f307..70b5319 100644
Binary files a/src-tauri/icons/Square107x107Logo.png and b/src-tauri/icons/Square107x107Logo.png differ
diff --git a/src-tauri/icons/Square142x142Logo.png b/src-tauri/icons/Square142x142Logo.png
index 98de3ed..8ea003b 100644
Binary files a/src-tauri/icons/Square142x142Logo.png and b/src-tauri/icons/Square142x142Logo.png differ
diff --git a/src-tauri/icons/Square150x150Logo.png b/src-tauri/icons/Square150x150Logo.png
index 71ed6ff..ca3ef0a 100644
Binary files a/src-tauri/icons/Square150x150Logo.png and b/src-tauri/icons/Square150x150Logo.png differ
diff --git a/src-tauri/icons/Square284x284Logo.png b/src-tauri/icons/Square284x284Logo.png
index 2ef5512..783cfe0 100644
Binary files a/src-tauri/icons/Square284x284Logo.png and b/src-tauri/icons/Square284x284Logo.png differ
diff --git a/src-tauri/icons/Square30x30Logo.png b/src-tauri/icons/Square30x30Logo.png
index 6a309ab..db64e6a 100644
Binary files a/src-tauri/icons/Square30x30Logo.png and b/src-tauri/icons/Square30x30Logo.png differ
diff --git a/src-tauri/icons/Square310x310Logo.png b/src-tauri/icons/Square310x310Logo.png
index f3280f6..5ed7339 100644
Binary files a/src-tauri/icons/Square310x310Logo.png and b/src-tauri/icons/Square310x310Logo.png differ
diff --git a/src-tauri/icons/Square44x44Logo.png b/src-tauri/icons/Square44x44Logo.png
index 5fdac47..d4f3e8a 100644
Binary files a/src-tauri/icons/Square44x44Logo.png and b/src-tauri/icons/Square44x44Logo.png differ
diff --git a/src-tauri/icons/Square71x71Logo.png b/src-tauri/icons/Square71x71Logo.png
index 9657537..7900428 100644
Binary files a/src-tauri/icons/Square71x71Logo.png and b/src-tauri/icons/Square71x71Logo.png differ
diff --git a/src-tauri/icons/Square89x89Logo.png b/src-tauri/icons/Square89x89Logo.png
index e000a0b..7d6bd4f 100644
Binary files a/src-tauri/icons/Square89x89Logo.png and b/src-tauri/icons/Square89x89Logo.png differ
diff --git a/src-tauri/icons/StoreLogo.png b/src-tauri/icons/StoreLogo.png
index 1f8fc2f..5dafd8d 100644
Binary files a/src-tauri/icons/StoreLogo.png and b/src-tauri/icons/StoreLogo.png differ
diff --git a/src-tauri/icons/ableton-peroject-manager-icon.png b/src-tauri/icons/ableton-peroject-manager-icon.png
index ae1c9b2..12b4088 100644
Binary files a/src-tauri/icons/ableton-peroject-manager-icon.png and b/src-tauri/icons/ableton-peroject-manager-icon.png differ
diff --git a/src-tauri/icons/icon.icns b/src-tauri/icons/icon.icns
index c4d331f..dba1625 100644
Binary files a/src-tauri/icons/icon.icns and b/src-tauri/icons/icon.icns differ
diff --git a/src-tauri/icons/icon.ico b/src-tauri/icons/icon.ico
index ffd254c..08f4cdb 100644
Binary files a/src-tauri/icons/icon.ico and b/src-tauri/icons/icon.ico differ
diff --git a/src-tauri/icons/icon.png b/src-tauri/icons/icon.png
index 695f2f0..69ee776 100644
Binary files a/src-tauri/icons/icon.png and b/src-tauri/icons/icon.png differ
diff --git a/src/app/page.js b/src/app/page.js
index d3641cc..5f5035f 100644
--- a/src/app/page.js
+++ b/src/app/page.js
@@ -23,6 +23,7 @@ import {
import { cn } from "@/lib/utils";
import { badgeVariants } from "@/components/ui/badge";
import "remixicon/fonts/remixicon.css";
+import _ from "lodash";
/**
* Displays a progress bar while scanning the project directory.
@@ -63,6 +64,7 @@ export default function Home() {
const [config, setConfig] = useState({});
const [filterByTags, setFilterByTags] = useState([]);
const [collapseAll, setCollapseAll] = useState(true);
+ const [sortMethod, setSortMethod] = useState([]);
const { t } = useTranslation();
const colourStyles = {
option: (styles, { data, isDisabled, isFocused, isSelected }) => ({
@@ -119,7 +121,6 @@ export default function Home() {
entries.splice(i, 1);
continue;
}
-
if (entry.children) {
for (let [i, child] of entry.children.entries()) {
const isFile = await invoke("is_file", { path: child.path }).catch(
@@ -127,6 +128,13 @@ export default function Home() {
entry.children.splice(i, 1);
},
);
+ // look for existing alm.json file
+ if (child.path.endsWith("alm.json")) {
+ // add apm object to entry
+ const almFile = await readTextFile(child.path);
+ const almJson = JSON.parse(almFile);
+ entry.alm = almJson;
+ }
if (child.path.endsWith(".als")) {
setCurrentScanPath(child.name);
@@ -162,6 +170,26 @@ export default function Home() {
getConfig();
}, []);
+ // sort function to sort directoryEntries by tags within alm.tags key if alm key exists
+ const sortByTags = (a, b) => {
+ const aTags = a.alm?.tags ? Object.values(a.alm.tags) : [];
+ const bTags = b.alm?.tags ? Object.values(b.alm.tags) : [];
+
+ const sortedATags = _.sortBy(aTags, ["value", "label"]);
+ const sortedBTags = _.sortBy(bTags, ["value", "label"]);
+
+ const aTagsString = sortedATags.map((tag) => tag.value).join("");
+ const bTagsString = sortedBTags.map((tag) => tag.value).join("");
+
+ // * -1 reverses order so tags are on top of list
+ return aTagsString.localeCompare(bTagsString) * -1;
+ };
+
+ // sort projects by name
+ const sortByName = (a, b) => {
+ return _.sortBy([a, b], ["name"]);
+ };
+
if (displayProgress)
return (
+
@@ -227,6 +268,7 @@ export default function Home() {
.filter((entry) =>
entry.name.toLowerCase().includes(filterInput.toLowerCase()),
)
+ .sort(sortMethod.value === "name" ? sortByName : sortByTags)
.map((entry) => {
return (
{
- const { t } = useTranslation();
- const [notes, setNotes] = useState({});
+const Notes = ({ projectDirectory, almFile, setAlmFile }) => {
+ const [notes, setNotes] = useState(almFile?.notes || "");
const [loading, setLoading] = useState(false);
useEffect(() => {
@@ -20,16 +18,15 @@ const Notes = ({ projectDirectory, projectNotesPath, almFile, setAlmFile }) => {
}
setLoading(false);
};
- if (projectNotesPath && isMounted) getNotes();
+ if (almFile && isMounted) getNotes();
return () => {
isMounted = false;
};
- }, [projectNotesPath, almFile]);
+ }, [almFile]);
const onSave = async (editedNote) => {
// if no changes have been made we don't want to do anything
- console.log(editedNote);
if (editedNote === notes) return;
setNotes(editedNote);
const copyAlm = { ...almFile };
@@ -47,7 +44,7 @@ const Notes = ({ projectDirectory, projectNotesPath, almFile, setAlmFile }) => {
) : (
<>
-
+
>
)}
>
diff --git a/src/components/ProjectItem.js b/src/components/ProjectItem.js
index 2a5eeb1..abe0da8 100644
--- a/src/components/ProjectItem.js
+++ b/src/components/ProjectItem.js
@@ -8,7 +8,6 @@ import { useTranslation } from "react-i18next";
import { Separator } from "@/components/ui/separator";
import FolderView from "@/components/FolderView";
-import { readTextFile } from "@tauri-apps/api/fs";
import { Tags } from "@/components/Tags";
import { RightColumn } from "@/components/RightColumn";
import {
@@ -43,13 +42,11 @@ export default function ProjectItem({
filterByTags,
config,
setConfig,
- setProjectDirectory,
setFilterByTags,
collapseAll,
}) {
const [openDetails, setOpenDetails] = useState(false);
const { t } = useTranslation();
- const [projectNotesPath, setProjectNotesPath] = useState("");
const [almFile, setAlmFile] = useState({});
const [isAccordionOpen, setIsAccordionOpen] = useState("open");
@@ -59,27 +56,7 @@ export default function ProjectItem({
useEffect(() => {
if (project) {
- // search for notes and alm.json within project folder
- if (project.children) {
- const notes = project.children.filter((child) =>
- child.name.endsWith(".md"),
- );
- if (notes.length > 0) setProjectNotesPath(notes[0].path);
- }
- const getAlmFile = async () => {
- console.log("reading alm file");
- const readFile = await readTextFile(project.path + "/alm.json").catch(
- (error) => {
- if (!error.includes("os error 2")) {
- console.log(error);
- }
- },
- );
-
- if (!readFile) return;
- setAlmFile(JSON.parse(readFile));
- };
- getAlmFile();
+ setAlmFile(project.alm);
}
}, [project]);
@@ -169,12 +146,7 @@ export default function ProjectItem({
diff --git a/src/components/RightColumn.js b/src/components/RightColumn.js
index 30d343a..5376187 100644
--- a/src/components/RightColumn.js
+++ b/src/components/RightColumn.js
@@ -18,7 +18,6 @@ import Notes from "@/components/Notes";
*/
export const RightColumn = ({
projectDirectory,
- projectNotesPath,
name,
openDetails,
setOpenDetails,
@@ -39,7 +38,6 @@ export const RightColumn = ({
) : (