aboutsummaryrefslogtreecommitdiffstats
path: root/src/web
AgeCommit message (Collapse)AuthorLines
2023-06-11pin craco to resolve conflicting depsJP Dillingham-1/+2
2023-06-11update depsJP Dillingham-15530/+3507
2023-06-11override css-what per https://github.com/advisories/GHSA-q8pj-2vqx-8ggcJP Dillingham-0/+1
2023-06-11override css select per https://github.com/advisories/GHSA-rp65-9cf3-cjxrJP Dillingham-0/+1
2023-03-15Bump webpack from 5.73.0 to 5.76.1 in /src/webdependabot[bot]-18/+18
Bumps [webpack](https://github.com/webpack/webpack) from 5.73.0 to 5.76.1. - [Release notes](https://github.com/webpack/webpack/releases) - [Commits](https://github.com/webpack/webpack/compare/v5.73.0...v5.76.1) --- updated-dependencies: - dependency-name: webpack dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
2023-03-03Bump dns-packet from 5.3.1 to 5.4.0 in /src/webdependabot[bot]-6/+6
Bumps [dns-packet](https://github.com/mafintosh/dns-packet) from 5.3.1 to 5.4.0. - [Release notes](https://github.com/mafintosh/dns-packet/releases) - [Changelog](https://github.com/mafintosh/dns-packet/blob/master/CHANGELOG.md) - [Commits](https://github.com/mafintosh/dns-packet/compare/v5.3.1...5.4.0) --- updated-dependencies: - dependency-name: dns-packet dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
2023-02-19Trying to speed up the performance of the Browse tab.Matt Goldspink-16/+34
It looks like there's a couple of issues with the current implementation which shows in Performance tab in Chrome: 1) getChildDirectories and in particular the split function. When you look at the code we're doing 3 filters on a reduced array each time, but always starting with the full list of directories. So for every child directory we iterate once over the entire array of all directories to remove 1 item, then for n-1 items we split them, then we find the ones who start with the parent path name. This is very inefficient. To fix this I added one first iteration that will split the names on them all once and use that depth as a key into a Map and store an Array of the items at that depth. We could possibly go one step further and iterate the array store the d.name split on the last index of the seperator as a key to speed this up? But the new version is already orders of magnitude faster 2) The compression on saveState into localStorage is slow and blocking the UI thread. Given that the saveState doesn't affect the actual state in the component or whats rendered I've moved it out of the current tick of rendering and shifted it in most browsers to be done when the screen is idle (i.e. user is not doing anything). Or in the case of Safari falling back to the next tick. This dropped render time for on one user with 6000+ directories from 1 minute to around 15s, of which a large chunk is the server calls. Fixes #317
2023-02-03Merge branch 'feature/dark-mode' of github.com:mattgoldspink/slskd into ↵Matt Goldspink-44/+42
feature/dark-mode
2023-02-03Fixing things based on feedback on previous PR.Matt Goldspink-35/+122
- Added a new menu item to the header to toggle the theme. The default is still the OS but it can be turned on or off. For now this is not controlled from the user Options. I'll look to see if we can do that, and make sure we honor precedence. - The above required me to shift the prefered media detection into App.js from CodeEditor.js and now I pass theme down through the components to reach it. - Fixed styling of DirectoryTree - had to move styles hardcoded into component into css - Fixed gaps in styling of logs so that different rows are color coded correctly.
2023-02-03Merge branch 'slskd:master' into feature/dark-modeMatt Goldspink-44/+42
2023-01-30Merge branch 'master' into portJP Dillingham-43/+40
2023-01-29wrap each set of routes in a SwitchJP Dillingham-39/+38
2023-01-29revert back to catch-allJP Dillingham-5/+1
2023-01-28disable lint ruleJP Dillingham-0/+1
2023-01-28tweak route matching regexJP Dillingham-1/+1
2023-01-23Merge branch 'master' into feature/fix-reload-to-stay-on-current-searchJP Dillingham-3/+1
2023-01-23Fixing #555 to allow browser reload to stay on the same page.Matt Goldspink-2/+5
There were 2 issues here: 1. The Redirect in App.js seems to be being hit on reload always and would always force a redirect. I tried googling but couldn't find a good answer why and how to workaround it, so I've just excluded our known paths from that redirect. 2. Even after this in Searches.js there's a race condition with the component being connected and starting to process the searchId, but the searches haven't been set yet, so it assumes it's invalid and resets to /searches. So I've swapped the order in onUpdate and that seems to fix it with no side effects.
2023-01-22Adding dark mode support.Matt Goldspink-206/+1728
This initial version is done based on the OS theme (so it'll only be dark mode if the OS setting is dark mode). In order for this to work I've added the customised less files for semantic locally and this requires a change from the react build scripts to craco because react doesn't support less compilation. I've verified as many screens as I can to make sure they're all looking ok but I'm sure I missed some parts. CodeMirror needs a slightly different solution which needed JS code to detect the current theme. The color scheme is heavily based on githubs dark mode and is using mostly css variable support. This should make it easy to tweak in the future too.
2023-01-19Instead of only showing the file size when some bytes have been downloaded ↵Matt Goldspink-3/+1
always show it. That way a user knows the size of pending downloads too. Fixes #600
2023-01-15use injected port in devJP Dillingham-1/+2
2023-01-14update default api in webJP Dillingham-1/+1
2023-01-11update browserslistJP Dillingham-6/+6
2023-01-08Bump json5 from 1.0.1 to 1.0.2 in /src/webdependabot[bot]-12/+12
Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2. - [Release notes](https://github.com/json5/json5/releases) - [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md) - [Commits](https://github.com/json5/json5/compare/v1.0.1...v1.0.2) --- updated-dependencies: - dependency-name: json5 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
2023-01-01don't show debug view button if remote config is disabledJP Dillingham-1/+1
2022-12-29fix all the broken stuffJP Dillingham-24/+50
2022-12-29pass state to ChatJP Dillingham-2/+6
2022-12-29add get()JP Dillingham-0/+4
2022-12-29fix menuJP Dillingham-8/+2
2022-12-11animate 'get directory' button, toast errorsJP Dillingham-11/+25
2022-12-10use DTOJP Dillingham-1/+1
2022-11-25suppress loaderJP Dillingham-4/+7
2022-11-25refresh shares when state changesJP Dillingham-4/+5
2022-11-25show '?' when counts are nullJP Dillingham-2/+2
2022-11-16Bump minimatch and recursive-readdir in /src/webdependabot[bot]-32/+9
Bumps [minimatch](https://github.com/isaacs/minimatch) and [recursive-readdir](https://github.com/jergason/recursive-readdir). These dependencies needed to be updated together. Updates `minimatch` from 3.0.4 to 3.1.2 - [Release notes](https://github.com/isaacs/minimatch/releases) - [Commits](https://github.com/isaacs/minimatch/compare/v3.0.4...v3.1.2) Updates `recursive-readdir` from 2.2.2 to 2.2.3 - [Release notes](https://github.com/jergason/recursive-readdir/releases) - [Changelog](https://github.com/jergason/recursive-readdir/blob/master/CHANGELOG.md) - [Commits](https://github.com/jergason/recursive-readdir/commits/v2.2.3) --- updated-dependencies: - dependency-name: minimatch dependency-type: indirect - dependency-name: recursive-readdir dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
2022-11-16Merge branch 'master' into dependabot/npm_and_yarn/src/web/loader-utils-2.0.4JP Dillingham-80/+144
2022-11-16remove debuggingJP Dillingham-2/+2
2022-11-16fix rerender issueJP Dillingham-103/+97
2022-11-15Bump loader-utils from 2.0.3 to 2.0.4 in /src/webdependabot[bot]-12/+12
Bumps [loader-utils](https://github.com/webpack/loader-utils) from 2.0.3 to 2.0.4. - [Release notes](https://github.com/webpack/loader-utils/releases) - [Changelog](https://github.com/webpack/loader-utils/blob/v2.0.4/CHANGELOG.md) - [Commits](https://github.com/webpack/loader-utils/compare/v2.0.3...v2.0.4) --- updated-dependencies: - dependency-name: loader-utils dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
2022-11-15add default route backJP Dillingham-2/+3
2022-11-15update network referencesJP Dillingham-6/+6
2022-11-14Merge remote-tracking branch 'origin/master' into agent-uiJP Dillingham-21/+58
2022-11-12Moved directory button to footerinalone-16/+13
2022-11-11add agent navigation uiJP Dillingham-9/+20
2022-11-11add network libJP Dillingham-0/+9
2022-11-11Append directory before filename in getFullDirectoryinalone-2/+7
2022-11-11Add 'get full directory' to FileListinalone-21/+56
This commit adds a new {username}/directory/{directory} endpoint which returns the contents of a given directory from a user. This has been implemented in the frontend by adding a "Get Full Directory" button to FileList, which is rendered if a "getFullDirectory" function is passed a as a prop. This is not needed in Browse, so this is currently just added to the search.
2022-11-10split navigation into mode-specific versionsJP Dillingham-88/+137
2022-11-08Bump loader-utils from 2.0.2 to 2.0.3 in /src/webdependabot[bot]-6/+6
Bumps [loader-utils](https://github.com/webpack/loader-utils) from 2.0.2 to 2.0.3. - [Release notes](https://github.com/webpack/loader-utils/releases) - [Changelog](https://github.com/webpack/loader-utils/blob/v2.0.3/CHANGELOG.md) - [Commits](https://github.com/webpack/loader-utils/compare/v2.0.2...v2.0.3) --- updated-dependencies: - dependency-name: loader-utils dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
2022-11-04remove unused importJP Dillingham-1/+0
2022-11-03display share hostJP Dillingham-1/+10