mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-05-23 06:10:32 +00:00
Compare commits
10 Commits
ext-api/i-
...
glary/affi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c2433d7b35 | ||
|
|
d98cc41146 | ||
|
|
0fe808ea10 | ||
|
|
178bb42271 | ||
|
|
893fb7429f | ||
|
|
0f0bcc9de8 | ||
|
|
dcc81d9180 | ||
|
|
5c215aa999 | ||
|
|
8a1ce890d0 | ||
|
|
4453d858ed |
@@ -9,10 +9,12 @@ const PAYMENT_STATUSES = ['success', 'failed'] as const
|
||||
const LOCALE_PREFIXES = LOCALES.map((locale) =>
|
||||
locale === DEFAULT_LOCALE ? '' : `/${locale}`
|
||||
)
|
||||
const NOINDEX_PATHNAMES = ['/affiliates/terms']
|
||||
const SITEMAP_EXCLUDED_PATHNAMES = new Set(
|
||||
LOCALE_PREFIXES.flatMap((prefix) =>
|
||||
PAYMENT_STATUSES.map((status) => `${prefix}/payment/${status}`)
|
||||
)
|
||||
LOCALE_PREFIXES.flatMap((prefix) => [
|
||||
...PAYMENT_STATUSES.map((status) => `${prefix}/payment/${status}`),
|
||||
...NOINDEX_PATHNAMES.map((path) => `${prefix}${path}`)
|
||||
])
|
||||
)
|
||||
|
||||
function isExcludedFromSitemap(page: string): boolean {
|
||||
|
||||
143
apps/website/e2e/affiliates-terms.spec.ts
Normal file
143
apps/website/e2e/affiliates-terms.spec.ts
Normal file
@@ -0,0 +1,143 @@
|
||||
import { expect } from '@playwright/test'
|
||||
|
||||
import { test } from './fixtures/blockExternalMedia'
|
||||
|
||||
const PATH = '/affiliates/terms'
|
||||
|
||||
const SECTION_IDS = [
|
||||
'1-program-overview',
|
||||
'2-eligible-products',
|
||||
'3-commission-structure',
|
||||
'4-attribution-rules',
|
||||
'5-prohibited-activities',
|
||||
'6-content-guidelines',
|
||||
'7-termination',
|
||||
'8-program-modifications',
|
||||
'9-indemnification',
|
||||
'10-governing-law',
|
||||
'11-miscellaneous'
|
||||
] as const
|
||||
|
||||
test.describe('Affiliate Terms — desktop @smoke', () => {
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await page.goto(PATH)
|
||||
})
|
||||
|
||||
test('renders heading and is marked noindex', async ({ page }) => {
|
||||
await expect(
|
||||
page.getByRole('heading', { name: 'Affiliate Terms', level: 1 })
|
||||
).toBeVisible()
|
||||
|
||||
const robotsContent = await page
|
||||
.locator('meta[name="robots"]')
|
||||
.getAttribute('content')
|
||||
expect(robotsContent).toContain('noindex')
|
||||
})
|
||||
|
||||
test('exposes one anchor per legal section in order', async ({ page }) => {
|
||||
for (const id of SECTION_IDS) {
|
||||
await expect(page.locator(`[id="${id}"]`)).toBeAttached()
|
||||
}
|
||||
|
||||
const orderedIds = await page.evaluate(
|
||||
(ids) => {
|
||||
const elements = ids
|
||||
.map((id) => document.getElementById(id))
|
||||
.filter((el): el is HTMLElement => el !== null)
|
||||
return elements
|
||||
.slice()
|
||||
.sort((a, b) => {
|
||||
const relation = a.compareDocumentPosition(b)
|
||||
if (relation & Node.DOCUMENT_POSITION_FOLLOWING) return -1
|
||||
if (relation & Node.DOCUMENT_POSITION_PRECEDING) return 1
|
||||
return 0
|
||||
})
|
||||
.map((el) => el.id)
|
||||
},
|
||||
[...SECTION_IDS]
|
||||
)
|
||||
expect(orderedIds).toEqual([...SECTION_IDS])
|
||||
})
|
||||
|
||||
test('renders an effective date footer', async ({ page }) => {
|
||||
await expect(page.getByText(/Effective Date:/)).toBeVisible()
|
||||
})
|
||||
|
||||
test('skips internal-only sections (competitive analysis, open questions)', async ({
|
||||
page
|
||||
}) => {
|
||||
await expect(page.getByText(/Competitive analysis/i)).toHaveCount(0)
|
||||
await expect(
|
||||
page.getByText(/Open questions for legal review/i)
|
||||
).toHaveCount(0)
|
||||
})
|
||||
})
|
||||
|
||||
test.describe('Affiliate Terms — desktop interactions', () => {
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await page.goto(PATH)
|
||||
})
|
||||
|
||||
test('clicking a desktop TOC link scrolls to the matching section', async ({
|
||||
page
|
||||
}) => {
|
||||
const desktopToc = page.getByRole('navigation', { name: 'On this page' })
|
||||
await expect(desktopToc).toBeVisible()
|
||||
|
||||
const link = desktopToc.getByRole('link', { name: /5\. Prohibited/ })
|
||||
await link.click()
|
||||
|
||||
const target = page.locator('[id="5-prohibited-activities"]')
|
||||
await expect(target).toBeInViewport()
|
||||
})
|
||||
|
||||
test('clicking a TOC link updates the URL hash so the section is shareable', async ({
|
||||
page
|
||||
}) => {
|
||||
const desktopToc = page.getByRole('navigation', { name: 'On this page' })
|
||||
await desktopToc.getByRole('link', { name: /7\. Termination/ }).click()
|
||||
|
||||
await expect
|
||||
.poll(() => page.evaluate(() => window.location.hash))
|
||||
.toBe('#7-termination')
|
||||
})
|
||||
})
|
||||
|
||||
test.describe('Affiliate Terms — mobile @mobile', () => {
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await page.goto(PATH)
|
||||
})
|
||||
|
||||
test('shows a collapsed accordion TOC by default', async ({ page }) => {
|
||||
const accordion = page.locator('details', {
|
||||
has: page.getByText('On this page')
|
||||
})
|
||||
await expect(accordion).toBeVisible()
|
||||
await expect(accordion).not.toHaveAttribute('open', '')
|
||||
})
|
||||
|
||||
test('expanding the accordion reveals every section link', async ({
|
||||
page
|
||||
}) => {
|
||||
const accordion = page.locator('details', {
|
||||
has: page.getByText('On this page')
|
||||
})
|
||||
await accordion.locator('summary').click()
|
||||
await expect(accordion).toHaveAttribute('open', '')
|
||||
|
||||
for (const id of SECTION_IDS) {
|
||||
await expect(accordion.locator(`a[href="#${id}"]`).first()).toBeVisible()
|
||||
}
|
||||
})
|
||||
|
||||
test('headings remain readable at narrow viewports without horizontal overflow', async ({
|
||||
page
|
||||
}) => {
|
||||
const heading = page.getByRole('heading', { name: '1. Program Overview' })
|
||||
await expect(heading).toBeVisible()
|
||||
const box = await heading.boundingBox()
|
||||
expect(box, 'heading box').not.toBeNull()
|
||||
expect(box!.x).toBeGreaterThanOrEqual(0)
|
||||
expect(box!.x + box!.width).toBeLessThanOrEqual(page.viewportSize()!.width)
|
||||
})
|
||||
})
|
||||
@@ -30,29 +30,38 @@ Disallow: /_astro/
|
||||
Disallow: /_website/
|
||||
Disallow: /_vercel/
|
||||
Disallow: /payment/
|
||||
Disallow: /affiliates/terms
|
||||
|
||||
User-agent: GPTBot
|
||||
Allow: /
|
||||
Disallow: /affiliates/terms
|
||||
|
||||
User-agent: OAI-SearchBot
|
||||
Allow: /
|
||||
Disallow: /affiliates/terms
|
||||
|
||||
User-agent: ChatGPT-User
|
||||
Allow: /
|
||||
Disallow: /affiliates/terms
|
||||
|
||||
User-agent: ClaudeBot
|
||||
Allow: /
|
||||
Disallow: /affiliates/terms
|
||||
|
||||
User-agent: Claude-User
|
||||
Allow: /
|
||||
Disallow: /affiliates/terms
|
||||
|
||||
User-agent: Claude-SearchBot
|
||||
Allow: /
|
||||
Disallow: /affiliates/terms
|
||||
|
||||
User-agent: PerplexityBot
|
||||
Allow: /
|
||||
Disallow: /affiliates/terms
|
||||
|
||||
User-agent: Google-Extended
|
||||
Allow: /
|
||||
Disallow: /affiliates/terms
|
||||
|
||||
Sitemap: https://comfy.org/sitemap-index.xml
|
||||
|
||||
244
apps/website/src/components/legal/LegalContentSection.vue
Normal file
244
apps/website/src/components/legal/LegalContentSection.vue
Normal file
@@ -0,0 +1,244 @@
|
||||
<script setup lang="ts">
|
||||
import { cn } from '@comfyorg/tailwind-utils'
|
||||
import { useIntersectionObserver, useTemplateRefsList } from '@vueuse/core'
|
||||
import { computed, ref } from 'vue'
|
||||
|
||||
import type { Locale, TranslationKey } from '../../i18n/translations'
|
||||
|
||||
import { hasKey, t, translationKeys } from '../../i18n/translations'
|
||||
import { prefersReducedMotion } from '../../composables/useReducedMotion'
|
||||
import { scrollTo } from '../../scripts/smoothScroll'
|
||||
|
||||
const {
|
||||
prefix,
|
||||
locale = 'en',
|
||||
tocLabelKey
|
||||
} = defineProps<{
|
||||
prefix: string
|
||||
locale?: Locale
|
||||
tocLabelKey: TranslationKey
|
||||
}>()
|
||||
|
||||
interface Block {
|
||||
type: 'paragraph' | 'list'
|
||||
key: TranslationKey
|
||||
}
|
||||
|
||||
interface LegalSection {
|
||||
id: string
|
||||
title: string
|
||||
blocks: Block[]
|
||||
}
|
||||
|
||||
function escapeRegex(s: string): string {
|
||||
return s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
|
||||
}
|
||||
|
||||
function buildSections(): LegalSection[] {
|
||||
const labelRegex = new RegExp(`^${escapeRegex(prefix)}\\.([^.]+)\\.label$`)
|
||||
const sectionIds: string[] = []
|
||||
for (const key of translationKeys) {
|
||||
const match = key.match(labelRegex)
|
||||
if (match && !sectionIds.includes(match[1])) sectionIds.push(match[1])
|
||||
}
|
||||
|
||||
return sectionIds.map((id) => {
|
||||
const blockRegex = new RegExp(
|
||||
`^${escapeRegex(prefix)}\\.${escapeRegex(id)}\\.block\\.(\\d+)$`
|
||||
)
|
||||
const indices: number[] = []
|
||||
for (const key of translationKeys) {
|
||||
const match = key.match(blockRegex)
|
||||
if (match) indices.push(parseInt(match[1]))
|
||||
}
|
||||
indices.sort((a, b) => a - b)
|
||||
|
||||
const blocks: Block[] = indices.map((i) => {
|
||||
const key = `${prefix}.${id}.block.${i}` as TranslationKey
|
||||
const value = t(key, locale)
|
||||
return { type: value.includes('\n') ? 'list' : 'paragraph', key }
|
||||
})
|
||||
|
||||
const titleKey = `${prefix}.${id}.title` as TranslationKey
|
||||
return {
|
||||
id,
|
||||
title: hasKey(titleKey)
|
||||
? t(titleKey, locale)
|
||||
: t(`${prefix}.${id}.label` as TranslationKey, locale),
|
||||
blocks
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const sections = buildSections()
|
||||
const tocItems = computed(() =>
|
||||
sections.map((s) => ({ id: s.id, title: s.title }))
|
||||
)
|
||||
const activeSection = ref(sections[0]?.id ?? '')
|
||||
const sectionRefs = useTemplateRefsList<HTMLElement>()
|
||||
const mobileTocOpen = ref(false)
|
||||
|
||||
let isScrolling = false
|
||||
const HEADER_OFFSET = -144
|
||||
|
||||
useIntersectionObserver(
|
||||
sectionRefs,
|
||||
(entries) => {
|
||||
if (isScrolling) return
|
||||
let best: IntersectionObserverEntry | null = null
|
||||
for (const entry of entries) {
|
||||
if (!entry.isIntersecting) continue
|
||||
if (!best || entry.boundingClientRect.top < best.boundingClientRect.top)
|
||||
best = entry
|
||||
}
|
||||
if (best) activeSection.value = best.target.id
|
||||
},
|
||||
{ rootMargin: '-20% 0px -60% 0px' }
|
||||
)
|
||||
|
||||
function scrollToSection(id: string) {
|
||||
activeSection.value = id
|
||||
isScrolling = true
|
||||
mobileTocOpen.value = false
|
||||
const nextHash = `#${id}`
|
||||
if (window.location.hash !== nextHash) {
|
||||
history.replaceState(null, '', nextHash)
|
||||
}
|
||||
const el = document.getElementById(id)
|
||||
if (el) {
|
||||
scrollTo(el, {
|
||||
offset: HEADER_OFFSET,
|
||||
duration: 0.8,
|
||||
immediate: prefersReducedMotion(),
|
||||
onComplete: () => {
|
||||
isScrolling = false
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
isScrolling = false
|
||||
}
|
||||
|
||||
function listItems(key: TranslationKey): string[] {
|
||||
return t(key, locale).split('\n')
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section class="px-4 pt-8 pb-24 lg:px-20 lg:pt-12 lg:pb-32">
|
||||
<div class="mx-auto max-w-7xl lg:flex lg:gap-16">
|
||||
<aside class="lg:w-64 lg:shrink-0">
|
||||
<details
|
||||
:open="mobileTocOpen"
|
||||
class="border-transparency-white-t4 mb-8 rounded-2xl border bg-(--site-bg-soft) lg:hidden"
|
||||
@toggle="
|
||||
(e) => (mobileTocOpen = (e.target as HTMLDetailsElement).open)
|
||||
"
|
||||
>
|
||||
<summary
|
||||
class="text-primary-comfy-canvas flex cursor-pointer items-center justify-between px-4 py-3 text-sm font-semibold tracking-wide select-none"
|
||||
>
|
||||
<span>{{ t(tocLabelKey, locale) }}</span>
|
||||
<span
|
||||
:class="
|
||||
mobileTocOpen
|
||||
? 'rotate-180 transition-transform'
|
||||
: 'transition-transform'
|
||||
"
|
||||
aria-hidden="true"
|
||||
>
|
||||
▾
|
||||
</span>
|
||||
</summary>
|
||||
<ul class="border-transparency-white-t4 border-t p-2">
|
||||
<li v-for="item in tocItems" :key="item.id">
|
||||
<a
|
||||
:href="`#${item.id}`"
|
||||
:aria-current="activeSection === item.id ? 'true' : undefined"
|
||||
:class="
|
||||
cn(
|
||||
'hover:bg-transparency-white-t4 block rounded-lg px-3 py-2 text-sm transition-colors',
|
||||
activeSection === item.id
|
||||
? 'text-primary-comfy-yellow font-semibold'
|
||||
: 'text-primary-warm-gray'
|
||||
)
|
||||
"
|
||||
@click.prevent="scrollToSection(item.id)"
|
||||
>
|
||||
{{ item.title }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<nav
|
||||
class="hidden lg:sticky lg:top-32 lg:block"
|
||||
:aria-label="t(tocLabelKey, locale)"
|
||||
>
|
||||
<p
|
||||
class="text-primary-warm-gray mb-4 text-xs font-semibold tracking-widest uppercase"
|
||||
>
|
||||
{{ t(tocLabelKey, locale) }}
|
||||
</p>
|
||||
<ul class="space-y-2">
|
||||
<li v-for="item in tocItems" :key="item.id">
|
||||
<a
|
||||
:href="`#${item.id}`"
|
||||
:aria-current="activeSection === item.id ? 'true' : undefined"
|
||||
class="hover:text-primary-comfy-canvas block text-sm/snug transition-colors"
|
||||
:class="
|
||||
activeSection === item.id
|
||||
? 'text-primary-comfy-yellow font-semibold'
|
||||
: 'text-primary-warm-gray'
|
||||
"
|
||||
@click.prevent="scrollToSection(item.id)"
|
||||
>
|
||||
{{ item.title }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</aside>
|
||||
|
||||
<article class="flex-1 lg:max-w-3xl">
|
||||
<section
|
||||
v-for="section in sections"
|
||||
:id="section.id"
|
||||
:ref="sectionRefs.set"
|
||||
:key="section.id"
|
||||
class="mb-16 scroll-mt-24 lg:scroll-mt-36"
|
||||
>
|
||||
<h2
|
||||
class="text-primary-comfy-canvas mb-6 text-2xl font-light lg:text-3xl"
|
||||
>
|
||||
{{ section.title }}
|
||||
</h2>
|
||||
|
||||
<template v-for="block in section.blocks" :key="block.key">
|
||||
<p
|
||||
v-if="block.type === 'paragraph'"
|
||||
class="text-primary-comfy-canvas mt-4 text-sm/relaxed lg:text-base/relaxed"
|
||||
v-html="t(block.key, locale)"
|
||||
/>
|
||||
<ul
|
||||
v-else
|
||||
class="mt-4 space-y-2 pl-5 text-sm/relaxed lg:text-base/relaxed"
|
||||
>
|
||||
<li
|
||||
v-for="(item, j) in listItems(block.key)"
|
||||
:key="j"
|
||||
class="text-primary-comfy-canvas flex items-start gap-2"
|
||||
>
|
||||
<span
|
||||
class="bg-primary-comfy-yellow mt-2 size-1.5 shrink-0 rounded-full"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
<span v-html="item" />
|
||||
</li>
|
||||
</ul>
|
||||
</template>
|
||||
</section>
|
||||
</article>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
76
apps/website/src/components/legal/legalSections.test.ts
Normal file
76
apps/website/src/components/legal/legalSections.test.ts
Normal file
@@ -0,0 +1,76 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
|
||||
import { getRoutes } from '../../config/routes'
|
||||
import { hasKey, t, translationKeys } from '../../i18n/translations'
|
||||
|
||||
const PREFIX = 'affiliate-terms'
|
||||
const EXPECTED_SECTION_IDS = [
|
||||
'1-program-overview',
|
||||
'2-eligible-products',
|
||||
'3-commission-structure',
|
||||
'4-attribution-rules',
|
||||
'5-prohibited-activities',
|
||||
'6-content-guidelines',
|
||||
'7-termination',
|
||||
'8-program-modifications',
|
||||
'9-indemnification',
|
||||
'10-governing-law',
|
||||
'11-miscellaneous'
|
||||
] as const
|
||||
|
||||
function deriveAffiliateSectionIds(): string[] {
|
||||
const labelRegex = new RegExp(`^${PREFIX}\\.([0-9]+-[a-z-]+)\\.label$`)
|
||||
const ids: string[] = []
|
||||
for (const key of translationKeys) {
|
||||
const match = key.match(labelRegex)
|
||||
if (match && !ids.includes(match[1])) ids.push(match[1])
|
||||
}
|
||||
return ids
|
||||
}
|
||||
|
||||
describe('affiliate terms i18n', () => {
|
||||
it('exposes the eleven canonical sections in numeric order', () => {
|
||||
const ids = deriveAffiliateSectionIds()
|
||||
expect(ids).toEqual([...EXPECTED_SECTION_IDS])
|
||||
})
|
||||
|
||||
it('every section has a label, title, and at least one block', () => {
|
||||
for (const id of EXPECTED_SECTION_IDS) {
|
||||
expect(hasKey(`${PREFIX}.${id}.label`)).toBe(true)
|
||||
expect(hasKey(`${PREFIX}.${id}.title`)).toBe(true)
|
||||
expect(hasKey(`${PREFIX}.${id}.block.0`)).toBe(true)
|
||||
}
|
||||
})
|
||||
|
||||
it('section titles follow the "N. Section Name" pattern', () => {
|
||||
for (const id of EXPECTED_SECTION_IDS) {
|
||||
const title = t(`${PREFIX}.${id}.title` as never)
|
||||
const numberPrefix = id.split('-')[0]
|
||||
expect(title).toMatch(new RegExp(`^${numberPrefix}\\. `))
|
||||
}
|
||||
})
|
||||
|
||||
it('exposes the effective date and page-chrome keys editors will need', () => {
|
||||
expect(hasKey('affiliate-terms.effective-date')).toBe(true)
|
||||
expect(hasKey('affiliate-terms.page.title')).toBe(true)
|
||||
expect(hasKey('affiliate-terms.page.heading')).toBe(true)
|
||||
expect(hasKey('affiliate-terms.page.tocLabel')).toBe(true)
|
||||
expect(hasKey('affiliate-terms.page.effectiveDateLabel')).toBe(true)
|
||||
})
|
||||
|
||||
it('does not include any internal-only "Competitive analysis" or "Open questions" keys', () => {
|
||||
const internalRegex = /(competitive-analysis|open-questions|legal-review)/
|
||||
const leaks = translationKeys.filter(
|
||||
(key) => key.startsWith(PREFIX) && internalRegex.test(key)
|
||||
)
|
||||
expect(leaks).toEqual([])
|
||||
})
|
||||
|
||||
it('exposes affiliate terms at the canonical /affiliates/terms path regardless of locale', () => {
|
||||
// Guards against re-introducing /zh-CN/affiliates/terms, which would
|
||||
// serve an unreviewed translation of legal-reviewed copy. See the
|
||||
// comment on LOCALE_INVARIANT_ROUTE_KEYS in src/config/routes.ts.
|
||||
expect(getRoutes('en').affiliateTerms).toBe('/affiliates/terms')
|
||||
expect(getRoutes('zh-CN').affiliateTerms).toBe('/affiliates/terms')
|
||||
})
|
||||
})
|
||||
@@ -14,16 +14,30 @@ const baseRoutes = {
|
||||
demos: '/demos',
|
||||
termsOfService: '/terms-of-service',
|
||||
privacyPolicy: '/privacy-policy',
|
||||
affiliateTerms: '/affiliates/terms',
|
||||
contact: '/contact'
|
||||
} as const
|
||||
|
||||
type Routes = typeof baseRoutes
|
||||
|
||||
// Routes that are served only at their canonical path regardless of the
|
||||
// active locale. Localized variants of these routes intentionally do not
|
||||
// exist, so getRoutes(<non-en>) must not prefix them — emitting
|
||||
// /zh-CN/<route> would produce a dead link.
|
||||
//
|
||||
// affiliateTerms: legal-reviewed English-only document. See the comment
|
||||
// header in src/pages/affiliates/terms.astro and the affiliate-terms i18n
|
||||
// block in src/i18n/translations.ts for the reasoning.
|
||||
const LOCALE_INVARIANT_ROUTE_KEYS = new Set<keyof Routes>(['affiliateTerms'])
|
||||
|
||||
export function getRoutes(locale: Locale = 'en'): Routes {
|
||||
if (locale === 'en') return baseRoutes
|
||||
const prefix = `/${locale}`
|
||||
return Object.fromEntries(
|
||||
Object.entries(baseRoutes).map(([k, v]) => [k, `${prefix}${v}`])
|
||||
Object.entries(baseRoutes).map(([k, v]) => [
|
||||
k,
|
||||
LOCALE_INVARIANT_ROUTE_KEYS.has(k as keyof Routes) ? v : `${prefix}${v}`
|
||||
])
|
||||
) as unknown as Routes
|
||||
}
|
||||
|
||||
|
||||
@@ -2170,6 +2170,189 @@ const translations = {
|
||||
'如果您对本条款有任何疑问,请通过 <a href="mailto:legal@comfy.org" class="text-white underline">legal@comfy.org</a> 与我们联系。'
|
||||
},
|
||||
|
||||
// ── Affiliate Program Terms ───────────────────────────────────────
|
||||
// Legal-reviewed copy — ENGLISH ONLY. There is no /zh-CN/affiliates/terms
|
||||
// route, and the `'zh-CN'` values below intentionally duplicate `en`
|
||||
// verbatim only to satisfy the translations dictionary's required
|
||||
// Record<Locale, string> shape. Do NOT translate these into Chinese:
|
||||
// shipping an unreviewed translation as the active terms exposes us to
|
||||
// liability from the translation diverging from the legal-approved
|
||||
// English source. If a translated terms page is ever needed, add a
|
||||
// separate `/affiliates/terms/<locale>` route only after legal signs
|
||||
// off on that specific translation as the authoritative version.
|
||||
'affiliate-terms.effective-date': {
|
||||
en: 'May 16, 2026',
|
||||
'zh-CN': 'May 16, 2026'
|
||||
},
|
||||
'affiliate-terms.1-program-overview.label': {
|
||||
en: 'PROGRAM',
|
||||
'zh-CN': 'PROGRAM'
|
||||
},
|
||||
'affiliate-terms.1-program-overview.title': {
|
||||
en: '1. Program Overview',
|
||||
'zh-CN': '1. Program Overview'
|
||||
},
|
||||
'affiliate-terms.1-program-overview.block.0': {
|
||||
en: 'The <a href="https://comfy.org" class="text-white underline">Comfy.org</a> Affiliate Program ("<strong>Program</strong>") allows approved participants ("<strong>Affiliates</strong>") to earn commissions by referring new paying customers to Comfy Cloud. By participating in this program, you agree to these terms.',
|
||||
'zh-CN':
|
||||
'The <a href="https://comfy.org" class="text-white underline">Comfy.org</a> Affiliate Program ("<strong>Program</strong>") allows approved participants ("<strong>Affiliates</strong>") to earn commissions by referring new paying customers to Comfy Cloud. By participating in this program, you agree to these terms.'
|
||||
},
|
||||
'affiliate-terms.2-eligible-products.label': {
|
||||
en: 'PRODUCTS',
|
||||
'zh-CN': 'PRODUCTS'
|
||||
},
|
||||
'affiliate-terms.2-eligible-products.title': {
|
||||
en: '2. Eligible Products',
|
||||
'zh-CN': '2. Eligible Products'
|
||||
},
|
||||
'affiliate-terms.2-eligible-products.block.0': {
|
||||
en: 'Commissions are earned on Comfy Cloud paid subscription plans only. The following are excluded from commission eligibility: free tier signups (unless they later convert to paid), one-time credit purchases, enterprise contracts negotiated directly with Comfy sales, and API-only usage billed outside of standard subscription plans.',
|
||||
'zh-CN':
|
||||
'Commissions are earned on Comfy Cloud paid subscription plans only. The following are excluded from commission eligibility: free tier signups (unless they later convert to paid), one-time credit purchases, enterprise contracts negotiated directly with Comfy sales, and API-only usage billed outside of standard subscription plans.'
|
||||
},
|
||||
'affiliate-terms.3-commission-structure.label': {
|
||||
en: 'COMMISSION',
|
||||
'zh-CN': 'COMMISSION'
|
||||
},
|
||||
'affiliate-terms.3-commission-structure.title': {
|
||||
en: '3. Commission Structure',
|
||||
'zh-CN': '3. Commission Structure'
|
||||
},
|
||||
'affiliate-terms.3-commission-structure.block.0': {
|
||||
en: 'Commission rate: 30% recurring on the net subscription amount received by Comfy.org\nCommission duration: 3 months from the referred customer\u2019s first paid subscription\nCookie/attribution window: 60 days from the referral click\nMinimum payout threshold: $100\nPayout schedule: Monthly, within the first 10 business days of each month after the receipt of applicable payment by Comfy from its referred customer\nPayout method: Via the affiliate tracking platform (Stripe Express or PayPal)\nCommission cessation: To the extent a referred customer\u2019s subscription is canceled, in whole or in part, the affiliate shall correspondingly cease to receive commission payments, even within the 3-month commission window. Refunded or charged-back transactions are not eligible for commission, and any commission previously paid for such transactions will be deducted from future payouts (see Section 4).',
|
||||
'zh-CN':
|
||||
'Commission rate: 30% recurring on the net subscription amount received by Comfy.org\nCommission duration: 3 months from the referred customer\u2019s first paid subscription\nCookie/attribution window: 60 days from the referral click\nMinimum payout threshold: $100\nPayout schedule: Monthly, within the first 10 business days of each month after the receipt of applicable payment by Comfy from its referred customer\nPayout method: Via the affiliate tracking platform (Stripe Express or PayPal)\nCommission cessation: To the extent a referred customer\u2019s subscription is canceled, in whole or in part, the affiliate shall correspondingly cease to receive commission payments, even within the 3-month commission window. Refunded or charged-back transactions are not eligible for commission, and any commission previously paid for such transactions will be deducted from future payouts (see Section 4).'
|
||||
},
|
||||
'affiliate-terms.4-attribution-rules.label': {
|
||||
en: 'ATTRIBUTION',
|
||||
'zh-CN': 'ATTRIBUTION'
|
||||
},
|
||||
'affiliate-terms.4-attribution-rules.title': {
|
||||
en: '4. Attribution Rules',
|
||||
'zh-CN': '4. Attribution Rules'
|
||||
},
|
||||
'affiliate-terms.4-attribution-rules.block.0': {
|
||||
en: 'Commissions are attributed on a last-click basis within the 60-day cookie window\nIf a referred customer cancels and re-subscribes within 60 days, the original affiliate retains attribution\nIf a referred customer upgrades their plan, commission is calculated on the upgraded amount\nIf a referred customer downgrades their plan, commission adjusts to the new plan amount\nRefunded transactions are not eligible for commission\nAny commission paid on refunded transactions will be deducted from future payouts to you',
|
||||
'zh-CN':
|
||||
'Commissions are attributed on a last-click basis within the 60-day cookie window\nIf a referred customer cancels and re-subscribes within 60 days, the original affiliate retains attribution\nIf a referred customer upgrades their plan, commission is calculated on the upgraded amount\nIf a referred customer downgrades their plan, commission adjusts to the new plan amount\nRefunded transactions are not eligible for commission\nAny commission paid on refunded transactions will be deducted from future payouts to you'
|
||||
},
|
||||
'affiliate-terms.5-prohibited-activities.label': {
|
||||
en: 'PROHIBITED',
|
||||
'zh-CN': 'PROHIBITED'
|
||||
},
|
||||
'affiliate-terms.5-prohibited-activities.title': {
|
||||
en: '5. Prohibited Activities',
|
||||
'zh-CN': '5. Prohibited Activities'
|
||||
},
|
||||
'affiliate-terms.5-prohibited-activities.block.0': {
|
||||
en: 'Affiliates must NOT:',
|
||||
'zh-CN': 'Affiliates must NOT:'
|
||||
},
|
||||
'affiliate-terms.5-prohibited-activities.block.1': {
|
||||
en: '<strong>Self-refer</strong>: Use your own affiliate link to purchase or receive discounts on your own account\n<strong>Bid on branded keywords</strong>: Run paid search campaigns (Google Ads, Bing Ads, etc.) targeting "ComfyUI," "Comfy.org," "Comfy Cloud," or any misspellings or variations thereof\n<strong>Misrepresent</strong>: Impersonate Comfy.org, claim to be an employee, or create assets that could be confused with official Comfy.org materials\n<strong>Spam</strong>: Send unsolicited bulk emails, messages, or engage in any form of spam promotion\n<strong>Cookie stuff</strong>: Use hidden iframes, pop-unders, or any technical means to set cookies without genuine user intent\n<strong>Incentivize clicks</strong>: Offer monetary rewards, points, or other incentives solely for clicking your affiliate link (content recommendations are fine)\n<strong>Use misleading claims</strong>: Make false or exaggerated claims about Comfy.org products, pricing, or features\n<strong>Promote on prohibited content</strong>: Place affiliate links on sites containing illegal content, hate speech, or adult content\n<strong>Contrary to laws</strong>: Place affiliate links in any market that is prohibited as a region under the laws of the United States of America.',
|
||||
'zh-CN':
|
||||
'<strong>Self-refer</strong>: Use your own affiliate link to purchase or receive discounts on your own account\n<strong>Bid on branded keywords</strong>: Run paid search campaigns (Google Ads, Bing Ads, etc.) targeting "ComfyUI," "Comfy.org," "Comfy Cloud," or any misspellings or variations thereof\n<strong>Misrepresent</strong>: Impersonate Comfy.org, claim to be an employee, or create assets that could be confused with official Comfy.org materials\n<strong>Spam</strong>: Send unsolicited bulk emails, messages, or engage in any form of spam promotion\n<strong>Cookie stuff</strong>: Use hidden iframes, pop-unders, or any technical means to set cookies without genuine user intent\n<strong>Incentivize clicks</strong>: Offer monetary rewards, points, or other incentives solely for clicking your affiliate link (content recommendations are fine)\n<strong>Use misleading claims</strong>: Make false or exaggerated claims about Comfy.org products, pricing, or features\n<strong>Promote on prohibited content</strong>: Place affiliate links on sites containing illegal content, hate speech, or adult content\n<strong>Contrary to laws</strong>: Place affiliate links in any market that is prohibited as a region under the laws of the United States of America.'
|
||||
},
|
||||
'affiliate-terms.6-content-guidelines.label': {
|
||||
en: 'CONTENT & IP',
|
||||
'zh-CN': 'CONTENT & IP'
|
||||
},
|
||||
'affiliate-terms.6-content-guidelines.title': {
|
||||
en: '6. Content Guidelines and Intellectual Property Rights',
|
||||
'zh-CN': '6. Content Guidelines and Intellectual Property Rights'
|
||||
},
|
||||
'affiliate-terms.6-content-guidelines.block.0': {
|
||||
en: 'Affiliates must clearly disclose the affiliate relationship in accordance with FTC guidelines (US) and equivalent regulations in their jurisdiction\nRecommended disclosure: "This page contains affiliate links. I may earn a commission if you sign up through my link."\nAffiliates may use Comfy.org logos and brand assets only as provided in the official affiliate asset kit, and may not modify them\nComfy.org retains all rights, including in any of its intellectual property apart from the limited use rights granted herein',
|
||||
'zh-CN':
|
||||
'Affiliates must clearly disclose the affiliate relationship in accordance with FTC guidelines (US) and equivalent regulations in their jurisdiction\nRecommended disclosure: "This page contains affiliate links. I may earn a commission if you sign up through my link."\nAffiliates may use Comfy.org logos and brand assets only as provided in the official affiliate asset kit, and may not modify them\nComfy.org retains all rights, including in any of its intellectual property apart from the limited use rights granted herein'
|
||||
},
|
||||
'affiliate-terms.7-termination.label': {
|
||||
en: 'TERMINATION',
|
||||
'zh-CN': 'TERMINATION'
|
||||
},
|
||||
'affiliate-terms.7-termination.title': {
|
||||
en: '7. Termination',
|
||||
'zh-CN': '7. Termination'
|
||||
},
|
||||
'affiliate-terms.7-termination.block.0': {
|
||||
en: 'Either party may terminate the affiliate relationship at any time with 14 days\u2019 prior written notice\nComfy.org reserves the right to immediately terminate and withhold commissions if an affiliate violates any of the prohibited activities listed above\nUpon termination, any unpaid commissions above the minimum threshold will be paid in the next regular payout cycle\nCommissions on referred customers will cease at the time of termination, even if within the 3-month commission window',
|
||||
'zh-CN':
|
||||
'Either party may terminate the affiliate relationship at any time with 14 days\u2019 prior written notice\nComfy.org reserves the right to immediately terminate and withhold commissions if an affiliate violates any of the prohibited activities listed above\nUpon termination, any unpaid commissions above the minimum threshold will be paid in the next regular payout cycle\nCommissions on referred customers will cease at the time of termination, even if within the 3-month commission window'
|
||||
},
|
||||
'affiliate-terms.8-program-modifications.label': {
|
||||
en: 'MODIFICATIONS',
|
||||
'zh-CN': 'MODIFICATIONS'
|
||||
},
|
||||
'affiliate-terms.8-program-modifications.title': {
|
||||
en: '8. Program Modifications',
|
||||
'zh-CN': '8. Program Modifications'
|
||||
},
|
||||
'affiliate-terms.8-program-modifications.block.0': {
|
||||
en: 'Comfy.org reserves the right to modify these terms, commission rates, or program structure with 30 days notice to active affiliates\nContinued participation after notice constitutes acceptance of modified terms',
|
||||
'zh-CN':
|
||||
'Comfy.org reserves the right to modify these terms, commission rates, or program structure with 30 days notice to active affiliates\nContinued participation after notice constitutes acceptance of modified terms'
|
||||
},
|
||||
'affiliate-terms.9-indemnification.label': {
|
||||
en: 'LIABILITY',
|
||||
'zh-CN': 'LIABILITY'
|
||||
},
|
||||
'affiliate-terms.9-indemnification.title': {
|
||||
en: '9. Indemnification and Limitation of Liability',
|
||||
'zh-CN': '9. Indemnification and Limitation of Liability'
|
||||
},
|
||||
'affiliate-terms.9-indemnification.block.0': {
|
||||
en: 'You will indemnify Comfy.org from any third party claim arising out of your breach of these terms.\nComfy.org\u2019s liability to any affiliate shall not (i) exceed the total commissions paid to that affiliate in the preceding 12 months, and (ii) include any indirect, consequential, punitive or any other type of special damages.\nComfy.org is not responsible for tracking failures caused by user browser settings, ad blockers, or VPNs, though we employ server-side tracking to minimize these issues',
|
||||
'zh-CN':
|
||||
'You will indemnify Comfy.org from any third party claim arising out of your breach of these terms.\nComfy.org\u2019s liability to any affiliate shall not (i) exceed the total commissions paid to that affiliate in the preceding 12 months, and (ii) include any indirect, consequential, punitive or any other type of special damages.\nComfy.org is not responsible for tracking failures caused by user browser settings, ad blockers, or VPNs, though we employ server-side tracking to minimize these issues'
|
||||
},
|
||||
'affiliate-terms.10-governing-law.label': {
|
||||
en: 'GOVERNING LAW',
|
||||
'zh-CN': 'GOVERNING LAW'
|
||||
},
|
||||
'affiliate-terms.10-governing-law.title': {
|
||||
en: '10. Governing Law',
|
||||
'zh-CN': '10. Governing Law'
|
||||
},
|
||||
'affiliate-terms.10-governing-law.block.0': {
|
||||
en: 'These terms shall be governed by and construed in accordance with the laws of the State of Delaware, without regard to conflict of law principles. All disputes arising under this Agreement shall be resolved exclusively in the state or federal courts in the State of Delaware.',
|
||||
'zh-CN':
|
||||
'These terms shall be governed by and construed in accordance with the laws of the State of Delaware, without regard to conflict of law principles. All disputes arising under this Agreement shall be resolved exclusively in the state or federal courts in the State of Delaware.'
|
||||
},
|
||||
'affiliate-terms.11-miscellaneous.label': {
|
||||
en: 'MISCELLANEOUS',
|
||||
'zh-CN': 'MISCELLANEOUS'
|
||||
},
|
||||
'affiliate-terms.11-miscellaneous.title': {
|
||||
en: '11. Miscellaneous',
|
||||
'zh-CN': '11. Miscellaneous'
|
||||
},
|
||||
'affiliate-terms.11-miscellaneous.block.0': {
|
||||
en: '<strong>(a) Entire Agreement.</strong> These terms constitutes the sole and entire agreement (including the attached schedules and exhibits) of the Parties with respect to the subject matter of these terms, and supersedes all prior and contemporaneous understandings, agreements, representations, and warranties, both written and oral, with respect to the subject matter. <strong>(b) Relationship of Parties.</strong> Each party is an independent contractor with regard to these terms. Nothing contained in These terms shall be construed as creating any agency, partnership, joint venture, or other form of joint enterprise, employment, or fiduciary relationship between the Parties. Neither party, by virtue of these terms, will have any right, power, or authority to act or create an obligation, express or implied, on behalf of the other party. <strong>(c) Assignment.</strong> Neither party shall assign any of its rights or delegate any of its obligations hereunder without the prior written consent of the other party, which consent shall not be unreasonably withheld, conditioned or delayed. <strong>(d) Severability.</strong> If any term or provision of these terms is invalid, illegal, or unenforceable in any jurisdiction, such invalidity, illegality, or unenforceability shall not affect any other term or provision of these terms or invalidate or render unenforceable such term or provision in any other jurisdiction. Upon a determination that any term or provision is invalid, illegal or unenforceable, the Parties hereto shall negotiate in good faith to modify these terms to effect the original intent of the Parties as closely as possible in order that the transactions contemplated hereby be consummated as originally contemplated to the greatest extent possible. <strong>(e) Waiver.</strong> No waiver by either party of any of the provisions hereof shall be effective unless explicitly set forth in writing and signed by the party so waiving. <strong>(f) Notice.</strong> Each party shall deliver all notices, requests, consents, claims, demands, waivers, and other communications under these terms in writing to the email utilized for the primary contact for the other party. <strong>(g) Cumulative Remedies.</strong> All rights and remedies provided in these terms are cumulative and not exclusive, and the exercise by a party of any right or remedy does not preclude the exercise of any other rights or remedies that may now or subsequently be available at Law, in equity, by statute, in any other agreement between the Parties or otherwise. <strong>(h) No Third-Party Beneficiaries.</strong> These terms benefits solely the Parties to these terms and their respective permitted successors and assigns and nothing in these terms, express or implied, confers on any other person or entity any legal or equitable right, benefit, or remedy of any nature whatsoever under or by reason of these terms.',
|
||||
'zh-CN':
|
||||
'<strong>(a) Entire Agreement.</strong> These terms constitutes the sole and entire agreement (including the attached schedules and exhibits) of the Parties with respect to the subject matter of these terms, and supersedes all prior and contemporaneous understandings, agreements, representations, and warranties, both written and oral, with respect to the subject matter. <strong>(b) Relationship of Parties.</strong> Each party is an independent contractor with regard to these terms. Nothing contained in These terms shall be construed as creating any agency, partnership, joint venture, or other form of joint enterprise, employment, or fiduciary relationship between the Parties. Neither party, by virtue of these terms, will have any right, power, or authority to act or create an obligation, express or implied, on behalf of the other party. <strong>(c) Assignment.</strong> Neither party shall assign any of its rights or delegate any of its obligations hereunder without the prior written consent of the other party, which consent shall not be unreasonably withheld, conditioned or delayed. <strong>(d) Severability.</strong> If any term or provision of these terms is invalid, illegal, or unenforceable in any jurisdiction, such invalidity, illegality, or unenforceability shall not affect any other term or provision of these terms or invalidate or render unenforceable such term or provision in any other jurisdiction. Upon a determination that any term or provision is invalid, illegal or unenforceable, the Parties hereto shall negotiate in good faith to modify these terms to effect the original intent of the Parties as closely as possible in order that the transactions contemplated hereby be consummated as originally contemplated to the greatest extent possible. <strong>(e) Waiver.</strong> No waiver by either party of any of the provisions hereof shall be effective unless explicitly set forth in writing and signed by the party so waiving. <strong>(f) Notice.</strong> Each party shall deliver all notices, requests, consents, claims, demands, waivers, and other communications under these terms in writing to the email utilized for the primary contact for the other party. <strong>(g) Cumulative Remedies.</strong> All rights and remedies provided in these terms are cumulative and not exclusive, and the exercise by a party of any right or remedy does not preclude the exercise of any other rights or remedies that may now or subsequently be available at Law, in equity, by statute, in any other agreement between the Parties or otherwise. <strong>(h) No Third-Party Beneficiaries.</strong> These terms benefits solely the Parties to these terms and their respective permitted successors and assigns and nothing in these terms, express or implied, confers on any other person or entity any legal or equitable right, benefit, or remedy of any nature whatsoever under or by reason of these terms.'
|
||||
},
|
||||
|
||||
'affiliate-terms.page.title': {
|
||||
en: 'Affiliate Terms — Comfy',
|
||||
'zh-CN': 'Affiliate Terms — Comfy'
|
||||
},
|
||||
'affiliate-terms.page.description': {
|
||||
en: 'Comfy.org Affiliate Program Terms and Conditions.',
|
||||
'zh-CN': 'Comfy.org Affiliate Program Terms and Conditions.'
|
||||
},
|
||||
'affiliate-terms.page.heading': {
|
||||
en: 'Affiliate Terms',
|
||||
'zh-CN': 'Affiliate Terms'
|
||||
},
|
||||
'affiliate-terms.page.tocLabel': {
|
||||
en: 'On this page',
|
||||
'zh-CN': '本页内容'
|
||||
},
|
||||
'affiliate-terms.page.effectiveDateLabel': {
|
||||
en: 'Effective Date',
|
||||
'zh-CN': '生效日期'
|
||||
},
|
||||
|
||||
// Customers page
|
||||
'customers.hero.label': {
|
||||
en: 'CUSTOMER STORIES',
|
||||
|
||||
31
apps/website/src/pages/affiliates/terms.astro
Normal file
31
apps/website/src/pages/affiliates/terms.astro
Normal file
@@ -0,0 +1,31 @@
|
||||
---
|
||||
// Affiliate Program Terms — English only, by design.
|
||||
// Legal-reviewed copy must not be served under a localized route until
|
||||
// legal explicitly approves a translation; rendering an unreviewed
|
||||
// translation as the active terms exposes us to liability from the
|
||||
// translation diverging from the approved English source. See the
|
||||
// matching comment in src/i18n/translations.ts for the i18n block.
|
||||
import BaseLayout from '../../layouts/BaseLayout.astro'
|
||||
import HeroSection from '../../components/legal/HeroSection.vue'
|
||||
import LegalContentSection from '../../components/legal/LegalContentSection.vue'
|
||||
import { t } from '../../i18n/translations'
|
||||
---
|
||||
|
||||
<BaseLayout
|
||||
title={t('affiliate-terms.page.title')}
|
||||
description={t('affiliate-terms.page.description')}
|
||||
noindex
|
||||
>
|
||||
<HeroSection title={t('affiliate-terms.page.heading')} />
|
||||
<p class="text-primary-warm-gray mt-2 text-center text-sm">
|
||||
{t('affiliate-terms.page.effectiveDateLabel')}: {
|
||||
t('affiliate-terms.effective-date')
|
||||
}
|
||||
</p>
|
||||
<LegalContentSection
|
||||
prefix="affiliate-terms"
|
||||
locale="en"
|
||||
tocLabelKey="affiliate-terms.page.tocLabel"
|
||||
client:load
|
||||
/>
|
||||
</BaseLayout>
|
||||
Reference in New Issue
Block a user