comic source page

This commit is contained in:
nyne
2024-09-30 17:06:58 +08:00
parent a8782b5ce0
commit fdb3901fd1
20 changed files with 695 additions and 27 deletions

View File

@@ -1,5 +1,16 @@
import 'dart:convert';
import 'package:venera/foundation/app.dart';
import 'package:venera/utils/io.dart';
class _Appdata {
final _Settings settings = _Settings();
void saveSettings() async {
var data = jsonEncode(settings._data);
var file = File(FilePath.join(App.dataPath, 'settings.json'));
await file.writeAsString(data);
}
}
final appdata = _Appdata();
@@ -15,9 +26,16 @@ class _Settings {
'newFavoriteAddTo': 'end', // start, end
'moveFavoriteAfterRead': 'none', // none, end, start
'proxy': 'direct', // direct, system, proxy string
'explore_pages': [],
'categories': [],
'favorites': [],
};
operator[](String key) {
return _data[key];
}
operator[]=(String key, dynamic value) {
_data[key] = value;
}
}