Compare commits

..

4 Commits

Author SHA1 Message Date
jld3103 585cbda181
chore(app): Update screenshots 1 year ago
jld3103 e4d32cc63a
fix(neon,app): Correctly mock shared preferences in screenshot tests 1 year ago
jld3103 85d6463b8b
fix(app): Fix accounts screenshots 1 year ago
jld3103 76b2c4dd13
fix(neon): Disable debug banner 1 year ago
  1. 13
      .cspell/dart_flutter.txt
  2. 11
      .cspell/misc.txt
  3. 20
      .cspell/neon.txt
  4. 79
      .cspell/nextcloud.txt
  5. 72
      .cspell/tools.txt
  6. 50
      .cspell/webdav.txt
  7. 2
      .fvm/fvm_config.json
  8. 56
      .github/renovate.json
  9. 1
      .github/workflows/.gitattributes
  10. 4
      .github/workflows/conventional_commits.yaml
  11. 43
      .github/workflows/dart.yml
  12. 94
      .github/workflows/generate.yaml
  13. 28
      .github/workflows/neon.yml
  14. 130
      .github/workflows/publish.yaml
  15. 12
      .github/workflows/spellcheck.yaml
  16. 15
      .gitignore
  17. 21
      .gitmodules
  18. 2
      .husky/commit-msg
  19. 9
      .vscode/extensions.json
  20. 6
      .vscode/settings.json
  21. 23
      CONTRIBUTING.md
  22. 0
      LICENSE
  23. 88
      README.md
  24. 11
      assets/BSD-3-Clause.txt
  25. 3
      commitlint.yaml
  26. 56
      cspell.json
  27. 35
      dartdoc_options.yaml
  28. 25
      docs/README.md
  29. 11
      docs/architecture.md
  30. 12
      docs/architecture.puml
  31. 2
      docs/architecture.svg
  32. 8
      docs/dependencies.md
  33. 2
      docs/login.svg
  34. 11
      docs/workflows.md
  35. 2
      external/nextcloud-news
  36. 2
      external/nextcloud-notes
  37. 2
      external/nextcloud-notifications
  38. 2
      external/nextcloud-server
  39. 1
      external/nextcloud-spreed
  40. 1
      external/nextcloud-uppush
  41. 1
      external/openapi-specification
  42. 7
      melos.yaml
  43. 48
      packages/app/.gitignore
  44. 33
      packages/app/.metadata
  45. 2
      packages/app/LICENSE
  46. BIN
      packages/app/android/app/src/main/res/mipmap-hdpi/app_dashboard.png
  47. BIN
      packages/app/android/app/src/main/res/mipmap-hdpi/app_files.png
  48. BIN
      packages/app/android/app/src/main/res/mipmap-mdpi/app_dashboard.png
  49. BIN
      packages/app/android/app/src/main/res/mipmap-mdpi/app_files.png
  50. BIN
      packages/app/android/app/src/main/res/mipmap-xhdpi/app_dashboard.png
  51. BIN
      packages/app/android/app/src/main/res/mipmap-xhdpi/app_files.png
  52. BIN
      packages/app/android/app/src/main/res/mipmap-xxhdpi/app_dashboard.png
  53. BIN
      packages/app/android/app/src/main/res/mipmap-xxhdpi/app_files.png
  54. BIN
      packages/app/android/app/src/main/res/mipmap-xxxhdpi/app_dashboard.png
  55. BIN
      packages/app/android/app/src/main/res/mipmap-xxxhdpi/app_files.png
  56. 2
      packages/app/android/build.gradle
  57. 2
      packages/app/android/gradle/wrapper/gradle-wrapper.properties
  58. 1
      packages/app/assets/logo.svg
  59. BIN
      packages/app/assets/logo.svg.vec
  60. 33
      packages/app/integration_test/screenshot_test.dart
  61. 5
      packages/app/l10n.yaml
  62. 7
      packages/app/lib/apps.dart
  63. 17
      packages/app/lib/branding.dart
  64. 2
      packages/app/lib/main.dart
  65. 4
      packages/app/linux/flutter/generated_plugin_registrant.cc
  66. 1
      packages/app/linux/flutter/generated_plugins.cmake
  67. 513
      packages/app/pubspec.lock
  68. 20
      packages/app/pubspec.yaml
  69. 4
      packages/app/pubspec_overrides.yaml
  70. BIN
      packages/app/screenshots/files_actions.png
  71. BIN
      packages/app/screenshots/files_create.png
  72. BIN
      packages/app/screenshots/files_details.png
  73. BIN
      packages/app/screenshots/files_photos.png
  74. BIN
      packages/app/screenshots/files_root.png
  75. BIN
      packages/app/screenshots/home_drawer.png
  76. BIN
      packages/app/screenshots/login_server_selection.png
  77. BIN
      packages/app/screenshots/news_articles_starred_list.png
  78. BIN
      packages/app/screenshots/news_articles_unread_list.png
  79. BIN
      packages/app/screenshots/news_feed_add.png
  80. BIN
      packages/app/screenshots/news_feed_articles_list.png
  81. BIN
      packages/app/screenshots/news_feeds_list.png
  82. BIN
      packages/app/screenshots/news_folders_list.png
  83. BIN
      packages/app/screenshots/notes_categories_list.png
  84. BIN
      packages/app/screenshots/notes_note_create.png
  85. BIN
      packages/app/screenshots/notes_note_edit.png
  86. BIN
      packages/app/screenshots/notes_note_preview.png
  87. BIN
      packages/app/screenshots/notes_notes_list.png
  88. BIN
      packages/app/screenshots/notifications_list.png
  89. BIN
      packages/app/screenshots/settings_account.png
  90. BIN
      packages/app/screenshots/settings_accounts.png
  91. BIN
      packages/app/screenshots/settings_app_files.png
  92. BIN
      packages/app/screenshots/settings_app_news.png
  93. BIN
      packages/app/screenshots/settings_app_notes.png
  94. BIN
      packages/app/screenshots/settings_dark.png
  95. BIN
      packages/app/screenshots/settings_light.png
  96. BIN
      packages/app/screenshots/settings_oled.png
  97. 12
      packages/dynamite/dynamite/.gitignore
  98. 2
      packages/dynamite/dynamite/LICENSE
  99. 30
      packages/dynamite/dynamite/README.md
  100. 13
      packages/dynamite/dynamite/build.yaml
  101. Some files were not shown because too many files have changed in this diff Show More

13
.cspell/dart_flutter.txt

@ -1,13 +0,0 @@
autofocus
cupertino
endtemplate
expando
gapless
goldens
lerp
pubspec
sublist
todos
unawaited
unfocus
writeln

11
.cspell/misc.txt

@ -1,11 +0,0 @@
browsable
cleartext
deeplinking
flathub
foss
fullscreen
playstore
postmarket
provokateurin
subroutes
uncategorized

20
.cspell/neon.txt

@ -1,20 +0,0 @@
crypton
exportables
fcmup
filesize
gotify
heckel
mocktail
nextpush
noprovider
ntfy
oled
oledas
rxdart
seti
siacs
sqflite
underspecified
updateshouldnotify
wakelock
zxing

79
.cspell/nextcloud.txt

