Remove unnecessarily styling, fix file sorting
This commit is contained in:
@@ -1,9 +1,7 @@
|
|||||||
// Prevents additional console window on Windows in release, DO NOT REMOVE!!
|
// Prevents additional console window on Windows in release, DO NOT REMOVE!!
|
||||||
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
|
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
|
||||||
|
|
||||||
use std::any::Any;
|
use tauri::{AboutMetadata, CustomMenuItem, Menu, MenuItem, Submenu};
|
||||||
|
|
||||||
use tauri::{AboutMetadata, CustomMenuItem, Menu, MenuEntry, MenuItem, Submenu};
|
|
||||||
|
|
||||||
#[derive(Clone, serde::Serialize)]
|
#[derive(Clone, serde::Serialize)]
|
||||||
struct OpenFolderMessage {}
|
struct OpenFolderMessage {}
|
||||||
|
|||||||
@@ -1,11 +1,5 @@
|
|||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import {
|
import { Component, signal } from '@angular/core';
|
||||||
ChangeDetectorRef,
|
|
||||||
Component,
|
|
||||||
OnDestroy,
|
|
||||||
OnInit,
|
|
||||||
signal,
|
|
||||||
} from '@angular/core';
|
|
||||||
import { MatButtonModule } from '@angular/material/button';
|
import { MatButtonModule } from '@angular/material/button';
|
||||||
import { MatSidenavModule } from '@angular/material/sidenav';
|
import { MatSidenavModule } from '@angular/material/sidenav';
|
||||||
import { RouterOutlet } from '@angular/router';
|
import { RouterOutlet } from '@angular/router';
|
||||||
@@ -86,37 +80,12 @@ export class AppComponent {
|
|||||||
return {
|
return {
|
||||||
isDirectory: entry.children != null,
|
isDirectory: entry.children != null,
|
||||||
name: entry.name || '',
|
name: entry.name || '',
|
||||||
children: entry.children?.map((entry) =>
|
children: entry.children
|
||||||
this.mapEntry(entry, splitNumbers)
|
?.sort(this.sortFiles(splitNumbers))
|
||||||
),
|
.map((entry) => this.mapEntry(entry, splitNumbers)),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private sortFiles =
|
private sortFiles = (splitNumbers: RegExp) => (a: FileEntry, b: FileEntry) =>
|
||||||
(splitNumbers: RegExp) => (a: FileEntry, b: FileEntry) => {
|
a.name?.localeCompare(b.name ?? '') ?? 0;
|
||||||
return a.name?.localeCompare(b.name ?? '') ?? 0;
|
|
||||||
// if (!a.name) {
|
|
||||||
// return -1;
|
|
||||||
// }
|
|
||||||
// if (!b.name) {
|
|
||||||
// return 1;
|
|
||||||
// }
|
|
||||||
// const aSplit = splitNumbers.exec(a.name);
|
|
||||||
// const bSplit = splitNumbers.exec(b.name);
|
|
||||||
// if (!aSplit) {
|
|
||||||
// return -1;
|
|
||||||
// }
|
|
||||||
// if (!bSplit) {
|
|
||||||
// return 1;
|
|
||||||
// }
|
|
||||||
// for (
|
|
||||||
// let i = 0;
|
|
||||||
// i < (aSplit.length > bSplit.length ? bSplit.length : aSplit.length);
|
|
||||||
// i++
|
|
||||||
// ) {}
|
|
||||||
// // TODO: Alternative is to iterate through characters in the strings to find numbers, if there isn't a number then return
|
|
||||||
// // locale compare?
|
|
||||||
// // TODO: finish this
|
|
||||||
// return 0;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
html {
|
html {
|
||||||
@include mat.all-component-themes(theme.$rose-theme);
|
@include mat.core-theme(theme.$rose-theme);
|
||||||
|
@include mat.toolbar-theme(theme.$rose-theme);
|
||||||
|
@include mat.button-theme(theme.$rose-theme);
|
||||||
|
@include mat.tree-theme(theme.$rose-theme);
|
||||||
|
@include mat.sidenav-theme(theme.$rose-theme);
|
||||||
|
@include mat.icon-theme(theme.$rose-theme);
|
||||||
|
@include mat.form-field-theme(theme.$rose-theme);
|
||||||
@include custom-colours(theme.$rose-theme);
|
@include custom-colours(theme.$rose-theme);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -20,6 +26,7 @@ body {
|
|||||||
}
|
}
|
||||||
body {
|
body {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
font-family: "Roboto";
|
||||||
--mat-tree-node-min-height: 24px;
|
--mat-tree-node-min-height: 24px;
|
||||||
--mat-tree-node-text-size: 14px;
|
--mat-tree-node-text-size: 14px;
|
||||||
--mdc-icon-button-state-layer-size: 24px;
|
--mdc-icon-button-state-layer-size: 24px;
|
||||||
|
|||||||
Reference in New Issue
Block a user