feat: add topic summaries and growth profiles

This commit is contained in:
2026-07-31 15:34:03 +08:00
parent 884dc765ad
commit 3e60a6da42
22 changed files with 1040 additions and 5 deletions

View File

@@ -8,6 +8,12 @@ const props = defineProps<{
used: number;
limit: number;
entitlement?: UserEntitlementSummary | null;
finishing?: boolean;
}>();
defineEmits<{
finishTopic: [];
openProfile: [];
}>();
const hasEntitlement = computed(() => Boolean(props.entitlement));
@@ -25,6 +31,19 @@ const limitText = computed(() => displayLimit.value === null ? "不限" : String
<span>{{ title }}</span>
<small v-if="hasEntitlement">{{ entitlement?.name }}</small>
</div>
<strong>{{ displayUsed }}/{{ limitText }}</strong>
<div class="session-quota-actions">
<button
v-if="entitlement?.enableGrowthProfile"
type="button"
class="quota-link"
@click="$emit('openProfile')"
>
我的档案
</button>
<button type="button" class="quota-link" :disabled="finishing" @click="$emit('finishTopic')">
{{ finishing ? '沉淀中' : '沉淀本主题' }}
</button>
<strong>{{ displayUsed }}/{{ limitText }}</strong>
</div>
</section>
</template>