@ -1,79 +0,0 @@
apirequest
applist
apppassword
approximative
appstore
bigfilechunking
bools
bulkupload
commenters
csapi
datetime
deletedshares
dialin
dialout
displayname
etag
fediverse
getapppassword
groupid
hostedsignalingserver
hovercard
iscustomavatar
itemsperpage
keepalive
keypair
lastmod
licence
logfile
logoheader
matterbridge
mimetypes
mountpoint
navigations
nextcloud
nextcloud's
openlocaleditor
organisation
prio
productname
publicpreview
publicshare
publicshareauth
replyable
requesttrial
reshares
resharing
rgdnvw
setsip
shareapi
sharebymail
sharee
shareesapi
shareinfo
statuscode
stime
stunservers
stylesheet
subadmin
subadmins
subfiles
subline
tasktypes
textprocessing
totalitems
transferownership
trashbin
turnservers
undelete
unifiedpush
unsharing
unstar
updatenotification
uppush
usercount
usergroup
userid
userroom
versionstring
whatsnew

72
.cspell/tools.txt

@ -1,72 +0,0 @@
aarch
allprojects
appindicator
autoptr
buildscript
buildsystem
buildx
cest
classpath
cloc
commitlint
dapplication
dartdoc
dists
dockerenv
endforeach
endfunction
endlegend
endswith
enduml
euxo
exiftool
extglob
fehguy
freedesktop
fullpath
gboolean
gchar
genhtml
hicolor
icudtl
inkscape
intellij
jetbrains
jsonpatch
jvmargs
klass
lcov
libapp
libappindicator
libayatana
libflutter
libgtk
libindicator
libsqlite
mipmap
ndebug
nodoc
nonintegers
nproc
openrelay
openrelayprojectsecret
palo
petstore
plantuml
precache
puml
rpath
signoff
startuml
staticauth
stdlib
strconcat
strdupv
strfreev
subprojects
sysroot
tsvg
werror
workdir
xxxh
xxxhdpi

50
.cspell/webdav.txt

@ -1,50 +0,0 @@
copymove
dasl
davgetcontentlength
davgetcontenttype
davgetetag
davgetlastmodified
davresourcetype
fileid
getcontentlength
getcontenttype
getetag
getlastmodified
largefile
mkcol
multistatus
nccreationtime
ncdatafingerprint
nchaspreview
ncisencrypted
ncmetadataetag
ncmounttype
ncnote
ncrichworkspace
ncuploadtime
nodestcoll
noncoll
noparent
occommentscount
occommentshref
occommentsunread
ocdownloadurl
ocfavorite
ocfileid
ocid
ocmsharepermissions
ocownerdisplayname
ocownerid
ocpermissions
ocsize
ocssharepermissions
owncloud
propertyupdate
propfind
proppatch
propstat
propstats
resourcetype
sharees
systemtag
webdav

2
.fvm/fvm_config.json

@ -1,4 +1,4 @@
{
"flutterSdkVersion": "3.16.0",
"flutterSdkVersion": "3.13.2@stable",
"flavors": {}
}

56
.github/renovate.json

@ -6,59 +6,5 @@
"labels": [
"dependencies"
],
"rangeStrategy": "bump",
"lockFileMaintenance": {
"enabled": true,
"automerge": true
},
"packageRules": [
{
"matchManagers": ["pub"],
"matchDatasources": ["dart-version", "flutter-version"],
"matchUpdateTypes": [
"minor",
"patch"
],
"enabled": false
},
{
"matchManagers": ["pub"],
"matchDepTypes": ["dependencies"],
"matchUpdateTypes": [
"minor",
"patch"
],
"enabled": false
},
{
"groupName": "built_value",
"matchPackagePatterns": "^built"
},
{
"groupName": "go_router",
"matchPackagePatterns": "^go_router"
},
{
"groupName": "sqflite",
"matchPackagePatterns": "^sqflite"
},
{
"groupName": "unifiedpush",
"matchPackagePatterns": "^unifiedpush"
},
{
"groupName": "xml_serializable",
"matchPackageNames": [
"xml_annotation",
"xml_serializable"
]
},
{
"groupName": "json_serializable",
"matchPackageNames": [
"json_annotation",
"json_serializable"
]
}
]
"rangeStrategy": "bump"
}

1
.github/workflows/.gitattributes vendored

@ -0,0 +1 @@
dart.yml -diff

4
.github/workflows/conventional_commits.yaml

@ -8,12 +8,12 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
with:
fetch-depth: 0
- name: Install dart
uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d # v1
uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f # v1
- name: Install commitlint_cli
run: dart pub get

43
.github/workflows/dart.yml

@ -1,6 +1,15 @@
name: Dart CI
on:
push:
branches:
- main
pull_request:
defaults:
run:
shell: bash
env:
PUB_ENVIRONMENT: bot.github
permissions: read-all
concurrency:
group: dart-${{ github.head_ref || github.run_id }}
@ -10,37 +19,25 @@ jobs:
dart-ci:
name: Dart CI
runs-on: ubuntu-22.04
permissions:
packages: write
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Cache dependencies
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
with:
fetch-depth: 0
- name: Login to GHCR
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3
- name: Build test Docker image
run: ./tool/build-dev-container.sh
path: ~/.pub-cache/hosted
key: dart-ci
- name: Checkout repository
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- name: Install dart
uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d # v1
uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f # v1
- name: Setup
run: ./tool/setup.sh
- name: Build test Docker image
run: ./tool/build-dev-container.sh
- name: Check formatting
run: melos run format:check
run: melos run format-check
- name: Lint code
run: melos run analyze
- name: Run tests
run: |
mapfile -t packages < <(melos list --parsable --diff=${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }}..${{ github.event.pull_request.head.sha }} --include-dependents | xargs -r -n1 basename)
if [ -z "$packages" ]; then exit 0; fi
packages_glob="$(printf ",%s" "${packages[@]}")"
packages_glob="${packages_glob:1}"
melos exec --scope="$packages_glob" --concurrency=1 --fail-fast --dir-exists=test -- "flutter test --concurrency=$(nproc --all)"
run: melos run test

94
.github/workflows/generate.yaml

