From 79592dc2bf4f80c52edbfb0908c4eaa69dd45d04 Mon Sep 17 00:00:00 2001 From: Aaron Leopold <36278431+aaronleopold@users.noreply.github.com> Date: Sat, 20 Apr 2024 09:05:28 -0700 Subject: [PATCH] :memo: Update outdated docs pages At least what I noticed --- core/src/db/entity/user/permissions.rs | 3 +- .../access-control/age-restrictions.mdx | 21 ++++++++---- docs/pages/guides/basics/scanner.mdx | 19 ++++------- docs/pages/guides/mobile/app.mdx | 2 +- docs/pages/installation/docker.mdx | 32 +++++++++---------- docs/pages/installation/executable.mdx | 7 ++-- .../library/management/LibraryExclusions.tsx | 1 + .../management/LibrarySettingsScene.tsx | 2 ++ 8 files changed, 45 insertions(+), 42 deletions(-) diff --git a/core/src/db/entity/user/permissions.rs b/core/src/db/entity/user/permissions.rs index 86fa06615..a2d06a529 100644 --- a/core/src/db/entity/user/permissions.rs +++ b/core/src/db/entity/user/permissions.rs @@ -19,6 +19,7 @@ impl From for AgeRestriction { } } +// TODO: consider separating some of the `manage` permissions into more granular permissions // TODO: consider adding self:update permission, useful for child accounts /// Permissions that can be granted to a user. Some permissions are implied by others, /// and will be automatically granted if the "parent" permission is granted. @@ -58,7 +59,6 @@ pub enum UserPermission { /// Grant access to delete the library (manage library) #[serde(rename = "library:delete")] DeleteLibrary, - // TODO: ReadUsers, CreateUsers, ManageUsers /// Grant access to read users. /// /// Note that this is explicitly for querying users via user-specific endpoints. @@ -143,6 +143,7 @@ impl ToString for UserPermission { } } +// TODO: refactor to remove panic :grimace: impl From<&str> for UserPermission { fn from(s: &str) -> UserPermission { match s { diff --git a/docs/pages/guides/access-control/age-restrictions.mdx b/docs/pages/guides/access-control/age-restrictions.mdx index 7578f263b..696fd457b 100644 --- a/docs/pages/guides/access-control/age-restrictions.mdx +++ b/docs/pages/guides/access-control/age-restrictions.mdx @@ -3,9 +3,8 @@ import { Callout } from 'nextra-theme-docs' # Age Restrictions - This functionality is experimental. Please ensure you properly test any configured age - restrictions to ensure they work as expected with your library **before** you give the restricted - user access to their account. + Please ensure you properly test any configured age restrictions to ensure they work as expected + with your library **before** you give the restricted user access to their account. Age restrictions are set on a per-user basis, and are used to determine whether or not a user can access a book. For more information on users and user management, see the dedicated [users](/guides/access-control/users) page. @@ -40,6 +39,13 @@ The age restriction is located directly within the metadata for a book itself, o This means that **without metadata, Stump cannot determine whether or not a book is age-allowed**. There are fallback options described below. +#### EPUB + +Stump will attempt to parse one of the following from an EPUB file's metadata: + +- `typicalAgeRange`: Generally in the format of `[number]-[number]` +- `contentRating`: Subject to the publisher, but generally similar to that you'd find on a movie or TV show + ### How does Stump determine whether or not a book is age-allowed? If a book or a book's series has an age restriction set, Stump will use that age restriction to determine whether or not a user can access it. The comparison done internally is `less than or equal to X number`, meaning that if a user has an age restriction set to `13` and a book is rated to `17`, the user will not be able to access the book. If a user has an age restriction set to `17` and a book is rated to `13`, the user will be able to access the book. In other words, **the age restriction set on the user must be greater than or equal to the age restriction number set on the book or series in order to have access**. @@ -53,7 +59,8 @@ Stump doesn't currently support editing metadata directly, but it is planned for ### Other considerations -- Stump doesn't currently support dynamic thumbnails for libraries containing age-restricted books or series. This means that if it happens to be the case that the first book in the first series of a library is age-restricted, the thumbnail for the library **will still be displayed** so long as a user has access to the library. This is planned to be fixed in the future by one of two ways: - 1. Settings will be made available to override the thumbnail for a library or series - 2. Server owners will be able to associate libraries and series with tags and then set restrictions on a user that would prevent access to specific tags. See the [Tag-based restrictions](#tag-based-restrictions) section for more information. - 3. Server owners can exclude users from seeing certain libraries entirely +#### Library thumbnails + +If you generated a library thumbnail for a library which coincidentally contains an age-restricted book that is ordered first, the thumbnail will still be displayed so long as a user has access to the library. + +You can get around this by setting a the thumbnail to source from a different book, or uploading a custom thumbnail. diff --git a/docs/pages/guides/basics/scanner.mdx b/docs/pages/guides/basics/scanner.mdx index 889174328..01f35c01c 100644 --- a/docs/pages/guides/basics/scanner.mdx +++ b/docs/pages/guides/basics/scanner.mdx @@ -92,17 +92,10 @@ For convenience, there are a few preset options you may select from the dropdown > In the future, this section of the UI will change to include scheduling options for more than just scans. However, for now, it is only for scans. -## Ignore Files +## Ignoring files -Stump has minimal support for a custom `.stumpignore` file, which allows you to ignore certain files and directories from being scanned. This is useful for files which are organized with your media, but you don't want to be included in the library. - -Some examples you can achieve with this: - -```bash -# Ignore all files in the "extras" directory -extras/ -# Ignore all files in the "extras" directory, except for "extras/include-me.cbz" -!extras/include-me.cbz -``` - -Please note, that in the above example, if you exclude an entire directory and explicitly include a file in that directory, a series will still potentially be created for that directory depending on which [library pattern](/guides/libraries#library-patterns) you have configured. If it does get created, `include-me.cbz` will be the only file in the series. + + Stump has removed support for `.stumpignore` files in favor of a more robust configuration system. + The corresponding GitHub issue for tracking is + [#284](https://github.com/stumpapp/stump/issues/284) + diff --git a/docs/pages/guides/mobile/app.mdx b/docs/pages/guides/mobile/app.mdx index 3a5ff4ed6..4f1be9f8c 100644 --- a/docs/pages/guides/mobile/app.mdx +++ b/docs/pages/guides/mobile/app.mdx @@ -5,7 +5,7 @@ import { Callout } from 'nextra-theme-docs' A mobile app is currently in the **very early** stages of development, thanks primarily to the efforts of two contributors! If you are a mobile developer and would like to help out, please feel free to reach out. -If you're interested in updates, you can track the broad progress on the [mobile-app feature branch](https://github.com/stumpapp/stump/tree/mobile-app) on GitHub. As development progresses a bit more to an MVP, I'll be sure to add a dedicated project for better tracking +If you're interested in updates, you can track the broad progress via the [are we mobile yet](https://github.com/orgs/stumpapp/projects/8) project board. diff --git a/docs/pages/installation/docker.mdx b/docs/pages/installation/docker.mdx index 2f3996916..5cca8f8c3 100644 --- a/docs/pages/installation/docker.mdx +++ b/docs/pages/installation/docker.mdx @@ -26,6 +26,13 @@ echo -e "PUID=$(id -u)\nPGID=$(id -g)" + + This tutorial uses the newer `docker compose` CLI. If you find this command does not exist for + you, you might be on V1, which uses `docker-compose`. Please review [Docker's + documentation](https://docs.docker.com/compose/install/) for more information and/or + platform-specific installation. + + ### Create a `docker-compose.yml` file @@ -36,12 +43,12 @@ Below is an example of a Docker Compose file you can use to bootstrap your Stump version: '3.3' services: stump: - image: aaronleopold/stump:nightly + image: aaronleopold/stump:latest container_name: stump # Replace my paths (prior to the colons) with your own volumes: - - /Users/aaronleopold/.stump:/config - - /Users/aaronleopold/Documents/Stump:/data + - /home/aaronleopold/.stump:/config + - /media/books:/data ports: - 10801:10801 environment: @@ -70,13 +77,6 @@ docker compose up -d - - This tutorial uses the newer `docker compose` CLI. If you find this command does not exist for - you, you might be on V1, which uses `docker-compose`. Please review [Docker's - documentation](https://docs.docker.com/compose/install/) for more information and/or - platform-specific installation. - - @@ -92,17 +92,17 @@ docker create \ -e "PUID=1000" \ -e "PGID=1000" \ -p 10801:10801 \ - --volume "/Users/aaronleopold/.stump:/config" \ - --volume "/Users/aaronleopold/Documents/Stump:/data" \ + --volume "/home/aaronleopold/.stump:/config" \ + --volume "/media/books:/data" \ --restart unless-stopped \ - aaronleopold/stump:nightly + aaronleopold/stump:latest ``` If you prefer bind mounts, you can swap out the two `--volume` lines with: ```bash ---mount type=volume,source=/Users/aaronleopold/.stump,target=/config \ ---mount type=volume,source=/Users/aaronleopold/Documents/Stump,target=/data \ +--mount type=volume,source=/home/aaronleopold/.stump,target=/config \ +--mount type=volume,source=/media/books,target=/data \ ``` ### Start the container @@ -116,7 +116,7 @@ docker start stump When a new image is available, you can update your container using these commands: ```bash -docker pull aaronleopold/stump:nightly +docker pull aaronleopold/stump:latest docker restart stump ``` diff --git a/docs/pages/installation/executable.mdx b/docs/pages/installation/executable.mdx index dc9b5a5c5..63a10d536 100644 --- a/docs/pages/installation/executable.mdx +++ b/docs/pages/installation/executable.mdx @@ -5,12 +5,11 @@ import { Tabs } from 'nextra/components' # Executable - Any present tense information in this section is not accurate. Once a release is made, the - following information will apply shortly thereafter. + Native executables are not yet available. The corresponding GitHub issue for tracking is + [#310](https://github.com/stumpapp/stump/issues/310). For now, you can install Stump using + [Docker](/installation/docker) or directly from [source](/installation/source). -Pre-built binaries will be generally available on [GitHub](https://github.com/stumpapp/stump/releases) after `0.1.0` is released. Until then, only Docker images are available. - ## Platform-specific instructions Select your platform to view the installation instructions diff --git a/packages/browser/src/scenes/library/management/LibraryExclusions.tsx b/packages/browser/src/scenes/library/management/LibraryExclusions.tsx index 156a6e09c..28174f427 100644 --- a/packages/browser/src/scenes/library/management/LibraryExclusions.tsx +++ b/packages/browser/src/scenes/library/management/LibraryExclusions.tsx @@ -69,6 +69,7 @@ export default function LibraryExclusions() { return null } + // TODO: disabled state if no options return (
diff --git a/packages/browser/src/scenes/library/management/LibrarySettingsScene.tsx b/packages/browser/src/scenes/library/management/LibrarySettingsScene.tsx index 9fca8d50f..6ee7049c6 100644 --- a/packages/browser/src/scenes/library/management/LibrarySettingsScene.tsx +++ b/packages/browser/src/scenes/library/management/LibrarySettingsScene.tsx @@ -8,6 +8,8 @@ import { CreateOrUpdateLibraryForm } from './form' import LibraryExclusions from './LibraryExclusions' import QuickActions from './QuickActions' +// TODO: redesign this page, it is ugly. + export default function LibrarySettingsScene() { const { library } = useLibraryContext() const { libraries } = useLibraries()