Compare commits

...

4 Commits

Author SHA1 Message Date
Марков Сергей Викторович 0aaef61e46 file picker and share support for aurora 9 months ago
Марков Сергей Викторович 96764ad072 aurora support 10 months ago
Марков Сергей Викторович df629913ea aurora platform is add 12 months ago
Сергей Марков 2c9430c3b7 Create Aurora env 1 year ago
  1. 21
      .vscode/c_cpp_properties.json
  2. 26
      .vscode/launch.json
  3. 78
      .vscode/settings.json
  4. 47
      packages/app/.gitignore
  5. 17
      packages/app/.metadata
  6. 1
      packages/app/aurora/.gitignore
  7. 47
      packages/app/aurora/CMakeLists.txt
  8. 28
      packages/app/aurora/desktop/su.markow.nextcloud-neon.desktop
  9. BIN
      packages/app/aurora/icons/108x108.png
  10. BIN
      packages/app/aurora/icons/128x128.png
  11. BIN
      packages/app/aurora/icons/172x172.png
  12. BIN
      packages/app/aurora/icons/86x86.png
  13. 12
      packages/app/aurora/main.cpp
  14. 34
      packages/app/aurora/rpm/su.markow.nextcloud-neon.spec
  15. 2
      packages/app/de.provokateurin.neon.yaml
  16. 4
      packages/app/linux/CMakeLists.txt
  17. 4
      packages/app/linux/flutter/generated_plugin_registrant.cc
  18. 2
      packages/app/linux/flutter/generated_plugins.cmake
  19. 263
      packages/app/pubspec.lock
  20. 35
      packages/app/pubspec.yaml
  21. 15
      packages/neon/neon/lib/l10n/localizations.dart
  22. 15
      packages/neon/neon/lib/l10n/localizations_en.dart
  23. 3
      packages/neon/neon/lib/src/app.dart
  24. 155
      packages/neon/neon/lib/src/pages/aurora_login_qr_code.dart
  25. 2
      packages/neon/neon/lib/src/pages/settings.dart
  26. 6
      packages/neon/neon/lib/src/platform/android.dart
  27. 51
      packages/neon/neon/lib/src/platform/aurora.dart
  28. 4
      packages/neon/neon/lib/src/platform/linux.dart
  29. 5
      packages/neon/neon/lib/src/platform/platform.dart
  30. 7
      packages/neon/neon/lib/src/router.dart
  31. 168
      packages/neon/neon/lib/src/settings/models/storage.dart
  32. 7
      packages/neon/neon/lib/src/utils/adaptive.dart
  33. 7
      packages/neon/neon/lib/src/utils/global_options.dart
  34. 7
      packages/neon/neon/lib/src/utils/request_manager.dart
  35. 2
      packages/neon/neon/lib/src/utils/save_file.dart
  36. 26
      packages/neon/neon/lib/src/widgets/adaptive_widgets/list_tile.dart
  37. 12
      packages/neon/neon/pubspec.yaml
  38. 15
      packages/neon/neon_dashboard/lib/l10n/localizations.dart
  39. 4
      packages/neon/neon_files/lib/blocs/files.dart
  40. 1
      packages/neon/neon_files/lib/dialogs/choose_create.dart
  41. 15
      packages/neon/neon_files/lib/l10n/localizations.dart
  42. 2
      packages/neon/neon_files/lib/neon_files.dart
  43. 15
      packages/neon/neon_files/pubspec.yaml
  44. 15
      packages/neon/neon_news/lib/l10n/localizations.dart
  45. 15
      packages/neon/neon_notes/lib/l10n/localizations.dart
  46. 15
      packages/neon/neon_notifications/lib/l10n/localizations.dart

21
.vscode/c_cpp_properties.json vendored

@ -0,0 +1,21 @@
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**",
"${workspaceFolder}/external/share_plus_aurora/aurora/include/**",
"/home/mars/Aurora_Platform_SDK_4.0.2.303/targets/AuroraOS-4.0.2.303-base-armv7hl/usr/include/flutter-embedder/**",
"/home/mars/Aurora_Platform_SDK_4.0.2.303/targets/AuroraOS-4.0.2.303-base-armv7hl/usr/include/qt5/**",
"/home/mars/Aurora_Platform_SDK_4.0.2.303/targets/AuroraOS-4.0.2.303-base-armv7hl/usr/include/auroraapp"
],
"defines": [],
"compilerPath": "/usr/bin/clang",
"cStandard": "c17",
"cppStandard": "c++14",
"intelliSenseMode": "linux-clang-x64",
"configurationProvider": "ms-vscode.cmake-tools"
}
],
"version": 4
}

26
.vscode/launch.json vendored

@ -2,24 +2,16 @@
"version": "0.2.0", "version": "0.2.0",
"configurations": [ "configurations": [
{ {
"name": "app", "name": "Attach with GDB",
"cwd": "packages/app", "type": "cppdbg",
"request": "launch", "request": "launch",
"type": "dart" "program": "./packages/app/build/aurora/psdk_4.0.2.303/aurora-arm/debug/su.markow.nextcloud-neon",
}, "MIMode": "gdb",
{ "miDebuggerPath": "/home/mars/.local/opt/gdb-14.1/bin/gdb",
"name": "app (profile mode)", "miDebuggerServerAddress": "192.168.1.95:10005",
"cwd": "packages/app", "useExtendedRemote": true,
"request": "launch", "cwd": "${workspaceRoot}",
"type": "dart", "visualizerFile": "/home/mars/.config/Code/User/workspaceStorage/fea3d830734d8233dc16614e19dcbb1c/tonka3000.qtvsctools/qt.natvis.xml"
"flutterMode": "profile"
},
{
"name": "app (release mode)",
"cwd": "packages/app",
"request": "launch",
"type": "dart",
"flutterMode": "release"
} }
] ]
} }

78
.vscode/settings.json vendored

@ -1,7 +1,7 @@
{ {
"dart.lineLength": 120, "dart.lineLength": 120,
"yaml.format.singleQuote": true, "yaml.format.singleQuote": true,
"dart.flutterSdkPath": ".fvm/flutter_sdk", "dart.flutterSdkPath": "/home/mars/.local/opt/flutter",
"files.insertFinalNewline": true, "files.insertFinalNewline": true,
"search.exclude": { "search.exclude": {
"**/.fvm": true "**/.fvm": true
@ -11,5 +11,79 @@
}, },
"files.associations": { "files.associations": {
"*.arb": "json", "*.arb": "json",
} "cctype": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cwchar": "cpp",
"cwctype": "cpp",
"any": "cpp",
"array": "cpp",
"atomic": "cpp",
"bit": "cpp",
"*.tcc": "cpp",
"bitset": "cpp",
"chrono": "cpp",
"codecvt": "cpp",
"compare": "cpp",
"complex": "cpp",
"concepts": "cpp",
"condition_variable": "cpp",
"coroutine": "cpp",
"cstdint": "cpp",
"deque": "cpp",
"forward_list": "cpp",
"list": "cpp",
"map": "cpp",
"set": "cpp",
"unordered_map": "cpp",
"unordered_set": "cpp",
"vector": "cpp",
"exception": "cpp",
"algorithm": "cpp",
"functional": "cpp",
"iterator": "cpp",
"memory": "cpp",
"memory_resource": "cpp",
"numeric": "cpp",
"optional": "cpp",
"random": "cpp",
"ratio": "cpp",
"string": "cpp",
"string_view": "cpp",
"system_error": "cpp",
"tuple": "cpp",
"type_traits": "cpp",
"utility": "cpp",
"fstream": "cpp",
"future": "cpp",
"initializer_list": "cpp",
"iomanip": "cpp",
"iosfwd": "cpp",
"iostream": "cpp",
"istream": "cpp",
"limits": "cpp",
"mutex": "cpp",
"new": "cpp",
"ostream": "cpp",
"ranges": "cpp",
"shared_mutex": "cpp",
"sstream": "cpp",
"stdexcept": "cpp",
"stop_token": "cpp",
"streambuf": "cpp",
"thread": "cpp",
"cinttypes": "cpp",
"typeindex": "cpp",
"typeinfo": "cpp",
"valarray": "cpp",
"variant": "cpp",
"qdbusconnectioninterface": "cpp"
},
"cmake.sourceDirectory": "/home/mars/dev/aurora/neon/external/share_plus_aurora/aurora"
} }

47
packages/app/.gitignore vendored

@ -0,0 +1,47 @@
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
migrate_working_dir/
# IntelliJ related
*.iml
*.ipr
*.iws
.idea/
# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/
# Flutter/Dart/Pub related
**/doc/api/
**/ios/Flutter/.last_build_id
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.packages
.pub-cache/
.pub/
/build/
# Symbolication related
app.*.symbols
# Obfuscation related
app.*.map.json
# Android Studio will place build artifacts here
/android/app/debug
/android/app/profile
/android/app/release
# Aurora generated
/aurora/flutter

17
packages/app/.metadata

@ -4,8 +4,8 @@
# This file should be version controlled and should not be manually edited. # This file should be version controlled and should not be manually edited.
version: version:
revision: "ead455963c12b453cdb2358cad34969c76daf180" revision: "2828ddd9a707d09af00b793a42faaa0f0e2b957f"
channel: "stable" channel: "master"
project_type: app project_type: app
@ -13,14 +13,11 @@ project_type: app
migration: migration:
platforms: platforms:
- platform: root - platform: root
create_revision: ead455963c12b453cdb2358cad34969c76daf180 create_revision: 2828ddd9a707d09af00b793a42faaa0f0e2b957f
base_revision: ead455963c12b453cdb2358cad34969c76daf180 base_revision: 2828ddd9a707d09af00b793a42faaa0f0e2b957f
- platform: android - platform: aurora
create_revision: ead455963c12b453cdb2358cad34969c76daf180 create_revision: 2828ddd9a707d09af00b793a42faaa0f0e2b957f
base_revision: ead455963c12b453cdb2358cad34969c76daf180 base_revision: 2828ddd9a707d09af00b793a42faaa0f0e2b957f
- platform: linux
create_revision: ead455963c12b453cdb2358cad34969c76daf180
base_revision: ead455963c12b453cdb2358cad34969c76daf180
# User provided section # User provided section