@ -1,94 +0,0 @@
name: Generate
on:
pull_request:
concurrency:
group: generate-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
changes:
name: Check changes
runs-on: ubuntu-22.04
outputs:
src: ${{ steps.changes.outputs.src}}
steps:
- uses: dorny/paths-filter@v2
id: changes
continue-on-error: true
with:
filters: |
src:
- external/**
- tool/**
- packages/dynamite/**
- packages/nextcloud/**
dart:
name: Dart
runs-on: ubuntu-22.04
needs: changes
if: needs.changes.outputs.src != 'false'
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
fetch-depth: 0
- name: Submodules
run: git submodule update --init --depth 0
- name: Install dart
uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d # v1
- name: Setup
run: ./tool/setup.sh
- name: Generate dynamite end to end test
run: |
./tool/generate-dynamite-e2e-test.sh
if [ -n "$(git status --porcelain)" ]; then
git --no-pager diff
exit 1
fi
- name: Generate dynamite petstore example
run: |
./tool/generate-dynamite-petstore-example.sh
if [ -n "$(git status --porcelain)" ]; then
git --no-pager diff
exit 1
fi
- name: Generate nextcloud
run: |
./tool/generate-nextcloud.sh
if [ -n "$(git status --porcelain)" ]; then
git --no-pager diff
exit 1
fi
openapi:
name: OpenAPI
runs-on: ubuntu-22.04
needs: changes
if: needs.changes.outputs.src != 'false'
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
fetch-depth: 0
- name: Submodules
run: git submodule update --init --depth 0
- name: Install php
uses: shivammathur/setup-php@a36e1e52ff4a1c9e9c9be31551ee4712a6cb6bd0 # v2
with:
php-version: '8.1'
tools: composer
- name: Generate specs
run: |
./tool/generate-specs.sh
if [ -n "$(git status --porcelain)" ]; then
git --no-pager diff
exit 1
fi

28
.github/workflows/neon.yml

@ -1,28 +0,0 @@
name: Neon
on:
pull_request:
concurrency:
group: neon-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
untested-apis:
name: Untested APIs
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Find untested Neon APIs
run: ./tool/find-untested-neon-apis.sh
dart-io-usage:
name: dart:io usage
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Find dart:io usage
run: ./tool/find-dart-io-usage.sh

130
.github/workflows/publish.yaml

@ -1,13 +1,17 @@
name: Publish
on:
schedule:
- cron: '0 5 * * *'
push:
branches:
- main
concurrency:
group: publish
cancel-in-progress: true
env:
PUB_CACHE: ~/.pub-cache
jobs:
setup:
name: Setup
@ -17,8 +21,11 @@ jobs:
build_number: ${{ steps.build_number.outputs.BUILD_NUMBER }}
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- name: Set flutter version
id: flutter_version
run: echo "FLUTTER_VERSION=$(jq ".flutterSdkVersion" -r < .fvm/fvm_config.json | cut -d "@" -f 1)" >> $GITHUB_OUTPUT
- name: Set build number
id: build_number
run: echo "BUILD_NUMBER=$(date +"%s")" >> $GITHUB_OUTPUT
@ -29,15 +36,30 @@ jobs:
needs: setup
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: kuhnroyal/flutter-fvm-config-action@34c3905bc939a4ff9d9cb07d5a977493fa73b2aa # v2
id: fvm_config
- uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 # v2
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa # v2
with:
flutter-version: ${{ needs.setup.outputs.flutter_version }}
channel: 'stable'
cache: true
- name: Pub dependency cache
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
with:
flutter-version: ${{ steps.fvm_config.outputs.FLUTTER_VERSION }}
channel: ${{ steps.fvm_config.outputs.FLUTTER_CHANNEL }}
path: ${{ env.PUB_CACHE }}
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }}
restore-keys: |
${{ runner.os }}-pub-
- name: Gradle dependency cache
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Set up JDK 11
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3
uses: actions/setup-java@cd89f46ac9d01407894225f350157564c9c7cee2 # v3
with:
distribution: 'adopt'
java-version: 11
@ -53,17 +75,17 @@ jobs:
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3
with:
name: Android arm64-v8a
path: packages/app/build/app/outputs/flutter-apk/app-arm64-v8a-release-signed.apk
if-no-files-found: error
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3
with:
name: Android armeabi-v7a
path: packages/app/build/app/outputs/flutter-apk/app-armeabi-v7a-release-signed.apk
if-no-files-found: error
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3
with:
name: Android x86_64
path: packages/app/build/app/outputs/flutter-apk/app-x86_64-release-signed.apk
@ -83,46 +105,70 @@ jobs:
export DEBUG_KEYSTORE=${{ secrets.DEBUG_KEYSTORE }}
GITHUB_REPOSITORY=provokateurin/nextcloud-neon fdroid nightly -v --archive-older 10
linux:
name: Linux ${{ matrix.architecture.flutter }}
linux_x86_64:
name: Linux x86_64
runs-on: ubuntu-22.04
needs: setup
permissions:
packages: write
strategy:
matrix:
architecture:
- docker: amd64
flutter: x64
- docker: arm64
flutter: arm64
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Login to GHCR
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa # v2
with:
flutter-version: ${{ needs.setup.outputs.flutter_version }}
channel: 'stable'
cache: true
- name: Pub dependency cache
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
with:
path: ${{ env.PUB_CACHE }}
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }}
restore-keys: |
${{ runner.os }}-pub-
- name: Install dependencies
run: |
sudo apt-get install \
-y --no-install-recommends \
clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev \
libappindicator3-dev
- name: Build
run: cd packages/app && flutter build linux --build-number="${{ needs.setup.outputs.build_number }}"
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
name: Linux x86_64
path: packages/app/build/linux/x64/release/bundle/*
if-no-files-found: error
linux_arm64:
name: Linux arm64
runs-on: ubuntu-22.04
needs: setup
steps:
- name: Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- name: Set docker image
id: docker_image
run: |
echo "local=nextcloud-neon-build-linux-arm64:${{ needs.setup.outputs.flutter_version }}" >> $GITHUB_OUTPUT
echo "remote=ghcr.io/$GITHUB_REPOSITORY/build-linux-arm64:${{ needs.setup.outputs.flutter_version }}" >> $GITHUB_OUTPUT
- run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin
- name: Set up QEMU
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3
uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2
with:
platforms: ${{ matrix.architecture.docker }}
platforms: arm64
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3
uses: docker/setup-buildx-action@885d1462b80bc1c1c7f0b00334ad271f09369c55 # v2
with:
platforms: linux/${{ matrix.architecture.docker }}
platforms: linux/arm64
- name: Install dart
uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d # v1
- name: Setup
run: ./tool/setup.sh
- name: Build
run: ./tool/build-app.sh linux/${{ matrix.architecture.docker }} --build-number="${{ needs.setup.outputs.build_number }}"
env:
FLUTTER_VERSION: ${{ needs.setup.outputs.flutter_version }}
run: ./tool/build-app.sh linux/arm64 --build-number="${{ needs.setup.outputs.build_number }}"
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3
with:
name: Linux ${{ matrix.architecture.flutter }}
path: packages/app/build/linux/${{ matrix.architecture.flutter }}/release/bundle/*
name: Linux arm64
path: packages/app/build/linux/arm64/release/bundle/*
if-no-files-found: error

12
.github/workflows/spellcheck.yaml

@ -1,12 +0,0 @@
name: 'Check spelling'
on:
pull_request:
jobs:
spellcheck:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: streetsidesoftware/cspell-action@52cba17693dc12d7d8f521631037008a17c93e53 # v5
with:
incremental_files_only: false

15
.gitignore vendored

@ -1,17 +1,6 @@
.dart_tool
pubspec.lock
packages/**/.idea
packages/**/*.iml
packages/**/*.symbols
packages/**/*.log
packages/**/.flutter-plugins
packages/**/.flutter-plugins-dependencies
/.dart_tool/
/pubspec.lock
packages/**/coverage
packages/**/build
packages/**/doc/api
!packages/app/pubspec.lock
# Melos reccomends not adding them to vcs but we need them as we don't use melos in CI
# **/pubspec_overrides.yaml

21
.gitmodules vendored

@ -1,24 +1,21 @@
[submodule "external/nextcloud-server"]
path = external/nextcloud-server
url = https://github.com/nextcloud/server.git
[submodule "external/nextcloud-news"]
path = external/nextcloud-news
url = https://github.com/nextcloud/news.git
[submodule "external/seti-ui"]
path = external/seti-ui
url = https://github.com/jesseweed/seti-ui.git
[submodule "external/nextcloud-notes"]
path = external/nextcloud-notes
url = https://github.com/nextcloud/notes.git
[submodule "external/nextcloud-notifications"]
path = external/nextcloud-notifications
url = https://github.com/nextcloud/notifications.git
[submodule "external/nextcloud-uppush"]
path = external/nextcloud-uppush
url = https://github.com/UP-NextPush/server-app.git
[submodule "external/flathub-shared-modules"]
path = external/flathub-shared-modules
url = https://github.com/flathub/shared-modules.git
[submodule "external/nextcloud-spreed"]
path = external/nextcloud-spreed
url = https://github.com/nextcloud/spreed
[submodule "external/nextcloud-news"]
path = external/nextcloud-news
url = https://github.com/nextcloud/news
[submodule "external/nextcloud-notes"]
path = external/nextcloud-notes
url = https://github.com/nextcloud/notes
[submodule "external/openapi-specification"]
path = external/openapi-specification
url = https://github.com/OAI/OpenAPI-Specification.git

