refactor: rename internal Fai* design system + fai_ helpers to chain
Some checks failed
Security / Security check (push) Failing after 2s
Some checks failed
Security / Security check (push) Failing after 2s
The Studio design system, widgets and helpers carried a Fai* / fai_ prefix (FaiSpace, FaiColors, FaiTheme, FaiLog, 17 fai_*.dart files, the faiBinary* l10n keys). Studio is the Ch∆In product, so rename them to Chain* / chain_ — carefully preserving English fail/failure/failed. Also fix stale references: the 'fai' binary in l10n strings -> 'chain', FAI_* env vars (FAI_BIN/DATA_DIR/MODULES_DIR/TODAY/BOOTSTRAP_TOKEN) -> CHAIN_*, fai_platform -> fai_chain, fai_hub -> chain_hub. Vendor security-hook tooling (FAI_BANNED_TERMS_FILE) + the .fai bundle ext left. flutter analyze + test: clean (20 passed). Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
This commit is contained in:
parent
68d23ab7dd
commit
891acd2ba2
52 changed files with 1225 additions and 1225 deletions
|
|
@ -103,7 +103,7 @@ class _FederationPageState extends State<FederationPage> {
|
|||
tooltip: l.federationReloadTooltip,
|
||||
onPressed: _refresh,
|
||||
),
|
||||
const SizedBox(width: FaiSpace.sm),
|
||||
const SizedBox(width: ChainSpace.sm),
|
||||
],
|
||||
),
|
||||
floatingActionButton: FloatingActionButton.extended(
|
||||
|
|
@ -118,7 +118,7 @@ class _FederationPageState extends State<FederationPage> {
|
|||
return const Center(child: CircularProgressIndicator());
|
||||
}
|
||||
if (snapshot.hasError) {
|
||||
return FaiEmptyState(
|
||||
return ChainEmptyState(
|
||||
icon: Icons.cloud_off_outlined,
|
||||
iconColor: theme.colorScheme.error,
|
||||
title: l.hubUnreachable,
|
||||
|
|
@ -131,7 +131,7 @@ class _FederationPageState extends State<FederationPage> {
|
|||
}
|
||||
final sats = snapshot.data ?? [];
|
||||
if (sats.isEmpty) {
|
||||
return FaiEmptyState(
|
||||
return ChainEmptyState(
|
||||
icon: Icons.hub_outlined,
|
||||
title: l.federationEmptyTitle,
|
||||
hint: l.federationEmptyHint,
|
||||
|
|
@ -143,9 +143,9 @@ class _FederationPageState extends State<FederationPage> {
|
|||
);
|
||||
}
|
||||
return ListView.separated(
|
||||
padding: const EdgeInsets.all(FaiSpace.xl),
|
||||
padding: const EdgeInsets.all(ChainSpace.xl),
|
||||
itemCount: sats.length,
|
||||
separatorBuilder: (_, _) => const SizedBox(height: FaiSpace.md),
|
||||
separatorBuilder: (_, _) => const SizedBox(height: ChainSpace.md),
|
||||
itemBuilder: (context, i) => _SatelliteCard(satellite: sats[i]),
|
||||
);
|
||||
},
|
||||
|
|
@ -162,19 +162,19 @@ class _SatelliteCard extends StatelessWidget {
|
|||
Widget build(BuildContext context) {
|
||||
final theme = Theme.of(context);
|
||||
final l = AppLocalizations.of(context)!;
|
||||
return FaiCard(
|
||||
return ChainCard(
|
||||
accentTop: true,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
FaiPill(
|
||||
ChainPill(
|
||||
label: l.federationPillConnected,
|
||||
tone: FaiPillTone.success,
|
||||
tone: ChainPillTone.success,
|
||||
icon: Icons.link,
|
||||
),
|
||||
const SizedBox(width: FaiSpace.sm),
|
||||
const SizedBox(width: ChainSpace.sm),
|
||||
Expanded(
|
||||
child: Text(
|
||||
satellite.displayName,
|
||||
|
|
@ -183,19 +183,19 @@ class _SatelliteCard extends StatelessWidget {
|
|||
),
|
||||
),
|
||||
),
|
||||
FaiPill(
|
||||
ChainPill(
|
||||
label: satellite.region.isEmpty
|
||||
? l.federationRegionNone
|
||||
: satellite.region,
|
||||
tone: FaiPillTone.neutral,
|
||||
tone: ChainPillTone.neutral,
|
||||
icon: Icons.public,
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: FaiSpace.md),
|
||||
const SizedBox(height: ChainSpace.md),
|
||||
Wrap(
|
||||
spacing: FaiSpace.md,
|
||||
runSpacing: FaiSpace.xs,
|
||||
spacing: ChainSpace.md,
|
||||
runSpacing: ChainSpace.xs,
|
||||
children: [
|
||||
_meta(theme, 'v${satellite.hubVersion}'),
|
||||
_meta(theme, 'wire ${satellite.wireVersion}'),
|
||||
|
|
@ -203,7 +203,7 @@ class _SatelliteCard extends StatelessWidget {
|
|||
],
|
||||
),
|
||||
if (satellite.capabilities.isNotEmpty) ...[
|
||||
const SizedBox(height: FaiSpace.md),
|
||||
const SizedBox(height: ChainSpace.md),
|
||||
Text(
|
||||
l.federationCapabilities(satellite.capabilities.length),
|
||||
style: theme.textTheme.labelSmall?.copyWith(
|
||||
|
|
@ -213,13 +213,13 @@ class _SatelliteCard extends StatelessWidget {
|
|||
),
|
||||
const SizedBox(height: 4),
|
||||
Wrap(
|
||||
spacing: FaiSpace.xs,
|
||||
runSpacing: FaiSpace.xs,
|
||||
spacing: ChainSpace.xs,
|
||||
runSpacing: ChainSpace.xs,
|
||||
children: satellite.capabilities
|
||||
.map(
|
||||
(c) => FaiPill(
|
||||
(c) => ChainPill(
|
||||
label: c,
|
||||
tone: FaiPillTone.accent,
|
||||
tone: ChainPillTone.accent,
|
||||
icon: Icons.extension_outlined,
|
||||
),
|
||||
)
|
||||
|
|
@ -233,7 +233,7 @@ class _SatelliteCard extends StatelessWidget {
|
|||
|
||||
Widget _meta(ThemeData theme, String text) => Text(
|
||||
text,
|
||||
style: FaiTheme.mono(size: 10, color: theme.colorScheme.onSurfaceVariant),
|
||||
style: ChainTheme.mono(size: 10, color: theme.colorScheme.onSurfaceVariant),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -261,11 +261,11 @@ class _EnrollmentDialog extends StatelessWidget {
|
|||
Text(l.federationTokenLabel, style: theme.textTheme.labelSmall),
|
||||
const SizedBox(height: 4),
|
||||
_CopyableBlock(text: enrollment.token, copiedMsg: l.federationCopied),
|
||||
const SizedBox(height: FaiSpace.md),
|
||||
const SizedBox(height: ChainSpace.md),
|
||||
Text(l.federationConfigLabel, style: theme.textTheme.labelSmall),
|
||||
const SizedBox(height: 4),
|
||||
_CopyableBlock(text: config, copiedMsg: l.federationCopied),
|
||||
const SizedBox(height: FaiSpace.md),
|
||||
const SizedBox(height: ChainSpace.md),
|
||||
Text(
|
||||
l.federationEnrollmentHint,
|
||||
style: theme.textTheme.bodySmall?.copyWith(
|
||||
|
|
@ -299,19 +299,19 @@ class _CopyableBlock extends StatelessWidget {
|
|||
Container(
|
||||
width: double.infinity,
|
||||
padding: const EdgeInsets.fromLTRB(
|
||||
FaiSpace.md,
|
||||
FaiSpace.md,
|
||||
ChainSpace.md,
|
||||
ChainSpace.md,
|
||||
40,
|
||||
FaiSpace.md,
|
||||
ChainSpace.md,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: theme.colorScheme.surfaceContainerHigh,
|
||||
borderRadius: BorderRadius.circular(FaiRadius.sm),
|
||||
borderRadius: BorderRadius.circular(ChainRadius.sm),
|
||||
border: Border.all(color: theme.colorScheme.outlineVariant),
|
||||
),
|
||||
child: SelectableText(
|
||||
text,
|
||||
style: FaiTheme.mono(size: 11, color: theme.colorScheme.onSurface),
|
||||
style: ChainTheme.mono(size: 11, color: theme.colorScheme.onSurface),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue