diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7f6f5696d..c427e4c06 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -48,7 +48,7 @@ jobs: cache-dependency-path: ui/v2.5/pnpm-lock.yaml - name: Install UI dependencies - run: cd ui/v2.5 && pnpm install --frozen-lockfile + run: make pre-ui - name: Generate run: make generate diff --git a/Makefile b/Makefile index d9caf0ee5..0a4505e90 100644 --- a/Makefile +++ b/Makefile @@ -10,10 +10,12 @@ ifdef IS_WIN_SHELL RM := del /s /q RMDIR := rmdir /s /q NOOP := @@ + PREFIX := $(USERPROFILE)\\bin else RM := rm -f RMDIR := rm -rf NOOP := @: + PREFIX := $(HOME)/.local endif # set LDFLAGS environment variable to any extra ldflags required @@ -40,9 +42,6 @@ GO_BUILD_FLAGS := $(GO_BUILD_FLAGS) GO_BUILD_TAGS := $(GO_BUILD_TAGS) GO_BUILD_TAGS += sqlite_stat4 sqlite_math_functions -# set STASH_NOLEGACY environment variable or uncomment to disable legacy browser support -# STASH_NOLEGACY := true - # set STASH_SOURCEMAPS environment variable or uncomment to enable UI sourcemaps # STASH_SOURCEMAPS := true @@ -282,7 +281,7 @@ endif generate: generate-backend generate-ui .PHONY: generate-ui -generate-ui: +generate-ui: pre-ui cd ui/v2.5 && npm run gqlgen .PHONY: generate-backend @@ -365,18 +364,15 @@ ui-env: build-info $(eval export VITE_APP_DATE := $(BUILD_DATE)) $(eval export VITE_APP_GITHASH := $(GITHASH)) $(eval export VITE_APP_STASH_VERSION := $(STASH_VERSION)) -ifdef STASH_NOLEGACY - $(eval export VITE_APP_NOLEGACY := true) -endif ifdef STASH_SOURCEMAPS $(eval export VITE_APP_SOURCEMAPS := true) endif .PHONY: ui -ui: ui-only generate-login-locale +ui: pre-ui generate ui-only generate-login-locale .PHONY: ui-only -ui-only: ui-env +ui-only: ui-env generate ui cd ui/v2.5 && npm run build .PHONY: zip-ui @@ -394,7 +390,7 @@ fmt-ui: # runs all of the frontend PR-acceptance steps .PHONY: validate-ui -validate-ui: +validate-ui: pre-ui generate cd ui/v2.5 && npm run validate # these targets run the same steps as fmt-ui and validate-ui, but only on files that have changed @@ -444,4 +440,14 @@ start-compiler-container: .PHONY: remove-compiler-container remove-compiler-container: - docker rm -f -v build \ No newline at end of file + docker rm -f -v build + +.PHONY: install +install: build-release +ifdef IS_WIN_SHELL + @if not exist "$(PREFIX)" mkdir $(PREFIX) + @copy "dist\\stash-win.exe" "$(PREFIX)\\stash-win.exe" +else + @mkdir -p $(PREFIX)/bin + @install -m 755 $(STASH_OUTPUT) $(PREFIX)/bin/stash +endif \ No newline at end of file diff --git a/docker/build/x86_64/Dockerfile b/docker/build/x86_64/Dockerfile index 163bd64b2..da70d6e49 100644 --- a/docker/build/x86_64/Dockerfile +++ b/docker/build/x86_64/Dockerfile @@ -18,7 +18,7 @@ ARG STASH_VERSION RUN BUILD_DATE=$(date +"%Y-%m-%d %H:%M:%S") make ui-only # Build Backend -FROM golang:1.24.3-alpine AS backend +FROM golang:1.25.9-alpine AS backend RUN apk add --no-cache make alpine-sdk WORKDIR /stash COPY ./go* ./*.go Makefile gqlgen.yml .gqlgenc.yml /stash/ diff --git a/docker/build/x86_64/Dockerfile-CUDA b/docker/build/x86_64/Dockerfile-CUDA index 8a0b02e10..585f296e1 100644 --- a/docker/build/x86_64/Dockerfile-CUDA +++ b/docker/build/x86_64/Dockerfile-CUDA @@ -1,8 +1,8 @@ # This dockerfile should be built with `make docker-cuda-build` from the stash root. -ARG CUDA_VERSION=12.8.0 +ARG CUDA_VERSION=13.2.1 # Build Frontend -FROM node:20-alpine AS frontend +FROM node:24-alpine AS frontend RUN apk add --no-cache make git ## cache node_modules separately COPY ./ui/v2.5/package.json ./ui/v2.5/pnpm-lock.yaml /stash/ui/v2.5/ @@ -19,7 +19,7 @@ ARG STASH_VERSION RUN BUILD_DATE=$(date +"%Y-%m-%d %H:%M:%S") make ui-only # Build Backend -FROM golang:1.24.3-bullseye AS backend +FROM golang:1.25.9-bullseye AS backend RUN apt update && apt install -y build-essential golang WORKDIR /stash COPY ./go* ./*.go Makefile gqlgen.yml .gqlgenc.yml /stash/ diff --git a/pkg/stashbox/scene.go b/pkg/stashbox/scene.go index 64c4defa2..9ba4d1a22 100644 --- a/pkg/stashbox/scene.go +++ b/pkg/stashbox/scene.go @@ -204,11 +204,7 @@ func (c Client) sceneFragmentToScrapedScene(ctx context.Context, s *graphql.Scen } for _, t := range s.Tags { - st := &models.ScrapedTag{ - Name: t.Name, - RemoteSiteID: &t.ID, - } - ss.Tags = append(ss.Tags, st) + ss.Tags = append(ss.Tags, tagFragmentToScrapedTag(*t)) } return ss, nil diff --git a/ui/v2.5/src/components/Tagger/scenes/StashSearchResult.tsx b/ui/v2.5/src/components/Tagger/scenes/StashSearchResult.tsx index add295c49..eb48c8aa6 100755 --- a/ui/v2.5/src/components/Tagger/scenes/StashSearchResult.tsx +++ b/ui/v2.5/src/components/Tagger/scenes/StashSearchResult.tsx @@ -434,7 +434,11 @@ const StashSearchResult: React.FC = ({ t: GQL.ScrapedTag, createInput?: GQL.TagCreateInput ) { - const toCreate: GQL.TagCreateInput = createInput ?? { name: t.name }; + const toCreate: GQL.TagCreateInput = createInput ?? { + name: t.name, + description: t.description ?? undefined, + aliases: t.alias_list?.filter((a) => a) ?? undefined, + }; // If the tag has a remote_site_id and we have an endpoint, include the stash_id const endpoint = currentSource?.sourceInput.stash_box_endpoint; diff --git a/ui/v2.5/src/core/StashService.ts b/ui/v2.5/src/core/StashService.ts index 33b778343..12a1b97f7 100644 --- a/ui/v2.5/src/core/StashService.ts +++ b/ui/v2.5/src/core/StashService.ts @@ -2264,6 +2264,9 @@ export const mutateDeleteFiles = (ids: string[]) => } evictQueries(cache, [ + GQL.FindSceneDocument, // files list on scene detail + GQL.FindImageDocument, // files list on image detail + GQL.FindGalleryDocument, // files list on gallery detail GQL.FindScenesDocument, // filter by file count GQL.FindImagesDocument, // filter by file count GQL.FindGalleriesDocument, // filter by file count