Skip to content

Commit

Permalink
feat(details widget): colors PE-4711
Browse files Browse the repository at this point in the history
  • Loading branch information
matibat committed Oct 6, 2023
1 parent c908bd7 commit daffcf4
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 26 deletions.
38 changes: 28 additions & 10 deletions lib/components/details_panel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,15 @@ class _DetailsPanelState extends State<DetailsPanel> {
AppPlatform.isMobile || AppPlatform.isMobileWeb()
? 0
: null,
backgroundColor: ArDriveTheme.of(context)
.themeData
.tableTheme
.backgroundColor,
backgroundColor: mobileView
? ArDriveTheme.of(context)
.themeData
.tableTheme
.backgroundColor
: ArDriveTheme.of(context)
.themeData
.colors
.themeBgSurface,
contentPadding: widget.isSharePage
? const EdgeInsets.only()
: const EdgeInsets.all(24),
Expand All @@ -238,8 +243,9 @@ class _DetailsPanelState extends State<DetailsPanel> {
child: ArDriveCard(
borderRadius:
AppPlatform.isMobile || AppPlatform.isMobileWeb() ? 0 : null,
backgroundColor:
ArDriveTheme.of(context).themeData.tableTheme.backgroundColor,
backgroundColor: widget.isSharePage
? ArDriveTheme.of(context).themeData.tableTheme.cellColor
: ArDriveTheme.of(context).themeData.tableTheme.backgroundColor,
contentPadding: const EdgeInsets.all(24),
content: Column(
children: [
Expand All @@ -257,7 +263,7 @@ class _DetailsPanelState extends State<DetailsPanel> {
),
mobile: (context) => const SizedBox.shrink(),
),
if (mobileView && widget.isSharePage)
if (widget.isSharePage)
SizedBox(
height: 64,
child: Column(
Expand All @@ -275,7 +281,7 @@ class _DetailsPanelState extends State<DetailsPanel> {
),
),
if (previewState is FsEntryPreviewSuccess &&
!(widget.isSharePage && mobileView))
!(widget.isSharePage))
ArDriveCard(
contentPadding: const EdgeInsets.all(24),
backgroundColor: ArDriveTheme.of(context)
Expand Down Expand Up @@ -305,7 +311,7 @@ class _DetailsPanelState extends State<DetailsPanel> {
size: 32,
),
},
if (widget.currentDrive != null && !widget.isSharePage)
if (widget.currentDrive != null)
ScreenTypeLayout.builder(
desktop: (context) => const SizedBox.shrink(),
mobile: (context) => EntityActionsMenu(
Expand All @@ -332,11 +338,23 @@ class _DetailsPanelState extends State<DetailsPanel> {
child: ArDriveTabView(
key: Key(widget.item.id + tabs.length.toString()),
tabs: tabs,
backgroundColor: ArDriveTheme.of(context)
.themeData
.colors
.themeBgSurface,
unselectedTabColor: ArDriveTheme.of(context)
.themeData
.colors
.themeBgSurface,
unselectedLabelColor: ArDriveTheme.of(context)
.themeData
.colors
.themeFgDefault,
),
),
if (widget.isSharePage)
SizedBox(
height: mobileView ? 138 : 138,
height: 138,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Expand Down
36 changes: 20 additions & 16 deletions lib/pages/shared_file/shared_file_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -196,22 +196,26 @@ class SharedFilePage extends StatelessWidget {
}

return ScreenTypeLayout.builder(
desktop: (context) => Padding(
padding: const EdgeInsets.all(24.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
if (state is SharedFileLoadSuccess) ...{
Flexible(
flex: 1,
child: activityPanel(state),
)
} else ...{
const CircularProgressIndicator(
strokeWidth: 8,
),
}
],
desktop: (context) => Container(
color:
ArDriveTheme.of(context).themeData.tableTheme.backgroundColor,
child: Padding(
padding: const EdgeInsets.all(24.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
if (state is SharedFileLoadSuccess) ...{
Flexible(
flex: 1,
child: activityPanel(state),
)
} else ...{
const CircularProgressIndicator(
strokeWidth: 8,
),
}
],
),
),
),
mobile: (context) => SingleChildScrollView(
Expand Down

0 comments on commit daffcf4

Please sign in to comment.