Bug fixes
This commit is contained in:
@@ -115,7 +115,6 @@ sudo pm2 start server.cjs
|
|||||||
### TODO
|
### TODO
|
||||||
|
|
||||||
- Mobile improvements
|
- Mobile improvements
|
||||||
- Case insensitive sort (images, but check all)
|
|
||||||
- Debounce all inputs
|
- Debounce all inputs
|
||||||
- Update to use forms
|
- Update to use forms
|
||||||
- Text formatting in background ScrollArea
|
- Text formatting in background ScrollArea
|
||||||
|
|||||||
@@ -19,9 +19,9 @@ function Applications({ contentType }: { contentType: string[] }) {
|
|||||||
.sort((a: Application, b: Application) => {
|
.sort((a: Application, b: Application) => {
|
||||||
switch (appSort) {
|
switch (appSort) {
|
||||||
case 'A>Z':
|
case 'A>Z':
|
||||||
return a.name > b.name ? 1 : -1;
|
return a.name.toLocaleLowerCase() > b.name.toLocaleLowerCase() ? 1 : -1;
|
||||||
case 'Z>A':
|
case 'Z>A':
|
||||||
return a.name < b.name ? 1 : -1;
|
return a.name.toLocaleLowerCase() < b.name.toLocaleLowerCase() ? 1 : -1;
|
||||||
case 'Newest':
|
case 'Newest':
|
||||||
if (a.id && b.id) {
|
if (a.id && b.id) {
|
||||||
return a.id < b.id ? 1 : -1;
|
return a.id < b.id ? 1 : -1;
|
||||||
|
|||||||
@@ -33,9 +33,15 @@ function Bookmarks({ contentType }: { contentType: string[] }) {
|
|||||||
.sort((a: BookmarkGroup, b: BookmarkGroup) => {
|
.sort((a: BookmarkGroup, b: BookmarkGroup) => {
|
||||||
switch (bookmarkSort) {
|
switch (bookmarkSort) {
|
||||||
case 'A>Z':
|
case 'A>Z':
|
||||||
return a.categoryName > b.categoryName ? 1 : -1;
|
return a.categoryName.toLocaleLowerCase() >
|
||||||
|
b.categoryName.toLocaleLowerCase()
|
||||||
|
? 1
|
||||||
|
: -1;
|
||||||
case 'Z>A':
|
case 'Z>A':
|
||||||
return a.categoryName < b.categoryName ? 1 : -1;
|
return a.categoryName.toLocaleLowerCase() <
|
||||||
|
b.categoryName.toLocaleLowerCase()
|
||||||
|
? 1
|
||||||
|
: -1;
|
||||||
case 'Newest':
|
case 'Newest':
|
||||||
if (a.id && b.id) {
|
if (a.id && b.id) {
|
||||||
return a.id < b.id ? 1 : -1;
|
return a.id < b.id ? 1 : -1;
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ export default function RecommendedApplications({
|
|||||||
linksActive={true}
|
linksActive={true}
|
||||||
/>
|
/>
|
||||||
))
|
))
|
||||||
.toSorted((a: any, b: any) => (a.key > b.key ? 1 : -1))
|
.toSorted((a: any, b: any) => (a.name > b.name ? 1 : -1))
|
||||||
.slice(0, 5)}
|
.slice(0, 5)}
|
||||||
</Stack>
|
</Stack>
|
||||||
</Group>
|
</Group>
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ export default function RecommendedBookmarks({
|
|||||||
{bookmark.name}
|
{bookmark.name}
|
||||||
</Text>
|
</Text>
|
||||||
))
|
))
|
||||||
.toSorted((a: any, b: any) => (a.key > b.key ? 1 : -1))
|
.toSorted((a: any, b: any) => (a.name > b.name ? 1 : -1))
|
||||||
.slice(0, 5)}
|
.slice(0, 5)}
|
||||||
</Stack>
|
</Stack>
|
||||||
<Stack
|
<Stack
|
||||||
@@ -88,7 +88,7 @@ export default function RecommendedBookmarks({
|
|||||||
{bookmark.name}
|
{bookmark.name}
|
||||||
</Text>
|
</Text>
|
||||||
))
|
))
|
||||||
.toSorted((a: any, b: any) => (a.key > b.key ? 1 : -1))
|
.toSorted((a: any, b: any) => (a.name > b.name ? 1 : -1))
|
||||||
.slice(5, 10)}
|
.slice(5, 10)}
|
||||||
</Stack>
|
</Stack>
|
||||||
</Group>
|
</Group>
|
||||||
|
|||||||
@@ -43,7 +43,8 @@ function DebouncedBookmarkItem({
|
|||||||
if (groupData) {
|
if (groupData) {
|
||||||
setGroups(
|
setGroups(
|
||||||
groupData.sort(
|
groupData.sort(
|
||||||
(a: BookmarkGroup, b: BookmarkGroup) => a.categoryName > b.categoryName,
|
(a: BookmarkGroup, b: BookmarkGroup) =>
|
||||||
|
a.categoryName.toLocaleLowerCase() > b.categoryName.toLocaleLowerCase(),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -257,7 +257,7 @@ export function ThemePlaylists() {
|
|||||||
{themePlaylists
|
{themePlaylists
|
||||||
.filter((playlist: ThemePlaylist) => playlist.default === 0)
|
.filter((playlist: ThemePlaylist) => playlist.default === 0)
|
||||||
.sort((a: ThemePlaylist, b: ThemePlaylist) =>
|
.sort((a: ThemePlaylist, b: ThemePlaylist) =>
|
||||||
a.name > b.name ? 1 : -1,
|
a.name.toLocaleLowerCase() > b.name.toLocaleLowerCase() ? 1 : -1,
|
||||||
)
|
)
|
||||||
.map((cardPlaylist: ThemePlaylist) => {
|
.map((cardPlaylist: ThemePlaylist) => {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -77,7 +77,10 @@ export function Themes() {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (backgroundData && isBackgroundFetched) {
|
if (backgroundData && isBackgroundFetched) {
|
||||||
setBackgroundList(['None', ...backgroundData]);
|
setBackgroundList([
|
||||||
|
'None',
|
||||||
|
...backgroundData.sort((a: string, b: string) => a.localeCompare(b)),
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
}, [backgroundData, isBackgroundFetched]);
|
}, [backgroundData, isBackgroundFetched]);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user