Repository navigation
[TAS-6774] ✨ Add public domain flag to book settings and bulk upload - #827
Conversation
There was a problem hiding this comment.
🔵 Needs a closer look
The change is broad and functionally correct but depends on a coordinated backend release (likecoin-api-public#1533) that an automated reviewer cannot verify, warranting human sign-off.
No open issues 🎉
What changed in this PR
This PR adds a "Public domain" (isPublicDomain) flag to both the book settings UI and the CSV-driven bulk-upload flow, stacked on top of #826 (which introduced the AI-generated-content flag). The diff therefore also carries the hasAiGeneratedContent and a bulk-only, one-way isLikerLandArt flag. The implementation mirrors the existing isAdultOnly listing-flag pattern end-to-end: type definitions, defaults, parse/validate/serialize round-trips, the review table, the settings form, the review cards, the edit-change labels, and both i18n locales. It depends on backend support in likecoin-api-public#1533.
Changes:
- Adds
isPublicDomain(plushasAiGeneratedContent) toggles toBookSettingsFieldsand wires them through the pricing draft, settings composable, publish payload, review cards, and edit-change tracking. - Extends the bulk-upload pipeline with
is_public_domain,has_ai_generated_content, and a one-wayis_liker_land_artCSV column (constants, parse, validate, serialize, result CSV, review table, template) and sendsisLikerLandArtonly whentrue. - Adds matching
en.json/zh-TW.jsonstrings for all new columns, labels, and hints.
| File | Description |
|---|---|
| i18n/locales/zh-TW.json | Authoritative zh-TW strings for new CSV descriptions, review-table headers, and form labels/hints |
| i18n/locales/en.json | English translations mirroring the new zh-TW keys |
| app/utils/bulk-upload.ts | Adds three CSV columns across column list, defaults, parse, validate, serialize, and result CSV |
| app/types/publish.ts | Adds hasAiGeneratedContent/isPublicDomain to PricingFormSettings |
| app/types/bulk-upload.ts | Adds new flags to CSV row, book, and serialized-book interfaces |
| app/types/book.ts | Adds optional hasAiGeneratedContent/isPublicDomain to ClassListingData |
| app/pages/new-book.vue | Seeds the new flags in the default listing draft |
| app/pages/bulk-upload.vue | Adds review-table columns/cells, review data mapping, and template columns |
| app/constant/index.ts | Adds CSV_DEFAULT_* constants (all false) |
| app/composables/usePublishBook.ts | Sends the new flags in the single-book listing payload |
| app/composables/useBulkUpload.ts | Sends isPublicDomain/hasAiGeneratedContent always, isLikerLandArt only when true |
| app/composables/useBookListingSettings.ts | Adds refs, init, snapshot/restore, and settings payload handling |
| app/composables/useBookEditChanges.ts | Maps new fields to their label keys |
| app/components/publish/SaleSettingsCard.vue | Binds new v-models to BookSettingsFields |
| app/components/publish/ReviewStep.vue | Passes new props to the review pricing card |
| app/components/publish/ReviewPricingCard.vue | Adds props and settings rows for the new flags |
| app/components/BookSettingsFields.vue | Adds toggle rows and required defineModels |
| app/components/book-status/BookListingSettingsCard.vue | Binds new v-models from the settings context |
I verified completeness against the established isAdultOnly pattern (all 11 call sites updated), confirmed CSV column ordering is consistent across CSV_ALL_COLUMNS, generateResultCSV, and the template, and confirmed full i18n key parity across both locales. No concrete code defects were found.
Review effort: Balanced
39eaaaf to
97dcf4e
Compare
QA screenshots
Tested on https://publish.sepolia.3ook.com (2026-10-26), publisher account, API deployed to rinkeby.
Book settings: both toggles, off by default, then on
Review step: Yes / No
Edit settings: saved and reloaded, off then on
Bulk upload: CSV field help, review table, result CSV
Invalid value (
yes) is rejected