chore: screenshots
This commit is contained in:
@@ -95,8 +95,6 @@ class BackupPage extends StatelessWidget {
|
||||
prop: Stores.setting.icloudSync,
|
||||
func: (val) async {
|
||||
if (val) {
|
||||
final relativePaths = await PersistentStore.getFileNames();
|
||||
await ICloud.sync(relativePaths: relativePaths);
|
||||
}
|
||||
},
|
||||
),
|
||||
@@ -109,35 +107,25 @@ class BackupPage extends StatelessWidget {
|
||||
if (icloudLoading.value) {
|
||||
return UIs.centerSizedLoadingSmall;
|
||||
}
|
||||
return ConstrainedBox(
|
||||
constraints: const BoxConstraints(maxWidth: 137),
|
||||
child: Row(
|
||||
children: [
|
||||
TextButton(
|
||||
onPressed: () async {
|
||||
icloudLoading.value = true;
|
||||
final files = await PersistentStore.getFileNames();
|
||||
for (final file in files) {
|
||||
await ICloud.download(relativePath: file);
|
||||
}
|
||||
icloudLoading.value = false;
|
||||
},
|
||||
child: Text(l10n.download),
|
||||
),
|
||||
UIs.width7,
|
||||
TextButton(
|
||||
onPressed: () async {
|
||||
icloudLoading.value = true;
|
||||
final files = await PersistentStore.getFileNames();
|
||||
for (final file in files) {
|
||||
await ICloud.upload(relativePath: file);
|
||||
}
|
||||
icloudLoading.value = false;
|
||||
},
|
||||
child: Text(l10n.upload),
|
||||
),
|
||||
],
|
||||
),
|
||||
return Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
TextButton(
|
||||
onPressed: () async {
|
||||
icloudLoading.value = true;
|
||||
icloudLoading.value = false;
|
||||
},
|
||||
child: Text(l10n.download),
|
||||
),
|
||||
UIs.width7,
|
||||
TextButton(
|
||||
onPressed: () async {
|
||||
icloudLoading.value = true;
|
||||
icloudLoading.value = false;
|
||||
},
|
||||
child: Text(l10n.upload),
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
|
||||
@@ -8,6 +8,7 @@ import 'package:toolbox/core/channel/bg_run.dart';
|
||||
import 'package:toolbox/core/channel/home_widget.dart';
|
||||
import 'package:toolbox/core/extension/context/dialog.dart';
|
||||
import 'package:toolbox/core/extension/context/locale.dart';
|
||||
import 'package:toolbox/core/persistant_store.dart';
|
||||
import 'package:toolbox/core/utils/platform/auth.dart';
|
||||
import 'package:toolbox/core/utils/platform/base.dart';
|
||||
import 'package:toolbox/data/res/github_id.dart';
|
||||
@@ -340,7 +341,7 @@ class _HomePageState extends State<HomePage>
|
||||
}
|
||||
|
||||
Future<void> _onLongPressSetting() async {
|
||||
final map = Stores.setting.toJson();
|
||||
final map = Stores.setting.box.toJson(includeInternal: false);
|
||||
final keys = map.keys;
|
||||
|
||||
/// Encode [map] to String with indent `\t`
|
||||
|
||||
@@ -219,29 +219,31 @@ class _ServerPageState extends State<ServerPage>
|
||||
final cardStatus = getCardNoti(id);
|
||||
final title = _buildServerCardTitle(srv.status, srv.state, srv.spi);
|
||||
|
||||
return AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 377),
|
||||
curve: Curves.fastEaseInToSlowEaseOut,
|
||||
height: _calcCardHeight(srv.state, cardStatus.value.flip),
|
||||
child: ValueBuilder(
|
||||
listenable: cardStatus,
|
||||
build: () {
|
||||
final List<Widget> children = [title];
|
||||
if (srv.state == ServerState.finished) {
|
||||
if (cardStatus.value.flip) {
|
||||
children.addAll(_buildFlipedCard(srv));
|
||||
} else {
|
||||
children.addAll(_buildNormalCard(srv.status, srv.spi));
|
||||
}
|
||||
return ValueBuilder(
|
||||
listenable: cardStatus,
|
||||
build: () {
|
||||
late final List<Widget> children;
|
||||
if (srv.state == ServerState.finished) {
|
||||
if (cardStatus.value.flip) {
|
||||
children = [title, ..._buildFlipedCard(srv)];
|
||||
} else {
|
||||
children = [title, ..._buildNormalCard(srv.status, srv.spi)];
|
||||
}
|
||||
return Column(
|
||||
} else {
|
||||
children = [title];
|
||||
}
|
||||
return AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 377),
|
||||
curve: Curves.fastEaseInToSlowEaseOut,
|
||||
height: _calcCardHeight(srv.state, cardStatus.value.flip),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: children,
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user