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 ( +