Merge pull request #70 from BEDOLAGA-DEV/dev

Dev
This commit is contained in:
Egor
2026-01-21 06:47:04 +03:00
committed by GitHub
3 changed files with 30 additions and 24 deletions

View File

@@ -442,17 +442,20 @@ export default function ConnectionModal({ onClose }: ConnectionModalProps) {
{t('subscription.connection.addToApp', { appName: selectedApp.name })} {t('subscription.connection.addToApp', { appName: selectedApp.name })}
</button> </button>
)} )}
<button {/* Copy link button - hidden when hideLink is true */}
onClick={copySubscriptionLink} {!appConfig?.hideLink && (
className={`w-full h-11 rounded-xl border transition-all flex items-center justify-center gap-2 text-sm font-medium ${ <button
copied onClick={copySubscriptionLink}
? 'border-success-500 bg-success-500/10 text-success-400' className={`w-full h-11 rounded-xl border transition-all flex items-center justify-center gap-2 text-sm font-medium ${
: 'border-dark-600 text-dark-300 hover:bg-dark-800' copied
}`} ? 'border-success-500 bg-success-500/10 text-success-400'
> : 'border-dark-600 text-dark-300 hover:bg-dark-800'
{copied ? <CheckIcon /> : <CopyIcon />} }`}
{copied ? t('subscription.connection.copied') : t('subscription.connection.copyLink')} >
</button> {copied ? <CheckIcon /> : <CopyIcon />}
{copied ? t('subscription.connection.copied') : t('subscription.connection.copyLink')}
</button>
)}
</div> </div>
</div> </div>
)} )}

View File

@@ -455,19 +455,21 @@ export default function Subscription() {
{t('subscription.getConfig')} {t('subscription.getConfig')}
</button> </button>
{/* Subscription URL */} {/* Subscription URL - hidden when hide_subscription_link is true */}
<div className="flex gap-2"> {!subscription.hide_subscription_link && (
<code className="flex-1 bg-dark-900/50 border border-dark-700/50 px-3 py-2 rounded-lg text-xs text-dark-300 overflow-x-auto scrollbar-hide break-all"> <div className="flex gap-2">
{subscription.subscription_url} <code className="flex-1 bg-dark-900/50 border border-dark-700/50 px-3 py-2 rounded-lg text-xs text-dark-300 overflow-x-auto scrollbar-hide break-all">
</code> {subscription.subscription_url}
<button </code>
onClick={copyUrl} <button
className={`btn-secondary px-3 ${copied ? 'text-success-400 border-success-500/30' : ''}`} onClick={copyUrl}
title={t('subscription.copyLink')} className={`btn-secondary px-3 ${copied ? 'text-success-400 border-success-500/30' : ''}`}
> title={t('subscription.copyLink')}
{copied ? <CheckIcon /> : <CopyIcon />} >
</button> {copied ? <CheckIcon /> : <CopyIcon />}
</div> </button>
</div>
)}
</div> </div>
)} )}

View File

@@ -482,6 +482,7 @@ export interface AppConfig {
platformNames: Record<string, LocalizedText> platformNames: Record<string, LocalizedText>
hasSubscription: boolean hasSubscription: boolean
subscriptionUrl: string | null subscriptionUrl: string | null
hideLink?: boolean
branding?: { branding?: {
name?: string name?: string
logoUrl?: string logoUrl?: string