feat(creator-studio): pay toggle and entry in the publish settings card
The card below the writing surface only offered cover and scheduling, so paid content could only be reached through the bottom bar's 发布 button. - The card gains a 付费内容 row (rendered only with canPay): a toggle bound to draft.pay.enabled, a status line that reflects whether resources were added, and a 配置价格与付费资源 link. - Turning the toggle on opens the publish drawer and scrolls it to the pay section, so pricing is the next thing the author sees. Entering from the bottom bar keeps the drawer at the top.
This commit is contained in:
1 parent
0e4e4670dd
commit
ac84e991d1
8 files changed
+126
-14
No files matched your search
@@ -429,6 +429,15 @@ test('writing surface is a centered paper card with a publish settings card belo
|
||||
assert.match(settings, /type="datetime-local"/);
|
||||
assert.match(settings, /canSchedule/);
|
||||
assert.match(appSource, /scheduleEnabled=\{!!draft\.schedule\.enabled\}/);
|
||||
|
||||
// 付费开关在卡片里,且能直接打开发布抽屉的付费配置。
|
||||
assert.match(settings, /canPay/);
|
||||
assert.match(settings, /onPayEnabledChange/);
|
||||
assert.match(settings, /onOpenPaySettings/);
|
||||
assert.match(settings, /配置价格与付费资源/);
|
||||
assert.match(appSource, /onOpenPaySettings=\{/);
|
||||
assert.match(appSource, /focusPay=\{drawerFocusPay\}/);
|
||||
assert.match(read('assets/creator-studio/src/panels/publish-drawer.tsx'), /scrollIntoView/);
|
||||
});
|
||||
|
||||
test('scheduled publishing is validated and applied server side', () => {
|
||||
|
||||
Reference in new issue
Block a user