Skip to content

Commit

Permalink
v0.12.0 (See changelog)
Browse files Browse the repository at this point in the history
  • Loading branch information
redsolver committed Oct 2, 2022
1 parent 037fd96 commit 24208f2
Show file tree
Hide file tree
Showing 26 changed files with 510 additions and 97 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
# Vup Changelog

## main
## Beta 0.12.0

- Added "Delete permanently" action for files and directories in trash
- Added experimental support for storing encrypted file data on custom remotes (S3 and WebDAV)
- Added skylink health indicator and pin tool to file details view
- Improved "Delete local copies" action
- Added timeout to prevent sync operations from locking up
- Added "Copy link" button for already shared directories
- Added "Gallery" view type when sharing files
- Custom themes: Added support for background images
- Improved button label readability
- Fixed some bugs

## Beta 0.11.0

Expand Down
2 changes: 2 additions & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />

<uses-permission android:name="android.permission.USE_FINGERPRINT"/>
<uses-permission android:name="android.permission.VIBRATE" />


<application android:allowBackup="false" android:label="Vup" android:icon="@mipmap/ic_launcher">
<activity android:name=".MainActivity" android:launchMode="singleTask" android:theme="@style/LaunchTheme" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:hardwareAccelerated="true" android:windowSoftInputMode="adjustResize">
Expand Down
Binary file added assets/icon/outline.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icon/vup-logo-single.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion lib/generic/state.dart
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ const customThemesPath = 'vup.hns/config/custom_themes.json';
final scriptsStatus = <String, Map>{};

// Pools
final uploadPool = Pool(3);
final downloadPool = Pool(3);

