add membership socket connection status

This commit is contained in:
Simon 2026-01-26 22:35:30 +07:00
parent f337a3c89d
commit 107f124ee2
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4
2 changed files with 22 additions and 0 deletions

View File

@ -29,3 +29,4 @@ class MembershipProfileSerializer(serializers.Serializer):
sponsor_tier = SponsortierSerializer()
subscription_count = serializers.IntegerField()
subscription_is_max = serializers.BooleanField()
is_connected = serializers.BooleanField()

View File

@ -24,6 +24,7 @@ type ProfileResponseType = {
sponsor_tier: SponsorTierType;
subscription_count: number;
subscription_is_max: boolean;
is_connected: boolean;
};
export default function MembershipAppsettings({ show_help_text }: { show_help_text: boolean }) {
@ -136,6 +137,13 @@ export default function MembershipAppsettings({ show_help_text }: { show_help_te
.
</li>
<li>Click on validate to verify everything is working.</li>
<li>
Setup the{' '}
<a href="https://github.com/tubearchivist/members" target="_blank">
Client Container
</a>
.
</li>
<li>
If you are subscribed to less channels than your sponsor tier allows, you can directly
sync all your subscriptions here.
@ -206,6 +214,19 @@ export default function MembershipAppsettings({ show_help_text }: { show_help_te
<br />
Subscriptions: {profileResponse.subscription_count}/
{profileResponse.sponsor_tier.max_subs}
<br />
Socket:{' '}
{profileResponse.is_connected ? (
'Established'
) : (
<>
Not established. Make sure the{' '}
<a href="https://github.com/tubearchivist/members" target="_blank">
Client Container
</a>{' '}
is connected.
</>
)}
</p>
</>
)}