2
.husky/commit-msg

@ -1,4 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
fvm dart run commitlint_cli --edit "$1"
dart run commitlint_cli --edit "$1"

9
.vscode/extensions.json vendored

@ -1,9 +0,0 @@
{
"recommendations": [
"dart-code.dart-code",
"dart-code.flutter",
"jebbs.plantuml",
"redhat.vscode-yaml",
"streetsidesoftware.code-spell-checker"
]
}

6
.vscode/settings.json vendored

@ -2,14 +2,12 @@
"dart.lineLength": 120,
"yaml.format.singleQuote": true,
"dart.flutterSdkPath": ".fvm/flutter_sdk",
"files.insertFinalNewline": true,
// Remove .fvm files from search
"search.exclude": {
"**/.fvm": true
},
// Remove from file watching
"files.watcherExclude": {
"**/.fvm": true
},
"files.associations": {
"*.arb": "json",
}
}

23
CONTRIBUTING.md

@ -11,23 +11,7 @@ Currently included are:
To set up all these tools run the `./tool/setup.sh` script.
Note that you need to have Dart installed and [`~/.pub-cache/bin/` needs to be in your PATH](https://dart.dev/tools/pub/cmd/pub-global#running-a-script-from-your-path) before running the script.
You will need to have the following dependencies installed to get the app running:
- [yq](https://github.com/kislyuk/yq)
- [sqlite3](https://pub.dev/packages/sqflite_common_ffi#getting-started)
- [appindicator3](https://pub.dev/packages/tray_manager#quick-start)
For working with lower levels like generating the OpenAPI specifications a few more dependencies are required:
- [jsonpatch](https://pypi.org/project/jsonpatch)
- [PHP](https://www.php.net)
- [composer](https://getcomposer.org)
## Picking an issue
You may wish to start with our list of [good first issues](https://github.com/nextcloud/neon/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22)
## Commits
All commits need to be signed and signed off to to be pass our tests.
To sign off your commits use `git commit --signoff`.
To setup commit signing please consult the [Github documentation](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits).
## Conventional commits
We use conventional commits to have meaningful commit messages and be able to generate changelogs.
A non-breaking feature contribution to `neon_notes` could look like this:
```bash
@ -60,8 +44,3 @@ This way we can make sure it will not be introduced again.
## Documentation
Whenever you are submitting new features make sure to also add documentation comments in the code.
Please adhere to the [effective-dart](https://dart.dev/effective-dart/documentation) documentation guidelines.
## Workflow
We use a rebase workflow, meaning that we rebase PRs onto the latest main branch instead of merging the current main into the development branches.
This helps to keep the git history cleaner and easier to bisect in the case of debugging an error.
You can read more on it [here](https://www.atlassian.com/git/tutorials/merging-vs-rebasing).

0
assets/AGPL-3.0.txt → LICENSE

88
README.md

@ -1,74 +1,70 @@
# Neon
# neon
<img src="assets/logo.svg" alt="Neon logo" width="200"/>
A framework for building convergent cross-platform Nextcloud clients using Flutter.
## The goals of Neon
## Features
See [here](packages/app/README.md) for screenshots.
- :heavy_check_mark: Supported
- :rocket: Planned
The Neon project has three main goals:
| App | Status |
|---------------|--------------------|
| Files | :heavy_check_mark: |
| News | :heavy_check_mark: |
| Notes | :heavy_check_mark: |
| Notifications | :heavy_check_mark: |
| Activity | :rocket: |
| Calendar | :rocket: |
| Contacts | :rocket: |
| Cookbook | :rocket: |
| Dashboard | :rocket: |
| Photos | :rocket: |
| Talk | :rocket: |
| Tasks | :rocket: |
1. The [Neon framework](packages/neon/neon) does the heavy lifting for Nextcloud client developers. Neon already handles the authentication flow and manages data requests and caching. This means that developers can reuse a lot of the code and do not need to reinvent the wheel.
2. The [Neon app](packages/app) is a cross-platform Nextcloud client that runs on iOS, Android, macOS, Windows, Linux and Web. We already support Android and Linux with the other platforms being work in progress.
3. The [Neon app](packages/app) is a multi client app. This means that you can have multiple clients in the same mobile app. It enables seamless switching between multiple apps as Nextcloud users have enjoyed on the web forever.
## Problems with other clients and how this project tries to solve them
### Current problems with other clients
_Excerpt from my job application to Nextcloud:_
- There are many clients that are designed to run exclusively on a single platform or device type. They all have different code bases, which makes feature parity and maintenance much more difficult.
- The user experience and features differ significantly from platform to platform, which leads to frustration. This particularly affects mobile devices running Linux (e.g. postmarketOS). There is no suitable client on this platform at all. Using the desktop Linux client for file synchronization would probably work, but it still lacks almost all the features available on e.g. Android and the client is not converging to the needs of a mobile screens.
- Even on feature-rich platforms, features are spread across multiple apps, making it more complicated for the user who simply wants to get the most out of their Nextcloud server on their device.
- The user experience and features differ significantly from platform to platform, which leads to frustration. This particularly affects mobile devices running Linux (e.g. postmarketOS). There is no suitable client on this platform at all. Using the desktop Linux client for file synchronization would probably work, but this platform still lacks almost all the features available on e.g. Android and the client is not made for mobile screens. Someone who uses Linux on their mobile device is likely also interested in Nextcloud, so the need for a solution is definitely there.
- Even on feature-rich platforms, features are spread across multiple apps (e.g. on Android), making it more complicated for the user who simply wants to get the most out of their Nextcloud server on their device.
### How Neon as a framework tries to solve them
The Neon project uses [Dart](https://dart.dev/) and [Flutter](https://flutter.dev/) to help mobile client developers building apps. Flutter allows us to build convergent cross-platform clients that feel native.
We are a 100% FOSS framework and do not rely on any proprietary libraries making it easy for developers to publish their apps in places like the [F-Droid](https://f-droid.org/) store.
We provide a generated [Nextcloud Dart client](packages/nextcloud) that is generated from the new OpenAPI specifications shipped with Nextcloud and is already being used by other Dart and Flutter projects. Gone are the days of looking at the PHP code and implementing an API client by hand which can be time-consuming and very error-prone.
This project uses OpenAPI specifications to generate all the necessary API client code.
This vastly reduces the developer efforts of writing a lot of boilerplate code and having to look at the PHP source code.
Most server APIs were not well or at all documented until now (there are some exceptions).
Based on this work a project at the Nextcloud company started for adopting OpenAPI to document the server APIs.
The OpenAPI specifications are generated completely automated from the source code (although some changes to the type annotations are required) and are validated with static analysis of the PHP code.
These efforts are not done yet, but this project basically became the front-line for testing the automatically generated specifications.
We provide abstractions, common utilities and prebuilt UI components (called Widgets in Flutter) that can be re-used. This allows Neon to make developing a new Nextcloud client as easy as adding a few custom UI elements and the necessary state management, while everything else is already taken care of for you.
We use flutter because of its cross-platform capabilities.
To decrease the developer burden, a lot of useful widgets and utilities have been developed, so that they can be re-used.
Trying to make everything re-usable is a major goal of this project, as we want to close the gap between platforms and functionalities and make development of new clients and apps enjoyable and fast.
Developing a new Nextcloud client can be as easy as adding some UI and then necessary state management, everything else is taken care of for you.
## Contributing
We encourage every client developer to contribute their app implementation back into Neon.
This way the app developers can choose from a large set of clients to enable.
Checkout our [contributing docs](CONTRIBUTING.md) to get started with developing with Neon.
We have a lot of [documentation](docs) from helping you set up your development environment to our guidelines.
Please make sure to read them before starting to contribute.
## Development and support
We have a Matrix space where you can ask questions: https://matrix.to/#/#nextcloud-neon:matrix.org
## Features
See [here](packages/app/README.md) for screenshots.
## Documentation
- :heavy_check_mark: Supported
- :construction: Work in progress
- :rocket: Planned
| App | Status |
|---------------------------------------------------|--------------------|
| [Dashboard](packages/neon/neon_dashboard) | :heavy_check_mark: |
| [Files](packages/neon/neon_files) | :heavy_check_mark: |
| [News](packages/neon/neon_news) | :heavy_check_mark: |
| [Notes](packages/neon/neon_notes) | :heavy_check_mark: |
| [Notifications](packages/neon/neon_notifications) | :heavy_check_mark: |
| Activity | :rocket: |
| Calendar | :rocket: |
| Contacts | :rocket: |
| Cookbook | :rocket: |
| Photos | :rocket: |
| Talk | :rocket: |
| Tasks | :rocket: |
See [docs](./docs).
## Platform support
| Platform | Progress |
|-----------|--------------------|
| Android | :heavy_check_mark: |
| iOS | :construction: |
| MacOS | :construction: |
| Linux | :heavy_check_mark: |
| Windows | :rocket: |
| Web | :construction: |
Except for web, Neon should run on all supported Flutter platforms in the future.
Right now this is not the case, only Android and Linux are supported and tested, but this can easily be extended to other platforms.
The features and problems of all platforms should be considered when implementing new features.

11
assets/BSD-3-Clause.txt

@ -1,11 +0,0 @@
Copyright (c) 2023 provokateurin.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

3
commitlint.yaml

@ -13,12 +13,9 @@ rules:
- tool
- app
- dynamite
- dynamite_petstore_example
- dynamite_runtime
- dynamite_end_to_end_test
- file_icons
- neon
- neon_dashboard
- neon_files
- neon_news
- neon_notes

56
cspell.json

@ -1,56 +0,0 @@
{
"version": "0.2",
"language": "en",
"useGitignore": true,
"enableGlobDot": false,
"words": [
"OpenAPI"
],
"ignorePaths": [
"**.svg",
"**/assets",
"**/l10n/!(en.arb)",
"external",
"packages/dynamite/dynamite_petstore_example/lib",
"packages/file_icons/lib/src/data.dart",
"packages/neon_lints/lib",
"tool/dev/static"
],
"dictionaries": [
"bash",
"dart_flutter",
"en_US",
"misc",
"neon",
"nextcloud",
"softwareTerms",
"tools",
"webdav"
],
"dictionaryDefinitions": [
{
"name": "dart_flutter",
"path": ".cspell/dart_flutter.txt"
},
{
"name": "misc",
"path": ".cspell/misc.txt"
},
{
"name": "neon",
"path": ".cspell/neon.txt"
},
{
"name": "nextcloud",
"path": ".cspell/nextcloud.txt"
},
{
"name": "tools",
"path": ".cspell/tools.txt"
},
{
"name": "webdav",
"path": ".cspell/webdav.txt"
}
]
}

35
dartdoc_options.yaml

@ -1,35 +0,0 @@
include: package:neon_lints/dartdoc_options.yaml
dartdoc:
nodoc: ['lib/l10n/*.dart']
showUndocumentedCategories: true
ignore:
## Errors that are ignored:
## Warnings that are ignored:
- reexported-private-api-across-packages
## Default ignores for dartdoc:
errors:
## Default errors of dartdoc:
- duplicate-file
- invalid-parameter
- tool-error
- unresolved-export
## Warnings that are elevated to errors:
- ambiguous-doc-reference
- ambiguous-reexport
- broken-link
- category-order-gives-missing-package-name
- deprecated
- ignored-canonical-for
- missing-from-search-index
- no-canonical-found
- no-documentable-libraries
- no-library-level-docs
- orphaned-file
- unknown-file
- unknown-macro
- unresolved-doc-reference
## Ignores that are elevated to errors:
# - type-as-html # broken, https://github.com/dart-lang/dartdoc/issues/3545
- missing-constant-constructor
- missing-code-block-language

25
docs/README.md

@ -1,28 +1,9 @@
# Documentation
## Terminology
There can be a lot of confusion what an `app` is. It can mean a server app conventionally written in PHP, the app implementation of one or a mobile app built with Neon.
We try to use the following naming:
- **App** as the resulting user facing app that enables one or more clients
- **Client** for the implementation of a server PHP app
- **API-Client** as the Dart client generated from the OpenAPI specifications
- **Server app** as the app running on the server conventionally built with PHP
- **Neon project** is this entire mono repository containing all the code
- **Neon framework** the Flutter Nextcloud app framework itself
## [Code of Conduct](../CODE_OF_CONDUCT.md)
## Code of Conduct
Please read the [Code of Conduct](../CODE_OF_CONDUCT.md). This document offers some guidance to ensure Nextcloud and Neon participants can cooperate effectively in a positive and inspiring atmosphere, and to explain how together we can strengthen and support each other.
## [Contributing](../CONTRIBUTING.md)
## Contributing
Please review the [guidelines for contributing](../CONTRIBUTING.md) to this repository to help you get started with our workflows and tools.
## Architecture overview
Check out our little [overview](architecture.md) of how the Neon project is built to help you get started.
## [Architecture overview](architecture.md)
## [Login user flow](login.md)
## [Neon workflows](workflows.md)
We have documented various workflows for working with the mono repo structure like adding a new package.
## [Dependencies](dependencies.md)
How we pin and upgrade our dependencies

11
docs/architecture.md

@ -2,9 +2,8 @@
![Architecture overview diagram](architecture.svg)
The Neon project consists of multiple packages:
- The `nextcloud` package provides implementations for multiple server APIs. These are generated with the `dynamite` generator utilizing the OpenAPI specifications shipping since Nextcloud Hub 6.
- Plugins are special clients that are deeper implemented into the framework and need to be closely coupled with it.
- The individual clients are implemented as separate packages. These depend on the Neon framework and implement a few common interfaces, so they can be used together in apps.
- The main star is the `neon` package that provides common UI components (Widgets) and functionality that is useful for building Nextcloud apps. It also manages the global state at runtime so clients do not have to manage multiple accounts, data fetching or caching.
- On top of all that sits the app package that injects a set of selected clients into the framework. It is possible to configure which one should be included and add custom styling and branding to it.
The framework consists of multiple packages:
- For APIs the nextcloud package provides the implementations. The dynamite generator generates the code using the OpenAPI specs.
- The main package is the neon package that provides widgets and functionality that is useful for building a Nextcloud client. It also manages the global state at runtime so that the app implementations do not have to manage things like multiple accounts for example.
- The individual apps are implemented as separate packages. Those depend on the neon framework and implement a few interfaces so that the neon framework can use them.
- On top of all that sits the app package that injects the relevant app implementations into the framework. It is possible to configure which app implementations should be included and how the app is branded.

12
docs/architecture.puml

@ -1,14 +1,14 @@
@startuml architecture
package "Neon framework" {
package "neon framework" {
component neon
component nextcloud
component settings
component sort_box
component file_icons
}
package "Clients" {
component neon_dashboard
package "App implementations" {
component neon_files
component neon_news
component neon_notes
@ -17,12 +17,11 @@ package "Clients" {
package "OpenAPI" {
component dynamite
component specifications
component specs
}
component app
app ..> neon_dashboard
app ..> neon_files
app ..> neon_news
app ..> neon_notes
@ -35,10 +34,11 @@ neon_notifications --> neon
neon --> nextcloud
neon --> settings
neon --> sort_box
neon --> file_icons
dynamite --> nextcloud
specifications --> nextcloud
specs --> nextcloud
@enduml

2
docs/architecture.svg

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

8
docs/dependencies.md

@ -1,8 +0,0 @@
# Dependencies
We follow the guidelines outlined in https://dart.dev/tools/pub/dependencies with some rules and automatic workflows:
1. We use the caret notation with the major version set to the latest major version and the minor and patch versions set to `0`. The constraint will be updated in case we need a particular feature or bug fix that was released in a newer version.
2. Dev dependencies should be pinned to the latest versions since they do not affect consumers of our packages.
3. Using Renovate we automatically update our dependency constraints. For non-dev dependencies this will be the latest major version, for everything else it will upgrade to the latest minor and patch versions as well. The lock files are also kept up-to-date with Renovate to compile everything with the latest available versions.
4. The same rules and automatic workflows apply to the Dart and Flutter versions we use.
5. The `app` package does not constrain the versions so the latest versions can be used.

2
docs/login.svg

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

11
docs/workflows.md

@ -1,11 +0,0 @@
# Workflows
## Adding a new package to the Neon project
If you need to add a new package to the Neon project please make sure to execute all the following steps:
1. Use the according template by running `fvm dart create -t package package_name` or `fvm flutter create -t package package_name`.
2. Make sure to activate our strict linting by adding it to the package.
3. Regenerate the dependency overrides by executing `melos bootstrap`.
4. Add a Symlink to our main [license](../assets/AGPL-3.0.txt).
5. Update [commitlint.yaml](../commitlint.yaml) by adding the new package name.
6. Remove the package `.gitignore` (a global `.gitignore` for all packages is used instead).

2
external/nextcloud-news vendored

@ -1 +1 @@
Subproject commit d56d4b4d4eaeaf71fd25298596e032073fea9056
Subproject commit 144d6d188e2280896f6cacc2218e583d939b4407

2
external/nextcloud-notes vendored

@ -1 +1 @@
Subproject commit 0785e69d2b65cf3ed0347c6da0f38dc0e9ed6903
Subproject commit 50e881eb151ec5b94fa2bfe0b94c5cd3bbc2acc7

2
external/nextcloud-notifications vendored

@ -1 +1 @@
Subproject commit ba53fd66d1bf421765b0b6678aad868bae5a3889
Subproject commit 09d3a1c9abcdd1c0ec4d8531907b56ac9f368666

2
external/nextcloud-server vendored

@ -1 +1 @@
Subproject commit 4154ba343b9b188e40f327fb78d9eb5083e163a1
Subproject commit 020401b6c82930783188fd428b961ddd4a296656

1
external/nextcloud-spreed vendored

@ -1 +0,0 @@
Subproject commit 7489cced7336f83d477aeda5c902f5bb08ebddfd

1
external/nextcloud-uppush vendored

@ -0,0 +1 @@
Subproject commit 5ae33f4ebae9e478d40d2c776d9d305a58a829aa

1
external/openapi-specification vendored

@ -1 +0,0 @@
Subproject commit f73731dd34ffbf68512a363b579504b294986b53

7
melos.yaml

@ -18,14 +18,9 @@ ide:
intellij:
enabled: false
command:
bootstrap:
hooks:
post: melos run format
scripts:
format: dart format --fix --line-length 120 .
format:check: dart format --output=none --set-exit-if-changed --line-length 120 .
format-check: dart format --output=none --set-exit-if-changed --line-length 120 .
analyze: dart analyze --fatal-infos .
test: melos exec --concurrency=1 --fail-fast --dir-exists=test -- "flutter test --concurrency=$(nproc --all)"
generate:neon:build_runner: melos exec --scope="neon*" --file-exists="build.yaml" -- dart run build_runner build --delete-conflicting-outputs && melos run format

48
packages/app/.gitignore vendored

@ -0,0 +1,48 @@
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
# 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/
# Web related
lib/generated_plugin_registrant.dart
# 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
.flatpak-builder/

33
packages/app/.metadata

@ -1,33 +0,0 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled and should not be manually edited.
version:
revision: "ead455963c12b453cdb2358cad34969c76daf180"
channel: "stable"
project_type: app
# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: ead455963c12b453cdb2358cad34969c76daf180
base_revision: ead455963c12b453cdb2358cad34969c76daf180
- platform: android
create_revision: ead455963c12b453cdb2358cad34969c76daf180
base_revision: ead455963c12b453cdb2358cad34969c76daf180
- platform: linux
create_revision: ead455963c12b453cdb2358cad34969c76daf180
base_revision: ead455963c12b453cdb2358cad34969c76daf180
# User provided section
# List of Local paths (relative to this file) that should be
# ignored by the migrate tool.
#
# Files that are not part of the templates will be ignored by default.
unmanaged_files:
- 'lib/main.dart'
- 'ios/Runner.xcodeproj/project.pbxproj'

2
packages/app/LICENSE

@ -1 +1 @@
../../assets/AGPL-3.0.txt
../../LICENSE

BIN
packages/app/android/app/src/main/res/mipmap-hdpi/app_dashboard.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

BIN
packages/app/android/app/src/main/res/mipmap-hdpi/app_files.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 616 B

After

Width:  |  Height:  |  Size: 499 B

BIN
packages/app/android/app/src/main/res/mipmap-mdpi/app_dashboard.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

BIN
packages/app/android/app/src/main/res/mipmap-mdpi/app_files.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 421 B

After

Width:  |  Height:  |  Size: 337 B

BIN
packages/app/android/app/src/main/res/mipmap-xhdpi/app_dashboard.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

BIN
packages/app/android/app/src/main/res/mipmap-xhdpi/app_files.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 779 B

After

Width:  |  Height:  |  Size: 583 B

BIN
packages/app/android/app/src/main/res/mipmap-xxhdpi/app_dashboard.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

BIN
packages/app/android/app/src/main/res/mipmap-xxhdpi/app_files.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 843 B

BIN
packages/app/android/app/src/main/res/mipmap-xxxhdpi/app_dashboard.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

BIN
packages/app/android/app/src/main/res/mipmap-xxxhdpi/app_files.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

2
packages/app/android/build.gradle

@ -1,5 +1,5 @@
buildscript {
ext.kotlin_version = '1.9.21'
ext.kotlin_version = '1.9.10'
repositories {
google()
mavenCentral()

2
packages/app/android/gradle/wrapper/gradle-wrapper.properties vendored

@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.2-all.zip

1
packages/app/assets/logo.svg

@ -0,0 +1 @@
../../../assets/logo.svg

BIN
packages/app/assets/logo.svg.vec

Binary file not shown.

33
packages/app/integration_test/screenshot_test.dart

@ -1,23 +1,20 @@
import 'dart:io';
import 'package:app/apps.dart';
import 'package:app/branding.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_material_design_icons/flutter_material_design_icons.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';
import 'package:neon/models.dart';
import 'package:neon/neon.dart';
import 'package:neon/nextcloud.dart';
import 'package:neon/settings.dart';
import 'package:neon_files/widgets/actions.dart';
import 'package:nextcloud/core.dart' as core;
import 'package:nextcloud/news.dart' as news;
import 'package:nextcloud/nextcloud.dart';
import 'package:nextcloud/notes.dart' as notes;
import 'package:nextcloud/notifications.dart' as notifications;
import 'package:shared_preferences/shared_preferences.dart';
import 'package:universal_io/io.dart';
Future<void> runTestApp(
Future runTestApp(
final WidgetTester tester,
final IntegrationTestWidgetsFlutterBinding binding, {
final Account? account,
@ -33,18 +30,18 @@ Future<void> runTestApp(
await tester.pumpAndSettle();
}
Future<void> openDrawer(final WidgetTester tester) async {
Future openDrawer(final WidgetTester tester) async {
await tester.tap(find.byTooltip('Open navigation menu'));
await tester.pumpAndSettle();
}
Future<void> switchPage(final WidgetTester tester, final String name) async {
Future switchPage(final WidgetTester tester, final String name) async {
await openDrawer(tester);
await tester.tap(find.text(name).last);
await tester.pumpAndSettle();
}
Future<void> prepareScreenshot(final WidgetTester tester, final IntegrationTestWidgetsFlutterBinding binding) async {
Future prepareScreenshot(final WidgetTester tester, final IntegrationTestWidgetsFlutterBinding binding) async {
await binding.convertFlutterSurfaceToImage();
await tester.pumpAndSettle();
}
@ -56,7 +53,6 @@ Future<Account> getAccount(final String username) async {
loginName: username,
password: username,
).core.appPassword.getAppPassword())
.body
.ocs
.data
.apppassword;
@ -67,7 +63,7 @@ Future<Account> getAccount(final String username) async {
);
}
Future<void> main() async {
Future main() async {
// The screenshots are pretty annoying on Android. See https://github.com/flutter/flutter/issues/92381
assert(Platform.isAndroid, 'Screenshots need to be taken on Android');
@ -81,8 +77,9 @@ Future<void> main() async {
await SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, overlays: []);
});
setUp(() {
setUp(() async {
SharedPreferences.setMockInitialValues({});
NeonStorage.mock(await SharedPreferences.getInstance());
});
testWidgets('login', (final tester) async {
@ -153,7 +150,7 @@ Future<void> main() async {
final folder = await account.client.news.createFolder(name: 'test');
await account.client.news.addFeed(
url: nasaFeedURL,
folderId: folder.body.folders.single.id,
folderId: folder.folders.single.id,
);
await runTestApp(
@ -283,7 +280,7 @@ Future<void> main() async {
});
testWidgets('notifications', (final tester) async {
await (await getAccount('admin')).client.notifications.api.generateNotification(
await (await getAccount('admin')).client.notifications.sendAdminNotification(
userId: account.username,
shortMessage: 'Notifications demo',
longMessage: 'This is a notifications demo of the Neon app',
@ -350,7 +347,7 @@ Future<void> main() async {
await binding.takeScreenshot('settings_dark');
// Enable OLED theme
await tester.tap(find.byType(SwitchListTile).first);
await tester.tap(find.byType(CheckboxListTile).first);
await tester.pumpAndSettle();
await binding.takeScreenshot('settings_oled');
@ -368,7 +365,7 @@ Future<void> main() async {
await binding.takeScreenshot('settings_accounts');
// Go to account settings
await tester.tap(find.text('demo@10.0.2.2:80'));
await tester.tap(find.text('demo@10.0.2.2'));
await tester.pumpAndSettle();
await tester.tap(find.text('Automatic'));
await tester.pumpAndSettle();

5
packages/neon/neon_dashboard/l10n.yaml → packages/app/l10n.yaml

@ -1,7 +1,6 @@
arb-dir: lib/l10n
arb-dir: ../neon/neon/lib/l10n
template-arb-file: en.arb
output-localization-file: localizations.dart
synthetic-package: false
output-class: DashboardLocalizations
output-dir: lib/l10n
output-dir: ../neon/neon/lib/l10n
nullable-getter: false

7
packages/app/lib/apps.dart

@ -1,15 +1,12 @@
import 'package:neon/models.dart';
import 'package:neon_dashboard/neon_dashboard.dart';
import 'package:neon_files/neon_files.dart';
import 'package:neon_news/neon_news.dart';
import 'package:neon_notes/neon_notes.dart';
import 'package:neon_notifications/neon_notifications.dart';
/// The collection of clients enabled for the Neon app.
final Set<AppImplementation> appImplementations = {
DashboardApp(),
final List<AppImplementation> appImplementations = [
FilesApp(),
NewsApp(),
NotesApp(),
NotificationsApp(),
};
];

17
packages/app/lib/branding.dart

@ -1,30 +1,23 @@
import 'dart:ui';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:neon/theme.dart';
import 'package:vector_graphics/vector_graphics.dart';
/// The custom theme used in the Neon app.
const neonTheme = NeonTheme(
final neonTheme = NeonTheme(
branding: branding,
colorScheme: colorScheme,
);
/// The custom branding used in the Neon app.
const branding = Branding(
final branding = Branding(
name: 'Nextcloud Neon',
logo: VectorGraphic(
logo: SvgPicture.asset(
'assets/logo.svg',
width: 100,
height: 100,
loader: AssetBytesLoader(
'assets/logo.svg.vec',
),
),
sourceCodeURL: 'https://github.com/nextcloud/neon',
issueTrackerURL: 'https://github.com/nextcloud/neon/issues',
legalese: 'Copyright © 2023, provokateurin\nUnder GPLv3 license',
);
/// The custom color scheme used in the Neon app.
const colorScheme = NeonColorScheme(
primary: Color(0xFFF37736),
);

2
packages/app/lib/main.dart

@ -2,7 +2,7 @@ import 'package:app/apps.dart';
import 'package:app/branding.dart';
import 'package:neon/neon.dart';
Future<void> main() async {
Future main() async {
await runNeon(
appImplementations: appImplementations,
theme: neonTheme,

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

@ -6,7 +6,6 @@
#include "generated_plugin_registrant.h"
#include <dynamic_color/dynamic_color_plugin.h>
#include <file_selector_linux/file_selector_plugin.h>
#include <screen_retriever/screen_retriever_plugin.h>
#include <tray_manager/tray_manager_plugin.h>
@ -14,9 +13,6 @@
#include <window_manager/window_manager_plugin.h>
void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) dynamic_color_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "DynamicColorPlugin");
dynamic_color_plugin_register_with_registrar(dynamic_color_registrar);
g_autoptr(FlPluginRegistrar) file_selector_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "FileSelectorPlugin");
file_selector_plugin_register_with_registrar(file_selector_linux_registrar);

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

@ -3,7 +3,6 @@
#
list(APPEND FLUTTER_PLUGIN_LIST
dynamic_color
file_selector_linux
screen_retriever
tray_manager

513
packages/app/pubspec.lock

File diff suppressed because it is too large Load Diff

20
packages/app/pubspec.yaml

@ -3,20 +3,17 @@ version: 1.0.0
publish_to: 'none'
environment:
sdk: '>=3.2.0 <4.0.0'
flutter: '>=3.16.0'
sdk: '>=3.1.0 <4.0.0'
flutter: '>=3.13.2'
dependencies:
flutter:
sdk: flutter
flutter_svg: ^2.0.7
neon:
git:
url: https://github.com/nextcloud/neon
path: packages/neon/neon
neon_dashboard:
git:
url: https://github.com/nextcloud/neon
path: packages/neon/neon_dashboard
neon_files:
git:
url: https://github.com/nextcloud/neon
@ -33,25 +30,18 @@ dependencies:
git:
url: https://github.com/nextcloud/neon
path: packages/neon/neon_notifications
universal_io: any
vector_graphics: any
dev_dependencies:
flutter_material_design_icons: any
flutter_test:
sdk: flutter
integration_test:
sdk: flutter
material_design_icons_flutter: ^7.0.7296
neon_lints:
git:
url: https://github.com/nextcloud/neon
path: packages/neon_lints
nextcloud:
git:
url: https://github.com/nextcloud/neon
path: packages/nextcloud
shared_preferences: any
vector_graphics_compiler: any
shared_preferences: ^2.2.1
flutter:
uses-material-design: true

4
packages/app/pubspec_overrides.yaml

@ -1,4 +1,4 @@
# melos_managed_dependency_overrides: dynamite_runtime,file_icons,neon,neon_dashboard,neon_files,neon_lints,neon_news,neon_notes,neon_notifications,nextcloud,sort_box
# melos_managed_dependency_overrides: dynamite_runtime,file_icons,neon,neon_files,neon_news,neon_notes,neon_notifications,nextcloud,sort_box,neon_lints
dependency_overrides:
dynamite_runtime:
path: ../dynamite/dynamite_runtime
@ -6,8 +6,6 @@ dependency_overrides:
path: ../file_icons
neon:
path: ../neon/neon
neon_dashboard:
path: ../neon/neon_dashboard
neon_files:
path: ../neon/neon_files
neon_lints:

BIN
packages/app/screenshots/files_actions.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 505 KiB

After

Width:  |  Height:  |  Size: 498 KiB

BIN
packages/app/screenshots/files_create.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 417 KiB

After

Width:  |  Height:  |  Size: 411 KiB

BIN
packages/app/screenshots/files_details.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.1 MiB

BIN
packages/app/screenshots/files_photos.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 482 KiB

After

Width:  |  Height:  |  Size: 473 KiB

BIN
packages/app/screenshots/files_root.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 254 KiB

After

Width:  |  Height:  |  Size: 236 KiB

BIN
packages/app/screenshots/home_drawer.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

After

Width:  |  Height:  |  Size: 101 KiB

BIN
packages/app/screenshots/login_server_selection.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 KiB

After

Width:  |  Height:  |  Size: 98 KiB

BIN
packages/app/screenshots/news_articles_starred_list.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 156 KiB

After

Width:  |  Height:  |  Size: 154 KiB

BIN
packages/app/screenshots/news_articles_unread_list.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 446 KiB

After

Width:  |  Height:  |  Size: 469 KiB

BIN
packages/app/screenshots/news_feed_add.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 KiB

After

Width:  |  Height:  |  Size: 93 KiB

BIN
packages/app/screenshots/news_feed_articles_list.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 508 KiB

After

Width:  |  Height:  |  Size: 520 KiB

BIN
packages/app/screenshots/news_feeds_list.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 150 KiB

After

Width:  |  Height:  |  Size: 142 KiB

BIN
packages/app/screenshots/news_folders_list.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 KiB

After

Width:  |  Height:  |  Size: 76 KiB

BIN
packages/app/screenshots/notes_categories_list.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

After

Width:  |  Height:  |  Size: 77 KiB

BIN
packages/app/screenshots/notes_note_create.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

After

Width:  |  Height:  |  Size: 97 KiB

BIN
packages/app/screenshots/notes_note_edit.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 52 KiB

BIN
packages/app/screenshots/notes_note_preview.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 50 KiB

BIN
packages/app/screenshots/notes_notes_list.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

After

Width:  |  Height:  |  Size: 85 KiB

BIN
packages/app/screenshots/notifications_list.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

After

Width:  |  Height:  |  Size: 76 KiB

BIN
packages/app/screenshots/settings_account.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 KiB

After

Width:  |  Height:  |  Size: 114 KiB

BIN
packages/app/screenshots/settings_accounts.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 172 KiB

After

Width:  |  Height:  |  Size: 161 KiB

BIN
packages/app/screenshots/settings_app_files.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 150 KiB

After

Width:  |  Height:  |  Size: 151 KiB

BIN
packages/app/screenshots/settings_app_news.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 240 KiB

After

Width:  |  Height:  |  Size: 231 KiB

BIN
packages/app/screenshots/settings_app_notes.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 171 KiB

After

Width:  |  Height:  |  Size: 160 KiB

BIN
packages/app/screenshots/settings_dark.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 KiB

After

Width:  |  Height:  |  Size: 144 KiB

BIN
packages/app/screenshots/settings_light.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 155 KiB

After

Width:  |  Height:  |  Size: 146 KiB

BIN
packages/app/screenshots/settings_oled.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 150 KiB

After

Width:  |  Height:  |  Size: 143 KiB

12
packages/dynamite/dynamite/.gitignore vendored

@ -0,0 +1,12 @@
# Files and directories created by pub.
.dart_tool/
.packages
# Conventional directory for build outputs.
build/
# Omit committing pubspec.lock for library packages; see
# https://dart.dev/guides/libraries/private-files#pubspeclock.
pubspec.lock
coverage/

2
packages/dynamite/dynamite/LICENSE

@ -1 +1 @@
../../../assets/AGPL-3.0.txt
../../../LICENSE

30
packages/dynamite/dynamite/README.md

@ -1,30 +0,0 @@
Provides a [Dart Build System](https://github.com/dart-lang/build) builder for generating clients from an [OpenAPI specifications](https://swagger.io/specification/).
The builder generates code if it find files with an `.openapi.json` or `.openapi.yaml` extension in the lib directory.
# Build configuration
You can configure code generation by setting values in the `build.yaml`.
```yaml
targets:
$default:
builders:
dynamite:
options:
# Options configure how source code is generated.
#
# The following are sensible default values that ignores the schemas for the coverage.
pageWidth: 120
analyzer_ignores:
- camel_case_types
- discarded_futures
- public_member_api_docs
- unreachable_switch_case
coverage_ignores:
- 'const .*\._\(\);'
- 'factory .*\.fromJson\(Map<String, dynamic> json\) => _jsonSerializers\.deserializeWith\(serializer, json\)!;'
- 'Map<String, dynamic> toJson\(\) => _jsonSerializers\.serializeWith\(serializer, this\)! as Map<String, dynamic>;'
- 'static BuiltSet<.*> get values => _\$.*Values;'
```

13
packages/dynamite/dynamite/build.yaml

@ -1,3 +1,16 @@
targets:
$default:
builders:
json_serializable:
options:
disallow_unrecognized_keys: true
explicit_to_json: true
create_factory: true
create_to_json: true
include_if_null: false
dynamite:
enabled: true
builders:
dynamite:
import: "package:dynamite/builder.dart"

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save