// Error handling
Expand Down
3 changes: 2 additions & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ Future<void> initApp() async {
await logger.init(vupTempDir);

vupConfigDir = join(
vupConfigDir, 'default',
vupConfigDir,
'default',
// 'debug',
);

Expand Down
4 changes: 2 additions & 2 deletions lib/page/settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class _SettingsPageState extends State<SettingsPage> {
),
if (devModeEnabled && isYTDlIntegrationEnabled)
SettingsPane(
title: 'Hooks/tasks/workflows/scripts (Advanced)',
title: 'Scripts (Advanced)',
build: () => ScriptsSettingsPage(),
),
/* SettingsPane(
Expand Down Expand Up @@ -158,7 +158,7 @@ class _SettingsPageState extends State<SettingsPage> {
onTap: () {
showAboutDialog(
applicationLegalese:
'Copyright © 2022 redsolver. All rights reserved.',
'Copyright © 2022 redsolver. Licensed under the terms of the EUPL-1.2 license.',
applicationName: 'Vup',
applicationVersion: packageInfo.version,
context: context,
Expand Down
2 changes: 1 addition & 1 deletion lib/page/settings/jellyfin.dart
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ class _JellyfinServerSettingsPageState
),
if (isJellyfinServerEnabled)
SelectableText(
'\nWarning: Authentication is not enforced because some players and API endpoints don\'t fully support it (yet). Please only run the server on localhost (this is the default) to prevent outside connections.\n\nJellyfin server running at ${jellyfinServerBindIp}:${jellyfinServerPort}\nStop the Jellyfin server if you want to change any settings.',
'\nWarning: Authentication is not enforced because some players and API endpoints don\'t fully support it (yet). Please only run the server on localhost (this is the default) to prevent outside connections.\n\nJellyfin server running at http://${jellyfinServerBindIp}:${jellyfinServerPort}\nStop the Jellyfin server if you want to change any settings.',
),
],
),
Expand Down
74 changes: 73 additions & 1 deletion lib/page/settings/remotes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class _RemotesSettingsPageState extends State<RemotesSettingsPage> {
await showInfoDialog(
context,
'Create remote manually',
'Warning: You can break quite a lot of things with this tool. Please only use it when you know what you\'re doing',
'Warning: You can break quite a lot of things with this tool. Please only use it if you know what you\'re doing',
);
final res = await showTextInputDialog(
context: context,
Expand All @@ -63,6 +63,7 @@ class _RemotesSettingsPageState extends State<RemotesSettingsPage> {
storageService.dac.customRemotes[res[0]] = json.decode(res[1]);

await storageService.dac.saveRemotes();
storageService.dac.loadRemotes();
context.pop();
setState(() {});
} catch (e, st) {
Expand Down Expand Up @@ -94,6 +95,77 @@ class _RemotesSettingsPageState extends State<RemotesSettingsPage> {
SelectableText(
'${json.encode(storageService.dac.customRemotes[id])}',
),
SizedBox(
height: 8,
),
ElevatedButton(
onPressed: () async {
final res = await showTextInputDialog(
context: context,
textFields: [
DialogTextField(hintText: 'uri'),
],
);
try {
showLoadingDialog(context, 'updating...');
final String uri = res![0];
final map = storageService.dac.customRemotes[id]!;
map['used_for_uris'] ??= [];

map['used_for_uris'].add(uri);

storageService.dac.customRemotes[id] = map;

await storageService.dac.saveRemotes();
storageService.dac.loadRemotes();
context.pop();
setState(() {});
} catch (e, st) {
context.pop();
setState(() {});
showErrorDialog(context, e, st);
}
},
child: Text(
'Add SkyFS path',
),
),
for (final uri in storageService
.dac.customRemotes[id]!['used_for_uris'] ??
[])
Row(
children: [
Flexible(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: SelectableText(uri),
),
),
TextButton(
onPressed: () async {
try {
showLoadingDialog(context, 'removing uri...');

final map = storageService.dac.customRemotes[id]!;
map['used_for_uris'].remove(uri);
storageService.dac.customRemotes[id] = map;

await storageService.dac.saveRemotes();
storageService.dac.loadRemotes();
context.pop();
setState(() {});
} catch (e, st) {
context.pop();
setState(() {});
showErrorDialog(context, e, st);
}
},
child: Text(
'Remove',
),
)
],
),
],
),
),
Expand Down
2 changes: 1 addition & 1 deletion lib/page/settings/web_server.dart
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class _WebServerSettingsPageState extends State<WebServerSettingsPage> {
Padding(
padding: const EdgeInsets.all(16.0),
child: SelectableText(
'Web server running at ${webServerBindIp}:${webServerPort}/home/\nStop the web server if you want to change any settings.',
'Web server running at http://${webServerBindIp}:${webServerPort}/home/\nStop the web server if you want to change any settings.',
),
),
],
Expand Down
2 changes: 1 addition & 1 deletion lib/page/settings/webdav.dart
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class _WebDavSettingsPageState extends State<WebDavSettingsPage> {
Padding(
padding: const EdgeInsets.all(16.0),
child: SelectableText(
'WebDav server running at ${webDavServerBindIp}:${webDavServerPort}\nStop the WebDav server if you want to change any settings.',
'WebDav server running at http://${webDavServerBindIp}:${webDavServerPort}\nStop the WebDav server if you want to change any settings.',
),
),
],
Expand Down
10 changes: 6 additions & 4 deletions lib/service/mysky.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ class MySkyService extends VupService {

late final Vault<String> usedMySkyPathsVault;

final useSecureStorage = true;

void setup(String cookie) {
final dbDir = Directory(join(
vupDataDir,
Expand Down Expand Up @@ -80,7 +82,7 @@ class MySkyService extends VupService {

dataBox.put('deviceId', newDeviceId);
}
Future.delayed(Duration(seconds: 50)).then((value) {
Future.delayed(const Duration(seconds: 50)).then((value) {
updateDeviceList();
});
}
Expand Down Expand Up @@ -131,7 +133,7 @@ class MySkyService extends VupService {

secureStorage = const FlutterSecureStorage();

if (!Platform.isMacOS) {
if (!Platform.isMacOS && useSecureStorage) {
if (dataBox.containsKey('seed')) {
await secureStorage.write(key: 'seed', value: dataBox.get('seed'));
await dataBox.delete('seed');
Expand All @@ -144,15 +146,15 @@ class MySkyService extends VupService {
}

Future<void> storeSeedPhrase(String seed) async {
if (!Platform.isMacOS) {
if (!Platform.isMacOS && useSecureStorage) {
await secureStorage.write(key: 'seed', value: seed);
} else {
await dataBox.put('seed', seed);
}
}

Future<String?> loadSeedPhrase() async {
if (!Platform.isMacOS) {
if (!Platform.isMacOS && useSecureStorage) {
return secureStorage.read(key: 'seed');
} else {
return dataBox.get('seed');
Expand Down
Loading

0 comments on commit 24208f2

Please sign in to comment.