1
packages/app/aurora/.gitignore vendored

@ -0,0 +1 @@
flutter/ephemeral

47
packages/app/aurora/CMakeLists.txt

@ -0,0 +1,47 @@
cmake_minimum_required(VERSION 3.10)
project(su.markow.nextcloud-neon LANGUAGES CXX)
include(GNUInstallDirs)
set(BINARY_NAME ${CMAKE_PROJECT_NAME})
set(FLUTTER_DIR ${CMAKE_CURRENT_SOURCE_DIR}/flutter)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_FLAGS "-Wall -Wextra")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
set(CMAKE_SKIP_RPATH OFF)
set(CMAKE_INSTALL_RPATH "\$ORIGIN/../share/${BINARY_NAME}/lib")
find_package(PkgConfig REQUIRED)
pkg_check_modules(FlutterEmbedder REQUIRED IMPORTED_TARGET flutter-embedder)
add_executable(${BINARY_NAME} main.cpp ${FLUTTER_DIR}/generated_plugin_registrant.cpp)
target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::FlutterEmbedder)
target_include_directories(${BINARY_NAME} PRIVATE ${FLUTTER_DIR})
include(flutter/generated_plugins.cmake)
set(PACKAGE_INSTALL_DIR ${CMAKE_INSTALL_DATADIR}/${BINARY_NAME})
set(DESKTOP_INSTALL_DIR ${CMAKE_INSTALL_DATADIR}/applications)
set(ICONS_INSTALL_ROOT_DIR ${CMAKE_INSTALL_DATADIR}/icons/hicolor)
add_custom_command(TARGET ${BINARY_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/libflutter-embedder.so
${PROJECT_BINARY_DIR}/bundle/lib/libflutter-embedder.so)
install(FILES ${PROJECT_BINARY_DIR}/bundle/icudtl.dat DESTINATION ${PACKAGE_INSTALL_DIR})
install(DIRECTORY ${PROJECT_BINARY_DIR}/bundle/flutter_assets DESTINATION ${PACKAGE_INSTALL_DIR})
install(DIRECTORY ${PROJECT_BINARY_DIR}/bundle/lib DESTINATION ${PACKAGE_INSTALL_DIR})
install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES desktop/${BINARY_NAME}.desktop DESTINATION ${DESKTOP_INSTALL_DIR})
foreach(ICONS_SIZE 86x86 108x108 128x128 172x172)
install(FILES icons/${ICONS_SIZE}.png
RENAME ${BINARY_NAME}.png
DESTINATION ${ICONS_INSTALL_ROOT_DIR}/${ICONS_SIZE}/apps/)
endforeach(ICONS_SIZE)

28
packages/app/aurora/desktop/su.markow.nextcloud-neon.desktop

@ -0,0 +1,28 @@
[Desktop Entry]
Type=Application
Name=nextcloud-neon
Comment=A new Flutter project.
Icon=su.markow.nextcloud-neon
Exec=/usr/bin/su.markow.nextcloud-neon
#X-Nemo-Application-Type=silica-qt5
#X-Share-Methods=files;
#X-Maemo-Service=su.markow.nextcloud-neon
#X-Maemo-Method=su.markow.nextcloud-neon.activateWindow
[X-Application]
Permissions=SecureStorage;UserDirs;Internet;Camera;Sharing
OrganizationName=su.markow
ApplicationName=nextcloud-neon
#ExecDBus=/usr/bin/su.markow.nextcloud-neon --dbus-launch
[X-Sailjail]
Permissions=Sensors;SecureStorage;PushNotifications;DeviceInfo;Audio;Bluetooth;Camera;Internet;Location;MediaIndexing;Microphone;RemovableMedia;UserDirs
OrganizationName=su.markow
ApplicationName=nextcloud-neon
#ExecDBus=usr/bin/su.markow.nextcloud --dbus-launch
#[X-Share Method files]
#Description=Nextcloud file share
#Description[ru]=Nextcloud обмена изображениями
#Capabilities=*/*
#SupportsMultipleFiles=yes

BIN
packages/app/aurora/icons/108x108.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

BIN
packages/app/aurora/icons/128x128.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

BIN
packages/app/aurora/icons/172x172.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

BIN
packages/app/aurora/icons/86x86.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

12
packages/app/aurora/main.cpp

@ -0,0 +1,12 @@
#include <flutter/application.h>
#include "generated_plugin_registrant.h"
#include <cstdio>
int main(int argc, char *argv[]) {
//freopen("/home/defaultuser/Downloads/nextcloud.debug.out.txt", "w", stdout);
//freopen("/home/defaultuser/Downloads/nextcloud.debug.err.txt", "w", stderr);
Application::Initialize(argc, argv);
RegisterPlugins();
Application::Launch();
return 0;
}

34
packages/app/aurora/rpm/su.markow.nextcloud-neon.spec

