Skip to content

Commit

Permalink
opt.: backup & titlebar
Browse files Browse the repository at this point in the history
  • Loading branch information
lollipopkit committed Dec 9, 2023
1 parent b2eb96e commit 73752bf
Show file tree
Hide file tree
Showing 27 changed files with 191 additions and 266 deletions.
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
"version": "0.2.0",
"configurations": [
{
"name": "toolbox",
"name": "debug",
"request": "launch",
"type": "dart",
// "args": [
// "-v"
// ]
},
{
"name": "toolbox (profile mode)",
"name": "profile",
"request": "launch",
"type": "dart",
"flutterMode": "profile",
Expand Down
2 changes: 1 addition & 1 deletion ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
countly_flutter: d880b352f212d4f6453a87c85f0455f3b4b9c611
file_picker: 1d63c4949e05e386da864365f8c13e1e64787675
file_picker: 880e54928ebe4aa405aaf4577f29a76a078341c6
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef
icloud_storage: d9ac7a33ced81df08ba7ea1bf3099cc0ee58f60a
Expand Down
6 changes: 4 additions & 2 deletions lib/core/utils/sync/webdav.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import 'package:toolbox/data/model/app/backup.dart';
import 'package:toolbox/data/model/app/error.dart';
import 'package:toolbox/data/res/path.dart';
import 'package:toolbox/data/res/store.dart';
// ignore: implementation_imports
import 'package:webdav_client/src/client.dart';
import 'package:webdav_client/webdav_client.dart';

abstract final class Webdav {
static var _client = WebdavClient(
Expand Down Expand Up @@ -73,6 +72,9 @@ abstract final class Webdav {

static void changeClient(String url, String user, String pwd) {
_client = WebdavClient(url: url, user: user, pwd: pwd);
Stores.setting.webdavUrl.put(url);
Stores.setting.webdavUser.put(user);
Stores.setting.webdavPwd.put(pwd);
}

static Future<void> sync() async {
Expand Down
2 changes: 1 addition & 1 deletion lib/data/provider/server.dart
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ class ServerProvider extends ChangeNotifier {
final completer = Completer();
final homePath = (await s.client?.run('echo \$HOME').string)?.trim();
if (homePath == null || homePath.isEmpty) {
throw Exception('Got home path: $homePath');
throw Exception('Got empty home path');
}
final remotePath = ShellFunc.getShellPath(homePath);
final reqId = Pros.sftp.add(
Expand Down
2 changes: 1 addition & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import 'data/provider/sftp.dart';
import 'data/provider/snippet.dart';
import 'data/res/color.dart';
import 'locator.dart';
import 'view/widget/custom_appbar.dart';
import 'view/widget/appbar.dart';

Future<void> main() async {
_runInZone(() async {
Expand Down
Loading

0 comments on commit 73752bf

Please sign in to comment.