35 Commits

Author SHA1 Message Date
InfiniteStash
33b08ce632 Add user notifications (#769) 2024-12-06 10:33:57 +01:00
InfiniteStash
a4c9b6076b Refactor image resizing (#667) 2024-11-24 12:58:52 +01:00
InfiniteStash
d179cf4d0d Switch package manager to PNPM (#838) 2024-11-21 08:18:44 +01:00
InfiniteStash
cfbf84c8af Optimize querying performer/studio favorite status (#696) 2024-02-16 10:40:22 +01:00
A Ghoul Coder
99cfddcce3 add error propagation and logging in favicon-related functions (#659)
* add error propagation and logging in favicon-related functions

If favicon fetching or serving fails for any reason, or if favicon_path
is not configured, log an error.

Related to #655

* add lint to default make target to conform with GitHub workflow

* change error string to conform to linter
2023-06-20 09:41:43 +10:00
A Ghoul Coder
f0bdb063d9 More reliable favicon retrieval. (#652)
* More reliable favicon retrieval.

Previously, the application looked for favicons in `/favicon.ico`.
But favicons can be anywhere on a website and the location can be
defined in HTML and JSON manifests. Websites can also have multiple
favicons.

As a result, when a new site was added to stash-box which did not have a
`/favicon.ico`, the site was created without a proper favicon. Additionally,
since stash-box didn't check the filetype of the data returned by the
`/favicon.ico` GET request, it stored various 404 and other redirected
html pages.

A non-trivial amount of logic is required to discover all favicon
locations, check filetypes, and sort them. It therefore makes sense to
rely on a third-party package for this job. This patch uses
`go.deanishe.net/favicon`.

* Check length of icons to avoid runtime error when using icons[0] later.

* Specify go.deanishe.net/favicon as direct requirement

* favicon: crate favicon file only after retreival has succeded

Previously, an empty file was created at the start of the downloadIcon
function and would remain as an empty file even when favicon retreival
failed. This empty file would prevent future attempts to download an
icon for the same site ID.

Now the icon file is created at the end, after everything else has
succeeded.

* retreive the smallest available favicon for sites

* use http.client with cookiejar for favicon finder

Cookies are required for certain websites, even for simple requests.
See code comment for details.

* Makefile: include generate in the default make target

This more closely mirrors the GitHub workflow build process and helps
avoid CI build failures on pull requests.
2023-06-16 13:52:33 +10:00
InfiniteStash
02f2efc674 Add scene pairings list to performer page (#561) 2022-12-02 22:24:03 +01:00
InfiniteStash
e5f83c8467 Add query filters for scenes with submitted fingerprints (#516) 2022-11-07 22:12:00 +01:00
A Ghoul Coder
d20343934d simple Makefile cleanup (#537)
* consolidate .PHONY lines for readability

* add 'make clean'

* pre-ui must be declared as PHONY

Otherwise, if a file named `pre-ui` exists, the pre-ui make target will
be skipped.

* rm dist in make clean

dist is currently created by go build from the cross-compile make
targets

* move PHONY and simple var exports to top for readability

* consolidate the previous 3-step build into a default make target

The previous default target was `pre-build` which doesn't accomplish
anything useful on its own. Now the default build target is `stash-box`
which calls the other three targets that build the application.

Readme updated to reflect this change.

* Remove config file from clean command

While the config is initially auto generated, it is typically manually edited by the user, so it should not be cleaned.

Co-authored-by: InfiniteTF <infinitekittens@protonmail.com>
2022-10-31 23:03:13 +01:00
InfiniteStash
18f6c7e46c Remove OS X build and simplify pipeline (#349) 2022-04-12 14:14:57 +02:00
InfiniteStash
2eb35f8b2e Update go and libraries (#348) 2022-04-10 12:13:53 +02:00
peolic
ce7a90c0ac SearchField "show all results" fixes (#236)
* Fix clicking on "show all results" not working

* Fix effect of pressing Enter on PerformerSelect

Fixes navigation to /search/:term when pressing enter on PerformerSelect

* Add `ui-start` to Makefile
2022-01-01 10:50:56 +01:00
InfiniteStash
1ff83e7cf3 Merge branch 'master' into develop 2021-12-30 11:13:21 +00:00
InfiniteStash
b625a0c00b Fix release docker build (#231) 2021-12-30 11:40:17 +01:00
InfiniteStash
0e937cba10 Add customizable URL targets (#140)
* URL Sites WIP

* Fix site edit button positions

Co-authored-by: peolic <66393006+peolic@users.noreply.github.com>

* Adjust studioForm width

Co-authored-by: peolic <66393006+peolic@users.noreply.github.com>

* Remove superfluous admin check

Co-authored-by: peolic <66393006+peolic@users.noreply.github.com>

* Remove superfluous admin check

Co-authored-by: peolic <66393006+peolic@users.noreply.github.com>

* Remove superfluous admin check

Co-authored-by: peolic <66393006+peolic@users.noreply.github.com>

* Use directive for mutation permissions check

Co-authored-by: peolic <66393006+peolic@users.noreply.github.com>

* Fix performerForm link tab width

Co-authored-by: peolic <66393006+peolic@users.noreply.github.com>

* Fix sceneForm link tab width

Co-authored-by: peolic <66393006+peolic@users.noreply.github.com>

* Fix siteForm class/width

Co-authored-by: peolic <66393006+peolic@users.noreply.github.com>

* Add `noopener` rel to site links

Co-authored-by: peolic <66393006+peolic@users.noreply.github.com>

* Fix urlInput add button disable logic

Co-authored-by: peolic <66393006+peolic@users.noreply.github.com>

* Review feedback

* Make generate

* Remove unnecessary code

* Refactor UrlInput to properly disable/enable add button

* Fix link editing error

* Tweak URLList rendering and add home URL to studio page

* Add target="_blank" to studio home link

Co-authored-by: peolic <66393006+peolic@users.noreply.github.com>
2021-12-18 11:22:09 +01:00
peolic
f18e0965c8 Update Apollo config to use local schema (#197) 2021-11-28 23:04:47 +01:00
InfiniteStash
cc1839a272 Add version page (#190) 2021-11-26 08:53:02 +01:00
InfiniteStash
92c6c0c4d3 Update build versioning and release publishing (#188) 2021-11-24 23:33:41 +01:00
WithoutPants
913c10bbe3 Refactor user fingerprints (#115) 2021-10-31 08:29:47 +01:00
InfiniteStash
6e53daaf06 Switch linting to golangci-lint (#132) 2021-09-23 23:01:36 +02:00
InfiniteStash
ddca0309ca Replace packr with go:embed (#118) 2021-08-19 20:19:56 +02:00
peolic
3576fcf290 Fix CI build (#107)
* format `.goreleaser.yml`

* add `go mod tidy` pre-hook

https://goreleaser.com/customization/build/#go-modules

* actually store go build cache

* use `fetch-depth: 0`
2021-07-20 20:53:13 +02:00
peolic
4c1faa9de6 Update cross build command (#94)
* Update cross build command

`golang-cross` now uses the GitHub Package Registry.
f205a9b103

* Use GHCR instead
2021-06-03 09:44:27 +02:00
InfiniteStash
6d4f43ee41 Add linting and additional error checkers (#84) 2021-05-24 18:46:22 +02:00
InfiniteStash
d158e640fc Move CI pipeline to Github actions (#70) 2021-05-17 13:50:32 +02:00
peolic
c2e426652a generate-dataloaders: fix missing line-continuation (#65) 2021-05-07 01:09:32 +02:00
InfiniteStash
72474a4b44 Add Tag Categories (#28) 2021-01-29 22:27:59 +01:00
InfiniteStash
b1bf1fea1a Rename namespace to stash-box and update linux compiles to be static (#41) 2021-01-29 13:25:26 +01:00
WithoutPants
5102bd8073 User registration (#31)
* Add configuration keys
* Move user stuff to separate package
* Add grant/repeal token implementation
* Invite key generation
* Initial new user implementation
* Send activation email
* Add new user activation implementation
* Allow resending activation email
* Return activation key if verification not required
* Implement reset password
* Add generate-ui make target
* Invite token and code management
* Restore original generated ts files
* Don't format generated files
* Add register page
* Add activate new user page
* Add reset password UI
* Add config documentation
2020-11-12 10:48:56 +11:00
InfiniteStash
a28da0a89b Add dataloaders (#25) 2020-08-23 11:22:26 +10:00
WithoutPants
838afdf900 Add some docker files and travis config (#22) 2020-08-12 13:41:38 +10:00
InfiniteStash
0d9f46c6f1 Omnibus stashdb changes (#19)
* Add fuzzy performer/scene search
* Add frontend support for users
* Add support for tags and fingerprints
* Fingerprint duration and UI updates
* Add image entity for performers/scenes/studios
* Switch frontend to create-react-app and typescript 3.9
* Remove image fields from URL type
* Remove image fields from studio
* Fix bugs, and update frontend config/readme
* Add pg_trgm info
* Fix integration tests
* Create image url resolver and remove unused image fields
* Don't open browser by default
* Fix development auth cookie issues

Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
2020-06-25 13:40:09 +10:00
WithoutPants
09392a009e Add User management (#13)
* Add user
* Generate root user
* Add create/update validation
* Disallow removing root user
* Fix packr deprecation message
* Change authorisation to user apikey
* Return error message when apikey fails
* Add integration tests for unauthorised calls
* Ignore .vscode
* Add gitattributes to fix UI eol lint issue
* Misc changes
* Prevent caching of integration test results
* Disallow changing root name or roles
* Remove old api key config
* Ensure api key matches stored key
* Add session management
* Fix empty key detection code
* Allow users to query users, hiding some info
* Add regenerate api key and change password
2020-01-23 07:22:30 +11:00
WithoutPants
856ebd6c94 Add studio, tags, scene (#3)
* Add tags
* Add studio
* Add scenes support
* Add integration test
* Add gitattributes. Add test targets
* Add DB interface and refactor
* Add performer image
* Replace checksums with fingerprints
* Update dependencies
* Make performers unique on name/disambiguation
* Add first draft of README
2019-11-27 13:17:46 +11:00
WithoutPants
0f29cf0c84 Initial performer prototype (#1)
* Initial performer prototype

* Drop file: from migration url to fix panic

* Remove vendor requirement
2019-11-18 21:13:05 +11:00