@@ -2,37 +2,43 @@ package com.linuxcommandlibrary.app.ui.screens
22
33import androidx.compose.foundation.Image
44import androidx.compose.foundation.clickable
5+ import androidx.compose.foundation.layout.Arrangement
56import androidx.compose.foundation.layout.Column
67import androidx.compose.foundation.layout.Row
78import androidx.compose.foundation.layout.Spacer
89import androidx.compose.foundation.layout.fillMaxSize
10+ import androidx.compose.foundation.layout.fillMaxWidth
911import androidx.compose.foundation.layout.height
1012import androidx.compose.foundation.layout.padding
1113import androidx.compose.foundation.layout.size
14+ import androidx.compose.foundation.layout.width
1215import androidx.compose.foundation.rememberScrollState
1316import androidx.compose.foundation.shape.RoundedCornerShape
1417import androidx.compose.foundation.verticalScroll
1518import androidx.compose.material.Button
19+ import androidx.compose.material.ButtonDefaults
1620import androidx.compose.material.Card
21+ import androidx.compose.material.Divider
1722import androidx.compose.material.Icon
18- import androidx.compose.material.IconButton
1923import androidx.compose.material.MaterialTheme
24+ import androidx.compose.material.OutlinedButton
2025import androidx.compose.material.Text
21- import androidx.compose.material.TextButton
2226import androidx.compose.runtime.Composable
2327import androidx.compose.runtime.LaunchedEffect
2428import androidx.compose.ui.Alignment
2529import androidx.compose.ui.Modifier
26- import androidx.compose.ui.graphics.Color
30+ import androidx.compose.ui.draw.clip
2731import androidx.compose.ui.input.pointer.PointerIcon
2832import androidx.compose.ui.input.pointer.pointerHoverIcon
2933import androidx.compose.ui.platform.LocalUriHandler
34+ import androidx.compose.ui.text.font.FontWeight
3035import androidx.compose.ui.unit.dp
3136import androidx.compose.ui.window.Dialog
3237import com.linuxcommandlibrary.app.platform.showRateAppButton
3338import com.linuxcommandlibrary.app.resources.Res
3439import com.linuxcommandlibrary.app.resources.af_linode
3540import com.linuxcommandlibrary.app.resources.af_proton
41+ import com.linuxcommandlibrary.app.resources.app_logo
3642import com.linuxcommandlibrary.app.ui.composables.AppIcon
3743import com.linuxcommandlibrary.app.ui.composables.SectionTitle
3844import com.linuxcommandlibrary.app.ui.composables.rememberIconPainter
@@ -49,99 +55,158 @@ fun AppInfoDialog(
4955
5056 Dialog (onDismissRequest = { onDismiss() }) {
5157 Card (
52- elevation = 8 .dp,
53- shape = RoundedCornerShape (6 .dp),
58+ elevation = 16 .dp,
59+ shape = RoundedCornerShape (24 .dp),
5460 ) {
55- Column (modifier = Modifier .fillMaxSize()) {
61+ Column (
62+ modifier = Modifier
63+ .fillMaxSize()
64+ .verticalScroll(rememberScrollState())
65+ .padding(24 .dp),
66+ horizontalAlignment = Alignment .CenterHorizontally ,
67+ ) {
68+ Image (
69+ painter = painterResource(Res .drawable.app_logo),
70+ contentDescription = null ,
71+ modifier = Modifier .size(72 .dp).clip(RoundedCornerShape (16 .dp)),
72+ )
73+ Spacer (Modifier .height(12 .dp))
5674 Text (
5775 " Linux Command Library" ,
58- style = MaterialTheme .typography.h5,
59- modifier = Modifier .padding(8 .dp),
76+ style = MaterialTheme .typography.h6,
77+ fontWeight = FontWeight .Bold ,
78+ )
79+ Text (
80+ " Version ${Version .APP_VERSION } " ,
81+ style = MaterialTheme .typography.caption,
82+ color = MaterialTheme .colors.onSurface.copy(alpha = 0.6f ),
6083 )
61- Row {
84+
85+ Spacer (Modifier .height(20 .dp))
86+
87+ Row (
88+ horizontalArrangement = Arrangement .spacedBy(12 .dp),
89+ modifier = Modifier .fillMaxWidth(),
90+ ) {
6291 if (showRateAppButton) {
6392 Button (
64- modifier = Modifier .padding(start = 6 .dp).pointerHoverIcon(PointerIcon .Hand ),
65- content = {
66- Text (
67- " Rate the app" ,
68- color = Color .White ,
69- )
70- },
7193 onClick = {
7294 uriHandler.openUri(" https://play.google.com/store/apps/details?id=com.inspiredandroid.linuxcommandbibliotheca" )
7395 },
74- )
96+ modifier = Modifier .weight(1f ).pointerHoverIcon(PointerIcon .Hand ),
97+ shape = RoundedCornerShape (12 .dp),
98+ elevation = ButtonDefaults .elevation(defaultElevation = 0 .dp),
99+ ) {
100+ Text (" Rate the app" )
101+ }
75102 }
76- IconButton (
77- modifier = Modifier .pointerHoverIcon(PointerIcon .Hand ),
103+ OutlinedButton (
78104 onClick = {
79105 uriHandler.openUri(" https://github.com/SimonSchubert/LinuxCommandLibrary" )
80106 },
107+ modifier = Modifier .weight(1f ).pointerHoverIcon(PointerIcon .Hand ),
108+ shape = RoundedCornerShape (12 .dp),
81109 ) {
82110 Icon (
83111 painter = githubPainter,
84- contentDescription = " View on GitHub " ,
85- modifier = Modifier .size(40 .dp),
112+ contentDescription = null ,
113+ modifier = Modifier .size(18 .dp),
86114 )
115+ Spacer (Modifier .width(8 .dp))
116+ Text (" GitHub" )
87117 }
88118 }
119+
120+ Spacer (Modifier .height(20 .dp))
121+ Divider (color = MaterialTheme .colors.onSurface.copy(alpha = 0.12f ))
122+ Spacer (Modifier .height(20 .dp))
89123 Text (
90- " Version: ${ Version . APP_VERSION } " ,
91- style = MaterialTheme .typography.caption ,
92- modifier = Modifier .padding( 8 .dp) ,
124+ " Support this project " ,
125+ style = MaterialTheme .typography.subtitle1 ,
126+ fontWeight = FontWeight . SemiBold ,
93127 )
94- Column (
95- modifier = Modifier
96- .padding(8 .dp)
97- .weight(1f )
98- .verticalScroll(rememberScrollState()),
128+ Spacer (Modifier .height(4 .dp))
129+ Text (
130+ " By using my referral links for these amazing products." ,
131+ style = MaterialTheme .typography.body2,
132+ color = MaterialTheme .colors.onSurface.copy(alpha = 0.7f ),
133+ )
134+ Spacer (Modifier .height(12 .dp))
135+ OutlinedButton (
136+ onClick = {
137+ uriHandler.openUri(" https://github.com/sponsors/SimonSchubert" )
138+ },
139+ modifier = Modifier .fillMaxWidth().pointerHoverIcon(PointerIcon .Hand ),
140+ shape = RoundedCornerShape (12 .dp),
99141 ) {
100- Text (" Support this project" , style = MaterialTheme .typography.h6)
101- Text (" By using my referral links for these amazing products." )
102- Spacer (Modifier .height(8 .dp))
103- Row {
104- Image (
105- painter = painterResource(Res .drawable.af_proton),
106- contentDescription = " Proton Free" ,
107- modifier = Modifier
108- .weight(1f )
109- .pointerHoverIcon(PointerIcon .Hand )
110- .clickable {
111- uriHandler.openUri(" https://linuxcommandlibrary.com/proton-free-2025" )
112- },
113- )
114- Image (
115- painter = painterResource(Res .drawable.af_linode),
116- contentDescription = " Linode Cloud" ,
117- modifier = Modifier
118- .weight(1f )
119- .pointerHoverIcon(PointerIcon .Hand )
120- .clickable {
121- uriHandler.openUri(" https://linuxcommandlibrary.com/linode-2025" )
122- },
123- )
124- }
125- Spacer (Modifier .height(8 .dp))
126- Text (" Man pages" , style = MaterialTheme .typography.h6)
127- Text (" Licence information about the man page is usually specified in the man detail page under the category Author, Copyright or Licence." )
128-
129- Spacer (Modifier .height(8 .dp))
130- Text (" TLDR pages" , style = MaterialTheme .typography.h6)
131- Text (" The MIT License (MIT) Copyright (c) 2014 the TLDR team and contributors" )
132- Spacer (Modifier .height(8 .dp))
133- Text (
134- " Thanks to icons8.com for the icons" ,
135- style = MaterialTheme .typography.h6,
142+ Icon (
143+ painter = githubPainter,
144+ contentDescription = null ,
145+ modifier = Modifier .size(18 .dp),
136146 )
147+ Spacer (Modifier .width(8 .dp))
148+ Text (" Sponsor on GitHub" )
137149 }
138- TextButton (
139- content = { Text (" OK" ) },
140- modifier = Modifier
141- .align(Alignment .End )
142- .padding(end = 6 .dp)
143- .pointerHoverIcon(PointerIcon .Hand ),
144- onClick = onDismiss,
150+ Spacer (Modifier .height(12 .dp))
151+ Row (horizontalArrangement = Arrangement .spacedBy(12 .dp)) {
152+ Image (
153+ painter = painterResource(Res .drawable.af_proton),
154+ contentDescription = " Proton Free" ,
155+ modifier = Modifier
156+ .weight(1f )
157+ .clip(RoundedCornerShape (12 .dp))
158+ .pointerHoverIcon(PointerIcon .Hand )
159+ .clickable {
160+ uriHandler.openUri(" https://linuxcommandlibrary.com/proton-free-2025" )
161+ },
162+ )
163+ Image (
164+ painter = painterResource(Res .drawable.af_linode),
165+ contentDescription = " Linode Cloud" ,
166+ modifier = Modifier
167+ .weight(1f )
168+ .clip(RoundedCornerShape (12 .dp))
169+ .pointerHoverIcon(PointerIcon .Hand )
170+ .clickable {
171+ uriHandler.openUri(" https://linuxcommandlibrary.com/linode-2025" )
172+ },
173+ )
174+ }
175+
176+ Spacer (Modifier .height(24 .dp))
177+
178+ Text (
179+ " Acknowledgements" ,
180+ style = MaterialTheme .typography.subtitle1,
181+ fontWeight = FontWeight .SemiBold ,
182+ )
183+ Spacer (Modifier .height(8 .dp))
184+ Text (
185+ " Man pages" ,
186+ style = MaterialTheme .typography.body2,
187+ fontWeight = FontWeight .Medium ,
188+ )
189+ Text (
190+ " Licence information about the man page is usually specified in the man detail page under the category Author, Copyright or Licence." ,
191+ style = MaterialTheme .typography.caption,
192+ color = MaterialTheme .colors.onSurface.copy(alpha = 0.6f ),
193+ )
194+ Spacer (Modifier .height(12 .dp))
195+ Text (
196+ " TLDR pages" ,
197+ style = MaterialTheme .typography.body2,
198+ fontWeight = FontWeight .Medium ,
199+ )
200+ Text (
201+ " The MIT License (MIT) Copyright (c) 2014 the TLDR team and contributors" ,
202+ style = MaterialTheme .typography.caption,
203+ color = MaterialTheme .colors.onSurface.copy(alpha = 0.6f ),
204+ )
205+ Spacer (Modifier .height(12 .dp))
206+ Text (
207+ " Thanks to icons8.com for the icons" ,
208+ style = MaterialTheme .typography.caption,
209+ color = MaterialTheme .colors.onSurface.copy(alpha = 0.6f ),
145210 )
146211 }
147212 }
0 commit comments