@ -0,0 +1,34 @@
%global __provides_exclude_from ^%{_datadir}/%{name}/lib/.*$
%global __requires_exclude ^lib(yuv|ZXing|jpeg|dconf|flutter-embedder|maliit-glib|.+_platform_plugin)\\.so.*$
Name: su.markow.nextcloud-neon
Summary: A new Flutter project.
Version: 0.1.0
Release: 1
License: Proprietary
Source0: %{name}-%{version}.tar.zst
BuildRequires: cmake
BuildRequires: pkgconfig(flutter-embedder)
BuildRequires: pkgconfig(sqlite3)
BuildRequires: pkgconfig(streamcamera)
BuildRequires: pkgconfig(Qt5DBus)
%description
%{summary}.
%prep
%autosetup
%build
%cmake -DCMAKE_BUILD_TYPE=%{_flutter_build_type} -DPSDK_VERSION=%{_flutter_psdk_version} -DPSDK_MAJOR=%{_flutter_psdk_major}
%make_build
%install
%make_install
%files
%{_bindir}/%{name}
%{_datadir}/%{name}/*
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.png

2
packages/app/de.provokateurin.neon.yaml

@ -9,7 +9,7 @@ finish-args:
- --socket=wayland - --socket=wayland
- --share=network - --share=network
- --device=dri - --device=dri
- --env=LD_LIBRARY_PATH=/app/lib/:/app/nextcloud-neon/lib/ - --env=LD_LIBRARY_PATH=/app/lib/:/app/nextcloud-neon/lib/:/usr/lib
modules: modules:
- ../../external/flathub-shared-modules/libappindicator/libappindicator-gtk3-12.10.json - ../../external/flathub-shared-modules/libappindicator/libappindicator-gtk3-12.10.json
- name: aarch64-quirks - name: aarch64-quirks

4
packages/app/linux/CMakeLists.txt

@ -95,9 +95,9 @@ include(flutter/generated_plugins.cmake)
# By default, "installing" just makes a relocatable bundle in the build # By default, "installing" just makes a relocatable bundle in the build
# directory. # directory.
set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle") set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle")
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) #if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE)
endif() #endif()
# Start with a clean build bundle directory every time. # Start with a clean build bundle directory every time.
install(CODE " install(CODE "

4
packages/app/linux/flutter/generated_plugin_registrant.cc

@ -8,6 +8,7 @@
#include <dynamic_color/dynamic_color_plugin.h> #include <dynamic_color/dynamic_color_plugin.h>
#include <file_selector_linux/file_selector_plugin.h> #include <file_selector_linux/file_selector_plugin.h>
#include <flutter_secure_storage_linux/flutter_secure_storage_linux_plugin.h>
#include <screen_retriever/screen_retriever_plugin.h> #include <screen_retriever/screen_retriever_plugin.h>
#include <tray_manager/tray_manager_plugin.h> #include <tray_manager/tray_manager_plugin.h>
#include <url_launcher_linux/url_launcher_plugin.h> #include <url_launcher_linux/url_launcher_plugin.h>
@ -20,6 +21,9 @@ void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) file_selector_linux_registrar = g_autoptr(FlPluginRegistrar) file_selector_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "FileSelectorPlugin"); fl_plugin_registry_get_registrar_for_plugin(registry, "FileSelectorPlugin");
file_selector_plugin_register_with_registrar(file_selector_linux_registrar); file_selector_plugin_register_with_registrar(file_selector_linux_registrar);
g_autoptr(FlPluginRegistrar) flutter_secure_storage_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterSecureStorageLinuxPlugin");
flutter_secure_storage_linux_plugin_register_with_registrar(flutter_secure_storage_linux_registrar);
g_autoptr(FlPluginRegistrar) screen_retriever_registrar = g_autoptr(FlPluginRegistrar) screen_retriever_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "ScreenRetrieverPlugin"); fl_plugin_registry_get_registrar_for_plugin(registry, "ScreenRetrieverPlugin");
screen_retriever_plugin_register_with_registrar(screen_retriever_registrar); screen_retriever_plugin_register_with_registrar(screen_retriever_registrar);

2
packages/app/linux/flutter/generated_plugins.cmake

@ -5,6 +5,7 @@
list(APPEND FLUTTER_PLUGIN_LIST list(APPEND FLUTTER_PLUGIN_LIST
dynamic_color dynamic_color
file_selector_linux file_selector_linux
flutter_secure_storage_linux
screen_retriever screen_retriever
tray_manager tray_manager
url_launcher_linux url_launcher_linux
@ -12,6 +13,7 @@ list(APPEND FLUTTER_PLUGIN_LIST
) )
list(APPEND FLUTTER_FFI_PLUGIN_LIST list(APPEND FLUTTER_FFI_PLUGIN_LIST
camera_linux
flutter_zxing flutter_zxing
) )

263
packages/app/pubspec.lock

@ -1,6 +1,14 @@
# Generated by pub # Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile # See https://dart.dev/tools/pub/glossary#lockfile
packages: packages:
ansicolor:
dependency: transitive
description:
name: ansicolor
sha256: "8bf17a8ff6ea17499e40a2d2542c2f481cd7615760c6d34065cb22bfd22e6880"
url: "https://pub.dev"
source: hosted
version: "2.0.2"
archive: archive:
dependency: transitive dependency: transitive
description: description:
@ -61,12 +69,12 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: built_value name: built_value
sha256: "723b4021e903217dfc445ec4cf5b42e27975aece1fc4ebbc1ca6329c2d9fb54e" sha256: "69acb7007eb2a31dc901512bfe0f7b767168be34cb734835d54c070bfa74c1b2"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "8.7.0" version: "8.8.0"
camera: camera:
dependency: transitive dependency: "direct main"
description: description:
name: camera name: camera
sha256: "1f9010f0689774380fbcd7d6b7820a5157e8e97685fa66d619e1d1f58b3fdf93" sha256: "1f9010f0689774380fbcd7d6b7820a5157e8e97685fa66d619e1d1f58b3fdf93"
@ -81,6 +89,15 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.10.8+13" version: "0.10.8+13"
camera_aurora:
dependency: "direct main"
description:
path: "packages/camera/camera_aurora"
ref: "camera_aurora-0.0.1"
resolved-ref: c60d7e18a052dcefaf790f41272949551c421a47
url: "https://gitlab.com/omprussia/flutter/flutter-plugins.git"
source: git
version: "0.0.1"
camera_avfoundation: camera_avfoundation:
dependency: transitive dependency: transitive
description: description:
@ -89,6 +106,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.9.13+7" version: "0.9.13+7"
camera_linux:
dependency: "direct main"
description:
name: camera_linux
sha256: "6ea08c23f643364e650e8fad73653747c049cbd00803a7c317132379ee3653ac"
url: "https://pub.dev"
source: hosted
version: "0.0.8"
camera_platform_interface: camera_platform_interface:
dependency: transitive dependency: transitive
description: description:
@ -133,10 +158,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: collection name: collection
sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687 sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.17.2" version: "1.18.0"
convert: convert:
dependency: transitive dependency: transitive
description: description:
@ -157,10 +182,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: cross_file name: cross_file
sha256: "445db18de832dba8d851e287aff8ccf169bed30d2e94243cb54c7d2f1ed2142c" sha256: "2f9d2cbccb76127ba28528cb3ae2c2326a122446a83de5a056aaa3880d3882c5"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.3.3+6" version: "0.3.3+7"
crypto: crypto:
dependency: transitive dependency: transitive
description: description:
@ -197,10 +222,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: dbus name: dbus
sha256: "6f07cba3f7b3448d42d015bfd3d53fe12e5b36da2423f23838efc1d5fb31a263" sha256: "365c771ac3b0e58845f39ec6deebc76e3276aa9922b0cc60840712094d9047ac"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.7.8" version: "0.7.10"
dependency_validator: dependency_validator:
dependency: transitive dependency: transitive
description: description:
@ -224,6 +249,14 @@ packages:
relative: true relative: true
source: path source: path
version: "1.0.0" version: "1.0.0"
encrypt:
dependency: transitive
description:
name: encrypt
sha256: "62d9aa4670cc2a8798bab89b39fc71b6dfbacf615de6cf5001fb39f7e4a996a2"
url: "https://pub.dev"
source: hosted
version: "5.0.3"
fake_async: fake_async:
dependency: transitive dependency: transitive
description: description:
@ -255,14 +288,31 @@ packages:
relative: true relative: true
source: path source: path
version: "1.0.0" version: "1.0.0"
file_picker: file_manager:
dependency: transitive dependency: transitive
description:
name: file_manager
sha256: "72c3ec25614ca7a115995db5ca6a7fe84ab3e9b9280e7ab25ab50b9c892f437e"
url: "https://pub.dev"
source: hosted
version: "1.0.2"
file_picker:
dependency: "direct main"
description: description:
name: file_picker name: file_picker
sha256: "4e42aacde3b993c5947467ab640882c56947d9d27342a5b6f2895b23956954a6" sha256: "4e42aacde3b993c5947467ab640882c56947d9d27342a5b6f2895b23956954a6"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "6.1.1" version: "6.1.1"
file_picker_aurora:
dependency: "direct main"
description:
path: "packages/file_picker/file_picker_aurora"
ref: file_picker_aurora
resolved-ref: fbcaeb1e3a8cb5118737529dd9d21eba1ff29913
url: "https://gitlab.com/hooky-mars/flutter-plugins.git"
source: git
version: "0.0.1"
file_selector_linux: file_selector_linux:
dependency: transitive dependency: transitive
description: description:
@ -349,10 +399,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: flutter_local_notifications name: flutter_local_notifications
sha256: "6d11ea777496061e583623aaf31923f93a9409ef8fcaeeefdd6cd78bf4fe5bb3" sha256: bb5cd63ff7c91d6efe452e41d0d0ae6348925c82eafd10ce170ef585ea04776e
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "16.1.0" version: "16.2.0"
flutter_local_notifications_linux: flutter_local_notifications_linux:
dependency: transitive dependency: transitive
description: description:
@ -394,10 +444,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: flutter_native_splash name: flutter_native_splash
sha256: d93394f22f73e810bda59e11ebe83329c5511d6460b6b7509c4e1f3c92d6d625 sha256: c4d899312b36e7454bedfd0a4740275837b99e532d81c8477579d8183db1de6c
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.3.5" version: "2.3.6"
flutter_plugin_android_lifecycle: flutter_plugin_android_lifecycle:
dependency: transitive dependency: transitive
description: description:
@ -406,6 +456,63 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.0.17" version: "2.0.17"
flutter_secure_storage:
dependency: "direct main"
description:
name: flutter_secure_storage
sha256: "22dbf16f23a4bcf9d35e51be1c84ad5bb6f627750565edd70dab70f3ff5fff8f"
url: "https://pub.dev"
source: hosted
version: "8.1.0"
flutter_secure_storage_aurora:
dependency: "direct main"
description:
path: "packages/flutter_secure_storage/flutter_secure_storage_aurora"
ref: "flutter_secure_storage_aurora-0.0.1"
resolved-ref: "569e04ade1870ee39b64a75dd2258fa463725de8"
url: "https://gitlab.com/omprussia/flutter/flutter-plugins.git"
source: git
version: "0.0.1"
flutter_secure_storage_linux:
dependency: transitive
description:
name: flutter_secure_storage_linux
sha256: "3d5032e314774ee0e1a7d0a9f5e2793486f0dff2dd9ef5a23f4e3fb2a0ae6a9e"
url: "https://pub.dev"
source: hosted
version: "1.2.0"
flutter_secure_storage_macos:
dependency: transitive
description:
name: flutter_secure_storage_macos
sha256: bd33935b4b628abd0b86c8ca20655c5b36275c3a3f5194769a7b3f37c905369c
url: "https://pub.dev"
source: hosted
version: "3.0.1"
flutter_secure_storage_platform_interface:
dependency: transitive
description:
name: flutter_secure_storage_platform_interface
sha256: "0d4d3a5dd4db28c96ae414d7ba3b8422fd735a8255642774803b2532c9a61d7e"
url: "https://pub.dev"
source: hosted
version: "1.0.2"
flutter_secure_storage_web:
dependency: transitive
description:
name: flutter_secure_storage_web
sha256: "30f84f102df9dcdaa2241866a958c2ec976902ebdaa8883fbfe525f1f2f3cf20"
url: "https://pub.dev"
source: hosted
version: "1.1.2"
flutter_secure_storage_windows:
dependency: transitive
description:
name: flutter_secure_storage_windows
sha256: "38f9501c7cb6f38961ef0e1eacacee2b2d4715c63cc83fe56449c4d3d0b47255"
url: "https://pub.dev"
source: hosted
version: "2.1.1"
flutter_svg: flutter_svg:
dependency: transitive dependency: transitive
description: description:
@ -646,10 +753,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: meta name: meta
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.9.1" version: "1.10.0"
mime: mime:
dependency: transitive dependency: transitive
description: description:
@ -742,10 +849,19 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: package_info_plus name: package_info_plus
sha256: "7e76fad405b3e4016cd39d08f455a4eb5199723cf594cd1b8916d47140d93017" sha256: "6ff267fcd9d48cb61c8df74a82680e8b82e940231bb5f68356672fde0397334a"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "4.2.0" version: "4.1.0"
package_info_plus_aurora:
dependency: transitive
description:
path: "packages/package_info_plus/package_info_plus_aurora"
ref: "package_info_plus_aurora-0.0.1"
resolved-ref: "5d3895d6b876a7c5239d66569ee1c59175713d34"
url: "https://gitlab.com/omprussia/flutter/flutter-plugins.git"
source: git
version: "0.0.1"
package_info_plus_platform_interface: package_info_plus_platform_interface:
dependency: transitive dependency: transitive
description: description:
@ -771,13 +887,13 @@ packages:
source: hosted source: hosted
version: "1.0.1" version: "1.0.1"
path_provider: path_provider:
dependency: transitive dependency: "direct main"
description: description:
name: path_provider name: path_provider
sha256: a1aa8aaa2542a6bc57e381f132af822420216c80d4781f7aa085ca3229208aaa sha256: b27217933eeeba8ff24845c34003b003b2b22151de3c908d0e679e8fe1aa078b
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.1" version: "2.1.2"
path_provider_android: path_provider_android:
dependency: transitive dependency: transitive
description: description:
@ -786,6 +902,15 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.2.1" version: "2.2.1"
path_provider_aurora:
dependency: "direct main"
description:
path: "packages/path_provider/path_provider_aurora"
ref: "path_provider_aurora-0.0.1"
resolved-ref: "4f2de1bfd4d111803553794327208609f1512016"
url: "https://gitlab.com/omprussia/flutter/flutter-plugins.git"
source: git
version: "0.0.1"
path_provider_foundation: path_provider_foundation:
dependency: transitive dependency: transitive
description: description:
@ -870,18 +995,18 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: platform name: platform
sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76" sha256: ae68c7bfcd7383af3629daafb32fb4e8681c7154428da4febcff06200585f102
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.1.0" version: "3.1.2"
plugin_platform_interface: plugin_platform_interface:
dependency: transitive dependency: transitive
description: description:
name: plugin_platform_interface name: plugin_platform_interface
sha256: da3fdfeccc4d4ff2da8f8c556704c08f912542c5fb3cf2233ed75372384a034d sha256: f4f88d4a900933e7267e2b353594774fc0d07fb072b47eedcd5b54e1ea3269f8
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.6" version: "2.1.7"
pointycastle: pointycastle:
dependency: transitive dependency: transitive
description: description:
@ -1002,6 +1127,15 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "7.2.1" version: "7.2.1"
share_plus_aurora:
dependency: transitive
description:
path: "packages/share_plus/share_plus_aurora"
ref: "share_plus_aurora-0.0.1"
resolved-ref: c089fd68e49a81017706de26d8897d91377bbbc3
url: "https://gitlab.com/hooky-mars/flutter-plugins.git"
source: git
version: "0.0.1"
share_plus_platform_interface: share_plus_platform_interface:
dependency: transitive dependency: transitive
description: description:
@ -1026,6 +1160,15 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.2.1" version: "2.2.1"
shared_preferences_aurora:
dependency: transitive
description:
path: "packages/shared_preferences/shared_preferences_aurora"
ref: "shared_preferences_aurora-0.0.1"
resolved-ref: "52c11f10424ea5c699a537a9a782eaa1bf596d5d"
url: "https://gitlab.com/omprussia/flutter/flutter-plugins.git"
source: git
version: "0.0.1"
shared_preferences_foundation: shared_preferences_foundation:
dependency: transitive dependency: transitive
description: description:
@ -1103,29 +1246,38 @@ packages:
source: hosted source: hosted
version: "7.0.0" version: "7.0.0"
sqflite: sqflite:
dependency: transitive dependency: "direct main"
description: description:
name: sqflite name: sqflite
sha256: "591f1602816e9c31377d5f008c2d9ef7b8aca8941c3f89cc5fd9d84da0c38a9a" sha256: "591f1602816e9c31377d5f008c2d9ef7b8aca8941c3f89cc5fd9d84da0c38a9a"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.3.0" version: "2.3.0"
sqflite_aurora:
dependency: "direct main"
description:
path: "packages/sqflite/sqflite_aurora"
ref: master
resolved-ref: "9c83303f10ec396bbb008e983659382ef69d4577"
url: "https://gitlab.com/omprussia/flutter/flutter-plugins.git"
source: git
version: "2.2.6+aurora1"
sqflite_common: sqflite_common:
dependency: transitive dependency: transitive
description: description:
name: sqflite_common name: sqflite_common
sha256: "8ed044102f3135add97be8653662052838859f5400075ef227f8ad72ae320803" sha256: bb4738f15b23352822f4c42a531677e5c6f522e079461fd240ead29d8d8a54a6
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.5.0+1" version: "2.5.0+2"
sqflite_common_ffi: sqflite_common_ffi:
dependency: transitive dependency: transitive
description: description:
name: sqflite_common_ffi name: sqflite_common_ffi
sha256: "198b40b4a7ba58cca18d7837d0246859b7b4c8b007d2902634fc26dec57fa3f1" sha256: "35d2fce1e971707c227cc4775cc017d5eafe06c2654c3435ebd5c3ad6c170f5f"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.3.0+3" version: "2.3.0+4"
sqlite3: sqlite3:
dependency: transitive dependency: transitive
description: description:
@ -1138,18 +1290,18 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: stack_trace name: stack_trace
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.11.0" version: "1.11.1"
stream_channel: stream_channel:
dependency: transitive dependency: transitive
description: description:
name: stream_channel name: stream_channel
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.1" version: "2.1.2"
stream_transform: stream_transform:
dependency: transitive dependency: transitive
description: description:
@ -1194,10 +1346,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: test_api name: test_api
sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8" sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.6.0" version: "0.6.1"
timezone: timezone:
dependency: transitive dependency: transitive
description: description:
@ -1274,10 +1426,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: url_launcher_ios name: url_launcher_ios
sha256: "4ac97281cf60e2e8c5cc703b2b28528f9b50c8f7cebc71df6bdf0845f647268a" sha256: bba3373219b7abb6b5e0d071b0fe66dfbe005d07517a68e38d4fc3638f35c6d3
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "6.2.0" version: "6.2.1"
url_launcher_linux: url_launcher_linux:
dependency: transitive dependency: transitive
description: description:
@ -1322,10 +1474,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: uuid name: uuid
sha256: df5a4d8f22ee4ccd77f8839ac7cb274ebc11ef9adcce8b92be14b797fe889921 sha256: cd210a09f7c18cbe5a02511718e0334de6559871052c90a90c0cca46a4aa81c8
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "4.2.1" version: "4.3.3"
vector_graphics: vector_graphics:
dependency: "direct main" dependency: "direct main"
description: description:
@ -1370,18 +1522,18 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: vm_service name: vm_service
sha256: c620a6f783fa22436da68e42db7ebbf18b8c44b9a46ab911f666ff09ffd9153f sha256: c538be99af830f478718b51630ec1b6bee5e74e52c8a802d328d9e71d35d2583
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "11.7.1" version: "11.10.0"
wakelock_plus: wakelock_plus:
dependency: transitive dependency: transitive
description: description:
name: wakelock_plus name: wakelock_plus
sha256: f45a6c03aa3f8322e0a9d7f4a0482721c8789cb41d555407367650b8f9c26018 sha256: f268ca2116db22e57577fb99d52515a24bdc1d570f12ac18bb762361d43b043d
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.1.3" version: "1.1.4"
wakelock_plus_platform_interface: wakelock_plus_platform_interface:
dependency: transitive dependency: transitive
description: description:
@ -1394,10 +1546,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: web name: web
sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10 sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.1.4-beta" version: "0.3.0"
webdriver: webdriver:
dependency: transitive dependency: transitive
description: description:
@ -1426,10 +1578,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: webview_flutter_platform_interface name: webview_flutter_platform_interface
sha256: "6d9213c65f1060116757a7c473247c60f3f7f332cac33dc417c9e362a9a13e4f" sha256: adb8c03c2be231bea5a8ed0e9039e9d18dbb049603376beaefa15393ede468a5
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.6.0" version: "2.7.0"
webview_flutter_wkwebview: webview_flutter_wkwebview:
dependency: transitive dependency: transitive
description: description:
@ -1442,10 +1594,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: win32 name: win32
sha256: "350a11abd2d1d97e0cc7a28a81b781c08002aa2864d9e3f192ca0ffa18b06ed3" sha256: "7c99c0e1e2fa190b48d25c81ca5e42036d5cac81430ef249027d97b0935c553f"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "5.0.9" version: "5.1.0"
window_manager: window_manager:
dependency: transitive dependency: transitive
description: description:
@ -1462,6 +1614,15 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.0.3" version: "1.0.3"
xdga_directories:
dependency: transitive
description:
path: "packages/xdga_directories"
ref: "xdga_directories-0.0.1"
resolved-ref: "1869a4da50d080a8a7e8cc159783d83674a3490a"
url: "https://gitlab.com/omprussia/flutter/flutter-plugins.git"
source: git
version: "0.0.1"
xml: xml:
dependency: transitive dependency: transitive
description: description:
@ -1487,5 +1648,5 @@ packages:
source: hosted source: hosted
version: "3.1.2" version: "3.1.2"
sdks: sdks:
dart: ">=3.1.0 <4.0.0" dart: ">=3.2.2 <4.0.0"
flutter: ">=3.13.0" flutter: ">=3.13.0"

35
packages/app/pubspec.yaml

@ -9,6 +9,38 @@ environment:
dependencies: dependencies:
flutter: flutter:
sdk: flutter sdk: flutter
flutter_secure_storage: ^8.0.0
flutter_secure_storage_aurora:
git:
url: https://gitlab.com/omprussia/flutter/flutter-plugins.git
ref: flutter_secure_storage_aurora-0.0.1
path: packages/flutter_secure_storage/flutter_secure_storage_aurora
file_picker: ^6.0.0
file_picker_aurora:
git:
url: https://gitlab.com/hooky-mars/flutter-plugins.git
ref: file_picker_aurora
path: packages/file_picker/file_picker_aurora
camera: ^0.10.5+5
camera_aurora:
git:
url: https://gitlab.com/omprussia/flutter/flutter-plugins.git
ref: camera_aurora-0.0.1
path: packages/camera/camera_aurora
camera_linux: ^0.0.8
sqflite: ^2.3.0
sqflite_aurora:
git:
url: https://gitlab.com/omprussia/flutter/flutter-plugins.git
ref: master
path: packages/sqflite/sqflite_aurora
path_provider: ^2.1.1
path_provider_aurora:
git:
url: https://gitlab.com/omprussia/flutter/flutter-plugins.git
ref: path_provider_aurora-0.0.1
path: packages/path_provider/path_provider_aurora
neon: neon:
git: git:
url: https://github.com/nextcloud/neon url: https://github.com/nextcloud/neon
@ -50,7 +82,8 @@ dev_dependencies:
git: git:
url: https://github.com/nextcloud/neon url: https://github.com/nextcloud/neon
path: packages/nextcloud path: packages/nextcloud
shared_preferences: any shared_preferences: ^2.1.2
vector_graphics_compiler: any vector_graphics_compiler: any
flutter: flutter:

15
packages/neon/neon/lib/l10n/localizations.dart

@ -87,7 +87,9 @@ abstract class NeonLocalizations {
]; ];
/// A list of this localizations delegate's supported locales. /// A list of this localizations delegate's supported locales.
static const List<Locale> supportedLocales = <Locale>[Locale('en')]; static const List<Locale> supportedLocales = <Locale>[
Locale('en')
];
/// No description provided for @nextcloud. /// No description provided for @nextcloud.
/// ///
@ -706,14 +708,17 @@ class _NeonLocalizationsDelegate extends LocalizationsDelegate<NeonLocalizations
} }
NeonLocalizations lookupNeonLocalizations(Locale locale) { NeonLocalizations lookupNeonLocalizations(Locale locale) {
// Lookup logic when only language code is specified. // Lookup logic when only language code is specified.
switch (locale.languageCode) { switch (locale.languageCode) {
case 'en': case 'en': return NeonLocalizationsEn();
return NeonLocalizationsEn();
} }
throw FlutterError('NeonLocalizations.delegate failed to load unsupported locale "$locale". This is likely ' throw FlutterError(
'NeonLocalizations.delegate failed to load unsupported locale "$locale". This is likely '
'an issue with the localizations generation tool. Please file an issue ' 'an issue with the localizations generation tool. Please file an issue '
'on GitHub with a reproducible sample app and the gen-l10n configuration ' 'on GitHub with a reproducible sample app and the gen-l10n configuration '
'that was used.'); 'that was used.'
);
} }

15
packages/neon/neon/lib/l10n/localizations_en.dart

@ -77,8 +77,7 @@ class NeonLocalizationsEn extends NeonLocalizations {
String get errorCredentialsForAccountNoLongerMatch => 'The credentials for this account no longer match'; String get errorCredentialsForAccountNoLongerMatch => 'The credentials for this account no longer match';
@override @override
String get errorServerHadAProblemProcessingYourRequest => String get errorServerHadAProblemProcessingYourRequest => 'The server had a problem while processing your request. You might want to try again';
'The server had a problem while processing your request. You might want to try again';
@override @override
String get errorSomethingWentWrongTryAgainLater => 'Something went wrong. Please try again later'; String get errorSomethingWentWrongTryAgainLater => 'Something went wrong. Please try again later';
@ -95,12 +94,10 @@ class NeonLocalizationsEn extends NeonLocalizations {
String get errorConnectionTimedOut => 'Connection has timed out'; String get errorConnectionTimedOut => 'Connection has timed out';
@override @override
String get errorNoCompatibleNextcloudAppsFound => String get errorNoCompatibleNextcloudAppsFound => 'No compatible Nextcloud apps could be found.\nWe are working hard to implement more and more apps!';
'No compatible Nextcloud apps could be found.\nWe are working hard to implement more and more apps!';
@override @override
String get errorServerInMaintenanceMode => String get errorServerInMaintenanceMode => 'The server is in maintenance mode. Please try again later or contact the server admin.';
'The server is in maintenance mode. Please try again later or contact the server admin.';
@override @override
String errorMissingPermission(String name) { String errorMissingPermission(String name) {
@ -154,8 +151,7 @@ class NeonLocalizationsEn extends NeonLocalizations {
String get nextPushSupported => 'NextPush is supported!'; String get nextPushSupported => 'NextPush is supported!';
@override @override
String get nextPushSupportedText => String get nextPushSupportedText => 'NextPush is a FOSS way of receiving push notifications using the UnifiedPush protocol via a Nextcloud instance.\nYou can install NextPush from the F-Droid app store.';
'NextPush is a FOSS way of receiving push notifications using the UnifiedPush protocol via a Nextcloud instance.\nYou can install NextPush from the F-Droid app store.';
@override @override
String get nextPushSupportedInstall => 'Install NextPush'; String get nextPushSupportedInstall => 'Install NextPush';
@ -258,8 +254,7 @@ class NeonLocalizationsEn extends NeonLocalizations {
String get globalOptionsPushNotificationsEnabled => 'Enabled'; String get globalOptionsPushNotificationsEnabled => 'Enabled';
@override @override
String get globalOptionsPushNotificationsEnabledDisabledNotice => String get globalOptionsPushNotificationsEnabledDisabledNotice => 'No UnifiedPush distributor could be found or you denied the permission for showing notifications. Please go to the app settings and allow notifications and go to https://unifiedpush.org/users/distributors and setup any of the listed distributors. Then re-open this app and you should be able to enable notifications';
'No UnifiedPush distributor could be found or you denied the permission for showing notifications. Please go to the app settings and allow notifications and go to https://unifiedpush.org/users/distributors and setup any of the listed distributors. Then re-open this app and you should be able to enable notifications';
@override @override
String get globalOptionsPushNotificationsDistributor => 'UnifiedPush Distributor'; String get globalOptionsPushNotificationsDistributor => 'UnifiedPush Distributor';

3
packages/neon/neon/lib/src/app.dart

@ -3,6 +3,7 @@ import 'dart:convert';
import 'package:collection/collection.dart'; import 'package:collection/collection.dart';
import 'package:dynamic_color/dynamic_color.dart'; import 'package:dynamic_color/dynamic_color.dart';
import 'package:file_picker_aurora/app_router.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_native_splash/flutter_native_splash.dart'; import 'package:flutter_native_splash/flutter_native_splash.dart';
import 'package:meta/meta.dart'; import 'package:meta/meta.dart';
@ -54,7 +55,7 @@ class NeonApp extends StatefulWidget {
// ignore: prefer_mixin // ignore: prefer_mixin
class _NeonAppState extends State<NeonApp> with WidgetsBindingObserver, tray.TrayListener, WindowListener { class _NeonAppState extends State<NeonApp> with WidgetsBindingObserver, tray.TrayListener, WindowListener {
final _appRegex = RegExp(r'^app_([a-z]+)$', multiLine: true); final _appRegex = RegExp(r'^app_([a-z]+)$', multiLine: true);
final _navigatorKey = GlobalKey<NavigatorState>(); final _navigatorKey = FilePickerAuroraAppRouter.navigatorKey;
late final Iterable<AppImplementation> _appImplementations; late final Iterable<AppImplementation> _appImplementations;
late final GlobalOptions _globalOptions; late final GlobalOptions _globalOptions;
late final AccountsBloc _accountsBloc; late final AccountsBloc _accountsBloc;

155
packages/neon/neon/lib/src/pages/aurora_login_qr_code.dart

@ -0,0 +1,155 @@
import 'dart:async';
import 'dart:math';
import 'dart:ui';
import 'package:camera/camera.dart';
import 'package:camera_aurora/camera_aurora.dart';
import 'package:flutter/material.dart';
import 'package:neon/src/models/account.dart';
import 'package:neon/src/pages/login_qr_code.dart';
import 'package:neon/src/router.dart';
import 'package:neon/widgets.dart';
class AuroraLoginQRcodePage extends StatefulWidget {
const AuroraLoginQRcodePage({super.key});
@override
State<AuroraLoginQRcodePage> createState() => _AuroraLoginQRcodePageState();
}
class _AuroraLoginQRcodePageState extends State<AuroraLoginQRcodePage> {
String? _lastErrorURL;
late Future<CameraController> _controller;
StreamSubscription<String?>? _cameraSearchQrSubscription;
String? code;
Future<CameraController> _createController() async {
final cameras = await availableCameras();
if (cameras.isEmpty) {
throw CameraException('not found', null);
}
final camera = cameras.where((final element) => element.lensDirection == CameraLensDirection.back).first;
final controller = CameraController(
camera,
ResolutionPreset.medium,
imageFormatGroup: ImageFormatGroup.jpeg,
);
_cameraSearchQrSubscription = cameraSearchQr?.listen((text) {
if (text.isNotEmpty) {
setState(() {
code = text;
});
}
});
await controller.initialize();
return controller;
}
@override
void initState() {
_controller = _createController();
super.initState();
}
@override
Widget build(final BuildContext context) => Scaffold(
appBar: AppBar(
backgroundColor: Theme.of(context).colorScheme.inversePrimary,
title: const Text('Отсканируйте qr код пароля приложения'),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
FutureBuilder(
future: _controller,
builder: (final context, final snapshot) {
if (snapshot.hasData) {
if (code != null) {
String? url;
try {
print(code);
url = code;
if (url == null) {
throw const InvalidQRcodeException();
}
final match = LoginQRcode.tryParse(url);
if (match == null) {
throw const InvalidQRcodeException();
}
_cameraSearchQrSubscription?.cancel();
LoginCheckServerStatusRoute.withCredentials(
serverUrl: match.serverURL,
loginName: match.username,
password: match.password,
).pushReplacement(context);
} catch (e, s) {
if (_lastErrorURL != url) {
code = '';
debugPrint(e.toString());
debugPrint(s.toString());
_lastErrorURL = url;
NeonError.showSnackbar(context, e);
}
}
}
return Expanded(
child: Stack(
children: [
SizedBox(
width: double.maxFinite,
height: double.maxFinite,
child: snapshot.data!.buildPreview(),
// builder: (final context, final constraints) => AspectRatio(
// aspectRatio: max(constraints.maxHeight, constraints.maxWidth) /
// min(constraints.maxHeight, constraints.maxWidth),
// child: snapshot.data!.buildPreview(),
// ),
),
ClipPath(
clipper: InvertedClipper(),
child: Container(
width: double.maxFinite,
height: double.maxFinite,
color: Colors.blue.withOpacity(0.7),
),
),
],
),
);
} else if (snapshot.hasError) {
return Text(snapshot.error.toString());
}
return const CircularProgressIndicator();
},
)
],
),
),
);
}
class InvertedClipper extends CustomClipper<Path> {
@override
Path getClip(final Size size) {
final clipSize = min(size.width, size.height) * 0.6;
return Path()
..addRect(Rect.fromLTWH(0, 0, size.width, size.height))
..addRect(Rect.fromLTWH((size.width / 2) - clipSize / 2, (size.height / 2) - clipSize / 2, clipSize, clipSize))
..fillType = PathFillType.evenOdd;
}
@override
bool shouldReclip(final CustomClipper<Path> oldClipper) => true;
}

2
packages/neon/neon/lib/src/pages/settings.dart

@ -1,4 +1,5 @@
import 'package:file_picker/file_picker.dart'; import 'package:file_picker/file_picker.dart';
import 'package:file_picker_aurora/file_picker_aurora.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_material_design_icons/flutter_material_design_icons.dart'; import 'package:flutter_material_design_icons/flutter_material_design_icons.dart';
@ -270,6 +271,7 @@ class _SettingsPageState extends State<SettingsPage> {
final settingsExportHelper = _buildSettingsExportHelper(context); final settingsExportHelper = _buildSettingsExportHelper(context);
try { try {
FilePickerAurora.registerWith();
final result = await FilePicker.platform.pickFiles( final result = await FilePicker.platform.pickFiles(
withReadStream: true, withReadStream: true,
); );

6
packages/neon/neon/lib/src/platform/android.dart

@ -1,4 +1,5 @@
import 'package:meta/meta.dart'; import 'package:meta/meta.dart';
import 'package:neon/src/platform/aurora.dart';
import 'package:neon/src/platform/linux.dart'; import 'package:neon/src/platform/linux.dart';
import 'package:neon/src/platform/platform.dart'; import 'package:neon/src/platform/platform.dart';
import 'package:neon/src/utils/exceptions.dart'; import 'package:neon/src/utils/exceptions.dart';
@ -10,6 +11,7 @@ import 'package:permission_handler/permission_handler.dart';
/// ///
/// See: /// See:
/// * [NeonPlatform] to initialize and acquire an instance /// * [NeonPlatform] to initialize and acquire an instance
/// * [AuroraNeonPlatform] for the Android implementation
/// * [LinuxNeonPlatform] for the Linux implementation /// * [LinuxNeonPlatform] for the Linux implementation
@immutable @immutable
@internal @internal
@ -21,10 +23,10 @@ class AndroidNeonPlatform implements NeonPlatform {
bool get canUseCamera => true; bool get canUseCamera => true;
@override @override
bool get canUsePushNotifications => true; bool get canUsePushNotifications => false;
@override @override
bool get canUseQuickActions => true; bool get canUseQuickActions => false;
@override @override
bool get canUseSystemTray => false; bool get canUseSystemTray => false;

51
packages/neon/neon/lib/src/platform/aurora.dart

@ -0,0 +1,51 @@
import 'package:meta/meta.dart';
import 'package:neon/src/platform/android.dart';
import 'package:neon/src/platform/linux.dart';
import 'package:neon/src/platform/platform.dart';
import 'package:path/path.dart' as p;
import 'package:path_provider/path_provider.dart';
/// Aurora specific platform information.
///
/// See:
/// * [NeonPlatform] to initialize and acquire an instance
/// * [AndroidNeonPlatform] for the Android implementation
/// * [LinuxNeonPlatform] for the Linux implementation
@immutable
@internal
class AuroraNeonPlatform implements NeonPlatform {
/// Creates a new Aurora Neon platform.
const AuroraNeonPlatform();
@override
bool get canUseCamera => true;
@override
bool get canUsePushNotifications => false;
@override
bool get canUseQuickActions => false;
@override
bool get canUseSystemTray => false;
@override
bool get canUseWebView => true;
@override
bool get canUseWindowManager => false;
@override
bool get canUseSharing => true;
@override
bool get shouldUseFileDialog => false;
@override
Future<String> get userAccessibleAppDataPath async {
return p.join((await getDownloadsDirectory())!.path);
}
@override
void init() {}
}

4
packages/neon/neon/lib/src/platform/linux.dart

@ -1,5 +1,6 @@
import 'package:meta/meta.dart'; import 'package:meta/meta.dart';
import 'package:neon/src/platform/android.dart'; import 'package:neon/src/platform/android.dart';
import 'package:neon/src/platform/aurora.dart';
import 'package:neon/src/platform/platform.dart'; import 'package:neon/src/platform/platform.dart';
import 'package:path/path.dart' as p; import 'package:path/path.dart' as p;
import 'package:sqflite_common_ffi/sqflite_ffi.dart'; import 'package:sqflite_common_ffi/sqflite_ffi.dart';
@ -10,6 +11,7 @@ import 'package:universal_io/io.dart';
/// See: /// See:
/// * [NeonPlatform] to initialize and acquire an instance /// * [NeonPlatform] to initialize and acquire an instance
/// * [AndroidNeonPlatform] for the Android implementation /// * [AndroidNeonPlatform] for the Android implementation
/// * [AuroraNeonPlatform] for the Android implementation
@immutable @immutable
@internal @internal
class LinuxNeonPlatform implements NeonPlatform { class LinuxNeonPlatform implements NeonPlatform {
@ -29,7 +31,7 @@ class LinuxNeonPlatform implements NeonPlatform {
bool get canUseWindowManager => true; bool get canUseWindowManager => true;
@override @override
bool get canUseCamera => false; bool get canUseCamera => true;
@override @override
bool get canUsePushNotifications => false; bool get canUsePushNotifications => false;

5
packages/neon/neon/lib/src/platform/platform.dart

@ -1,7 +1,8 @@
import 'dart:async'; import 'dart:async';
import 'package:meta/meta.dart'; import 'package:flutter/foundation.dart';
import 'package:neon/src/platform/android.dart'; import 'package:neon/src/platform/android.dart';
import 'package:neon/src/platform/aurora.dart';
import 'package:neon/src/platform/linux.dart'; import 'package:neon/src/platform/linux.dart';
import 'package:universal_io/io.dart'; import 'package:universal_io/io.dart';
@ -30,6 +31,8 @@ abstract interface class NeonPlatform {
if (Platform.isAndroid) { if (Platform.isAndroid) {
_platform = const AndroidNeonPlatform(); _platform = const AndroidNeonPlatform();
} else if (TargetPlatform.aurora == defaultTargetPlatform) {
_platform = const AuroraNeonPlatform();
} else if (Platform.isLinux) { } else if (Platform.isLinux) {
_platform = const LinuxNeonPlatform(); _platform = const LinuxNeonPlatform();
} else { } else {

7
packages/neon/neon/lib/src/router.dart

@ -1,6 +1,7 @@
// ignore_for_file: unnecessary_overrides // ignore_for_file: unnecessary_overrides
import 'dart:async'; import 'dart:async';
import 'dart:io';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -10,6 +11,7 @@ import 'package:neon/src/blocs/accounts.dart';
import 'package:neon/src/models/account.dart'; import 'package:neon/src/models/account.dart';
import 'package:neon/src/models/app_implementation.dart'; import 'package:neon/src/models/app_implementation.dart';
import 'package:neon/src/pages/account_settings.dart'; import 'package:neon/src/pages/account_settings.dart';
import 'package:neon/src/pages/aurora_login_qr_code.dart';
import 'package:neon/src/pages/home.dart'; import 'package:neon/src/pages/home.dart';
import 'package:neon/src/pages/login.dart'; import 'package:neon/src/pages/login.dart';
import 'package:neon/src/pages/login_check_account.dart'; import 'package:neon/src/pages/login_check_account.dart';
@ -241,7 +243,10 @@ class LoginQRcodeRoute extends GoRouteData {
const LoginQRcodeRoute(); const LoginQRcodeRoute();
@override @override
Widget build(final BuildContext context, final GoRouterState state) => const LoginQRcodePage(); Widget build(final BuildContext context, final GoRouterState state) =>
TargetPlatform.aurora == defaultTargetPlatform || Platform.isLinux
? const AuroraLoginQRcodePage()
: const LoginQRcodePage();
@override @override
FutureOr<String?> redirect(final BuildContext context, final GoRouterState state) { FutureOr<String?> redirect(final BuildContext context, final GoRouterState state) {

168
packages/neon/neon/lib/src/settings/models/storage.dart

@ -1,6 +1,13 @@
import 'dart:convert';
import 'package:collection/collection.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:meta/meta.dart'; import 'package:meta/meta.dart';
import 'package:nextcloud/ids.dart'; import 'package:nextcloud/ids.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
import 'package:flutter_secure_storage_aurora/flutter_secure_storage_aurora.dart';
/// Storage interface used by `Option`s. /// Storage interface used by `Option`s.
/// ///
@ -91,6 +98,162 @@ enum StorageKeys implements Storable {
final String value; final String value;
} }
@internal
class SharedPreferencesAurora implements SharedPreferences {
static FlutterSecureStorage? _flutterSecureStorage;
static Map<String, String> tmp = <String, String>{};
static Future<void> init() async {
FlutterSecureStorageAurora.setSecret('5872747ed1ceda3638qwerty8b2b18b20');
_flutterSecureStorage = FlutterSecureStorage();
tmp.addAll(await _flutterSecureStorage!.readAll());
}
@override
bool containsKey(final String key) => tmp.containsKey(key);
@override
bool? getBool(final String key) {
if (tmp.containsKey(key)) {
return bool.parse(tmp[key]!);
}
return null;
}
@override
String? getString(final String key) => tmp[key];
@override
List<String>? getStringList(final String key) {
if (tmp.containsKey(key)) {
final list = jsonDecode(tmp[key]!)['list'] as List<dynamic>;
final resut = List<String>.empty(growable: true);
for (final item in list) {
resut.add(item as String);
}
return resut;
}
return null;
}
@override
Future<bool> remove(final String key) async {
if (_flutterSecureStorage == null) {
throw StateError(
'NeonStorage has not been initialized yet. Please make sure NeonStorage.init() has been called before and completed.',
);
}
tmp.remove(key);
await _flutterSecureStorage!.delete(key: key);
return true;
}
@override
Future<bool> setBool(final String key, final bool value) async {
if (_flutterSecureStorage == null) {
throw StateError(
'NeonStorage has not been initialized yet. Please make sure NeonStorage.init() has been called before and completed.',
);
}
tmp[key] = value.toString();
await _flutterSecureStorage!.write(key: key, value: value.toString());
return true;
}
@override
Future<bool> setString(final String key, final String value) async {
if (_flutterSecureStorage == null) {
throw StateError(
'NeonStorage has not been initialized yet. Please make sure NeonStorage.init() has been called before and completed.',
);
}
tmp[key] = value;
await _flutterSecureStorage!.write(key: key, value: value);
return true;
}
@override
Future<bool> setStringList(final String key, final List<String> value) async {
if (_flutterSecureStorage == null) {
throw StateError(
'NeonStorage has not been initialized yet. Please make sure NeonStorage.init() has been called before and completed.',
);
}
final list = jsonEncode({'list': value});
tmp[key] = list;
await _flutterSecureStorage!.write(key: key, value: list);
return true;
}
@override
Future<bool> clear() async {
if (_flutterSecureStorage == null) {
throw StateError(
'NeonStorage has not been initialized yet. Please make sure NeonStorage.init() has been called before and completed.',
);
}
tmp.clear();
await _flutterSecureStorage!.deleteAll();
return true;
}
@override
Future<bool> commit() {
// TODO: implement commit
throw UnimplementedError();
}
@override
Object? get(String key) {
// TODO: implement get
throw UnimplementedError();
}
@override
double? getDouble(String key) {
// TODO: implement getDouble
throw UnimplementedError();
}
@override
int? getInt(String key) {
// TODO: implement getInt
throw UnimplementedError();
}
@override
Set<String> getKeys() {
// TODO: implement getKeys
throw UnimplementedError();
}
@override
Future<void> reload() {
// TODO: implement reload
throw UnimplementedError();
}
@override
Future<bool> setDouble(String key, double value) {
// TODO: implement setDouble
throw UnimplementedError();
}
@override
Future<bool> setInt(String key, int value) {
// TODO: implement setInt
throw UnimplementedError();
}
}
/// Neon storage that manages the storage backend. /// Neon storage that manages the storage backend.
/// ///
/// [init] must be called and completed before accessing individual storages. /// [init] must be called and completed before accessing individual storages.
@ -122,8 +285,13 @@ final class NeonStorage {
return; return;
} }
if (TargetPlatform.aurora == defaultTargetPlatform) {
await SharedPreferencesAurora.init();
_sharedPreferences = SharedPreferencesAurora();
} else {
_sharedPreferences = await SharedPreferences.getInstance(); _sharedPreferences = await SharedPreferences.getInstance();
} }
}
/// Returns the database instance. /// Returns the database instance.
/// ///

7
packages/neon/neon/lib/src/utils/adaptive.dart

@ -7,13 +7,14 @@ bool isCupertino(final BuildContext context) {
final theme = Theme.of(context); final theme = Theme.of(context);
switch (theme.platform) { switch (theme.platform) {
case TargetPlatform.iOS:
case TargetPlatform.macOS:
return true;
case TargetPlatform.android: case TargetPlatform.android:
case TargetPlatform.fuchsia: case TargetPlatform.fuchsia:
case TargetPlatform.linux: case TargetPlatform.linux:
case TargetPlatform.windows: case TargetPlatform.windows:
default:
return false; return false;
case TargetPlatform.iOS:
case TargetPlatform.macOS:
return true;
} }
} }

7
packages/neon/neon/lib/src/utils/global_options.dart

@ -1,3 +1,4 @@
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:meta/meta.dart'; import 'package:meta/meta.dart';
import 'package:neon/l10n/localizations.dart'; import 'package:neon/l10n/localizations.dart';
@ -267,10 +268,12 @@ class GlobalOptions extends OptionsCollection {
storage: storage, storage: storage,
key: GlobalOptionKeys.navigationMode, key: GlobalOptionKeys.navigationMode,
label: (final context) => NeonLocalizations.of(context).globalOptionsNavigationMode, label: (final context) => NeonLocalizations.of(context).globalOptionsNavigationMode,
defaultValue: Platform.isAndroid || Platform.isIOS ? NavigationMode.drawer : NavigationMode.drawerAlwaysVisible, defaultValue: Platform.isAndroid || Platform.isIOS || TargetPlatform.aurora == defaultTargetPlatform
? NavigationMode.drawer
: NavigationMode.drawerAlwaysVisible,
values: { values: {
NavigationMode.drawer: (final context) => NeonLocalizations.of(context).globalOptionsNavigationModeDrawer, NavigationMode.drawer: (final context) => NeonLocalizations.of(context).globalOptionsNavigationModeDrawer,
if (!Platform.isAndroid && !Platform.isIOS) if (!Platform.isAndroid && !Platform.isIOS && TargetPlatform.aurora != defaultTargetPlatform)
NavigationMode.drawerAlwaysVisible: (final context) => NavigationMode.drawerAlwaysVisible: (final context) =>
NeonLocalizations.of(context).globalOptionsNavigationModeDrawerAlwaysVisible, NeonLocalizations.of(context).globalOptionsNavigationModeDrawerAlwaysVisible,
}, },

7
packages/neon/neon/lib/src/utils/request_manager.dart

@ -10,6 +10,7 @@ import 'package:path_provider/path_provider.dart';
import 'package:rxdart/rxdart.dart'; import 'package:rxdart/rxdart.dart';
import 'package:sqflite/sqflite.dart'; import 'package:sqflite/sqflite.dart';
import 'package:xml/xml.dart' as xml; import 'package:xml/xml.dart' as xml;
import 'package:sqflite/sqflite.dart';
typedef UnwrapCallback<T, R> = T Function(R); typedef UnwrapCallback<T, R> = T Function(R);
typedef SerializeCallback<T> = String Function(T); typedef SerializeCallback<T> = String Function(T);
@ -161,7 +162,11 @@ class RequestManager {
final BehaviorSubject<Result<T>> subject, final BehaviorSubject<Result<T>> subject,
) { ) {
final value = subject.valueOrNull?.copyWith(error: error, isLoading: false) ?? Result.error(error); final value = subject.valueOrNull?.copyWith(error: error, isLoading: false) ?? Result.error(error);
try {
subject.add(value); subject.add(value);
} catch (e) {
print(e);
}
} }
Future<bool> _emitCached<T, R>( Future<bool> _emitCached<T, R>(
@ -231,7 +236,7 @@ class Cache {
return; return;
} }
final cacheDir = await getApplicationCacheDirectory(); final cacheDir = await getTemporaryDirectory();
_database = await openDatabase( _database = await openDatabase(
p.join(cacheDir.path, 'cache.db'), p.join(cacheDir.path, 'cache.db'),
version: 1, version: 1,

2
packages/neon/neon/lib/src/utils/save_file.dart

@ -1,6 +1,7 @@
import 'dart:typed_data'; import 'dart:typed_data';
import 'package:file_picker/file_picker.dart'; import 'package:file_picker/file_picker.dart';
import 'package:file_picker_aurora/file_picker_aurora.dart';
import 'package:flutter_file_dialog/flutter_file_dialog.dart'; import 'package:flutter_file_dialog/flutter_file_dialog.dart';
import 'package:neon/src/platform/platform.dart'; import 'package:neon/src/platform/platform.dart';
import 'package:universal_io/io.dart'; import 'package:universal_io/io.dart';
@ -20,6 +21,7 @@ Future<String?> saveFileWithPickDialog(final String fileName, final Uint8List da
), ),
); );
} else { } else {
FilePickerAurora.registerWith();
final result = await FilePicker.platform.saveFile( final result = await FilePicker.platform.saveFile(
fileName: fileName, fileName: fileName,
); );

26
packages/neon/neon/lib/src/widgets/adaptive_widgets/list_tile.dart

@ -88,18 +88,6 @@ class AdaptiveListTile extends StatelessWidget {
final theme = Theme.of(context); final theme = Theme.of(context);
switch (theme.platform) { switch (theme.platform) {
case TargetPlatform.android:
case TargetPlatform.fuchsia:
case TargetPlatform.linux:
case TargetPlatform.windows:
return ListTile(
title: title,
subtitle: subtitle,
leading: leading,
trailing: trailing,
onTap: onTap,
enabled: enabled,
);
case TargetPlatform.iOS: case TargetPlatform.iOS:
case TargetPlatform.macOS: case TargetPlatform.macOS:
final tile = CupertinoListTile( final tile = CupertinoListTile(
@ -130,6 +118,20 @@ class AdaptiveListTile extends StatelessWidget {
} }
return tile; return tile;
case TargetPlatform.android:
case TargetPlatform.fuchsia:
case TargetPlatform.linux:
case TargetPlatform.windows:
default:
return ListTile(
title: title,
subtitle: subtitle,
leading: leading,
trailing: trailing,
onTap: onTap,
enabled: enabled,
);
} }
} }
} }

12
packages/neon/neon/pubspec.yaml

@ -11,7 +11,13 @@ dependencies:
crypto: ^3.0.0 crypto: ^3.0.0
cupertino_icons: ^1.0.0 cupertino_icons: ^1.0.0
dynamic_color: ^1.0.0 dynamic_color: ^1.0.0
file_manager: ^1.0.2
file_picker: ^6.0.0 file_picker: ^6.0.0
file_picker_aurora:
git:
url: https://gitlab.com/hooky-mars/flutter-plugins.git
ref: file_picker_aurora
path: packages/file_picker/file_picker_aurora
filesize: ^2.0.0 filesize: ^2.0.0
flutter: flutter:
sdk: flutter sdk: flutter
@ -44,6 +50,11 @@ dependencies:
rxdart: ^0.27.4 rxdart: ^0.27.4
scrollable_positioned_list: ^0.3.0 scrollable_positioned_list: ^0.3.0
shared_preferences: ^2.2.1 shared_preferences: ^2.2.1
shared_preferences_aurora:
git:
url: https://gitlab.com/omprussia/flutter/flutter-plugins.git
ref: shared_preferences_aurora-0.0.1
path: packages/shared_preferences/shared_preferences_aurora
sort_box: sort_box:
git: git:
url: https://github.com/nextcloud/neon url: https://github.com/nextcloud/neon
@ -59,6 +70,7 @@ dependencies:
window_manager: ^0.3.0 window_manager: ^0.3.0
xml: ^6.0.0 xml: ^6.0.0
dev_dependencies: dev_dependencies:
build_runner: ^2.4.6 build_runner: ^2.4.6
go_router_builder: ^2.3.4 go_router_builder: ^2.3.4

15
packages/neon/neon_dashboard/lib/l10n/localizations.dart

@ -87,7 +87,9 @@ abstract class DashboardLocalizations {
]; ];
/// A list of this localizations delegate's supported locales. /// A list of this localizations delegate's supported locales.
static const List<Locale> supportedLocales = <Locale>[Locale('en')]; static const List<Locale> supportedLocales = <Locale>[
Locale('en')
];
/// No description provided for @noEntries. /// No description provided for @noEntries.
/// ///
@ -112,14 +114,17 @@ class _DashboardLocalizationsDelegate extends LocalizationsDelegate<DashboardLoc
} }
DashboardLocalizations lookupDashboardLocalizations(Locale locale) { DashboardLocalizations lookupDashboardLocalizations(Locale locale) {
// Lookup logic when only language code is specified. // Lookup logic when only language code is specified.
switch (locale.languageCode) { switch (locale.languageCode) {
case 'en': case 'en': return DashboardLocalizationsEn();
return DashboardLocalizationsEn();
} }
throw FlutterError('DashboardLocalizations.delegate failed to load unsupported locale "$locale". This is likely ' throw FlutterError(
'DashboardLocalizations.delegate failed to load unsupported locale "$locale". This is likely '
'an issue with the localizations generation tool. Please file an issue ' 'an issue with the localizations generation tool. Please file an issue '
'on GitHub with a reproducible sample app and the gen-l10n configuration ' 'on GitHub with a reproducible sample app and the gen-l10n configuration '
'that was used.'); 'that was used.'
);
} }

4
packages/neon/neon_files/lib/blocs/files.dart

@ -172,7 +172,9 @@ class FilesBloc extends InteractiveBloc implements FilesBlocEvents, FilesBlocSta
} }
Future<File> _cacheFile(final PathUri uri, final String etag) async { Future<File> _cacheFile(final PathUri uri, final String etag) async {
final cacheDir = await getApplicationCacheDirectory(); final cacheDir = TargetPlatform.aurora == defaultTargetPlatform
? await getTemporaryDirectory()
: await getApplicationCacheDirectory();
final file = File(p.join(cacheDir.path, 'files', etag.replaceAll('"', ''), uri.name)); final file = File(p.join(cacheDir.path, 'files', etag.replaceAll('"', ''), uri.name));
if (!file.existsSync()) { if (!file.existsSync()) {

1
packages/neon/neon_files/lib/dialogs/choose_create.dart

@ -16,6 +16,7 @@ class FilesChooseCreateDialog extends StatefulWidget {
class _FilesChooseCreateDialogState extends State<FilesChooseCreateDialog> { class _FilesChooseCreateDialogState extends State<FilesChooseCreateDialog> {
Future<void> uploadFromPick(final FileType type) async { Future<void> uploadFromPick(final FileType type) async {
FilePickerAurora.registerWith();
final result = await FilePicker.platform.pickFiles( final result = await FilePicker.platform.pickFiles(
allowMultiple: true, allowMultiple: true,
type: type, type: type,

15
packages/neon/neon_files/lib/l10n/localizations.dart

@ -87,7 +87,9 @@ abstract class FilesLocalizations {
]; ];
/// A list of this localizations delegate's supported locales. /// A list of this localizations delegate's supported locales.
static const List<Locale> supportedLocales = <Locale>[Locale('en')]; static const List<Locale> supportedLocales = <Locale>[
Locale('en')
];
/// No description provided for @actionYes. /// No description provided for @actionYes.
/// ///
@ -376,14 +378,17 @@ class _FilesLocalizationsDelegate extends LocalizationsDelegate<FilesLocalizatio
} }
FilesLocalizations lookupFilesLocalizations(Locale locale) { FilesLocalizations lookupFilesLocalizations(Locale locale) {
// Lookup logic when only language code is specified. // Lookup logic when only language code is specified.
switch (locale.languageCode) { switch (locale.languageCode) {
case 'en': case 'en': return FilesLocalizationsEn();
return FilesLocalizationsEn();
} }
throw FlutterError('FilesLocalizations.delegate failed to load unsupported locale "$locale". This is likely ' throw FlutterError(
'FilesLocalizations.delegate failed to load unsupported locale "$locale". This is likely '
'an issue with the localizations generation tool. Please file an issue ' 'an issue with the localizations generation tool. Please file an issue '
'on GitHub with a reproducible sample app and the gen-l10n configuration ' 'on GitHub with a reproducible sample app and the gen-l10n configuration '
'that was used.'); 'that was used.'
);
} }

2
packages/neon/neon_files/lib/neon_files.dart

@ -29,7 +29,9 @@ import 'dart:async';
import 'package:collection/collection.dart'; import 'package:collection/collection.dart';
import 'package:file_icons/file_icons.dart'; import 'package:file_icons/file_icons.dart';
import 'package:file_picker/file_picker.dart'; import 'package:file_picker/file_picker.dart';
import 'package:file_picker_aurora/file_picker_aurora.dart';
import 'package:filesize/filesize.dart'; import 'package:filesize/filesize.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_material_design_icons/flutter_material_design_icons.dart'; import 'package:flutter_material_design_icons/flutter_material_design_icons.dart';
import 'package:go_router/go_router.dart'; import 'package:go_router/go_router.dart';

15
packages/neon/neon_files/pubspec.yaml

@ -13,6 +13,11 @@ dependencies:
url: https://github.com/nextcloud/neon url: https://github.com/nextcloud/neon
path: packages/file_icons path: packages/file_icons
file_picker: ^6.0.0 file_picker: ^6.0.0
file_picker_aurora:
git:
url: https://gitlab.com/hooky-mars/flutter-plugins.git
ref: file_picker_aurora
path: packages/file_picker/file_picker_aurora
filesize: ^2.0.0 filesize: ^2.0.0
flutter: flutter:
sdk: flutter sdk: flutter
@ -33,9 +38,19 @@ dependencies:
open_file: ^3.0.0 open_file: ^3.0.0
path: ^1.0.0 path: ^1.0.0
path_provider: ^2.0.0 path_provider: ^2.0.0
path_provider_aurora:
git:
url: https://gitlab.com/omprussia/flutter/flutter-plugins.git
ref: path_provider_aurora-0.0.1
path: packages/path_provider/path_provider_aurora
queue: ^3.0.0 queue: ^3.0.0
rxdart: ^0.27.0 rxdart: ^0.27.0
share_plus: ^7.0.0 share_plus: ^7.0.0
share_plus_aurora:
git:
url: https://gitlab.com/hooky-mars/flutter-plugins.git
ref: share_plus_aurora-0.0.1
path: packages/share_plus/share_plus_aurora
universal_io: ^2.0.0 universal_io: ^2.0.0
dev_dependencies: dev_dependencies:

15
packages/neon/neon_news/lib/l10n/localizations.dart

@ -87,7 +87,9 @@ abstract class NewsLocalizations {
]; ];
/// A list of this localizations delegate's supported locales. /// A list of this localizations delegate's supported locales.
static const List<Locale> supportedLocales = <Locale>[Locale('en')]; static const List<Locale> supportedLocales = <Locale>[
Locale('en')
];
/// No description provided for @actionClose. /// No description provided for @actionClose.
/// ///
@ -442,14 +444,17 @@ class _NewsLocalizationsDelegate extends LocalizationsDelegate<NewsLocalizations
} }
NewsLocalizations lookupNewsLocalizations(Locale locale) { NewsLocalizations lookupNewsLocalizations(Locale locale) {
// Lookup logic when only language code is specified. // Lookup logic when only language code is specified.
switch (locale.languageCode) { switch (locale.languageCode) {
case 'en': case 'en': return NewsLocalizationsEn();
return NewsLocalizationsEn();
} }
throw FlutterError('NewsLocalizations.delegate failed to load unsupported locale "$locale". This is likely ' throw FlutterError(
'NewsLocalizations.delegate failed to load unsupported locale "$locale". This is likely '
'an issue with the localizations generation tool. Please file an issue ' 'an issue with the localizations generation tool. Please file an issue '
'on GitHub with a reproducible sample app and the gen-l10n configuration ' 'on GitHub with a reproducible sample app and the gen-l10n configuration '
'that was used.'); 'that was used.'
);
} }

15
packages/neon/neon_notes/lib/l10n/localizations.dart

@ -87,7 +87,9 @@ abstract class NotesLocalizations {
]; ];
/// A list of this localizations delegate's supported locales. /// A list of this localizations delegate's supported locales.
static const List<Locale> supportedLocales = <Locale>[Locale('en')]; static const List<Locale> supportedLocales = <Locale>[
Locale('en')
];
/// No description provided for @errorChangedOnServer. /// No description provided for @errorChangedOnServer.
/// ///
@ -280,14 +282,17 @@ class _NotesLocalizationsDelegate extends LocalizationsDelegate<NotesLocalizatio
} }
NotesLocalizations lookupNotesLocalizations(Locale locale) { NotesLocalizations lookupNotesLocalizations(Locale locale) {
// Lookup logic when only language code is specified. // Lookup logic when only language code is specified.
switch (locale.languageCode) { switch (locale.languageCode) {
case 'en': case 'en': return NotesLocalizationsEn();
return NotesLocalizationsEn();
} }
throw FlutterError('NotesLocalizations.delegate failed to load unsupported locale "$locale". This is likely ' throw FlutterError(
'NotesLocalizations.delegate failed to load unsupported locale "$locale". This is likely '
'an issue with the localizations generation tool. Please file an issue ' 'an issue with the localizations generation tool. Please file an issue '
'on GitHub with a reproducible sample app and the gen-l10n configuration ' 'on GitHub with a reproducible sample app and the gen-l10n configuration '
'that was used.'); 'that was used.'
);
} }

15
packages/neon/neon_notifications/lib/l10n/localizations.dart

@ -87,7 +87,9 @@ abstract class NotificationsLocalizations {
]; ];
/// A list of this localizations delegate's supported locales. /// A list of this localizations delegate's supported locales.
static const List<Locale> supportedLocales = <Locale>[Locale('en')]; static const List<Locale> supportedLocales = <Locale>[
Locale('en')
];
/// No description provided for @actionClose. /// No description provided for @actionClose.
/// ///
@ -124,14 +126,17 @@ class _NotificationsLocalizationsDelegate extends LocalizationsDelegate<Notifica
} }
NotificationsLocalizations lookupNotificationsLocalizations(Locale locale) { NotificationsLocalizations lookupNotificationsLocalizations(Locale locale) {
// Lookup logic when only language code is specified. // Lookup logic when only language code is specified.
switch (locale.languageCode) { switch (locale.languageCode) {
case 'en': case 'en': return NotificationsLocalizationsEn();
return NotificationsLocalizationsEn();
} }
throw FlutterError('NotificationsLocalizations.delegate failed to load unsupported locale "$locale". This is likely ' throw FlutterError(
'NotificationsLocalizations.delegate failed to load unsupported locale "$locale". This is likely '
'an issue with the localizations generation tool. Please file an issue ' 'an issue with the localizations generation tool. Please file an issue '
'on GitHub with a reproducible sample app and the gen-l10n configuration ' 'on GitHub with a reproducible sample app and the gen-l10n configuration '
'that was used.'); 'that was used.'
);
} }

Loading…
Cancel
Save