💄 Optimized creator dashboard
This commit is contained in:
		@@ -154,7 +154,6 @@
 | 
			
		||||
  "language": "Language",
 | 
			
		||||
  "settingsDisplayLanguage": "Display Language",
 | 
			
		||||
  "languageFollowSystem": "Follow System",
 | 
			
		||||
  "publisherUnselected": "Unselected",
 | 
			
		||||
  "postsCreatedCount": "Posts",
 | 
			
		||||
  "stickerPacksCreatedCount": "Sticker Packs",
 | 
			
		||||
  "stickersCreatedCount": "Stickers",
 | 
			
		||||
@@ -212,5 +211,6 @@
 | 
			
		||||
  "walletCurrencyShortPoints": "NSP",
 | 
			
		||||
  "walletCurrencyGolds": "The Solar Dollars",
 | 
			
		||||
  "walletCurrencyShortGolds": "TSD",
 | 
			
		||||
  "retry": "Retry"
 | 
			
		||||
  "retry": "Retry",
 | 
			
		||||
  "creatorHubUnselectedHint": "Pick / create a publisher to get started."
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -59,7 +59,11 @@ class ManagedPublisherScreen extends HookConsumerWidget {
 | 
			
		||||
                    trailing: const Icon(Symbols.chevron_right),
 | 
			
		||||
                    contentPadding: const EdgeInsets.symmetric(horizontal: 24),
 | 
			
		||||
                    onTap: () {
 | 
			
		||||
                      context.router.push(NewPublisherRoute());
 | 
			
		||||
                      context.router.push(NewPublisherRoute()).then((value) {
 | 
			
		||||
                        if (value != null) {
 | 
			
		||||
                          ref.invalidate(publishersManagedProvider);
 | 
			
		||||
                        }
 | 
			
		||||
                      });
 | 
			
		||||
                    },
 | 
			
		||||
                  ),
 | 
			
		||||
                  const Divider(height: 1),
 | 
			
		||||
 
 | 
			
		||||
@@ -79,8 +79,11 @@ class CreatorHubScreen extends HookConsumerWidget {
 | 
			
		||||
              hint: CircleAvatar(
 | 
			
		||||
                radius: 16,
 | 
			
		||||
                child: Icon(
 | 
			
		||||
                  Symbols.unknown_med,
 | 
			
		||||
                  color: Theme.of(context).colorScheme.onSecondaryContainer,
 | 
			
		||||
                  Symbols.person,
 | 
			
		||||
                  color: Theme.of(
 | 
			
		||||
                    context,
 | 
			
		||||
                  ).colorScheme.onSecondaryContainer.withOpacity(0.9),
 | 
			
		||||
                  fill: 1,
 | 
			
		||||
                ),
 | 
			
		||||
              ).center().padding(right: 8),
 | 
			
		||||
              items: [...publishersMenu],
 | 
			
		||||
@@ -129,7 +132,51 @@ class CreatorHubScreen extends HookConsumerWidget {
 | 
			
		||||
      body: publisherStats.when(
 | 
			
		||||
        data:
 | 
			
		||||
            (stats) => SingleChildScrollView(
 | 
			
		||||
              child: Column(
 | 
			
		||||
              child:
 | 
			
		||||
                  currentPublisher.value == null
 | 
			
		||||
                      ? Column(
 | 
			
		||||
                        children: [
 | 
			
		||||
                          const Gap(24),
 | 
			
		||||
                          const Icon(Symbols.info, size: 32).padding(bottom: 4),
 | 
			
		||||
                          Text(
 | 
			
		||||
                            'creatorHubUnselectedHint',
 | 
			
		||||
                            textAlign: TextAlign.center,
 | 
			
		||||
                          ).tr(),
 | 
			
		||||
                          const Gap(24),
 | 
			
		||||
                          const Divider(height: 1),
 | 
			
		||||
                          ...(publishers.value?.map(
 | 
			
		||||
                                (publisher) => ListTile(
 | 
			
		||||
                                  leading: ProfilePictureWidget(
 | 
			
		||||
                                    fileId: publisher.pictureId,
 | 
			
		||||
                                  ),
 | 
			
		||||
                                  title: Text(publisher.nick),
 | 
			
		||||
                                  subtitle: Text('@${publisher.name}'),
 | 
			
		||||
                                  onTap: () {
 | 
			
		||||
                                    currentPublisher.value = publisher;
 | 
			
		||||
                                  },
 | 
			
		||||
                                ),
 | 
			
		||||
                              ) ??
 | 
			
		||||
                              []),
 | 
			
		||||
                          ListTile(
 | 
			
		||||
                            leading: const CircleAvatar(
 | 
			
		||||
                              child: Icon(Symbols.add),
 | 
			
		||||
                            ),
 | 
			
		||||
                            title: Text('createPublisher').tr(),
 | 
			
		||||
                            subtitle: Text('createPublisherHint').tr(),
 | 
			
		||||
                            trailing: const Icon(Symbols.chevron_right),
 | 
			
		||||
                            onTap: () {
 | 
			
		||||
                              context.router.push(NewPublisherRoute()).then((
 | 
			
		||||
                                value,
 | 
			
		||||
                              ) {
 | 
			
		||||
                                if (value != null) {
 | 
			
		||||
                                  ref.invalidate(publishersManagedProvider);
 | 
			
		||||
                                }
 | 
			
		||||
                              });
 | 
			
		||||
                            },
 | 
			
		||||
                          ),
 | 
			
		||||
                        ],
 | 
			
		||||
                      )
 | 
			
		||||
                      : Column(
 | 
			
		||||
                        children: [
 | 
			
		||||
                          if (stats != null)
 | 
			
		||||
                            _PublisherStatsWidget(
 | 
			
		||||
@@ -141,10 +188,14 @@ class CreatorHubScreen extends HookConsumerWidget {
 | 
			
		||||
                              title: Text('stickers').tr(),
 | 
			
		||||
                              trailing: Icon(Symbols.chevron_right),
 | 
			
		||||
                              leading: const Icon(Symbols.sticky_note),
 | 
			
		||||
                      contentPadding: EdgeInsets.symmetric(horizontal: 24),
 | 
			
		||||
                              contentPadding: EdgeInsets.symmetric(
 | 
			
		||||
                                horizontal: 24,
 | 
			
		||||
                              ),
 | 
			
		||||
                              onTap: () {
 | 
			
		||||
                                context.router.push(
 | 
			
		||||
                          StickersRoute(pubName: currentPublisher.value!.name),
 | 
			
		||||
                                  StickersRoute(
 | 
			
		||||
                                    pubName: currentPublisher.value!.name,
 | 
			
		||||
                                  ),
 | 
			
		||||
                                );
 | 
			
		||||
                              },
 | 
			
		||||
                            ),
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user