feat: add teacher help cards
This commit is contained in:
@@ -9,11 +9,13 @@ const props = defineProps<{
|
||||
limit: number;
|
||||
entitlement?: UserEntitlementSummary | null;
|
||||
finishing?: boolean;
|
||||
generatingHelpCard?: boolean;
|
||||
}>();
|
||||
|
||||
defineEmits<{
|
||||
finishTopic: [];
|
||||
openProfile: [];
|
||||
generateHelpCard: [];
|
||||
}>();
|
||||
|
||||
const hasEntitlement = computed(() => Boolean(props.entitlement));
|
||||
@@ -43,6 +45,15 @@ const limitText = computed(() => displayLimit.value === null ? "不限" : String
|
||||
<button type="button" class="quota-link" :disabled="finishing" @click="$emit('finishTopic')">
|
||||
{{ finishing ? '沉淀中' : '沉淀本主题' }}
|
||||
</button>
|
||||
<button
|
||||
v-if="entitlement?.allowHelpCard"
|
||||
type="button"
|
||||
class="quota-link"
|
||||
:disabled="generatingHelpCard"
|
||||
@click="$emit('generateHelpCard')"
|
||||
>
|
||||
{{ generatingHelpCard ? '生成中' : '求助卡' }}
|
||||
</button>
|
||||
<strong>{{ displayUsed }}/{{ limitText }}</strong>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user