feat: add topic summaries and growth profiles
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user