Skip to content

Commit c5be40b

Browse files
committed
Merge branch 'main' into feature/transparency
2 parents 89e0213 + 9f90a2f commit c5be40b

27 files changed

+481
-41
lines changed

.all-contributorsrc

+19
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,25 @@
162162
"contributions": [
163163
"translation"
164164
]
165+
},
166+
{
167+
"login": "LosDanieloss",
168+
"name": "Daniel Łojewski",
169+
"avatar_url": "https://avatars.githubusercontent.com/u/10536371?v=4",
170+
"profile": "https://github.com/LosDanieloss",
171+
"contributions": [
172+
"translation"
173+
]
174+
},
175+
{
176+
"login": "federicoviceconti",
177+
"name": "Federico",
178+
"avatar_url": "https://avatars.githubusercontent.com/u/25590766?v=4",
179+
"profile": "http://federicoviceconti.com",
180+
"contributions": [
181+
"translation",
182+
"bug"
183+
]
165184
}
166185
],
167186
"projectName": "sidekick",

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
4949
<td align="center"><a href="http://petner.kr"><img src="https://avatars.githubusercontent.com/u/37838834?v=4?s=50" width="50px;" alt=""/><br /><sub><b>seenewmax</b></sub></a><br /><a href="#translation-seenewmax" title="Translation">🌍</a></td>
5050
<td align="center"><a href="https://github.com/Chrg1001"><img src="https://avatars.githubusercontent.com/u/40189653?v=4?s=50" width="50px;" alt=""/><br /><sub><b>Chrg1001</b></sub></a><br /><a href="#translation-Chrg1001" title="Translation">🌍</a></td>
5151
</tr>
52+
<tr>
53+
<td align="center"><a href="https://github.com/LosDanieloss"><img src="https://avatars.githubusercontent.com/u/10536371?v=4?s=50" width="50px;" alt=""/><br /><sub><b>Daniel Łojewski</b></sub></a><br /><a href="#translation-LosDanieloss" title="Translation">🌍</a></td>
54+
<td align="center"><a href="http://federicoviceconti.com"><img src="https://avatars.githubusercontent.com/u/25590766?v=4?s=50" width="50px;" alt=""/><br /><sub><b>Federico</b></sub></a><br /><a href="#translation-federicoviceconti" title="Translation">🌍</a> <a href="https://github.com/leoafarias/sidekick/issues?q=author%3Afedericoviceconti" title="Bug reports">🐛</a></td>
55+
</tr>
5256
</table>
5357

5458
<!-- markdownlint-restore -->

lib/i18n/language_manager.dart

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ class LanguageManager {
2020
const Locale('zh', 'CN'),
2121
const Locale('ko', 'KR'),
2222
const Locale('ja', 'JP'),
23+
const Locale('pl', 'PL'),
24+
const Locale('it', 'IT'),
2325
];
2426

