Feat/relation (#139)

* update relation

* feat: add relation_type to avatar info structure and update related components

- Added `relation_type` to the avatar structured info in `info_presenter.py`.
- Updated `AvatarDetail.vue` to utilize the new `relation_type` for displaying avatar relationships.
- Modified `RelationRow.vue` to accept `type` as a prop for enhanced relationship representation.
- Updated `core.ts` to include `relation_type` in the `RelationInfo` interface.

Closes #
This commit is contained in:
4thfever
2026-02-05 22:14:44 +08:00
committed by GitHub
parent a9d9288432
commit 7630174820
33 changed files with 437 additions and 65 deletions

View File

@@ -193,6 +193,7 @@ async function handleClearObjective() {
:name="rel.name"
:meta="t('game.info_panel.avatar.relation_meta', { owner: data.name, relation: rel.relation })"
:sub="`${rel.sect} · ${rel.realm}`"
:type="rel.relation_type"
@click="jumpToAvatar(rel.target_id)"
/>
</div>

View File

@@ -3,6 +3,7 @@ defineProps<{
name: string;
meta?: string;
sub?: string;
type?: string;
}>();
defineEmits(['click']);
@@ -54,4 +55,3 @@ defineEmits(['click']);
color: #666;
}
</style>

View File

@@ -135,6 +135,7 @@ export interface RelationInfo {
target_id: string;
name: string;
relation: string;
relation_type: string;
realm: string;
sect: string;
}