2527
List<String> getListOfLocalesAsString() {

lib/src/components/atoms/console.dart

+6-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import 'package:flutter/cupertino.dart';
22
import 'package:flutter/material.dart';
33
import 'package:flutter_hooks/flutter_hooks.dart';
44
import 'package:flutter_spinkit/flutter_spinkit.dart';
5-
import 'package:hooks_riverpod/hooks_riverpod.dart';
65
import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';
76

87
import '../../modules/fvm/fvm.provider.dart';
@@ -21,11 +20,11 @@ class Console extends HookWidget {
2120

2221
@override
2322
Widget build(BuildContext context) {
24-
final output = useProvider(fvmStdoutProvider);
23+
final output = useStream(fvmStdoutProvider);
2524
final lines = useState<List<String>>(['']);
2625

2726
useValueChanged(output, (_, __) {
28-
lines.value.insert(0, output.data.value);
27+
lines.value.insert(0, output.data);
2928
if (lines.value.length > 100) {
3029
lines.value.removeAt(lines.value.length - 1);
3130
}
@@ -65,7 +64,10 @@ class Console extends HookWidget {
6564
mainAxisAlignment: MainAxisAlignment.start,
6665
crossAxisAlignment: CrossAxisAlignment.center,
6766
children: [
68-
ConsoleText(lines.value.first),
67+
Container(
68+
width: MediaQuery.of(context).size.width - 100,
69+
child: ConsoleText(lines.value.first)
70+
),
6971
],
7072
),
7173
),

lib/src/components/atoms/sliver_header_delegate.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class SliverHeaderDelegate extends SliverPersistentHeaderDelegate {
4141
),
4242
trailing: Text(
4343
I18Next.of(context).t('components:atoms.countFound', variables: {
44-
'count': count.toString(),
44+
'count': count,
4545
}),
4646
),
4747
onTap: onPress,

lib/src/components/molecules/version_install_button.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class VersionInstallButton extends HookWidget {
8989
child: Opacity(
9090
opacity: (version?.isCached ?? false) ? 0.3 : 1,
9191
child: IconButton(
92-
onPressed: (version?.isCached ?? false) ? onInstall : onInstall,
92+
onPressed: onInstall,
9393
splashRadius: 20,
9494
icon: Tooltip(
9595
message:

lib/src/components/organisms/app_bottom_bar.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class AppBottomBar extends HookWidget {
1717
expand.value = !expand.value;
1818
}
1919

20-
if (processing == false) {
20+
if (!processing) {
2121
return Container(height: 0);
2222
}
2323

lib/src/modules/common/app_shell.dart

+11-13
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ import 'constants.dart';
2222

2323
final _scaffoldKey = GlobalKey<ScaffoldState>();
2424

25+
const pages = [
26+
FVMScreen(),
27+
ProjectsScreen(),
28+
ReleasesScreen(),
29+
];
30+
2531
/// Main widget of the app
2632
class AppShell extends HookWidget {
2733
/// Constructor
@@ -59,17 +65,6 @@ class AppShell extends HookWidget {
5965
}
6066
});
6167

62-
// Render corret page widget based on index
63-
Widget renderPage(int index) {
64-
const pages = [
65-
FVMScreen(),
66-
ProjectsScreen(),
67-
ReleasesScreen(),
68-
];
69-
70-
return pages[index];
71-
}
72-
7368
NavigationRailDestination renderNavButton(String label, IconData iconData) {
7469
return NavigationRailDestination(
7570
icon: Icon(iconData, size: 20),
@@ -115,7 +110,10 @@ class AppShell extends HookWidget {
115110
),
116111
],
117112
),
118-
const VerticalDivider(thickness: 1, width: 1),
113+
const VerticalDivider(
114+
thickness: 1,
115+
width: 1,
116+
),
119117
Expanded(
120118
child: Stack(
121119
fit: StackFit.expand,
@@ -144,7 +142,7 @@ class AppShell extends HookWidget {
144142
child: child,
145143
);
146144
},
147-
child: renderPage(selectedIndex.value),
145+
child: pages[selectedIndex.value],
148146
),
149147
),
150148
],

lib/src/modules/fvm/fvm.provider.dart

+8-7
Original file line numberDiff line numberDiff line change
@@ -118,16 +118,17 @@ class FvmCacheProvider extends StateNotifier<List<CacheVersion>> {
118118
}
119119
}
120120

121-
final fvmStdoutProvider = StreamProvider.autoDispose((ref) {
122-
return StreamGroup.merge([
121+
final fvmStdoutProvider = StreamGroup
122+
.mergeBroadcast(_getConsoleStreams())
123+
.transform(utf8.decoder);
124+
125+
List<Stream<List<int>>> _getConsoleStreams() {
126+
return [
123127
FVMClient.console.stdout.stream,
124128
FVMClient.console.stderr.stream,
125129
FVMClient.console.warning.stream,
126130
FVMClient.console.info.stream,
127131
FVMClient.console.fine.stream,
128132
FVMClient.console.error.stream,
129-
])
130-
.transform(utf8.decoder)
131-
// .transform(const LineSplitter())
132-
.asBroadcastStream();
133-
});
133+
];
134+
}

localizations/ar-SA/settings.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
"ja-JP": "日本語",
1010
"sv-SE": "Svenska",
1111
"zh-CN": "中文",
12-
"ko-KR": "한국어"
12+
"ko-KR": "한국어",
13+
"pl-PL": "Polski",
14+
"it-IT": "Italiano"
1315
}
1416
}
1517
}

localizations/de-DE/settings.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
"ja-JP": "日本語",
1010
"sv-SE": "Svenska",
1111
"zh-CN": "中文",
12-
"ko-KR": "한국어"
12+
"ko-KR": "한국어",
13+
"pl-PL": "Polski",
14+
"it-IT": "Italiano"
1315
}
1416
}
1517
}

localizations/en-GB/settings.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
"ja-JP": "日本語",
1010
"sv-SE": "Svenska",
1111
"zh-CN": "中文",
12-
"ko-KR": "한국어"
12+
"ko-KR": "한국어",
13+
"pl-PL": "Polski",
14+
"it-IT": "Italiano"
1315
}
1416
}
1517
}

localizations/en-US/settings.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
"ja-JP": "日本語",
1010
"sv-SE": "Svenska",
1111
"zh-CN": "中文",
12-
"ko-KR": "한국어"
12+
"ko-KR": "한국어",
13+
"pl-PL": "Polski",
14+
"it-IT": "Italiano"
1315
}
1416
}
1517
}

localizations/es-ES/settings.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
"ja-JP": "日本語",
1010
"sv-SE": "Svenska",
1111
"zh-CN": "中文",
12-
"ko-KR": "한국어"
12+
"ko-KR": "한국어",
13+
"pl-PL": "Polski",
14+
"it-IT": "Italiano"
1315
}
1416
}
1517
}

localizations/it-IT/components.json

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"atoms": {
3+
"copiedToClipboard": "Copiato negli appunti",
4+
"refresh": "Aggiorna",
5+
"countFound": "{{count}} risultato/i"
6+
},
7+
"molecules": {
8+
"master": "Master",
9+
"versionIsInstalled": "La versione è installata",
10+
"versionNotInstalledClickToInstall": "Versione non installata. Premi per installare."
11+
}
12+
}

0 commit comments

Comments
 (0)