Compare commits

...

144 Commits

Author SHA1 Message Date
ricoberger
63f7ab7bf6 Prepare v1.4.1 Release 2024-08-07 17:38:04 +02:00
Rico Berger
676ff316d7 [core] Fix Warnings and Regenerate Splash Screens (#186)
This commit fixes the following warnings for the web build:

```
Warning: In index.html:38: Local variable for "serviceWorkerVersion" is deprecated. Use "{{flutter_service_worker_version}}" template token instead.
Warning: In index.html:60: "FlutterLoader.loadEntrypoint" is deprecated. Use "FlutterLoader.load" instead.
```

To re-add the slash screen we alsow run the
`flutter pub run flutter_native_splash:create` command again, which also
updated the splash screens for iOS and Android.

Last but not least this commit also fixes the following warnings for the
Windows build:

```
windows/runner/flutter_window.cpp does not ensure the show window callback is called, updating.
windows/flutter/CMakeLists.txt does not use FLUTTER_TARGET_PLATFORM, updating.
```
2024-08-07 17:34:19 +02:00
Rico Berger
3eccb0bd4a [core] Fix Web Build (#185)
Fix web build be initializing `JustAudioMediaKit` only on Linux and
Windows where it is really used. The corresponding issue for the broken
web build can be found here
https://github.com/Pato05/just_audio_media_kit/issues/15.

To test the web build on every PR to avoid such issues, the CI/CD
pipeline for the web build is now also run on every PR. On PRs we skip
the upload to Cloudflare for the web build.
2024-08-06 17:05:26 +02:00
Rico Berger
351c61f613 [core] Fix Metadata for Flatpak (#184)
The Linux version of the app is distributed via Flatpak, this commit
fixes some issues shown in the validation on Flathub. This includes the
summary and branding color and the app icon which should be square
instead of round.
2024-08-06 14:27:09 +02:00
Rico Berger
333e762539 [core] Upload Raw Build in Windows CI/CD Pipeline (#183)
Upload the raw build of the app in the Windows CI/CD pipeline, so that
we can test the production build during a new release.

We also had to adjust the Windows runner to `windows-2019`, because the
build on `windows-latest` and `windows-2022` can not be startet after
downloading it.
2024-08-06 09:40:13 +02:00
Rico Berger
280a222210 [podcast] Fix Audio Playback on Windows and Linux (#182)
Fix the audio playback on Windows and Linux for the podcast player by
adding the missing initialization for `JustAudioMediaKit`.
2024-08-06 07:45:15 +02:00
ricoberger
4853eeb0a8 Add Verification File for Flathub 2024-08-04 18:21:27 +02:00
ricoberger
9e9bf01b5b Fix Issues in app.feeddeck.feeddeck.metainfo.xml File 2024-08-04 18:09:59 +02:00
ricoberger
8989442fc1 Update Description in README 2024-08-04 15:12:13 +02:00
ricoberger
befe5b5977 Prepare v1.4.0 Release 2024-08-04 14:38:08 +02:00
dependabot[bot]
11585f284c Bump the pub group in /app with 12 updates (#181)
* Bump the pub group in /app with 12 updates

Bumps the pub group in /app with 12 updates:

| Package | From | To |
| --- | --- | --- |
| [app_links](https://github.com/llfbandit/app_links) | `6.1.3` | `6.1.4` |
| [flutter_cache_manager](https://github.com/Baseflow/flutter_cache_manager) | `3.3.2` | `3.4.0` |
| [flutter_native_splash](https://github.com/jonbhanson/flutter_native_splash) | `2.4.0` | `2.4.1` |
| [http](https://github.com/dart-lang/http/tree/master/pkgs) | `1.2.1` | `1.2.2` |
| [just_audio](https://github.com/ryanheise/just_audio) | `0.9.38` | `0.9.39` |
| [just_audio_background](https://github.com/ryanheise/just_audio) | `0.0.1-beta.12` | `0.0.1-beta.13` |
| [just_audio_media_kit](https://github.com/Pato05/just_audio_media_kit) | `2.0.4` | `2.0.5` |
| [package_info_plus](https://github.com/fluttercommunity/plus_plugins/tree/main/packages/package_info_plus) | `8.0.0` | `8.0.1` |
| [purchases_flutter](https://github.com/RevenueCat/purchases-flutter) | `6.29.4` | `6.30.2` |
| [shared_preferences](https://github.com/flutter/packages/tree/main/packages/shared_preferences) | `2.2.3` | `2.3.0` |
| [supabase_flutter](https://github.com/supabase/supabase-flutter/tree/main/packages) | `2.5.6` | `2.5.11` |
| [timeago](https://github.com/andresaraujo/timeago.dart) | `3.6.1` | `3.7.0` |


Updates `app_links` from 6.1.3 to 6.1.4
- [Release notes](https://github.com/llfbandit/app_links/releases)
- [Commits](https://github.com/llfbandit/app_links/compare/6.1.3...6.1.4)

Updates `flutter_cache_manager` from 3.3.2 to 3.4.0
- [Commits](https://github.com/Baseflow/flutter_cache_manager/compare/flutter_cache_manager_v3.3.2...v3.4.0)

Updates `flutter_native_splash` from 2.4.0 to 2.4.1
- [Release notes](https://github.com/jonbhanson/flutter_native_splash/releases)
- [Changelog](https://github.com/jonbhanson/flutter_native_splash/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jonbhanson/flutter_native_splash/commits)

Updates `http` from 1.2.1 to 1.2.2
- [Release notes](https://github.com/dart-lang/http/releases)
- [Commits](https://github.com/dart-lang/http/commits/http-v1.2.2/pkgs)

Updates `just_audio` from 0.9.38 to 0.9.39
- [Release notes](https://github.com/ryanheise/just_audio/releases)
- [Commits](https://github.com/ryanheise/just_audio/compare/just_audio-v0.9.38...just_audio-v0.9.39)

Updates `just_audio_background` from 0.0.1-beta.12 to 0.0.1-beta.13
- [Release notes](https://github.com/ryanheise/just_audio/releases)
- [Commits](https://github.com/ryanheise/just_audio/compare/just_audio_background-v0.0.1-beta.12...just_audio_background-v0.0.1-beta.13)

Updates `just_audio_media_kit` from 2.0.4 to 2.0.5
- [Changelog](https://github.com/Pato05/just_audio_media_kit/blob/main/CHANGELOG.md)
- [Commits](https://github.com/Pato05/just_audio_media_kit/compare/v2.0.4...v2.0.5)

Updates `package_info_plus` from 8.0.0 to 8.0.1
- [Release notes](https://github.com/fluttercommunity/plus_plugins/releases)
- [Commits](https://github.com/fluttercommunity/plus_plugins/commits/package_info_plus-v8.0.1/packages/package_info_plus)

Updates `purchases_flutter` from 6.29.4 to 6.30.2
- [Release notes](https://github.com/RevenueCat/purchases-flutter/releases)
- [Changelog](https://github.com/RevenueCat/purchases-flutter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/RevenueCat/purchases-flutter/compare/6.29.4...6.30.2)

Updates `shared_preferences` from 2.2.3 to 2.3.0
- [Release notes](https://github.com/flutter/packages/releases)
- [Commits](https://github.com/flutter/packages/commits/shared_preferences-v2.3.0/packages/shared_preferences)

Updates `supabase_flutter` from 2.5.6 to 2.5.11
- [Changelog](https://github.com/supabase/supabase-flutter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/supabase/supabase-flutter/commits/supabase_flutter-v2.5.11/packages)

Updates `timeago` from 3.6.1 to 3.7.0
- [Commits](https://github.com/andresaraujo/timeago.dart/commits)

---
updated-dependencies:
- dependency-name: app_links
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: pub
- dependency-name: flutter_cache_manager
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: pub
- dependency-name: flutter_native_splash
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: pub
- dependency-name: http
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: pub
- dependency-name: just_audio
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: pub
- dependency-name: just_audio_background
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: pub
- dependency-name: just_audio_media_kit
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: pub
- dependency-name: package_info_plus
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: pub
- dependency-name: purchases_flutter
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: pub
- dependency-name: shared_preferences
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: pub
- dependency-name: supabase_flutter
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: pub
- dependency-name: timeago
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: pub
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update `Podfile.lock`

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: ricoberger <mail@ricoberger.de>
2024-08-04 14:17:42 +02:00
dependabot[bot]
9503943b71 Bump the npm group in /landing with 8 updates (#180)
* Bump the npm group in /landing with 8 updates

Bumps the npm group in /landing with 8 updates:

| Package | From | To |
| --- | --- | --- |
| [@headlessui/react](https://github.com/tailwindlabs/headlessui/tree/HEAD/packages/@headlessui-react) | `2.1.1` | `2.1.2` |
| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `20.14.9` | `22.0.2` |
| [eslint](https://github.com/eslint/eslint) | `8.57.0` | `9.8.0` |
| [eslint-config-next](https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next) | `14.2.4` | `14.2.5` |
| [next](https://github.com/vercel/next.js) | `14.2.4` | `14.2.5` |
| [postcss](https://github.com/postcss/postcss) | `8.4.39` | `8.4.40` |
| [tailwindcss](https://github.com/tailwindlabs/tailwindcss) | `3.4.4` | `3.4.7` |
| [typescript](https://github.com/Microsoft/TypeScript) | `5.5.2` | `5.5.4` |


Updates `@headlessui/react` from 2.1.1 to 2.1.2
- [Release notes](https://github.com/tailwindlabs/headlessui/releases)
- [Changelog](https://github.com/tailwindlabs/headlessui/blob/main/packages/@headlessui-react/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/headlessui/commits/@headlessui/react@v2.1.2/packages/@headlessui-react)

Updates `@types/node` from 20.14.9 to 22.0.2
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `eslint` from 8.57.0 to 9.8.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.57.0...v9.8.0)

Updates `eslint-config-next` from 14.2.4 to 14.2.5
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/commits/v14.2.5/packages/eslint-config-next)

Updates `next` from 14.2.4 to 14.2.5
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v14.2.4...v14.2.5)

Updates `postcss` from 8.4.39 to 8.4.40
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.39...8.4.40)

Updates `tailwindcss` from 3.4.4 to 3.4.7
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/v3.4.7/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/compare/v3.4.4...v3.4.7)

Updates `typescript` from 5.5.2 to 5.5.4
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.5.2...v5.5.4)

---
updated-dependencies:
- dependency-name: "@headlessui/react"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: "@types/node"
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: npm
- dependency-name: eslint
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: npm
- dependency-name: eslint-config-next
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: next
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: postcss
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: tailwindcss
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: typescript
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>

* Revert `eslint` Update

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: ricoberger <mail@ricoberger.de>
2024-08-04 14:10:17 +02:00
ricoberger
d38cf80818 Merge branch 'main' of github.com:feeddeck/feeddeck 2024-07-27 10:15:32 +02:00
ricoberger
3e03f15825 Update Dependencies for Email Templates 2024-07-27 10:15:06 +02:00
dependabot[bot]
99e0538596 Bump braces from 3.0.2 to 3.0.3 in /landing (#178)
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-27 10:13:20 +02:00
dependabot[bot]
2a209519e1 Bump the npm group in /landing with 8 updates (#174)
* Bump the npm group in /landing with 8 updates

Bumps the npm group in /landing with 8 updates:

| Package | From | To |
| --- | --- | --- |
| [@headlessui/react](https://github.com/tailwindlabs/headlessui/tree/HEAD/packages/@headlessui-react) | `2.0.4` | `2.1.1` |
| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `20.13.0` | `20.14.9` |
| [eslint](https://github.com/eslint/eslint) | `8.57.0` | `9.6.0` |
| [eslint-config-next](https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next) | `14.2.3` | `14.2.4` |
| [next](https://github.com/vercel/next.js) | `14.2.3` | `14.2.4` |
| [postcss](https://github.com/postcss/postcss) | `8.4.38` | `8.4.39` |
| [tailwindcss](https://github.com/tailwindlabs/tailwindcss) | `3.4.3` | `3.4.4` |
| [typescript](https://github.com/Microsoft/TypeScript) | `5.4.5` | `5.5.2` |


Updates `@headlessui/react` from 2.0.4 to 2.1.1
- [Release notes](https://github.com/tailwindlabs/headlessui/releases)
- [Changelog](https://github.com/tailwindlabs/headlessui/blob/main/packages/@headlessui-react/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/headlessui/commits/@headlessui/react@v2.1.1/packages/@headlessui-react)

Updates `@types/node` from 20.13.0 to 20.14.9
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `eslint` from 8.57.0 to 9.6.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.57.0...v9.6.0)

Updates `eslint-config-next` from 14.2.3 to 14.2.4
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/commits/v14.2.4/packages/eslint-config-next)

Updates `next` from 14.2.3 to 14.2.4
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v14.2.3...v14.2.4)

Updates `postcss` from 8.4.38 to 8.4.39
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.38...8.4.39)

Updates `tailwindcss` from 3.4.3 to 3.4.4
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/v3.4.4/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/compare/v3.4.3...v3.4.4)

Updates `typescript` from 5.4.5 to 5.5.2
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.4.5...v5.5.2)

---
updated-dependencies:
- dependency-name: "@headlessui/react"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: "@types/node"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: eslint
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: npm
- dependency-name: eslint-config-next
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: next
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: postcss
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: tailwindcss
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: typescript
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>

* Revert `eslint` Update

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: ricoberger <mail@ricoberger.de>
2024-07-27 10:09:22 +02:00
dependabot[bot]
461dc6f384 Bump the pub group in /app with 6 updates (#176)
* Bump the pub group in /app with 6 updates

Bumps the pub group in /app with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [app_links](https://github.com/llfbandit/app_links) | `6.1.1` | `6.1.3` |
| [flutter_markdown](https://github.com/flutter/packages/tree/main/packages) | `0.7.1` | `0.7.3` |
| [purchases_flutter](https://github.com/RevenueCat/purchases-flutter) | `6.29.2` | `6.29.4` |
| [sign_in_with_apple](https://github.com/aboutyou/dart_packages) | `6.1.0` | `6.1.1` |
| [supabase_flutter](https://github.com/supabase/supabase-flutter/tree/main/packages) | `2.5.4` | `2.5.6` |
| [url_launcher](https://github.com/flutter/packages/tree/main/packages/url_launcher) | `6.2.6` | `6.3.0` |


Updates `app_links` from 6.1.1 to 6.1.3
- [Release notes](https://github.com/llfbandit/app_links/releases)
- [Commits](https://github.com/llfbandit/app_links/compare/6.1.1...6.1.3)

Updates `flutter_markdown` from 0.7.1 to 0.7.3
- [Release notes](https://github.com/flutter/packages/releases)
- [Commits](https://github.com/flutter/packages/commits/flutter_markdown-v0.7.3/packages)

Updates `purchases_flutter` from 6.29.2 to 6.29.4
- [Release notes](https://github.com/RevenueCat/purchases-flutter/releases)
- [Changelog](https://github.com/RevenueCat/purchases-flutter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/RevenueCat/purchases-flutter/compare/6.29.2...6.29.4)

Updates `sign_in_with_apple` from 6.1.0 to 6.1.1
- [Release notes](https://github.com/aboutyou/dart_packages/releases)
- [Commits](https://github.com/aboutyou/dart_packages/commits)

Updates `supabase_flutter` from 2.5.4 to 2.5.6
- [Changelog](https://github.com/supabase/supabase-flutter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/supabase/supabase-flutter/commits/supabase_flutter-v2.5.6/packages)

Updates `url_launcher` from 6.2.6 to 6.3.0
- [Release notes](https://github.com/flutter/packages/releases)
- [Commits](https://github.com/flutter/packages/commits/url_launcher-v6.3.0/packages/url_launcher)

---
updated-dependencies:
- dependency-name: app_links
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: pub
- dependency-name: flutter_markdown
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: pub
- dependency-name: purchases_flutter
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: pub
- dependency-name: sign_in_with_apple
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: pub
- dependency-name: supabase_flutter
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: pub
- dependency-name: url_launcher
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: pub
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update Podfile.lock

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: ricoberger <mail@ricoberger.de>
2024-07-27 10:07:31 +02:00
dependabot[bot]
409aa51f1c Bump docker/build-push-action from 5 to 6 in the github-actions group (#175)
Bumps the github-actions group with 1 update: [docker/build-push-action](https://github.com/docker/build-push-action).


Updates `docker/build-push-action` from 5 to 6
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v5...v6)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-27 10:02:17 +02:00
Rico Berger
3620fcb5b0 [core] Wrap Actions in SafeArea Widget (#172)
With this commit we are wrapping all action widgets in a `SafeArea`
widget, to improve the alignment of the actions.
2024-06-08 18:30:04 +02:00
Rico Berger
ca7c22b0d7 Fix ESLint Dependency Mismatch (#171) 2024-06-08 18:20:26 +02:00
dependabot[bot]
318aeb4187 Bump the pub group across 1 directory with 17 updates (#167)
* Bump the pub group across 1 directory with 17 updates

Bumps the pub group with 16 updates in the /app directory:

| Package | From | To |
| --- | --- | --- |
| [app_links](https://github.com/llfbandit/app_links) | `3.5.1` | `6.1.1` |
| [cupertino_icons](https://github.com/flutter/packages/tree/main/third_party/packages) | `1.0.6` | `1.0.8` |
| [flutter_cache_manager](https://github.com/Baseflow/flutter_cache_manager) | `3.3.1` | `3.3.2` |
| [flutter_lints](https://github.com/flutter/packages/tree/main/packages) | `3.0.2` | `4.0.0` |
| [flutter_markdown](https://github.com/flutter/packages/tree/main/packages) | `0.6.22` | `0.7.1` |
| [html2md](https://github.com/jarontai/html2md) | `1.3.1` | `1.3.2` |
| [just_audio](https://github.com/ryanheise/just_audio) | `0.9.37` | `0.9.38` |
| [just_audio_background](https://github.com/ryanheise/just_audio) | `0.0.1-beta.11` | `0.0.1-beta.12` |
| [just_audio_media_kit](https://github.com/Pato05/just_audio_media_kit) | `2.0.2` | `2.0.4` |
| [package_info_plus](https://github.com/fluttercommunity/plus_plugins/tree/main/packages/package_info_plus) | `6.0.0` | `8.0.0` |
| [purchases_flutter](https://github.com/RevenueCat/purchases-flutter) | `6.24.0` | `6.29.2` |
| [shared_preferences](https://github.com/flutter/packages/tree/main/packages/shared_preferences) | `2.2.2` | `2.2.3` |
| [sign_in_with_apple](https://github.com/aboutyou/dart_packages) | `6.0.0` | `6.1.0` |
| [url_launcher](https://github.com/flutter/packages/tree/main/packages/url_launcher) | `6.2.5` | `6.2.6` |
| [window_manager](https://github.com/leanflutter/window_manager) | `0.3.8` | `0.3.9` |
| [youtube_explode_dart](https://github.com/Hexer10/youtube_explode_dart) | `2.1.0` | `2.2.1` |



Updates `app_links` from 3.5.1 to 6.1.1
- [Release notes](https://github.com/llfbandit/app_links/releases)
- [Changelog](https://github.com/llfbandit/app_links/blob/master/CHANGELOG.md)
- [Commits](https://github.com/llfbandit/app_links/compare/3.5.1...6.1.1)

Updates `cupertino_icons` from 1.0.6 to 1.0.8
- [Release notes](https://github.com/flutter/packages/releases)
- [Commits](https://github.com/flutter/packages/commits/cupertino_icons-v1.0.8/third_party/packages)

Updates `flutter_cache_manager` from 3.3.1 to 3.3.2
- [Commits](https://github.com/Baseflow/flutter_cache_manager/commits/flutter_cache_manager_v3.3.2)

Updates `flutter_lints` from 3.0.2 to 4.0.0
- [Release notes](https://github.com/flutter/packages/releases)
- [Commits](https://github.com/flutter/packages/commits/flutter_lints-v4.0.0/packages)

Updates `flutter_markdown` from 0.6.22 to 0.7.1
- [Release notes](https://github.com/flutter/packages/releases)
- [Commits](https://github.com/flutter/packages/commits/flutter_markdown-v0.7.1/packages)

Updates `html2md` from 1.3.1 to 1.3.2
- [Changelog](https://github.com/jarontai/html2md/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jarontai/html2md/commits)

Updates `just_audio` from 0.9.37 to 0.9.38
- [Release notes](https://github.com/ryanheise/just_audio/releases)
- [Commits](https://github.com/ryanheise/just_audio/compare/just_audio-v0.9.37...just_audio-v0.9.38)

Updates `just_audio_background` from 0.0.1-beta.11 to 0.0.1-beta.12
- [Release notes](https://github.com/ryanheise/just_audio/releases)
- [Commits](https://github.com/ryanheise/just_audio/compare/just_audio_background-v0.0.1-beta.11...just_audio_background-v0.0.1-beta.12)

Updates `just_audio_media_kit` from 2.0.2 to 2.0.4
- [Changelog](https://github.com/Pato05/just_audio_media_kit/blob/main/CHANGELOG.md)
- [Commits](https://github.com/Pato05/just_audio_media_kit/compare/v2.0.2...v2.0.4)

Updates `package_info_plus` from 6.0.0 to 8.0.0
- [Release notes](https://github.com/fluttercommunity/plus_plugins/releases)
- [Commits](https://github.com/fluttercommunity/plus_plugins/commits/package_info_plus-v8.0.0/packages/package_info_plus)

Updates `purchases_flutter` from 6.24.0 to 6.29.2
- [Release notes](https://github.com/RevenueCat/purchases-flutter/releases)
- [Changelog](https://github.com/RevenueCat/purchases-flutter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/RevenueCat/purchases-flutter/compare/6.24.0...6.29.2)

Updates `shared_preferences` from 2.2.2 to 2.2.3
- [Release notes](https://github.com/flutter/packages/releases)
- [Commits](https://github.com/flutter/packages/commits/shared_preferences-v2.2.3/packages/shared_preferences)

Updates `sign_in_with_apple` from 6.0.0 to 6.1.0
- [Release notes](https://github.com/aboutyou/dart_packages/releases)
- [Commits](https://github.com/aboutyou/dart_packages/commits)

Updates `supabase_flutter` from 2.3.4 to 2.5.4
- [Changelog](https://github.com/supabase/supabase-flutter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/supabase/supabase-flutter/commits/supabase_flutter-v2.5.4/packages)

Updates `url_launcher` from 6.2.5 to 6.2.6
- [Release notes](https://github.com/flutter/packages/releases)
- [Commits](https://github.com/flutter/packages/commits/url_launcher-v6.2.6/packages/url_launcher)

Updates `window_manager` from 0.3.8 to 0.3.9
- [Release notes](https://github.com/leanflutter/window_manager/releases)
- [Changelog](https://github.com/leanflutter/window_manager/blob/main/CHANGELOG.md)
- [Commits](https://github.com/leanflutter/window_manager/commits/v0.3.9)

Updates `youtube_explode_dart` from 2.1.0 to 2.2.1
- [Release notes](https://github.com/Hexer10/youtube_explode_dart/releases)
- [Changelog](https://github.com/Hexer10/youtube_explode_dart/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Hexer10/youtube_explode_dart/compare/v2.1.0...v2.2.1)

---
updated-dependencies:
- dependency-name: app_links
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: pub
- dependency-name: cupertino_icons
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: pub
- dependency-name: flutter_cache_manager
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: pub
- dependency-name: flutter_lints
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: pub
- dependency-name: flutter_markdown
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: pub
- dependency-name: html2md
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: pub
- dependency-name: just_audio
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: pub
- dependency-name: just_audio_background
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: pub
- dependency-name: just_audio_media_kit
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: pub
- dependency-name: package_info_plus
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: pub
- dependency-name: purchases_flutter
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: pub
- dependency-name: shared_preferences
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: pub
- dependency-name: sign_in_with_apple
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: pub
- dependency-name: supabase_flutter
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: pub
- dependency-name: url_launcher
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: pub
- dependency-name: window_manager
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: pub
- dependency-name: youtube_explode_dart
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: pub
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update Flutter Version and Podfile

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: ricoberger <mail@ricoberger.de>
2024-06-08 17:59:59 +02:00
dependabot[bot]
1fb3bf63da Bump the npm group in /landing with 10 updates (#168)
Bumps the npm group in /landing with 10 updates:

| Package | From | To |
| --- | --- | --- |
| [@headlessui/react](https://github.com/tailwindlabs/headlessui/tree/HEAD/packages/@headlessui-react) | `1.7.18` | `2.0.4` |
| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `20.12.2` | `20.13.0` |
| [eslint](https://github.com/eslint/eslint) | `8.57.0` | `9.4.0` |
| [eslint-config-next](https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next) | `14.1.4` | `14.2.3` |
| [next](https://github.com/vercel/next.js) | `14.1.4` | `14.2.3` |
| [react](https://github.com/facebook/react/tree/HEAD/packages/react) | `18.2.0` | `18.3.1` |
| [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) | `18.2.73` | `18.3.3` |
| [react-dom](https://github.com/facebook/react/tree/HEAD/packages/react-dom) | `18.2.0` | `18.3.1` |
| [@types/react-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-dom) | `18.2.23` | `18.3.0` |
| [typescript](https://github.com/Microsoft/TypeScript) | `5.4.3` | `5.4.5` |


Updates `@headlessui/react` from 1.7.18 to 2.0.4
- [Release notes](https://github.com/tailwindlabs/headlessui/releases)
- [Changelog](https://github.com/tailwindlabs/headlessui/blob/main/packages/@headlessui-react/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/headlessui/commits/@headlessui/react@v2.0.4/packages/@headlessui-react)

Updates `@types/node` from 20.12.2 to 20.13.0
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `eslint` from 8.57.0 to 9.4.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.57.0...v9.4.0)

Updates `eslint-config-next` from 14.1.4 to 14.2.3
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/commits/v14.2.3/packages/eslint-config-next)

Updates `next` from 14.1.4 to 14.2.3
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v14.1.4...v14.2.3)

Updates `react` from 18.2.0 to 18.3.1
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v18.3.1/packages/react)

Updates `@types/react` from 18.2.73 to 18.3.3
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

Updates `react-dom` from 18.2.0 to 18.3.1
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v18.3.1/packages/react-dom)

Updates `@types/react-dom` from 18.2.23 to 18.3.0
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-dom)

Updates `typescript` from 5.4.3 to 5.4.5
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.4.3...v5.4.5)

---
updated-dependencies:
- dependency-name: "@headlessui/react"
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: npm
- dependency-name: "@types/node"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: eslint
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: npm
- dependency-name: eslint-config-next
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: next
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: react
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: "@types/react"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: react-dom
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: "@types/react-dom"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: typescript
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-08 16:59:05 +02:00
Rico Berger
aa5c4861db Revert "Bump the npm group in /landing with 10 updates (#165)" (#166)
This reverts commit a7c5afdd83.
2024-05-01 21:08:28 +02:00
dependabot[bot]
a7c5afdd83 Bump the npm group in /landing with 10 updates (#165)
Bumps the npm group in /landing with 10 updates:

| Package | From | To |
| --- | --- | --- |
| [@headlessui/react](https://github.com/tailwindlabs/headlessui/tree/HEAD/packages/@headlessui-react) | `1.7.18` | `1.7.19` |
| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `20.12.2` | `20.12.7` |
| [eslint](https://github.com/eslint/eslint) | `8.57.0` | `9.1.1` |
| [eslint-config-next](https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next) | `14.1.4` | `14.2.3` |
| [next](https://github.com/vercel/next.js) | `14.1.4` | `14.2.3` |
| [react](https://github.com/facebook/react/tree/HEAD/packages/react) | `18.2.0` | `18.3.1` |
| [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) | `18.2.73` | `18.3.1` |
| [react-dom](https://github.com/facebook/react/tree/HEAD/packages/react-dom) | `18.2.0` | `18.3.1` |
| [@types/react-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-dom) | `18.2.23` | `18.3.0` |
| [typescript](https://github.com/Microsoft/TypeScript) | `5.4.3` | `5.4.5` |


Updates `@headlessui/react` from 1.7.18 to 1.7.19
- [Release notes](https://github.com/tailwindlabs/headlessui/releases)
- [Changelog](https://github.com/tailwindlabs/headlessui/blob/main/packages/@headlessui-react/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/headlessui/commits/@headlessui/react@v1.7.19/packages/@headlessui-react)

Updates `@types/node` from 20.12.2 to 20.12.7
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `eslint` from 8.57.0 to 9.1.1
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.57.0...v9.1.1)

Updates `eslint-config-next` from 14.1.4 to 14.2.3
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/commits/v14.2.3/packages/eslint-config-next)

Updates `next` from 14.1.4 to 14.2.3
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v14.1.4...v14.2.3)

Updates `react` from 18.2.0 to 18.3.1
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v18.3.1/packages/react)

Updates `@types/react` from 18.2.73 to 18.3.1
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

Updates `react-dom` from 18.2.0 to 18.3.1
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v18.3.1/packages/react-dom)

Updates `@types/react-dom` from 18.2.23 to 18.3.0
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-dom)

Updates `typescript` from 5.4.3 to 5.4.5
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.4.3...v5.4.5)

---
updated-dependencies:
- dependency-name: "@headlessui/react"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: "@types/node"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: eslint
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: npm
- dependency-name: eslint-config-next
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: next
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: react
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: "@types/react"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: react-dom
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: "@types/react-dom"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: typescript
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-01 20:51:20 +02:00
Rico Berger
38fc655a53 [nitter] Disable Adding of new Sources (#163)
This commit disables the adding of new Nitter sources, because Nitter is
deprecated 😞 and adding new sources is not working anymore. Nitter
sources are also not updated anymore, because the update for Nitter
sources isn't working as well. To ensure that the Nitter sources are not
updated anymore the sources with type `nitter` are skipped in the
scheduler.

The Nitter source isn't removed completly, because we would also have to
cleanup the database and their might be items, which are bookmarked by
users.

See https://github.com/zedeus/nitter/issues/1155#issuecomment-1913361757
2024-04-06 17:22:27 +02:00
Rico Berger
4c34d33ac0 [x] Remove X Source (#162)
X (Twitter) was never supported and the code was never used to add a
source. We kept it in the hope that it will be possible again to use X
within the app. Since this isn't the case it is time to remove the code.
2024-04-06 13:00:12 +02:00
Rico Berger
eb9f84f650 [core] Update Flutter Version to 3.19.5 (#161) 2024-04-06 11:50:22 +02:00
dependabot[bot]
443e2db167 Bump the pub group in /app with 9 updates (#160)
* Bump the pub group in /app with 9 updates

Bumps the pub group in /app with 9 updates:

| Package | From | To |
| --- | --- | --- |
| [app_links](https://github.com/llfbandit/app_links) | `3.5.0` | `3.5.1` |
| [flutter_lints](https://github.com/flutter/packages/tree/main/packages) | `3.0.1` | `3.0.2` |
| [flutter_markdown](https://github.com/flutter/packages/tree/main/packages) | `0.6.20+1` | `0.6.22` |
| [flutter_native_splash](https://github.com/jonbhanson/flutter_native_splash) | `2.3.10` | `2.4.0` |
| [http](https://github.com/dart-lang/http/tree/master/pkgs) | `1.2.0` | `1.2.1` |
| [package_info_plus](https://github.com/fluttercommunity/plus_plugins/tree/main/packages/package_info_plus) | `5.0.1` | `6.0.0` |
| [just_audio](https://github.com/ryanheise/just_audio) | `0.9.36` | `0.9.37` |
| [just_audio_media_kit](https://github.com/Pato05/just_audio_media_kit) | `2.0.1` | `2.0.2` |
| [package_info_plus](https://github.com/fluttercommunity/plus_plugins/tree/main/packages/package_info_plus) | `5.0.1` | `6.0.0` |
| [purchases_flutter](https://github.com/RevenueCat/purchases-flutter) | `6.22.0` | `6.24.0` |


Updates `app_links` from 3.5.0 to 3.5.1
- [Release notes](https://github.com/llfbandit/app_links/releases)
- [Changelog](https://github.com/llfbandit/app_links/blob/master/CHANGELOG.md)
- [Commits](https://github.com/llfbandit/app_links/commits/3.5.1)

Updates `flutter_lints` from 3.0.1 to 3.0.2
- [Release notes](https://github.com/flutter/packages/releases)
- [Commits](https://github.com/flutter/packages/commits/flutter_lints-v3.0.2/packages)

Updates `flutter_markdown` from 0.6.20+1 to 0.6.22
- [Release notes](https://github.com/flutter/packages/releases)
- [Commits](https://github.com/flutter/packages/commits/flutter_markdown-v0.6.22/packages)

Updates `flutter_native_splash` from 2.3.10 to 2.4.0
- [Release notes](https://github.com/jonbhanson/flutter_native_splash/releases)
- [Changelog](https://github.com/jonbhanson/flutter_native_splash/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jonbhanson/flutter_native_splash/compare/v2.3.10...v2.4.0)

Updates `http` from 1.2.0 to 1.2.1
- [Release notes](https://github.com/dart-lang/http/releases)
- [Commits](https://github.com/dart-lang/http/commits/http-v1.2.1/pkgs)

Updates `package_info_plus` from 5.0.1 to 6.0.0
- [Release notes](https://github.com/fluttercommunity/plus_plugins/releases)
- [Commits](https://github.com/fluttercommunity/plus_plugins/commits/package_info_plus-v6.0.0/packages/package_info_plus)

Updates `just_audio` from 0.9.36 to 0.9.37
- [Release notes](https://github.com/ryanheise/just_audio/releases)
- [Commits](https://github.com/ryanheise/just_audio/commits)

Updates `just_audio_media_kit` from 2.0.1 to 2.0.2
- [Changelog](https://github.com/Pato05/just_audio_media_kit/blob/main/CHANGELOG.md)
- [Commits](https://github.com/Pato05/just_audio_media_kit/compare/v2.0.1...v2.0.2)

Updates `package_info_plus` from 5.0.1 to 6.0.0
- [Release notes](https://github.com/fluttercommunity/plus_plugins/releases)
- [Commits](https://github.com/fluttercommunity/plus_plugins/commits/package_info_plus-v6.0.0/packages/package_info_plus)

Updates `purchases_flutter` from 6.22.0 to 6.24.0
- [Release notes](https://github.com/RevenueCat/purchases-flutter/releases)
- [Changelog](https://github.com/RevenueCat/purchases-flutter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/RevenueCat/purchases-flutter/compare/6.22.0...6.24.0)

---
updated-dependencies:
- dependency-name: app_links
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: pub
- dependency-name: flutter_lints
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: pub
- dependency-name: flutter_markdown
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: pub
- dependency-name: flutter_native_splash
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: pub
- dependency-name: http
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: pub
- dependency-name: package_info_plus
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: pub
- dependency-name: just_audio
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: pub
- dependency-name: just_audio_media_kit
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: pub
- dependency-name: package_info_plus
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: pub
- dependency-name: purchases_flutter
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: pub
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix Podfile.lock

* Update Java and Gradle Version

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: ricoberger <mail@ricoberger.de>
2024-04-01 18:33:26 +02:00
dependabot[bot]
347c570cde Bump the github-actions group with 1 update (#159)
Bumps the github-actions group with 1 update: [actions/configure-pages](https://github.com/actions/configure-pages).


Updates `actions/configure-pages` from 4 to 5
- [Release notes](https://github.com/actions/configure-pages/releases)
- [Commits](https://github.com/actions/configure-pages/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/configure-pages
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-01 17:18:29 +02:00
dependabot[bot]
f8e2fa6128 Bump the npm group in /landing with 9 updates (#158)
Bumps the npm group in /landing with 9 updates:

| Package | From | To |
| --- | --- | --- |
| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `20.11.24` | `20.12.2` |
| [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) | `18.2.61` | `18.2.73` |
| [@types/react-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-dom) | `18.2.19` | `18.2.23` |
| [autoprefixer](https://github.com/postcss/autoprefixer) | `10.4.18` | `10.4.19` |
| [eslint-config-next](https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next) | `14.1.1` | `14.1.4` |
| [next](https://github.com/vercel/next.js) | `14.1.1` | `14.1.4` |
| [postcss](https://github.com/postcss/postcss) | `8.4.35` | `8.4.38` |
| [tailwindcss](https://github.com/tailwindlabs/tailwindcss) | `3.4.1` | `3.4.3` |
| [typescript](https://github.com/Microsoft/TypeScript) | `5.3.3` | `5.4.3` |


Updates `@types/node` from 20.11.24 to 20.12.2
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `@types/react` from 18.2.61 to 18.2.73
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

Updates `@types/react-dom` from 18.2.19 to 18.2.23
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-dom)

Updates `autoprefixer` from 10.4.18 to 10.4.19
- [Release notes](https://github.com/postcss/autoprefixer/releases)
- [Changelog](https://github.com/postcss/autoprefixer/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/autoprefixer/compare/10.4.18...10.4.19)

Updates `eslint-config-next` from 14.1.1 to 14.1.4
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/commits/v14.1.4/packages/eslint-config-next)

Updates `next` from 14.1.1 to 14.1.4
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v14.1.1...v14.1.4)

Updates `postcss` from 8.4.35 to 8.4.38
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.35...8.4.38)

Updates `tailwindcss` from 3.4.1 to 3.4.3
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/v3.4.3/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/compare/v3.4.1...v3.4.3)

Updates `typescript` from 5.3.3 to 5.4.3
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.3.3...v5.4.3)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: "@types/react"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: "@types/react-dom"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: autoprefixer
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: eslint-config-next
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: next
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: postcss
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: tailwindcss
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: typescript
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-01 17:18:06 +02:00
Rico Berger
9dbb979764 [core] Add Indexes to Improve Query Performance (#157)
Until now it could happen that the items for a column could not be
retrieved from the database, because of the set query timeout. In this
case we received the following error:

```
PostgrestException(message: canceling statement due to statement timeout, code: 57014, details: Internal Server Error, hint: null)
```

To fix this issue we added an `items_columnId_idx` index, so that the
items for a column are retrieved fast.

We also added some other useful indexes to improve the overall
performance of our queries.

Last but not least we also added an index to the `userId` columns as it
is recommended by Supabase to improve the performance of our RLS
policies.
2024-03-13 17:51:47 +01:00
dependabot[bot]
062db5d13a Bump the pub group in /app with 3 updates (#151)
* Bump the pub group in /app with 3 updates

Bumps the pub group in /app with 3 updates: [provider](https://github.com/rrousselGit/provider), [purchases_flutter](https://github.com/RevenueCat/purchases-flutter) and [sign_in_with_apple](https://github.com/aboutyou/dart_packages).


Updates `provider` from 6.1.1 to 6.1.2
- [Commits](https://github.com/rrousselGit/provider/compare/provider-v6.1.1...provider-v6.1.2)

Updates `purchases_flutter` from 6.21.1 to 6.22.0
- [Release notes](https://github.com/RevenueCat/purchases-flutter/releases)
- [Changelog](https://github.com/RevenueCat/purchases-flutter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/RevenueCat/purchases-flutter/compare/6.21.1...6.22.0)

Updates `sign_in_with_apple` from 5.0.0 to 6.0.0
- [Release notes](https://github.com/aboutyou/dart_packages/releases)
- [Commits](https://github.com/aboutyou/dart_packages/commits)

---
updated-dependencies:
- dependency-name: provider
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: pub
- dependency-name: purchases_flutter
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: pub
- dependency-name: sign_in_with_apple
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: pub
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update Flutter Version and Podfile

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: ricoberger <mail@ricoberger.de>
2024-03-02 11:08:50 +01:00
dependabot[bot]
788c7c9440 Bump the npm group in /landing with 2 updates (#156)
Bumps the npm group in /landing with 2 updates: [autoprefixer](https://github.com/postcss/autoprefixer) and [eslint-config-next](https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next).


Updates `autoprefixer` from 10.4.17 to 10.4.18
- [Release notes](https://github.com/postcss/autoprefixer/releases)
- [Changelog](https://github.com/postcss/autoprefixer/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/autoprefixer/compare/10.4.17...10.4.18)

Updates `eslint-config-next` from 14.1.0 to 14.1.1
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/commits/v14.1.1/packages/eslint-config-next)

---
updated-dependencies:
- dependency-name: autoprefixer
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: eslint-config-next
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-02 00:50:41 +01:00
ricoberger
aed602c55e [core] Adjust Dependabot Configuration
Adjust the Dependabot configuration to not update the
`/supabase/email-templates` folder anymore. This is done, because
Dependabot couldn't handle the `package.json` and `package-lock.json`
file very well and always wants to delete some required stuff.

Since the folder only contains our email templates it is also not
critical if the dependencies are not up to date.
2024-03-02 00:45:39 +01:00
dependabot[bot]
24f4648274 Bump the docker group in /supabase/functions/_cmd with 1 update (#153)
Bumps the docker group in /supabase/functions/_cmd with 1 update: lukechannings/deno.


Updates `lukechannings/deno` from v1.40.3 to v1.40.5

---
updated-dependencies:
- dependency-name: lukechannings/deno
  dependency-type: direct:production
  dependency-group: docker
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-02 00:22:45 +01:00
dependabot[bot]
d29d601513 Bump the github-actions group with 1 update (#152)
Bumps the github-actions group with 1 update: [release-drafter/release-drafter](https://github.com/release-drafter/release-drafter).


Updates `release-drafter/release-drafter` from 5 to 6
- [Release notes](https://github.com/release-drafter/release-drafter/releases)
- [Commits](https://github.com/release-drafter/release-drafter/compare/v5...v6)

---
updated-dependencies:
- dependency-name: release-drafter/release-drafter
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-02 00:22:11 +01:00
dependabot[bot]
f21d38b080 Bump the npm-landing group in /landing with 6 updates (#150)
Bumps the npm-landing group in /landing with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `20.11.15` | `20.11.24` |
| [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) | `18.2.51` | `18.2.61` |
| [@types/react-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-dom) | `18.2.18` | `18.2.19` |
| [eslint](https://github.com/eslint/eslint) | `8.56.0` | `8.57.0` |
| [next](https://github.com/vercel/next.js) | `14.1.0` | `14.1.1` |
| [postcss](https://github.com/postcss/postcss) | `8.4.33` | `8.4.35` |


Updates `@types/node` from 20.11.15 to 20.11.24
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `@types/react` from 18.2.51 to 18.2.61
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

Updates `@types/react-dom` from 18.2.18 to 18.2.19
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-dom)

Updates `eslint` from 8.56.0 to 8.57.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.56.0...v8.57.0)

Updates `next` from 14.1.0 to 14.1.1
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v14.1.0...v14.1.1)

Updates `postcss` from 8.4.33 to 8.4.35
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.33...8.4.35)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-landing
- dependency-name: "@types/react"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-landing
- dependency-name: "@types/react-dom"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-landing
- dependency-name: eslint
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-landing
- dependency-name: next
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-landing
- dependency-name: postcss
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-landing
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-02 00:21:33 +01:00
ricoberger
a0c64508c9 Update License 2024-02-25 16:36:47 +01:00
Rico Berger
11084f04e9 [core] Upgrade Flutter Version (#149)
Upgrade the used version of Flutter to 3.19.1 and all used packages to
their latest version.

For the Android Version of the app, we also had to adjust some files,
because of the "Deprecated imperative apply of Flutter's Gradle
plugins". The steps we had to run for this can be found at
https://docs.flutter.dev/release/breaking-changes/flutter-gradle-plugin-apply
2024-02-25 16:23:33 +01:00
dependabot[bot]
2a8aa5f3c1 Bump the npm-email-templates group in /supabase/email-templates with 2 updates (#115)
* Bump the npm-email-templates group

Bumps the npm-email-templates group in /supabase/email-templates with 2 updates: [@react-email/components](https://github.com/resend/react-email/tree/HEAD/packages/components) and [react-email](https://github.com/resend/react-email/tree/HEAD/packages/react-email).


Updates `@react-email/components` from 0.0.11 to 0.0.14
- [Release notes](https://github.com/resend/react-email/releases)
- [Commits](https://github.com/resend/react-email/commits/v0.0.14/packages/components)

Updates `react-email` from 1.9.5 to 2.0.0
- [Release notes](https://github.com/resend/react-email/releases)
- [Commits](https://github.com/resend/react-email/commits/HEAD/packages/react-email)

---
updated-dependencies:
- dependency-name: "@react-email/components"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-email-templates
- dependency-name: react-email
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: npm-email-templates
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump the npm-email-templates group

Bumps the npm-email-templates group in /supabase/email-templates with 2 updates: [@react-email/components](https://github.com/resend/react-email/tree/HEAD/packages/components) and [react-email](https://github.com/resend/react-email/tree/HEAD/packages/react-email).


Updates `@react-email/components` from 0.0.11 to 0.0.14
- [Release notes](https://github.com/resend/react-email/releases)
- [Commits](https://github.com/resend/react-email/commits/v0.0.14/packages/components)

Updates `react-email` from 1.9.5 to 2.0.0
- [Release notes](https://github.com/resend/react-email/releases)
- [Commits](https://github.com/resend/react-email/commits/HEAD/packages/react-email)

---
updated-dependencies:
- dependency-name: "@react-email/components"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-email-templates
- dependency-name: react-email
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: npm-email-templates
...

Signed-off-by: dependabot[bot] <support@github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: ricoberger <mail@ricoberger.de>
2024-02-24 09:09:40 +01:00
Rico Berger
c64b8026ae [core] Fix Blockquote Style (#148)
This commit fixes the style of blockquotes when we render the item
description as Markdown. Until now blockquotes had a weird blue
background, so that the text wasn't readable.

Now we are using the secondary color as background and we add a border on
the left site with the primary color.

We would also like to use italic as font family, but there is currently
a bug, so that the defined blockquote style is not applied. See
https://github.com/flutter/flutter/issues/81720
2024-02-23 18:39:10 +01:00
Rico Berger
ed76d85fd8 [core] Use Upstream just_audio_media_kit Version (#147)
Use the newest upstream version of the `just_audio_media_kit` package,
which removes the hard dependencies on the `media_kit_libs_linux` and
`media_kit_libs_windows_audio` packages, so that it shouldn't conflict
anymore with the usage of the `media_kit_libs_video` package.
2024-02-22 20:47:34 +01:00
Rico Berger
b2b3723ba8 [4chan] Improve Options Parsing (#146)
A 4chan source can now also be added via the RSS source type in the
Flutter app. If a user provides the RSS feed of an 4chan board, we check
if the url is related to 4chan and if this is the case, we use the 4chan
  instead of the RSS source type, similar to how it is handled for other
  sources like Medium, Reddit, etc.
2024-02-16 19:17:59 +01:00
Rico Berger
ca9ce54061 [mastodon] Add Support for Piped Videos (#145)
If a Mastodon post contains a Piped video it can now be played directly
within the app, similar to how it is handled for Nitter posts.
2024-02-14 19:01:56 +01:00
Rico Berger
8199c451b1 [reddit] Add Support for Piped Videos (#144)
If a Reddit post contains a Piped video it can now be played directly
within the app, similar to how it is handled in Nitter posts.
2024-02-14 19:00:51 +01:00
Rico Berger
66173d5a38 [lemmy] Add Support for Piped Videos (#143)
If a Lemmy post contains a Piped video it can now by played directly in
the app, similar to how it is handled for Nitter posts.
2024-02-14 18:59:14 +01:00
ricoberger
a5fba341d3 [core] Sort Imports 2024-02-14 18:36:54 +01:00
Rico Berger
689d3bd39b [4chan] Add Support for 4chan (#142)
This commit adds support for 4chan. This means that 4chan can be
selected as a new source type. When the 4chan source is selected a user
can select a board from which he wants to get the RSS feed.
2024-02-14 13:05:10 +01:00
Rico Berger
0b077ae973 [rss] Fix Image Parsing (#141)
The images of an RSS feed can now also start with `http://`, which is
necessary for some feeds.
2024-02-14 13:03:13 +01:00
Rico Berger
9a6bb033bf [core] Remove referer Check in image-proxy-v1 Function (#140) 2024-02-12 22:51:47 +01:00
ricoberger
7b84bab217 Prepare v1.3.0 Release 2024-02-12 19:51:12 +01:00
Rico Berger
1a56a8996e [core] Increase Update Interval for Reddit and Nitter (#138)
Reddit and Nitter are heavlily rate limited from time to time, to not
effect our premium users, by these limits, we decided to increase the
interval in which the Reddit and Nitter sources are updated for users
which are on the free tier.
2024-02-12 19:44:14 +01:00
Rico Berger
37bcc5e026 [nitter] Add Support for Piped Videos (#136)
The Nitter source now supports playing Piped Videos directly within the
app. For this we are checking if the Nitter post contains a piped.video
url and if this is the case we are using the newly added
`ItemPipedVideo` widget to render the video player, to allow users to
directly play the video within the app.

To support Piped videos we had to create a new `ItemPipedVideo` widget,
which is very similar to the `ItemYoutubeVideo` widget. This means on
the web version of FeedDeck we show the Video via an iframe and on the
other platforms via our `ItemVideoPlayer` widget. The main difference
between Piped and YouTube widget is the different client we use to fetch
the video urls. Besides the Piped API returns two different stream one
for the video and one for the audio, so that we had to add an additional
`audio` paramter to the `ItemVideoPlayer` widget, which allows us to
specify an additional audio source for a video.

NOTE: We had to add support for Piped, because Nitter automatically
converts the YouTube urls to the corresponding Piped urls.
2024-02-11 21:52:15 +01:00
Rico Berger
6a158f5176 [landing] Add Feature Images for Mobile Screens (#137)
Until now we always displayed the same feature images on the landing
page and it didn't matter if the user was on a desktop or mobile device.
This is now changed so that we display different images on mobile
devices (depending on the screen resolution).

Besides that we also moved the deprecated `themeColor` from the
`Metadata` to the `Viewport` and added it to all pages.

Last but not least we added some missing Android icons, which were
referenced in the `manifest.json` file, but where the icon didn't exist.
2024-02-11 21:26:47 +01:00
Rico Berger
0b7ca6cb14 [mastodon] Add Support for YouTube Videos (#135)
The Mastodon source supports YouTube Videos now. This means that if a
Mastodon post contains a link to a YouTube video as user can now
directly watch the video within the app.

If the post contains a video we render the YouTube video and the
description instead of the description, images and videos.
2024-02-10 21:25:16 +01:00
Rico Berger
303f78c3bc [reddit] Add Support for YouTube Videos (#134)
The Reddit source supports YouTube videos now. This means if a Reddit
post contains a link to a YouTube video, we render the video in the item
details, so that a user can directly watch the video.
2024-02-10 21:04:09 +01:00
ricoberger
c0c87e2c10 [core] Sort Imports 2024-02-10 20:43:18 +01:00
Rico Berger
babce57c80 [core] Fix Password Validations (#133)
This commit fixes the password validations. In #130 we introduced some
stronger password policies to forbid weak passwords, but forgot to
change it in all places. Now the same rules are also applying when a
user changes his password or resets his password.

During the sign in we do not use the same rules, to not block users
which have already signed up, with a password which doesn't match the
rules.
2024-02-10 15:31:56 +01:00
Rico Berger
ca5866ac13 [core] Add Continuous Delivery Workflow for Linux arm64 (#132)
Until now we had to manually build the app for Linux arm64 when we
created a new release. Now we are using ubicloud and the
`ubicloud-standard-2-arm` GitHub Action runner to build the app for
Linux arm64.
2024-02-10 14:58:27 +01:00
ricoberger
508e255c8b [core] Fix File 2024-02-06 21:05:40 +01:00
Rico Berger
aeeea4fd95 [core] Update macOS GitHub Action Runners (#131)
Update the used GitHub Action runners to `macos-14`, see
https://github.blog/changelog/2024-01-30-github-actions-introducing-the-new-m1-macos-runner-available-to-open-source/
2024-02-02 17:36:46 +01:00
Rico Berger
6029ee539e [core] Forbid Weak Passwords (#130)
This commit improves our password policy, so that every user which signs
up must have a password with a minimum length of 8 characters, one upper
and lower case letter and one number.
2024-02-02 17:22:53 +01:00
Rico Berger
c9a596111c [rss] Do Not Remove HTML Tags (#129)
We do not remove HTML tags from the description of a RSS feed item
anymore, because:

- This didn't worked for all feeds, because we first removed the tags
  and then unescape the data, which didn't make sense
- We render the HTML to Makrdown in the frontend so that the description
  can contain HTML tags and is still properly rendered and in some case
  better rendered then before
2024-02-02 17:04:43 +01:00
Rico Berger
b8a73cc003 [core] Make Log Level Configurable (#128)
The log level is now configurable, via the `FEEDDECK_LOG_LEVEL`
environment variable. The environment variable can have the following
values: `debug`, `info`, `warning` or `error`.

With this change we also only log the response when getting and parsing
the feed fails when the log level is set to `debug`, also when the
actual message is still an error. This should reduce the noice in the
logs a lot and allows us to specially turn this on while debugging.
2024-02-02 16:52:14 +01:00
ricoberger
817eb4d9e8 [core] Update File 2024-02-02 16:06:44 +01:00
dependabot[bot]
20e3e736c2 Bump the docker group in /supabase/functions/_cmd with 1 update (#127)
Bumps the docker group in /supabase/functions/_cmd with 1 update: lukechannings/deno.


Updates `lukechannings/deno` from v1.40.2 to v1.40.3

---
updated-dependencies:
- dependency-name: lukechannings/deno
  dependency-type: direct:production
  dependency-group: docker
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-02 00:06:02 +01:00
dependabot[bot]
20352c0301 Bump the npm-landing group in /landing with 2 updates (#126)
Bumps the npm-landing group in /landing with 2 updates: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) and [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react).


Updates `@types/node` from 20.11.13 to 20.11.15
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `@types/react` from 18.2.48 to 18.2.51
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-landing
- dependency-name: "@types/react"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-landing
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-02 00:05:29 +01:00
Rico Berger
e7b7000f46 [core] Add Open Link Action (#125)
This commit adds a new action to the menu shown when a user clicks
longer on the item in a column. The new "Open Link" action allows a user
to directly open the link of the item, so that the details modal must
not be opened anymore to open the link.
2024-01-31 21:09:34 +01:00
Rico Berger
fb3bec623a [core] Add Missing SafeArea Widget (#124)
Several widgets which where rendered within a modal bottom sheet didn't
used a `SafeArea` widget in the body of the `Scaffold` widget, so that
the action buttons on the bottom of the widget where not rendered in the
correct position.
2024-01-31 20:54:50 +01:00
dependabot[bot]
976c066004 Bump the pub group in /app with 2 updates (#121)
* Bump the pub group in /app with 2 updates

Bumps the pub group in /app with 2 updates: [purchases_flutter](https://github.com/RevenueCat/purchases-flutter) and [supabase_flutter](https://github.com/supabase/supabase-flutter/tree/main/packages).


Updates `purchases_flutter` from 6.18.0 to 6.19.0
- [Release notes](https://github.com/RevenueCat/purchases-flutter/releases)
- [Changelog](https://github.com/RevenueCat/purchases-flutter/blob/6.19.0/CHANGELOG.md)
- [Commits](https://github.com/RevenueCat/purchases-flutter/compare/6.18.0...6.19.0)

Updates `supabase_flutter` from 2.3.1 to 2.3.2
- [Changelog](https://github.com/supabase/supabase-flutter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/supabase/supabase-flutter/commits/HEAD/packages)

---
updated-dependencies:
- dependency-name: purchases_flutter
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: pub
- dependency-name: supabase_flutter
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: pub
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update Flutter Version

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: ricoberger <mail@ricoberger.de>
2024-01-31 20:28:49 +01:00
dependabot[bot]
304a9744a9 Bump the npm-landing group in /landing with 1 update (#120)
Bumps the npm-landing group in /landing with 1 update: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node).


Updates `@types/node` from 20.11.10 to 20.11.13
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-landing
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-31 19:51:34 +01:00
Rico Berger
ee11cae8dc [landing] Add Lemmy Icon (#123)
Add an icon for Lemmy to the landing page. The new `lemmy` source type
was added in #94 and is now also added to the landing page for the next
release which should happen very soon.
2024-01-31 19:37:50 +01:00
Rico Berger
04314f116d [core] Fix Naming of Files (#122)
Fix the naming of some files: Instead of login we are always using the
term sign in and already renamed the `DesktopLoginManager` to
`DesktopSignInManager` in #106. During the renaming we forgot to rename
the file which is now done.

We also renamed the `sign_in_with_apple.dart` file to
`signin_with_apple.dart`, because the other files also do not contain an
underscore between sign and in.
2024-01-31 19:32:23 +01:00
ricoberger
b645244378 [core] Fix Assignees in Dependabot Configuration 2024-01-31 19:12:09 +01:00
dependabot[bot]
110ff56aa1 Bump the pub group in /app with 9 updates (#119)
* Bump the pub group in /app with 9 updates

Bumps the pub group in /app with 9 updates:

| Package | From | To |
| --- | --- | --- |
| [cached_network_image](https://github.com/Baseflow/flutter_cached_network_image) | `3.3.0` | `3.3.1` |
| [flutter_native_splash](https://github.com/jonbhanson/flutter_native_splash) | `2.3.8` | `2.3.10` |
| [http](https://github.com/dart-lang/http/tree/master/pkgs) | `1.1.2` | `1.2.0` |
| [intl](https://github.com/dart-lang/i18n/tree/main/pkgs) | `0.18.1` | `0.19.0` |
| [purchases_flutter](https://github.com/RevenueCat/purchases-flutter) | `6.5.1` | `6.18.0` |
| [supabase_flutter](https://github.com/supabase/supabase-flutter/tree/main/packages) | `2.0.2` | `2.3.1` |
| [url_launcher](https://github.com/flutter/packages/tree/main/packages/url_launcher) | `6.2.2` | `6.2.4` |
| [window_manager](https://github.com/leanflutter/window_manager) | `0.3.7` | `0.3.8` |
| [youtube_explode_dart](https://github.com/Hexer10/youtube_explode_dart) | `2.0.4` | `2.1.0` |


Updates `cached_network_image` from 3.3.0 to 3.3.1
- [Commits](https://github.com/Baseflow/flutter_cached_network_image/compare/v3.3.0...v3.3.1)

Updates `flutter_native_splash` from 2.3.8 to 2.3.10
- [Release notes](https://github.com/jonbhanson/flutter_native_splash/releases)
- [Changelog](https://github.com/jonbhanson/flutter_native_splash/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jonbhanson/flutter_native_splash/commits)

Updates `http` from 1.1.2 to 1.2.0
- [Release notes](https://github.com/dart-lang/http/releases)
- [Commits](https://github.com/dart-lang/http/commits/HEAD/pkgs)

Updates `intl` from 0.18.1 to 0.19.0
- [Release notes](https://github.com/dart-lang/i18n/releases)
- [Commits](https://github.com/dart-lang/i18n/commits/intl-v0.19.0/pkgs)

Updates `purchases_flutter` from 6.5.1 to 6.18.0
- [Release notes](https://github.com/RevenueCat/purchases-flutter/releases)
- [Changelog](https://github.com/RevenueCat/purchases-flutter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/RevenueCat/purchases-flutter/compare/6.5.1...6.18.0)

Updates `supabase_flutter` from 2.0.2 to 2.3.1
- [Changelog](https://github.com/supabase/supabase-flutter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/supabase/supabase-flutter/commits/HEAD/packages)

Updates `url_launcher` from 6.2.2 to 6.2.4
- [Release notes](https://github.com/flutter/packages/releases)
- [Commits](https://github.com/flutter/packages/commits/url_launcher-v6.2.4/packages/url_launcher)

Updates `window_manager` from 0.3.7 to 0.3.8
- [Release notes](https://github.com/leanflutter/window_manager/releases)
- [Changelog](https://github.com/leanflutter/window_manager/blob/main/CHANGELOG.md)
- [Commits](https://github.com/leanflutter/window_manager/commits)

Updates `youtube_explode_dart` from 2.0.4 to 2.1.0
- [Release notes](https://github.com/Hexer10/youtube_explode_dart/releases)
- [Changelog](https://github.com/Hexer10/youtube_explode_dart/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Hexer10/youtube_explode_dart/compare/v2.0.4...v2.1.0)

---
updated-dependencies:
- dependency-name: cached_network_image
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: pub
- dependency-name: flutter_native_splash
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: pub
- dependency-name: http
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: pub
- dependency-name: intl
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: pub
- dependency-name: purchases_flutter
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: pub
- dependency-name: supabase_flutter
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: pub
- dependency-name: url_launcher
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: pub
- dependency-name: window_manager
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: pub
- dependency-name: youtube_explode_dart
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: pub
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix Podfile.lock

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: ricoberger <mail@ricoberger.de>
2024-01-31 19:10:56 +01:00
ricoberger
bbbeb9524f [core] Remove Deprecate Edge Functions
This commit removes the deprecated edge functions `add-source-v1` and
`profile-v1` from the stage deployment.
2024-01-31 19:07:01 +01:00
Rico Berger
90fc7532ba [core] Add Client Side Scraping of Sources (#118)
It is now possible to add and update sources via client side scraping.
For that a new edge function `add-or-update-source-v1` was added and the
old `add-source-v1` function was deprecated.

The new function accepts a new `feedData` field, which can contain the
feed for a source. If the field is provided we will not try to get the
feed for a source within our edge function and instead use the provided
data.

Currently this function is only used to add a Reddit source. Later we
plan to extend it for other sources and want to use it to update source
via the app, when the source provider makes heavy use of rate limiting.
2024-01-30 21:59:42 +01:00
dependabot[bot]
fac622ef97 Bump the docker group in /supabase/functions/_cmd with 1 update (#114)
Bumps the docker group in /supabase/functions/_cmd with 1 update: lukechannings/deno.


Updates `lukechannings/deno` from v1.38.4 to v1.40.2

---
updated-dependencies:
- dependency-name: lukechannings/deno
  dependency-type: direct:production
  dependency-group: docker
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-30 21:49:44 +01:00
dependabot[bot]
e29b94a576 Bump the github-actions group with 4 updates (#110)
Bumps the github-actions group with 4 updates: [actions/upload-artifact](https://github.com/actions/upload-artifact), [actions/configure-pages](https://github.com/actions/configure-pages), [actions/upload-pages-artifact](https://github.com/actions/upload-pages-artifact) and [actions/deploy-pages](https://github.com/actions/deploy-pages).


Updates `actions/upload-artifact` from 3 to 4
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4)

Updates `actions/configure-pages` from 3 to 4
- [Release notes](https://github.com/actions/configure-pages/releases)
- [Commits](https://github.com/actions/configure-pages/compare/v3...v4)

Updates `actions/upload-pages-artifact` from 2 to 3
- [Release notes](https://github.com/actions/upload-pages-artifact/releases)
- [Commits](https://github.com/actions/upload-pages-artifact/compare/v2...v3)

Updates `actions/deploy-pages` from 2 to 4
- [Release notes](https://github.com/actions/deploy-pages/releases)
- [Commits](https://github.com/actions/deploy-pages/compare/v2...v4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/configure-pages
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/upload-pages-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/deploy-pages
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-30 21:49:03 +01:00
dependabot[bot]
911b3691b3 Bump the npm-landing group in /landing with 11 updates (#116)
Bumps the npm-landing group in /landing with 11 updates:

| Package | From | To |
| --- | --- | --- |
| [@headlessui/react](https://github.com/tailwindlabs/headlessui/tree/HEAD/packages/@headlessui-react) | `1.7.17` | `1.7.18` |
| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `20.10.1` | `20.11.10` |
| [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) | `18.2.39` | `18.2.48` |
| [@types/react-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-dom) | `18.2.17` | `18.2.18` |
| [autoprefixer](https://github.com/postcss/autoprefixer) | `10.4.16` | `10.4.17` |
| [eslint](https://github.com/eslint/eslint) | `8.54.0` | `8.56.0` |
| [eslint-config-next](https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next) | `14.0.3` | `14.1.0` |
| [next](https://github.com/vercel/next.js) | `14.0.3` | `14.1.0` |
| [postcss](https://github.com/postcss/postcss) | `8.4.31` | `8.4.33` |
| [tailwindcss](https://github.com/tailwindlabs/tailwindcss) | `3.3.5` | `3.4.1` |
| [typescript](https://github.com/Microsoft/TypeScript) | `5.3.2` | `5.3.3` |


Updates `@headlessui/react` from 1.7.17 to 1.7.18
- [Release notes](https://github.com/tailwindlabs/headlessui/releases)
- [Changelog](https://github.com/tailwindlabs/headlessui/blob/main/packages/@headlessui-react/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/headlessui/commits/@headlessui/react@v1.7.18/packages/@headlessui-react)

Updates `@types/node` from 20.10.1 to 20.11.10
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `@types/react` from 18.2.39 to 18.2.48
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

Updates `@types/react-dom` from 18.2.17 to 18.2.18
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-dom)

Updates `autoprefixer` from 10.4.16 to 10.4.17
- [Release notes](https://github.com/postcss/autoprefixer/releases)
- [Changelog](https://github.com/postcss/autoprefixer/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/autoprefixer/compare/10.4.16...10.4.17)

Updates `eslint` from 8.54.0 to 8.56.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.54.0...v8.56.0)

Updates `eslint-config-next` from 14.0.3 to 14.1.0
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/commits/v14.1.0/packages/eslint-config-next)

Updates `next` from 14.0.3 to 14.1.0
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v14.0.3...v14.1.0)

Updates `postcss` from 8.4.31 to 8.4.33
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.31...8.4.33)

Updates `tailwindcss` from 3.3.5 to 3.4.1
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/compare/v3.3.5...v3.4.1)

Updates `typescript` from 5.3.2 to 5.3.3
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.3.2...v5.3.3)

---
updated-dependencies:
- dependency-name: "@headlessui/react"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-landing
- dependency-name: "@types/node"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-landing
- dependency-name: "@types/react"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-landing
- dependency-name: "@types/react-dom"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-landing
- dependency-name: autoprefixer
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-landing
- dependency-name: eslint
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-landing
- dependency-name: eslint-config-next
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-landing
- dependency-name: next
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-landing
- dependency-name: postcss
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-landing
- dependency-name: tailwindcss
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-landing
- dependency-name: typescript
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-landing
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-30 21:48:09 +01:00
Rico Berger
3a84376223 Add Assignees to Dependabot Configuration (#113) 2024-01-30 19:41:03 +01:00
Rico Berger
0f5a8e44f1 [core] Add Additional Header for Web Deployment (#112)
This commit adds the `X-Content-Type-Options`, `X-Frame-Options` and
`Referrer-Policy` headers to the web deployment of FeedDeck via the
`_headers` file.

See https://developers.cloudflare.com/pages/configuration/headers/
2024-01-30 19:27:47 +01:00
Rico Berger
5753fb2714 Update Flutter to Version 3.16.5 (#106)
Update the used Flutter version to 3.16.5 and the used packages to their
latest version.

The Supabase package contained some breaking changes:
- `functionUrl` is not exported anymore, so that it must be generated by
  ourselfs
- `Provider` was renamed to `OAuthProvider`
- The `signInWithApple` method was removed and is now implemented by us
  via the `sign_in_with_apple` package.

We also renamed the `DesktopLoginManager` to `DesktopSignInManager` to
use the same naming as in other places of the app, where we are always
using sign in and not login.
2023-12-21 17:24:07 +01:00
ricoberger
4008660a35 [core] Fix deno test Commands in Contributing Guidelines 2023-12-20 09:47:27 +01:00
Rico Berger
1cb58e1e0f [core] Refactor Tools and add get-feed Tool (#105)
This commit refactors the existing tools, by moving the tools logic to a
new `tools.ts` file, so that the main `cmd.ts` file remains clear.

Besides that we also add a new tool `get-feed` which can be used to run
the `getFeed` function from the command line. The function is called
with a source and returns the generated source and items, as they are
saved in the database by the `add-source-v1` Supabase edge function.
2023-12-17 18:04:53 +01:00
ricoberger
08e9170a80 [nitter] Adjust Header Handling 2023-12-17 13:51:03 +01:00
Rico Berger
4198a5bac6 [core] Replace Deprecated serve Function (#104)
The used `serve` function from the `std/server` module is deprecated and
must be replaced with `Deno.serve`. This was done within this commit.
2023-12-17 12:37:00 +01:00
ricoberger
295ae13705 [core] Remove deno.lock File 2023-12-17 12:11:31 +01:00
Rico Berger
0894f0e777 [core] Improve Error Handling for Feed Edge Functions (#103)
This commit improve the error handling for the edge function to add a
new source and the worker, so that we get more insights why a request
fails. A user will now also get a more detailed error why a source could
not be added.
2023-12-17 12:10:04 +01:00
ricoberger
2966ecc651 [rss] Fix Test Name 2023-12-12 22:13:47 +01:00
Rico Berger
49c168b5b2 [core] Disable Right Click for Item Actions on Web (#102)
On the web the right click on an item to show the actions, doesn't work
properly, because the browsers right click menu will be shown first. So
it doesn't make sense to show also our right click menu.
2023-12-12 22:03:32 +01:00
Rico Berger
8e0017e928 [rss] Show Videos from RSS Feeds (#101)
If an RSS feed contains a video within the `attachments` field, the video
will now be added to the `options` field of the item. In the Flutter
code we then check if the video field is present in the options and show
the video instead of an image in the details view of the item.
2023-12-12 21:49:45 +01:00
Rico Berger
982add8fbb [core] Update Deno Modules (#100)
This commit updates all used Deno modules to their latest version.

Since some of the used modules / functions were deprecated we had to
adjust our encrypt / descrypt functions and the generation of the source
and item ids, where we have to use a new md5 function.
2023-12-12 20:32:44 +01:00
Rico Berger
8065e19c85 [rss] Parse Atom and RDF Feeds from Websites (#99)
Until now we only checked if a website contained a RSS feed which can be
used for FeedDeck. Now we are also checking if the website contains a
Atom or RDF feed when no RSS feed was found.

For this we are checking `link` tag with the `type="application/atom+xml"`
attribute or a link tag with the `type="application/rdf+xml"` attribute.
2023-12-12 20:22:30 +01:00
Rico Berger
9e59439226 [core] Add Tests for Sources (#98)
This commit adds tests for all available sources.

This commit also fixes the parsing of Atom feeds for the RSS source,
where the `dc:date` field must be used for the `publishedAt` field.
2023-12-12 18:50:29 +01:00
Rico Berger
5087c299d3 [core] Add Test Setup for Deno (#97)
This commit uses the "Continuous Integration" GitHub Action, to run
tests for the Deno code, which is used by the Supabase functions and our
Docker containers.

This commit also adds a first test so that the `deno test` command does
not fail.
2023-12-03 15:55:04 +01:00
Rico Berger
bddf5874d4 [core] Fix Converting of HTML to Plain Text in Description (#96)
This commit fixes the conversion of HTML to plain text in the
description for an item. Until now it could happen, that the there was
no whitespace between some words after the conversion. This is now fixed
so that there is always a whitespace between words in the plain text.
2023-12-02 17:58:44 +01:00
Rico Berger
6c469e5d0d [core] Improve ItemVideoPlayer Widget (#95)
This commit adds two improvements to the `ItemVideoPlayer` widget. These
improvements are:
1. The padding for the widget is now defined within the widget, so that
   is must not be defined in the parent widget. With this change the
   widget follows the styling of our other widgets like `ItemMedia`.
2. On iOS the quality selection had a large bottom padding, this is now
   fixed, by using a `Wrap` widget instead of a `ListView` like we are
   using in the other modal bottom sheets which are showing some
   actions.
2023-12-02 16:51:56 +01:00
Rico Berger
8c88ece3dc [lemmy] Add Support for Lemmy (#94)
This commit adds support to add Lemmy RSS feeds to FeedDeck. A user can
provide the url of an Lemmy instance, the url of a community or of an
user.

The special thing of the Lemmy source in opposite to the normal RSS
source is, that we parse the provided link form a feed item, to check if
it contains a image, video or YouTube url, to apply some special
formatting.
2023-12-02 15:52:50 +01:00
Rico Berger
eb28a44cc8 [core] Fix Index Reset for Tabs in Small Deck Layout (#93)
The index was not reset in the `DeckLayoutSmall` widget, when the user
selected a new deck in the settings widget. This was caused because the
`DefaultTabController` was not rebuild after a new deck was selected, so
that the `initialIndex` value was not used.

This is now fixed by adding a `key` to the `DefaultTabController`, which
corresponds to the selected deck. This means if the user selects a new
deck in the settings the widget will be rebuild and the initial selected
tab will be the first one. If a user selects the same deck or switches
between the small and large layout the tab will be the formerly selected
one.
2023-12-01 18:09:54 +01:00
ricoberger
240e9e93d9 [podcast] Add Comment for the _player.pause() Hack 2023-12-01 18:03:28 +01:00
dependabot[bot]
eebec73fd2 Bump the npm-email-templates group in /supabase/email-templates with 1 update (#89)
* Bump the npm-email-templates group

Bumps the npm-email-templates group in /supabase/email-templates with 1 update: [@react-email/components](https://github.com/resendlabs/react-email/tree/HEAD/packages/components).

- [Release notes](https://github.com/resendlabs/react-email/releases)
- [Changelog](https://github.com/resendlabs/react-email/blob/canary/docs/changelog.mdx)
- [Commits](https://github.com/resendlabs/react-email/commits/v0.0.11/packages/components)

---
updated-dependencies:
- dependency-name: "@react-email/components"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-email-templates
...

Signed-off-by: dependabot[bot] <support@github.com>

* Run `npm install`

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: ricoberger <mail@ricoberger.de>
2023-12-01 17:38:16 +01:00
dependabot[bot]
1b226791b4 Bump the pub group in /app with 1 update (#90)
Bumps the pub group in /app with 1 update: [msix](https://github.com/YehudaKremer/msix).

- [Release notes](https://github.com/YehudaKremer/msix/releases)
- [Changelog](https://github.com/YehudaKremer/msix/blob/main/CHANGELOG.md)
- [Commits](https://github.com/YehudaKremer/msix/compare/v3.16.6...v3.16.7)

---
updated-dependencies:
- dependency-name: msix
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: pub
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-01 16:48:48 +01:00
dependabot[bot]
ad9885ce92 Bump the npm-landing group in /landing with 7 updates (#91)
Bumps the npm-landing group in /landing with 7 updates:

| Package | From | To |
| --- | --- | --- |
| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `20.8.10` | `20.10.1` |
| [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) | `18.2.33` | `18.2.39` |
| [@types/react-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-dom) | `18.2.14` | `18.2.17` |
| [eslint](https://github.com/eslint/eslint) | `8.52.0` | `8.54.0` |
| [eslint-config-next](https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next) | `14.0.1` | `14.0.3` |
| [next](https://github.com/vercel/next.js) | `14.0.1` | `14.0.3` |
| [typescript](https://github.com/Microsoft/TypeScript) | `5.2.2` | `5.3.2` |


Updates `@types/node` from 20.8.10 to 20.10.1
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `@types/react` from 18.2.33 to 18.2.39
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

Updates `@types/react-dom` from 18.2.14 to 18.2.17
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-dom)

Updates `eslint` from 8.52.0 to 8.54.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.52.0...v8.54.0)

Updates `eslint-config-next` from 14.0.1 to 14.0.3
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/commits/v14.0.3/packages/eslint-config-next)

Updates `next` from 14.0.1 to 14.0.3
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v14.0.1...v14.0.3)

Updates `typescript` from 5.2.2 to 5.3.2
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.2.2...v5.3.2)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-landing
- dependency-name: "@types/react"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-landing
- dependency-name: "@types/react-dom"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-landing
- dependency-name: eslint
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-landing
- dependency-name: eslint-config-next
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-landing
- dependency-name: next
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-landing
- dependency-name: typescript
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-landing
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-01 16:44:20 +01:00
dependabot[bot]
16418ab205 Bump the docker group in /supabase/functions/_cmd with 1 update (#92)
Bumps the docker group in /supabase/functions/_cmd with 1 update: lukechannings/deno.


---
updated-dependencies:
- dependency-name: lukechannings/deno
  dependency-type: direct:production
  dependency-group: docker
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-01 16:38:50 +01:00
Rico Berger
d9d82a1679 [core] Add Test Setup for Flutter (#87)
This commit adds a new "Continuous Integration" GitHub Action, which is
used to run the tests for the Flutter app (and later also for Deno).
This commit also adds a first test, so that the GitHub Action does not
fail.

This PR also removes the Visual Studio Code and Neovim configurations
from the contribution guide, since I'm not using it anymore and for that
I do not want to maintain it any longer.
2023-11-30 21:49:49 +01:00
ricoberger
ff52516324 Prepare v1.2.1 Release 2023-11-30 18:03:33 +01:00
Rico Berger
abd3c24f68 [core] Remove Blank in Item Preview Description (#86)
This commit removes all blank lines in the item preview description, so
that we do not render a blank line as the last line. This was done to
improve the style of the item previews, which looked ugly when the last
line was a blank line.
2023-11-29 21:47:53 +01:00
Rico Berger
04ef618295 [core] Add Right Click Support for Item Actions (#85)
Until now it was only possible to show the actions for an item by
pressing longer on the item. Now a user can also right click on the item
to display the actions which feels a bit more natural on desktop
devices.
2023-11-29 21:14:27 +01:00
Rico Berger
a58c93be8a [podcast] Stop Audio Playback on Windows and Linux (#84)
On Windows and Linux it could happen that the audio playback for a
podcast wasn't stopped when the item details view for a podcast item was
closed.

This commit "fixes" the problem, by pausing the audio player, before the
widget is disposed.

This commit also fixes the condition when the background audio services
should be initialized in the `main.dart` file. Instead of the macOS
check, we checked for iOS twice.
2023-11-29 21:06:06 +01:00
Rico Berger
5a8d6b34c1 [medium] Extend Filter Words List (#83) 2023-11-29 20:09:34 +01:00
ricoberger
9233e4d373 [core] Fix 2023-11-26 20:07:18 +01:00
Rico Berger
6e50af16a7 [core] Fix build.gradle File for Android Release (#82)
The change introduced in #71 so that we can run the Android build in a
GitHub action, broke the `flutter build appbundle` command to build the
Android version for the Google Play store. This commit should fix this,
so that we can build the Android version in a GitHub Action and for
Google Play.
2023-11-26 19:40:54 +01:00
ricoberger
046479071b Prepare v1.2.0 Release 2023-11-26 17:51:09 +01:00
Rico Berger
ffbed73669 [medium] Remove Spam (#79)
When using Medium as a source it is possible that the a lot of items
might be spam when following a tag. To reduce the spam, we filter these
items based on a word list and an calculated score. The score is
calculated by the number of words which are included in the title from
our word list.
2023-11-26 17:03:54 +01:00
Rico Berger
03371cf645 [reddit] Remove Tables from Description (#78)
When a Reddit post contained an image it was always rendered as table,
where the image was displayed in the left column and the author in the
right column. This looked very ugly in the app, so that we are now
removing all tables from the description of an Reddit post, so that the
image is rendered as large as possible and the author is displayed below
the image.
2023-11-26 16:55:17 +01:00
Rico Berger
eb606b5f6c [core] Improve Subtitle in Details View (#77)
This commit improves the displayed subtitle in the details view of an
item. For that we have adjusted the `ItemSubtitle` widget to diplay next
to the source title, author and publishing time an corresponding icon.
We also increased the space between the items and we are using a `|`
instead of a `/` as seperator.
2023-11-26 16:09:48 +01:00
Rico Berger
df927516b1 [core] Improve Icon Handling (#76)
Instead of defining the icons for a source only within the `SourceIcon`
widget, the icons are now defined as extension for the `FDSourceType`
enum. The background and foreground colors are also defined within the
enum now. This allows us to access the icon of a source outside of the
`SourceIcon` widget and we only have to touch the `source.dart` file
when adding a new source type.
2023-11-26 14:52:15 +01:00
Rico Berger
fa23e095e5 [core] Fix getMedia Function (#75)
In the `getMedia` function for Medium, Nitter, RSS and Tumblr we checked
the content and/or description of an RSS feed entry for a media file,
but we didn't pass the string to the `unescape` function first, so that
we might missed some media files, because our regular expression were
not able to find an image.

Now we are using the `unescape` function before using our regular
expression to find the image, similar to how we are also applying the
`unescape` function before we save the item description.
2023-11-25 18:24:22 +01:00
Rico Berger
2298176c3b [pinterest] Add Support for Pinterest (#74)
This commit adds a new source type "pinterest", which can be used to
follow the post of an user or a board on Pinterest. To use the new
source type a user can select the "Pinterest" item in the add source
modal. In the form a user can provide the username or board he wants to
follow via FeedDeck.

In the corresponding Supabase function we then convert the input
provided by the user to an valid RSS feed url for Pinterest. This means
that we have to add `/feed.rss` for users and `.rss` for boards to the
Pinterest url.

Then we generate the source and items as for the other sources and reuse
the existing components to render the preview and details item. We had
to adjust the rendering logic for these items, to ignore empty values,
from which also other sources will benefit.
2023-11-25 18:04:19 +01:00
Rico Berger
3f7caf4ad4 [core] Fix Decoding of Special Characters (#73)
We have to add the "charset" parameter to the "Content-Type" header when
we return json from one of the Supabase functions, so that special
characters are properly decoded in Flutter.
2023-11-25 00:00:22 +01:00
Rico Berger
db9363e7af [rss] Allow Users to Provide a Website URL (#72)
Users can now provide the URL of a website instead of the url of a RSS
feed via the input field for the RSS source.

This is possible because we are now trying to get and parse the RSS feed
for the provided url as usual, but if this operation fails, we try to
parse the text as html, so that we can check if it contains a
"<link type="application/rss+xml" href="RSS_FEED_URL">" tag. If this is
the case we are using this value to try to get and parse the RSS feed
again. If it fails again we are returning an error as before.
2023-11-24 23:11:50 +01:00
Rico Berger
ce36761c64 [core] Add GitHub Action for iOS and Android (#71)
This commit adds 2 new jobs to the existing "Continuous Delivery" GitHub
Action to test the build of the iOS and Android app.

For this we also had to adjust the "build.gradle" file for the Android
app, so that the test build in the GitHub Action is signed with dummy
credentials, since we do not provide the keystore properties.
2023-11-24 17:37:24 +01:00
Rico Berger
4e38cfdb5c [core] Update Flutter to Version 3.16.0 (#70)
Update the used Flutter version to 3.16.0 and all Flutter packages to
their latest version.

This commit also fixes all of the newly added analysis options and the
layout changes introduced with the new Flutter version (e.g. we have to
set the "tabAlignment" property in the "TabBar" widget).
2023-11-24 17:12:08 +01:00
Rico Berger
1c7c88a9ca [core] Submit "Add Source" Forms on Enter (#69)
All our forms were submitable via enter except the forms used to add a
new source to a column. This is now changed so that also these forms can
be submitted by pressing enter in a text field.
2023-11-07 23:12:46 +01:00
dependabot[bot]
c7d208de23 Bump the pub group in /app with 8 updates (#68)
* Bump the pub group in /app with 8 updates

Bumps the pub group in /app with 8 updates:

| Package | From | To |
| --- | --- | --- |
| [flutter_lints](https://github.com/flutter/packages/tree/main/packages) | `2.0.3` | `3.0.1` |
| [flutter_native_splash](https://github.com/jonbhanson/flutter_native_splash) | `2.3.3` | `2.3.5` |
| [msix](https://github.com/YehudaKremer/msix) | `3.16.4` | `3.16.6` |
| [package_info_plus](https://github.com/fluttercommunity/plus_plugins/tree/main/packages/package_info_plus) | `4.1.0` | `4.2.0` |
| [purchases_flutter](https://github.com/RevenueCat/purchases-flutter) | `6.0.0` | `6.2.0` |
| [supabase_flutter](https://github.com/supabase/supabase-flutter/tree/main/packages) | `1.10.22` | `1.10.24` |
| [timeago](https://github.com/andresaraujo/timeago.dart) | `3.5.0` | `3.6.0` |
| [url_launcher](https://github.com/flutter/packages/tree/main/packages/url_launcher) | `6.1.14` | `6.2.1` |


Updates `flutter_lints` from 2.0.3 to 3.0.1
- [Release notes](https://github.com/flutter/packages/releases)
- [Commits](https://github.com/flutter/packages/commits/pigeon-v3.0.1/packages)

Updates `flutter_native_splash` from 2.3.3 to 2.3.5
- [Release notes](https://github.com/jonbhanson/flutter_native_splash/releases)
- [Changelog](https://github.com/jonbhanson/flutter_native_splash/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jonbhanson/flutter_native_splash/commits/v2.3.5)

Updates `msix` from 3.16.4 to 3.16.6
- [Release notes](https://github.com/YehudaKremer/msix/releases)
- [Changelog](https://github.com/YehudaKremer/msix/blob/main/CHANGELOG.md)
- [Commits](https://github.com/YehudaKremer/msix/compare/v3.16.4...v3.16.6)

Updates `package_info_plus` from 4.1.0 to 4.2.0
- [Release notes](https://github.com/fluttercommunity/plus_plugins/releases)
- [Commits](https://github.com/fluttercommunity/plus_plugins/commits/package_info_plus-v4.2.0/packages/package_info_plus)

Updates `purchases_flutter` from 6.0.0 to 6.2.0
- [Release notes](https://github.com/RevenueCat/purchases-flutter/releases)
- [Changelog](https://github.com/RevenueCat/purchases-flutter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/RevenueCat/purchases-flutter/compare/6.0.0...6.2.0)

Updates `supabase_flutter` from 1.10.22 to 1.10.24
- [Changelog](https://github.com/supabase/supabase-flutter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/supabase/supabase-flutter/commits/supabase_flutter-v1.10.24/packages)

Updates `timeago` from 3.5.0 to 3.6.0
- [Commits](https://github.com/andresaraujo/timeago.dart/commits)

Updates `url_launcher` from 6.1.14 to 6.2.1
- [Release notes](https://github.com/flutter/packages/releases)
- [Commits](https://github.com/flutter/packages/commits/url_launcher-v6.2.1/packages/url_launcher)

---
updated-dependencies:
- dependency-name: flutter_lints
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: pub
- dependency-name: flutter_native_splash
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: pub
- dependency-name: msix
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: pub
- dependency-name: package_info_plus
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: pub
- dependency-name: purchases_flutter
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: pub
- dependency-name: supabase_flutter
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: pub
- dependency-name: timeago
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: pub
- dependency-name: url_launcher
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: pub
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update Flutter Packages

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: ricoberger <mail@ricoberger.de>
2023-11-05 23:33:01 +01:00
dependabot[bot]
a7639344a1 Bump the npm-email-templates group in /supabase/email-templates with 1 update (#61)
* Bump the npm-email-templates group

Bumps the npm-email-templates group in /supabase/email-templates with 1 update: [@react-email/components](https://github.com/resendlabs/react-email/tree/HEAD/packages/components).

- [Release notes](https://github.com/resendlabs/react-email/releases)
- [Changelog](https://github.com/resendlabs/react-email/blob/main/docs/changelog.mdx)
- [Commits](https://github.com/resendlabs/react-email/commits/HEAD/packages/components)

---
updated-dependencies:
- dependency-name: "@react-email/components"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-email-templates
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update Email Templates

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: ricoberger <mail@ricoberger.de>
2023-11-05 23:07:07 +01:00
dependabot[bot]
ff76531962 Bump the npm-landing group in /landing with 7 updates (#60)
Bumps the npm-landing group in /landing with 7 updates:

| Package | From | To |
| --- | --- | --- |
| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `20.8.5` | `20.8.10` |
| [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) | `18.2.28` | `18.2.33` |
| [@types/react-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-dom) | `18.2.13` | `18.2.14` |
| [eslint](https://github.com/eslint/eslint) | `8.51.0` | `8.52.0` |
| [eslint-config-next](https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next) | `13.5.4` | `14.0.1` |
| [next](https://github.com/vercel/next.js) | `13.5.4` | `14.0.1` |
| [tailwindcss](https://github.com/tailwindlabs/tailwindcss) | `3.3.3` | `3.3.5` |


Updates `@types/node` from 20.8.5 to 20.8.10
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `@types/react` from 18.2.28 to 18.2.33
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

Updates `@types/react-dom` from 18.2.13 to 18.2.14
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-dom)

Updates `eslint` from 8.51.0 to 8.52.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.51.0...v8.52.0)

Updates `eslint-config-next` from 13.5.4 to 14.0.1
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/commits/v14.0.1/packages/eslint-config-next)

Updates `next` from 13.5.4 to 14.0.1
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v13.5.4...v14.0.1)

Updates `tailwindcss` from 3.3.3 to 3.3.5
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/compare/v3.3.3...v3.3.5)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-landing
- dependency-name: "@types/react"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-landing
- dependency-name: "@types/react-dom"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-landing
- dependency-name: eslint
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-landing
- dependency-name: eslint-config-next
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: npm-landing
- dependency-name: next
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: npm-landing
- dependency-name: tailwindcss
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-landing
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-05 23:04:13 +01:00
dependabot[bot]
dc77f16a34 Bump the github-actions group with 1 update (#62)
* Bump the github-actions group with 1 update

Bumps the github-actions group with 1 update: [actions/setup-node](https://github.com/actions/setup-node).

- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update Node Version

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: ricoberger <mail@ricoberger.de>
2023-11-05 22:59:13 +01:00
Rico Berger
bcd03e7e60 [core] Add Custom Cache Manager (#67)
This commit adds a custom cache manager "CustomCacheManager" which is
used in the "CachedNetworkImage" widget. The custom cache manager is
required, so that we can adjust the stale periode of cached images. By
default the package used 30 days as stale periode, but for our use case
7 days should be enough and we can reduce the storage used by the app.

Note: We also fixed the "run.sh" script to work with devices where the
name contains a space.
2023-11-05 17:35:37 +01:00
Rico Berger
92bea5d715 [core] Improve Media Handling (#66)
This commit improves / simplifies the media handling within the app.
Until now we always had to provide the type of the media file (item
media / source icon) when we wanted to display it. This is now not
necessary anymore. Instead we always display the image from it's
original path when the url starts with "http://" or "https://".
Additionally we also check the platform to proxy the image request on
the web. If the image doesn't start with "http://" or "https://" we
always try to display the image from the Supabase storage.

For this we also adjusted the corresponding Deno function, so that we
check if the image starts with "http://" or "https://" before we upload
it to the Supabase storage. If this is the case we upload the source
icon to the Supabase storage. If the upload fails, we will use the
original path of the icon.

Last but not least this commit also introduces our own
"CachedNetworkImage" widget, which wraps the original
"CachedNetworkImage" widget. Our own widget will ensure that we use the
correct url for the image request, so that we do not have to use this
function all over the app anymore. Later this widget can also be used to
introduce our own cache manager.
2023-11-04 18:27:17 +01:00
Rico Berger
37cd4dff6f [core] Run "deno fmt" (#65)
Format the Deno code via "deno fmt" to use the defined code style from
the "deno.json" file.
2023-11-04 15:45:42 +01:00
Rico Berger
d62bf10eaf [github] Fix Icons in Item Preview (#64)
The icons for GitHub items were not shown, because we did not set the
correct "sourceIconType", which was required for the "ItemSource"
widget.
2023-11-04 11:48:12 +01:00
Rico Berger
3afbe5674b [core] Add Development Setup for Neovim (#63)
Add some stuff to make the development with Neovim easier:

- Add a "deno.json" file, which is required by the Deno language server,
  when working in Neovim to detect the "import_map.json" file.
- Add a "run.sh" script to easily run the Flutter app from the command
  line.
- Add the "run.sh" script and an example for Neovim to the contributing
  guide.
2023-11-04 11:47:53 +01:00
Rico Berger
6d5a699db6 [core] Add Missing Divider to Video Quality Selection (#58)
In the modal bottom sheet where a user can select the video quality the
dividers between the different qualities were missing. This commit adds
the missing divider, so that the modal bottom sheet looks similar to the
other modal bottom sheets we are using (e.g. sign out, account
settings).
2023-10-30 19:49:21 +01:00
Rico Berger
e19885a594 [core] Fix Modal Bottom Sheet Size for Images (#57)
The size of the modal bottom sheet to display images had always a max
width of 640px on large screens. This wasn't intended an the modal
bottom sheet should fill the whole screen. This is now fixed, so that
when a user clicks on an image in the details view of an item, the whole
screen is used to display the image.
2023-10-30 12:08:57 +01:00
Rico Berger
6e27eb751c [youtube] Add Desktop Support (#56)
It is now pissible to play YouTube videos on the native desktop clients.
To achieve this we removed the "youtube_player_iframe" package which was
used before to play YouTube video, but which only supported web, iOS and
Android as target platforms.

On the web we are now using our own implementation to render an iframe
with for the YouTube video.

On all other platforms we are now using the "youtube_explode_dart"
package to fetch the video urls for a YouTube video and then we display
them within our own video player (the "ItemVideoPlayer" widget which was
added in #51). We also decided to switch the package for the iOS and
Android implementation which already worked before, because we are now
able to play YouTube videos in fullscreen and we only have to maintain
an exception for the web implementation.

The "ItemVideoPlayer" widget now also supports multiple qualities of an
video via the "qualities" paramter, which allows a user to switch
between the different video qualities which are available for a YouTube
video. Last but not least the widget now uses our primary color for the
seek bar.
2023-10-29 22:48:54 +01:00
Rico Berger
8e3586f315 [github] Fix Notification Links for PRs (#55)
If a notification was related to a pull request the link we added to the
item didn't work. This should now be fixed, so that when a user clicks
on the item he is redirected to the correct pull request which is
associated with the item.

This commit also removes an unnecessary "console.log" statement.
2023-10-29 13:49:06 +01:00
Rico Berger
e994ab6214 [core] Sign Out from Current Device (#54)
Until now a user was always signed out from all devices when he clicked
on the "Sign Out" button in the settings. Now we will display a actions
modal bottom sheet where a user can select if he wants to sign out from
the current device or from all devices.

For this we pass the [SignOutScope] to the "signOut" function of
Supabase. if the scope is "local" the user will be signed out from the
current device. If the scope is "global" the user will be signed out
from all devices.
2023-10-29 10:39:28 +01:00
Rico Berger
4906f9dc27 [core] Improve Tabs Handling in Small Deck Layout (#53)
This commit improves the handling of tabs in the samll deck layout. We
are now saving the selected tabs index in the newly added
"LayoutRepository" so that we can reuse the selected tab when a user
switches between the small and large layout. We can now also set the tab
which should be initially selected in the large layout when a user
selects a column in the navigation rail. Last but not least we can also
reset the initial tab index when a user selects a new deck in the
settings, so that we always display the first column instead of the
column with the same index as it was selected in the previous deck.
2023-10-28 17:36:01 +02:00
Rico Berger
55c6da07d9 [rss] Improve Rendering of Items (#52)
The items of an RSS feed are now rendered better, to achieve this we did
the following changes:

- Remove leading and trailing whitespaces from the item description
  which should be rendered.
- Check if the media file of an item is an SVG image. If this is the
  case we will not add it to the "media" field in the database, because
  currently the CachedNetworkImage widget can not render SVGs. If we
  want to render them, we run into serious performance issue so we skip
  them completly.
- Always assume that the content of an RSS feed contains HTML and render
  them as plain text in the preview and as markdown in the details.
  Since we also render images from the description now, we check if the
  "item.media" image should be rendered. If the description contains an
  image we do not render our own image. If the description doesn't
  contain a image we render it.
2023-10-28 11:37:00 +02:00
Rico Berger
8dc83a5d5a [mastodon] Add Support for Videos (#51)
It is now possible to play videos from toots within FeedDeck. For that
we are using the "madia_kit" package, which is already used for the
Podcast player on Windows and Linux.

The videos from a toot are saved within the "options.videos" field of an
item next to the "options.media" field. In the "ItemDetailsMastodon"
widget we are then checking if this field is present and contains a list
of video urls. These urls can then be played via the "ItemVideos"
widget.
2023-10-27 15:22:27 +02:00
ricoberger
94d5732f6a Fix App IDs used in Landing Page 2023-10-22 23:09:37 +02:00
ricoberger
f4a9f84061 Fix app.feeddeck.feeddeck.metainfo.xml 2023-10-22 20:28:10 +02:00
263 changed files with 21158 additions and 5855 deletions

View File

@@ -4,6 +4,8 @@ updates:
directory: "/"
schedule:
interval: "monthly"
assignees:
- "ricoberger"
groups:
github-actions:
patterns:
@@ -13,6 +15,8 @@ updates:
directory: "/app"
schedule:
interval: "monthly"
assignees:
- "ricoberger"
groups:
pub:
patterns:
@@ -22,6 +26,8 @@ updates:
directory: "/supabase/functions/_cmd"
schedule:
interval: "monthly"
assignees:
- "ricoberger"
groups:
docker:
patterns:
@@ -31,16 +37,9 @@ updates:
directory: "/landing"
schedule:
interval: "monthly"
assignees:
- "ricoberger"
groups:
npm-landing:
patterns:
- "*"
- package-ecosystem: "npm"
directory: "/supabase/email-templates"
schedule:
interval: "monthly"
groups:
npm-email-templates:
npm:
patterns:
- "*"

View File

@@ -50,7 +50,7 @@ jobs:
- name: Build and Push Docker Image
id: docker_build
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
push: true
context: ./supabase/functions
@@ -87,11 +87,12 @@ jobs:
supabase db push
supabase functions deploy add-source-v1 --project-ref $PROJECT_ID --import-map supabase/functions/import_map.json
supabase functions deploy add-or-update-source-v1 --project-ref $PROJECT_ID --import-map supabase/functions/import_map.json
# supabase functions deploy add-source-v1 --project-ref $PROJECT_ID --import-map supabase/functions/import_map.json
supabase functions deploy delete-user-v1 --project-ref $PROJECT_ID --import-map supabase/functions/import_map.json
supabase functions deploy generate-magic-link-v1 --project-ref $PROJECT_ID --import-map supabase/functions/import_map.json
supabase functions deploy image-proxy-v1 --no-verify-jwt --project-ref $PROJECT_ID --import-map supabase/functions/import_map.json
supabase functions deploy profile-v1 --project-ref $PROJECT_ID --import-map supabase/functions/import_map.json
# supabase functions deploy profile-v1 --project-ref $PROJECT_ID --import-map supabase/functions/import_map.json
supabase functions deploy profile-v2 --project-ref $PROJECT_ID --import-map supabase/functions/import_map.json
supabase functions deploy revenuecat-webhooks-v1 --no-verify-jwt --project-ref $PROJECT_ID --import-map supabase/functions/import_map.json
supabase functions deploy stripe-create-billing-portal-link-v1 --project-ref $PROJECT_ID --import-map supabase/functions/import_map.json
@@ -109,6 +110,7 @@ jobs:
supabase db push
supabase functions deploy add-or-update-source-v1 --project-ref $PROJECT_ID --import-map supabase/functions/import_map.json
supabase functions deploy add-source-v1 --project-ref $PROJECT_ID --import-map supabase/functions/import_map.json
supabase functions deploy delete-user-v1 --project-ref $PROJECT_ID --import-map supabase/functions/import_map.json
supabase functions deploy generate-magic-link-v1 --project-ref $PROJECT_ID --import-map supabase/functions/import_map.json
@@ -120,12 +122,14 @@ jobs:
supabase functions deploy stripe-create-checkout-session-v1 --project-ref $PROJECT_ID --import-map supabase/functions/import_map.json
supabase functions deploy stripe-webhooks-v1 --no-verify-jwt --project-ref $PROJECT_ID --import-map supabase/functions/import_map.json
# The "Web" job builds the Flutter web app and publishes it to Cloudflare Pages. The job only runs when a commit is
# pushed to the main branch or a new tag is created.
# The "Web" job builds the Flutter web app and publishes it to Cloudflare Pages. The job only runs on pull requests or
# when a commit is pushed to the main branch or a new tag is created.
#
# When the job runs on a pull request it only builds the app but doesn't upload the build to Cloudflare.
web:
name: Web
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' || (github.event_name == 'release' && github.event.action == 'published')
if: github.event_name == 'pull_request' || github.ref == 'refs/heads/main' || (github.event_name == 'release' && github.event.action == 'published')
permissions:
contents: read
defaults:
@@ -166,7 +170,7 @@ jobs:
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.13.7'
flutter-version: '3.22.2'
channel: 'stable'
cache: true
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:'
@@ -183,6 +187,7 @@ jobs:
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
if: github.ref == 'refs/heads/main' || (github.event_name == 'release' && github.event.action == 'published')
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
@@ -194,7 +199,7 @@ jobs:
# runs for pull requests and when a new release is published.
macos:
name: macOS
runs-on: macos-latest
runs-on: macos-14
if: github.event_name == 'pull_request' || (github.event_name == 'release' && github.event.action == 'published')
permissions:
contents: write
@@ -209,7 +214,7 @@ jobs:
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.13.7'
flutter-version: '3.22.2'
channel: 'stable'
cache: true
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:'
@@ -230,7 +235,7 @@ jobs:
- name: Upload Artifacts (PR)
if: ${{ github.event_name == 'pull_request' }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: feeddeck-macos-universal.zip
path: app/build/macos/Build/Products/Release/feeddeck-macos-universal.zip
@@ -243,10 +248,10 @@ jobs:
upload_url: ${{ github.event.release.upload_url }}
asset_path: app/build/macos/Build/Products/Release/feeddeck-macos-universal.zip
# The "Linux" job builds the Flutter Linux app and uploads it to the GitHub release or the pull request. The job only
# runs for pull requests and when a new release is published.
linux:
name: Linux
# The "Linux (x86_64)" job builds the Flutter Linux app and uploads it to the GitHub release or the pull request. The
# job only runs for pull requests and when a new release is published.
linux-x86_64:
name: Linux (x86_64)
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' || (github.event_name == 'release' && github.event.action == 'published')
permissions:
@@ -271,7 +276,7 @@ jobs:
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.13.7'
flutter-version: '3.22.2'
channel: 'stable'
cache: true
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:'
@@ -297,7 +302,7 @@ jobs:
- name: Upload Artifacts (PR)
if: ${{ github.event_name == 'pull_request' }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: feeddeck-linux-x86_64.tar.gz
path: app/build/feeddeck-linux-x86_64.tar.gz
@@ -310,11 +315,82 @@ jobs:
upload_url: ${{ github.event.release.upload_url }}
asset_path: app/build/feeddeck-linux-x86_64.tar.gz
# The "Linux (arm64)" job builds the Flutter Linux app and uploads it to the GitHub release or the pull request. The
# job only runs for pull requests and when a new release is published.
#
# NOTE: Normally this job should run for every pull request and when a new release is published, but since we have to
# pay for the "ubicloud-standard-2-arm" runner, we only run the job when a new release is published.
linux-arm64:
name: Linux (arm64)
runs-on: ubicloud-standard-2-arm
if: github.event_name == 'release' && github.event.action == 'published'
# if: github.event_name == 'pull_request' || (github.event_name == 'release' && github.event.action == 'published')
permissions:
contents: write
defaults:
run:
working-directory: "app"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Packages
run: |
# Required for Flutter
sudo apt-get update -y
sudo apt-get install -y ninja-build libgtk-3-dev
# Required for Package "media_kit" which is used via "just_audio_media_kit" for Linux and Windows:
# See: https://pub.dev/packages/media_kit and https://pub.dev/packages/just_audio_media_kit
sudo apt-get install -y libmpv-dev mpv
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.22.2'
channel: 'master'
cache: true
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:'
cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:'
- name: Install Dependencies
run: |
flutter pub get
- name: Build
run: |
flutter config --enable-linux-desktop
flutter build linux --release --dart-define SUPABASE_URL=${{ secrets.SUPABASE_PROD_URL }} --dart-define SUPABASE_ANON_KEY=${{ secrets.SUPABASE_PROD_ANON_KEY }} --dart-define SUPABASE_SITE_URL=${{ secrets.SUPABASE_PROD_SITE_URL }} --dart-define GOOGLE_CLIENT_ID=${{ secrets.SUPABASE_PROD_GOOGLE_CLIENT_ID }}
- name: Package
run: |
cp linux/flatpak/app.feeddeck.feeddeck.desktop build/linux/arm64/release/bundle/
cp linux/flatpak/app.feeddeck.feeddeck.metainfo.xml build/linux/arm64/release/bundle/
cp linux/flatpak/app.feeddeck.feeddeck.svg build/linux/arm64/release/bundle/
cd build
cp -r linux/arm64/release/bundle/ feeddeck-linux-arm64
tar -czf feeddeck-linux-arm64.tar.gz feeddeck-linux-arm64
- name: Upload Artifacts (PR)
if: ${{ github.event_name == 'pull_request' }}
uses: actions/upload-artifact@v4
with:
name: feeddeck-linux-arm64.tar.gz
path: app/build/feeddeck-linux-arm64.tar.gz
if-no-files-found: error
- name: Upload Artifacts (Release)
uses: shogo82148/actions-upload-release-asset@v1
if: ${{ github.event_name == 'release' && github.event.action == 'published' }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: app/build/feeddeck-linux-arm64.tar.gz
# The "Windows" job builds the Flutter Windows app and uploads it to the GitHub release or the pull request. The job
# only runs for pull requests and when a new release is published.
windows:
name: Windows
runs-on: windows-latest
runs-on: windows-2019
if: github.event_name == 'pull_request' || (github.event_name == 'release' && github.event.action == 'published')
permissions:
contents: write
@@ -329,7 +405,7 @@ jobs:
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.13.7'
flutter-version: '3.22.2'
channel: 'stable'
cache: true
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:'
@@ -343,19 +419,22 @@ jobs:
run: |
flutter config --enable-windows-desktop
flutter build windows --release --dart-define SUPABASE_URL=${{ secrets.SUPABASE_PROD_URL }} --dart-define SUPABASE_ANON_KEY=${{ secrets.SUPABASE_PROD_ANON_KEY }} --dart-define SUPABASE_SITE_URL=${{ secrets.SUPABASE_PROD_SITE_URL }} --dart-define GOOGLE_CLIENT_ID=${{ secrets.SUPABASE_PROD_GOOGLE_CLIENT_ID }}
- name: Create Archive
run: |
Compress-Archive -Path build/windows/x64/runner/Release/* -Destination feeddeck-windows-x86_64.zip
- name: Package
run: |
flutter pub run msix:create --output-path build --output-name feeddeck
cd build
7z a -tzip feeddeck-windows-x86_64.zip feeddeck.msix
7z a -tzip feeddeck-windows-x86_64-msix.zip feeddeck.msix
- name: Upload Artifacts (PR)
if: ${{ github.event_name == 'pull_request' }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: feeddeck-windows-x86_64.zip
path: app/build/feeddeck-windows-x86_64.zip
path: app/feeddeck-windows-x86_64.zip
if-no-files-found: error
- name: Upload Artifacts (Release)
@@ -363,4 +442,86 @@ jobs:
if: ${{ github.event_name == 'release' && github.event.action == 'published' }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: app/build/feeddeck-windows-x86_64.zip
asset_path: app/feeddeck-windows-x86_64.zip
- name: Upload Artifacts (PR)
if: ${{ github.event_name == 'pull_request' }}
uses: actions/upload-artifact@v4
with:
name: feeddeck-windows-x86_64-msix.zip
path: app/build/feeddeck-windows-x86_64-msix.zip
if-no-files-found: error
- name: Upload Artifacts (Release)
uses: shogo82148/actions-upload-release-asset@v1
if: ${{ github.event_name == 'release' && github.event.action == 'published' }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: app/build/feeddeck-windows-x86_64-msix.zip
# The "iOS" job builds the Flutter iOS app on every pull request. This is only used to test that the build of the iOS
# app works. The artifact of the build isn't uploaded / used.
ios:
name: iOS
runs-on: macos-14
if: github.event_name == 'pull_request' || (github.event_name == 'release' && github.event.action == 'published')
defaults:
run:
working-directory: "app"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.22.2'
channel: 'stable'
cache: true
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:'
cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:'
- name: Install Dependencies
run: |
flutter pub get
- name: Build
run: |
flutter config --enable-ios
flutter build ipa --no-codesign --release --dart-define SUPABASE_URL=${{ secrets.SUPABASE_PROD_URL }} --dart-define SUPABASE_ANON_KEY=${{ secrets.SUPABASE_PROD_ANON_KEY }} --dart-define SUPABASE_SITE_URL=${{ secrets.SUPABASE_PROD_SITE_URL }} --dart-define GOOGLE_CLIENT_ID=${{ secrets.SUPABASE_PROD_GOOGLE_CLIENT_ID }}
# The "Android" job builds the Flutter Android app on every pull request. This is only used to test that the build of
# the Android app works. The artifact of the build isn't uploaded / used.
android:
name: Android
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' || (github.event_name == 'release' && github.event.action == 'published')
defaults:
run:
working-directory: "app"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Java
run: echo "JAVA_HOME=$JAVA_HOME_17_X64" >> $GITHUB_ENV
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.22.2'
channel: 'stable'
cache: true
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:'
cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:'
- name: Install Dependencies
run: |
flutter pub get
- name: Build
run: |
flutter config --enable-android
flutter build appbundle --release --dart-define SUPABASE_URL=${{ secrets.SUPABASE_PROD_URL }} --dart-define SUPABASE_ANON_KEY=${{ secrets.SUPABASE_PROD_ANON_KEY }} --dart-define SUPABASE_SITE_URL=${{ secrets.SUPABASE_PROD_SITE_URL }} --dart-define GOOGLE_CLIENT_ID=${{ secrets.SUPABASE_PROD_GOOGLE_CLIENT_ID }}

View File

@@ -0,0 +1,53 @@
name: Continuous Integration
on:
push:
branches:
- main
pull_request:
jobs:
flutter:
name: Flutter
runs-on: ubuntu-latest
defaults:
run:
working-directory: "app"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.22.2'
channel: 'stable'
cache: true
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:'
cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:'
- name: Install Dependencies
run: |
flutter pub get
- name: Test
run: |
flutter test
deno:
name: Deno
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: Test
run: |
deno test --allow-env --import-map=supabase/functions/import_map.json supabase/functions

View File

@@ -16,7 +16,7 @@ jobs:
steps:
- name: Update Changelog
uses: release-drafter/release-drafter@v5
uses: release-drafter/release-drafter@v6
with:
config-name: release.yaml
disable-autolabeler: true
@@ -40,14 +40,14 @@ jobs:
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: "16"
node-version: "20"
cache: npm
cache-dependency-path: landing/package-lock.json
- name: Setup Pages
uses: actions/configure-pages@v3
uses: actions/configure-pages@v5
- name: Install Dependencies
run: |
@@ -58,7 +58,7 @@ jobs:
npm run build
- name: Upload Artifact
uses: actions/upload-pages-artifact@v2
uses: actions/upload-pages-artifact@v3
with:
path: ./landing/out
@@ -78,4 +78,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v4

7
.gitignore vendored
View File

@@ -1,8 +1,11 @@
# Visual Studio Code Launch Configurations
.vscode/launch.json
# Visual Studio Code
.vscode
# Environment Variables
/supabase/.env.local
/supabase/.env.dev
/supabase/.env.stage
/supabase/.env.prod
# Deno
/coverage_deno

17
.vscode/settings.json vendored
View File

@@ -1,17 +0,0 @@
{
"deno.enable": true,
"deno.unstable": true,
"deno.lint": true,
"deno.enablePaths": [
"./supabase/functions"
],
"deno.importMap": "./supabase/functions/import_map.json",
"editor.formatOnSave": true,
"editor.defaultFormatter": "denoland.vscode-deno",
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"[html]": {
"editor.defaultFormatter": "vscode.html-language-features"
}
}

View File

@@ -57,100 +57,46 @@ check your installed version:
```sh
$ flutter --version
Flutter 3.13.7 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 2f708eb839 (4 days ago) • 2023-10-09 09:58:08 -0500
Engine • revision a794cf2681
Tools • Dart 3.1.3 • DevTools 2.25.0
Flutter 3.22.2 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 761747bfc5 (3 days ago) • 2024-06-05 22:15:13 +0200
Engine • revision edd8546116
Tools • Dart 3.4.3 • DevTools 2.34.3
$ deno --version
deno 1.36.4 (release, aarch64-apple-darwin)
v8 11.6.189.12
typescript 5.1.6
deno 1.40.2 (release, aarch64-apple-darwin)
v8 12.1.285.6
typescript 5.3.3
```
### Working with Flutter
We are recommending to use the
[Visual Studio Code](https://docs.flutter.dev/development/tools/vs-code)
extensions for development.
To run the app you can use the [`run.sh`](./app/run.sh) script, which will
automatically load the `.env` file from the Supabase project and passes the
required variables to the `flutter run` command:
The easiest way to run the Flutter app within Visual Studio Code is to create a
`.vscode/launch.json` file. Within the different configurations you have to
provide the following arguments: `--dart-define SUPABASE_URL=<SUPABASE_URL>`,
`--dart-define SUPABASE_ANON_KEY=<SUPABASE_ANON_KEY>`,
`--dart-define SUPABASE_SITE_URL=<SUPABASE_SITE_URL>` and
`--dart-define GOOGLE_CLIENT_ID=<GOOGLE_CLIENT_ID>`.
<details>
<summary>Example: `.vscode/launch.json`</summary>
```json
{
"version": "0.2.0",
"configurations": [
{
"name": "Local - Chrome",
"type": "dart",
"request": "launch",
"program": "app/lib/main.dart",
"args": [
"-d",
"chrome",
"--web-port",
"3000",
"--web-browser-flag=--disable-web-security",
"--dart-define",
"SUPABASE_URL=<SUPABASE_URL>",
"--dart-define",
"SUPABASE_ANON_KEY=<SUPABASE_ANON_KEY>",
"--dart-define",
"SUPABASE_SITE_URL=<SUPABASE_SITE_URL>",
"--dart-define",
"GOOGLE_CLIENT_ID=<GOOGLE_CLIENT_ID>"
]
},
{
"name": "Local - iOS Simulator",
"type": "dart",
"request": "launch",
"program": "app/lib/main.dart",
"args": [
"-d",
"iPhone 14 Pro Max",
"--dart-define",
"SUPABASE_URL=<SUPABASE_URL>",
"--dart-define",
"SUPABASE_ANON_KEY=<SUPABASE_ANON_KEY>",
"--dart-define",
"SUPABASE_SITE_URL=<SUPABASE_SITE_URL>",
"--dart-define",
"GOOGLE_CLIENT_ID=<GOOGLE_CLIENT_ID>"
]
},
{
"name": "Local - macOS",
"type": "dart",
"request": "launch",
"program": "app/lib/main.dart",
"args": [
"-d",
"macOS",
"--dart-define",
"SUPABASE_URL=<SUPABASE_URL>",
"--dart-define",
"SUPABASE_ANON_KEY=<SUPABASE_ANON_KEY>",
"--dart-define",
"SUPABASE_SITE_URL=<SUPABASE_SITE_URL>",
"--dart-define",
"GOOGLE_CLIENT_ID=<GOOGLE_CLIENT_ID>"
]
}
]
}
```sh
./run.sh --device="chrome" --environment="local"
```
</details>
To run the tests the following command can be used:
```sh
flutter test
```
To check the test coverage the `--coverage` flag can be added to the command and
an HTML report can be generated:
```sh
flutter test --coverage
# To generate the HTML report lcov is required, which can be installed via Homebrew:
brew install lcov
genhtml coverage/lcov.info -o coverage/html
open coverage/html/index.html
```
#### Sort all Imports
@@ -284,6 +230,38 @@ cd supabase/functions/_cmd
docker-compose up --build
```
To build the Docker image, the following commands can be run:
```sh
docker build -f supabase/functions/_cmd/Dockerfile -t ghcr.io/feeddeck/feeddeck:dev supabase/functions
# To build the Docker image for another platform use the following:
docker buildx build --platform linux/amd64 -f supabase/functions/_cmd/Dockerfile -t ghcr.io/feeddeck/feeddeck:dev supabase/functions
# The Docker image can then be used to run the scheduler, worker or tools, e.g.
docker run ghcr.io/feeddeck/feeddeck:dev tools get-feed '{"type": "reddit", "options": {"reddit": "/r/kubernetes"}}'
```
To run the tests for our code, the following command can be used:
```sh
deno test --allow-env --import-map=supabase/functions/import_map.json supabase/functions
```
To check the test coverage the `--coverage` flag can be added to the command and
an HTML report can be generated:
```sh
deno test --allow-env --import-map=supabase/functions/import_map.json supabase/functions --coverage=coverage_deno
# To generate the HTML report lcov is required, which can be installed via Homebrew:
brew install lcov
deno coverage coverage_deno --lcov --output=coverage_deno/coverage_deno.lcov
genhtml -o coverage_deno/html coverage_deno/coverage_deno.lcov
open coverage_deno/html/index.html
```
## Hosting
FeedDeck uses Supabase as backend. For Supabase we can use
@@ -305,6 +283,7 @@ supabase secrets set --env-file supabase/.env
supabase secrets list
# Deploy all functions
supabase functions deploy add-or-update-source-v1 --project-ref <PROJECT-ID> --import-map supabase/functions/import_map.json
supabase functions deploy add-source-v1 --project-ref <PROJECT-ID> --import-map supabase/functions/import_map.json
supabase functions deploy delete-user-v1 --project-ref <PROJECT-ID> --import-map supabase/functions/import_map.json
supabase functions deploy generate-magic-link-v1 --project-ref <PROJECT-ID> --import-map supabase/functions/import_map.json
@@ -406,21 +385,8 @@ Android, macOS, Windows and Linux if you do not want to use the official ones.
5. Build the app for Web by running `flutter build web`. The build can be found
at `app/build/web` and must be uploaded to your hosting provider.
6. Build the app for Linux by running `flutter build linux --release`. To build
the `arm64` version the following commands can be run on a Raspberry Pi. Once
the `feeddeck-linux-arm64.tar.gz` archive was created it can be uploaded to
the GitHub release.
```sh
cp linux/flatpak/app.feeddeck.feeddeck.desktop build/linux/arm64/release/bundle/
cp linux/flatpak/app.feeddeck.feeddeck.metainfo.xml build/linux/arm64/release/bundle/
cp linux/flatpak/app.feeddeck.feeddeck.svg build/linux/arm64/release/bundle/
cd build
cp -r linux/arm64/release/bundle/ feeddeck-linux-arm64
tar -czf feeddeck-linux-arm64.tar.gz feeddeck-linux-arm64
```
Update the `app.feeddeck.feeddeck.yml` file at
6. Build the app for Linux by running `flutter build linux --release`. Update
the `app.feeddeck.feeddeck.yml` file at
[github.com/flathub/app.feeddeck.feeddeck](https://github.com/flathub/app.feeddeck.feeddeck)
with the new release.

View File

@@ -1,6 +1,6 @@
MIT License
Copyright (c) 2023 Rico Berger
Copyright (c) 2024 Rico Berger
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in

View File

@@ -31,8 +31,8 @@ platforms. FeedDeck is written in [Flutter](https://flutter.dev/) and uses
- **RSS and Social Media Feeds:** Follow your favorite RSS and social media
feeds.
- **News:** Get the latest news from your favorite RSS feeds and Google News.
- **Social Media:** Follow your friends and favorite topics on Medium, Nitter,
Reddit, Tumblr and X.
- **Social Media:** Follow your friends and favorite topics on Medium, Reddit
and Tumblr.
- **GitHub:** Get your GitHub notifications and follow your repository
activities.
- **Podcasts:** Follow and listen to your favorite podcasts, via the built-in

1
app/.gitignore vendored
View File

@@ -31,6 +31,7 @@ migrate_working_dir/
.pub-cache/
.pub/
/build/
/coverage
# Symbolication related
app.*.symbols

View File

@@ -1,3 +1,9 @@
plugins {
id "com.android.application"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
}
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
@@ -12,11 +18,6 @@ if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
@@ -27,21 +28,18 @@ if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
namespace "app.feeddeck.feeddeck"
compileSdkVersion flutter.compileSdkVersion
ndkVersion flutter.ndkVersion
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = '1.8'
jvmTarget = '17'
}
sourceSets {
@@ -49,14 +47,13 @@ android {
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "app.feeddeck.feeddeck"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
// minSdkVersion flutter.minSdkVersion
// targetSdkVersion flutter.targetSdkVersion
minSdkVersion 21
targetSdkVersion 33
targetSdkVersion 34
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
@@ -72,7 +69,12 @@ android {
buildTypes {
release {
signingConfig signingConfigs.release
if (keystorePropertiesFile.exists()) {
signingConfig signingConfigs.release
} else {
// For testing purposes we sign with dummy credentials if no key properties are given.
signingConfig signingConfigs.debug
}
}
}
}
@@ -82,6 +84,5 @@ flutter {
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.google.android.gms:play-services-auth:20.6.0'
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -5,6 +5,10 @@
<!-- Show a splash screen on the activity. Automatically removed when
the Flutter engine draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
<item name="android:forceDarkAllowed">false</item>
<item name="android:windowFullscreen">true</item>
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your

View File

@@ -1,16 +1,3 @@
buildscript {
ext.kotlin_version = '1.7.10'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()

View File

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

View File

@@ -1,11 +1,26 @@
include ':app'
pluginManagement {
def flutterSdkPath = {
def properties = new Properties()
file("local.properties").withInputStream { properties.load(it) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
return flutterSdkPath
}
settings.ext.flutterSdkPath = flutterSdkPath()
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
def properties = new Properties()
includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")
assert localPropertiesFile.exists()
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "8.1.2" apply false
id "org.jetbrains.kotlin.android" version "1.9.10" apply false
}
include ":app"

View File

@@ -0,0 +1 @@
extensions:

Binary file not shown.

View File

@@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>11.0</string>
<string>12.0</string>
</dict>
</plist>

View File

@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
platform :ios, '11.0'
platform :ios, '12.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

View File

@@ -8,24 +8,27 @@ PODS:
- Flutter (1.0.0)
- flutter_native_splash (0.0.1):
- Flutter
- FMDB (2.7.5):
- FMDB/standard (= 2.7.5)
- FMDB/standard (2.7.5)
- just_audio (0.0.1):
- Flutter
- media_kit_libs_ios_video (1.0.4):
- Flutter
- media_kit_native_event_loop (1.0.0):
- Flutter
- media_kit_video (0.0.1):
- Flutter
- package_info_plus (0.4.5):
- Flutter
- path_provider_foundation (0.0.1):
- Flutter
- FlutterMacOS
- purchases_flutter (6.0.0):
- purchases_flutter (6.30.2):
- Flutter
- PurchasesHybridCommon (= 11.1.0)
- PurchasesHybridCommon (11.1.0):
- RevenueCat (= 4.43.2)
- RevenueCat (4.43.2)
- screen_brightness_ios (0.1.0):
- Flutter
- PurchasesHybridCommon (= 7.0.0)
- PurchasesHybridCommon (7.0.0):
- RevenueCat (= 4.27.0)
- RevenueCat (4.27.0)
- shared_preferences_foundation (0.0.1):
- Flutter
- FlutterMacOS
@@ -33,10 +36,12 @@ PODS:
- Flutter
- sqflite (0.0.3):
- Flutter
- FMDB (>= 2.7.5)
- FlutterMacOS
- url_launcher_ios (0.0.1):
- Flutter
- webview_flutter_wkwebview (0.0.1):
- volume_controller (0.0.1):
- Flutter
- wakelock_plus (0.0.1):
- Flutter
DEPENDENCIES:
@@ -46,19 +51,22 @@ DEPENDENCIES:
- Flutter (from `Flutter`)
- flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`)
- just_audio (from `.symlinks/plugins/just_audio/ios`)
- media_kit_libs_ios_video (from `.symlinks/plugins/media_kit_libs_ios_video/ios`)
- media_kit_native_event_loop (from `.symlinks/plugins/media_kit_native_event_loop/ios`)
- media_kit_video (from `.symlinks/plugins/media_kit_video/ios`)
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
- purchases_flutter (from `.symlinks/plugins/purchases_flutter/ios`)
- screen_brightness_ios (from `.symlinks/plugins/screen_brightness_ios/ios`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
- sign_in_with_apple (from `.symlinks/plugins/sign_in_with_apple/ios`)
- sqflite (from `.symlinks/plugins/sqflite/ios`)
- sqflite (from `.symlinks/plugins/sqflite/darwin`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
- webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/ios`)
- volume_controller (from `.symlinks/plugins/volume_controller/ios`)
- wakelock_plus (from `.symlinks/plugins/wakelock_plus/ios`)
SPEC REPOS:
trunk:
- FMDB
- PurchasesHybridCommon
- RevenueCat
@@ -75,45 +83,56 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/flutter_native_splash/ios"
just_audio:
:path: ".symlinks/plugins/just_audio/ios"
media_kit_libs_ios_video:
:path: ".symlinks/plugins/media_kit_libs_ios_video/ios"
media_kit_native_event_loop:
:path: ".symlinks/plugins/media_kit_native_event_loop/ios"
media_kit_video:
:path: ".symlinks/plugins/media_kit_video/ios"
package_info_plus:
:path: ".symlinks/plugins/package_info_plus/ios"
path_provider_foundation:
:path: ".symlinks/plugins/path_provider_foundation/darwin"
purchases_flutter:
:path: ".symlinks/plugins/purchases_flutter/ios"
screen_brightness_ios:
:path: ".symlinks/plugins/screen_brightness_ios/ios"
shared_preferences_foundation:
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
sign_in_with_apple:
:path: ".symlinks/plugins/sign_in_with_apple/ios"
sqflite:
:path: ".symlinks/plugins/sqflite/ios"
:path: ".symlinks/plugins/sqflite/darwin"
url_launcher_ios:
:path: ".symlinks/plugins/url_launcher_ios/ios"
webview_flutter_wkwebview:
:path: ".symlinks/plugins/webview_flutter_wkwebview/ios"
volume_controller:
:path: ".symlinks/plugins/volume_controller/ios"
wakelock_plus:
:path: ".symlinks/plugins/wakelock_plus/ios"
SPEC CHECKSUMS:
app_links: 5ef33d0d295a89d9d16bb81b0e3b0d5f70d6c875
app_links: e70ca16b4b0f88253b3b3660200d4a10b4ea9795
audio_service: f509d65da41b9521a61f1c404dd58651f265a567
audio_session: 4f3e461722055d21515cf3261b64c973c062f345
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
audio_session: 088d2483ebd1dc43f51d253d4a1c517d9a2e7207
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_native_splash: edf599c81f74d093a4daf8e17bd7a018854bc778
just_audio: baa7252489dbcf47a4c7cc9ca663e9661c99aafa
media_kit_native_event_loop: f1ee9f941ec0af371b245969a3e010901c375480
package_info_plus: fd030dabf36271f146f1f3beacd48f564b0f17f7
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
purchases_flutter: 549ccfbbaf5e7cd195043c714b69a35e278c00f1
PurchasesHybridCommon: af3b2413f9cb999bc1fdca44770bdaf39dfb89fa
RevenueCat: 84fbe2eb9bbf63e1abf346ccd3ff9ee45d633e3b
shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126
media_kit_libs_ios_video: a5fe24bc7875ccd6378a0978c13185e1344651c1
media_kit_native_event_loop: e6b2ab20cf0746eb1c33be961fcf79667304fa2a
media_kit_video: 5da63f157170e5bf303bf85453b7ef6971218a2e
package_info_plus: 58f0028419748fad15bf008b270aaa8e54380b1c
path_provider_foundation: 3784922295ac71e43754bd15e0653ccfd36a147c
purchases_flutter: 42d5544e7730ea89a88cc2f008b7c700fd147052
PurchasesHybridCommon: 4022d5944cb30ec44ba5159e42aa161fe0e30175
RevenueCat: 3d934653b7e8b09af88fd47e9e84cfaf5d0a89ba
screen_brightness_ios: 715ca807df953bf676d339f11464e438143ee625
shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
sign_in_with_apple: f3bf75217ea4c2c8b91823f225d70230119b8440
sqflite: 31f7eba61e3074736dff8807a9b41581e4f7f15a
url_launcher_ios: 08a3dfac5fb39e8759aeb0abbd5d9480f30fc8b4
webview_flutter_wkwebview: 2e2d318f21a5e036e2c3f26171342e95908bd60a
sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec
url_launcher_ios: bbd758c6e7f9fd7b5b1d4cde34d2b95fcce5e812
volume_controller: 531ddf792994285c9b17f9d8a7e4dcdd29b3eae9
wakelock_plus: 78ec7c5b202cab7761af8e2b2b3d0671be6c4ae1
PODFILE CHECKSUM: ec83c31511fbc978a9918c6fda235238118483f5
PODFILE CHECKSUM: 016564c560c4c9dbcb210e12c7aa6039072645f1
COCOAPODS: 1.13.0
COCOAPODS: 1.15.2

View File

@@ -161,7 +161,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1430;
LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
@@ -348,7 +348,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
@@ -428,7 +428,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@@ -477,7 +477,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
LastUpgradeVersion = "1510"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -1,73 +1,73 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>FeedDeck</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>feeddeck</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>app.feeddeck.feeddeck</string>
</array>
</dict>
</array>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>FeedDeck</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>feeddeck</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>app.feeddeck.feeddeck</string>
</array>
</dict>
</array>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIStatusBarHidden</key>
<true/>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIStatusBarHidden</key>
<false/>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
</plist>

View File

@@ -7,16 +7,19 @@ import 'package:flutter/material.dart';
import 'package:flutter_native_splash/flutter_native_splash.dart';
import 'package:flutter_web_plugins/url_strategy.dart';
import 'package:just_audio_background/just_audio_background.dart';
import 'package:media_kit/media_kit.dart';
import 'package:provider/provider.dart';
import 'package:window_manager/window_manager.dart';
import 'package:feeddeck/repositories/app_repository.dart';
import 'package:feeddeck/repositories/layout_repository.dart';
import 'package:feeddeck/repositories/profile_repository.dart';
import 'package:feeddeck/repositories/settings_repository.dart';
import 'package:feeddeck/utils/constants.dart';
import 'package:feeddeck/widgets/confirmation/confirmation.dart';
import 'package:feeddeck/widgets/home/home.dart';
import 'package:feeddeck/widgets/reset_password/reset_password.dart';
import 'package:feeddeck/widgets/item/details/utils/item_audio_palyer/item_audio_player_init/item_audio_player_init.dart';
/// Before we are calling [runApp] we have to ensure that the widget bindings
/// are initialized, so that we can preserve the splash screen until we are done
@@ -45,13 +48,26 @@ void main() async {
});
}
/// Initialize the [media_kit] packages, so that we can play audio and video
/// files.
MediaKit.ensureInitialized();
if (!kIsWeb && (Platform.isLinux || Platform.isWindows)) {
ItemAudioPlayerInit().init();
}
/// Initialize the [just_audio_background] package, so that we can play audio
/// files in the background.
await JustAudioBackground.init(
androidNotificationChannelId: 'com.ryanheise.bg_demo.channel.audio',
androidNotificationChannelName: 'Audio playback',
androidNotificationOngoing: true,
);
///
/// We can not initialize the [just_audio_background] package on Windows and
/// Linux, because then the returned duration in the `_player.durationStream`
/// isn't working correctly in the [ItemAudioPlayer] widget.
if (kIsWeb || Platform.isAndroid || Platform.isIOS || Platform.isMacOS) {
await JustAudioBackground.init(
androidNotificationChannelId: 'com.ryanheise.bg_demo.channel.audio',
androidNotificationChannelName: 'Audio playback',
androidNotificationOngoing: true,
);
}
/// For the ewb we have to use the path url strategy, so that the redirect
/// within Supabase is working in all cases. On all other platforms this is a
@@ -124,6 +140,7 @@ class FeedDeckApp extends StatelessWidget {
Widget build(BuildContext context) {
return MultiProvider(
providers: [
ChangeNotifierProvider(create: (_) => LayoutRepository()),
ChangeNotifierProvider(create: (_) => AppRepository()),
ChangeNotifierProvider(create: (_) => ProfileRepository()),
],

View File

@@ -4,20 +4,23 @@ import 'package:feeddeck/models/sources/github.dart';
import 'package:feeddeck/models/sources/googlenews.dart';
import 'package:feeddeck/models/sources/stackoverflow.dart';
import 'package:feeddeck/utils/constants.dart';
import 'package:feeddeck/utils/fd_icons.dart';
/// [FDSourceType] is a enum value which defines the source type. A source can
/// have one of the following types:
/// - [fourchan]
/// - [github]
/// - [googlenews]
/// - [lemmy]
/// - [mastodon]
/// - [medium]
/// - [nitter]
/// - [pinterest]
/// - [podcast]
/// - [reddit]
/// - [rss]
/// - [stackoverflow]
/// - [tumblr]
/// - [x]
/// - [youtube]
///
/// The [none] value is not valid and just here as a fallback in case sth. odd
@@ -25,17 +28,19 @@ import 'package:feeddeck/utils/constants.dart';
/// the list, so that we can loop though the types in a ListView / GridView
/// builder via `FDSourceType.values.length - 1`.
enum FDSourceType {
fourchan,
github,
googlenews,
lemmy,
mastodon,
medium,
nitter,
pinterest,
podcast,
reddit,
rss,
stackoverflow,
tumblr,
// x,
youtube,
none,
}
@@ -52,16 +57,22 @@ extension FDSourceTypeExtension on FDSourceType {
/// [toLocalizedString] returns a localized string for a source type.
String toLocalizedString() {
switch (this) {
case FDSourceType.fourchan:
return '4chan';
case FDSourceType.github:
return 'GitHub';
case FDSourceType.googlenews:
return 'Google News';
case FDSourceType.lemmy:
return 'Lemmy';
case FDSourceType.mastodon:
return 'Mastodon';
case FDSourceType.medium:
return 'Medium';
case FDSourceType.nitter:
return 'Nitter';
case FDSourceType.pinterest:
return 'Pinterest';
case FDSourceType.podcast:
return 'Podcast';
case FDSourceType.reddit:
@@ -72,8 +83,6 @@ extension FDSourceTypeExtension on FDSourceType {
return 'StackOverflow';
case FDSourceType.tumblr:
return 'Tumblr';
// case FDSourceType.x:
// return 'X';
case FDSourceType.youtube:
return 'YouTube';
default:
@@ -81,20 +90,61 @@ extension FDSourceTypeExtension on FDSourceType {
}
}
/// [color] returns the brand color for a source type, which can be used as
/// background color for the icon of a source type.
Color get color {
/// [icon] returns the icon for a source.
IconData get icon {
switch (this) {
case FDSourceType.fourchan:
return FDIcons.fourchan;
case FDSourceType.github:
return FDIcons.github;
case FDSourceType.googlenews:
return FDIcons.googlenews;
case FDSourceType.lemmy:
return FDIcons.lemmy;
case FDSourceType.mastodon:
return FDIcons.mastodon;
case FDSourceType.medium:
return FDIcons.medium;
case FDSourceType.nitter:
return FDIcons.nitter;
case FDSourceType.pinterest:
return FDIcons.pinterest;
case FDSourceType.podcast:
return Icons.podcasts;
case FDSourceType.reddit:
return FDIcons.reddit;
case FDSourceType.rss:
return FDIcons.rss;
case FDSourceType.stackoverflow:
return FDIcons.stackoverflow;
case FDSourceType.tumblr:
return FDIcons.tumblr;
case FDSourceType.youtube:
return FDIcons.youtube;
default:
return FDIcons.feeddeck;
}
}
/// [bgColor] returns the background color for the source icon.
Color get bgColor {
switch (this) {
case FDSourceType.fourchan:
return const Color(0xff880000);
case FDSourceType.github:
return const Color(0xff000000);
case FDSourceType.googlenews:
return const Color(0xff4285f4);
case FDSourceType.lemmy:
return const Color(0xff00bc8c);
case FDSourceType.mastodon:
return const Color(0xff6364ff);
case FDSourceType.medium:
return const Color(0xff000000);
case FDSourceType.nitter:
return const Color(0xffff6c60);
case FDSourceType.pinterest:
return const Color(0xffe60023);
case FDSourceType.podcast:
return const Color(0xff872ec4);
case FDSourceType.reddit:
@@ -105,14 +155,49 @@ extension FDSourceTypeExtension on FDSourceType {
return const Color(0xffef8236);
case FDSourceType.tumblr:
return const Color(0xff34526f);
// case FDSourceType.x:
// return const Color(0xff000000);
case FDSourceType.youtube:
return const Color(0xffff0000);
default:
return Constants.primary;
}
}
/// [fgColor] returns the forground color for the source icon. This should be
/// used toether with the [bgColor].
Color get fgColor {
switch (this) {
case FDSourceType.fourchan:
return const Color(0xffffffff);
case FDSourceType.github:
return const Color(0xffffffff);
case FDSourceType.googlenews:
return const Color(0xffffffff);
case FDSourceType.lemmy:
return const Color(0xffffffff);
case FDSourceType.mastodon:
return const Color(0xffffffff);
case FDSourceType.medium:
return const Color(0xffffffff);
case FDSourceType.nitter:
return const Color(0xffffffff);
case FDSourceType.pinterest:
return const Color(0xffffffff);
case FDSourceType.podcast:
return const Color(0xffffffff);
case FDSourceType.reddit:
return const Color(0xffffffff);
case FDSourceType.rss:
return const Color(0xffffffff);
case FDSourceType.stackoverflow:
return const Color(0xffffffff);
case FDSourceType.tumblr:
return const Color(0xffffffff);
case FDSourceType.youtube:
return const Color(0xffffffff);
default:
return Constants.onPrimary;
}
}
}
/// [getSourceTypeFromString] returns the [FDSourceType] from his string
@@ -173,7 +258,7 @@ class FDSource {
'id': id,
'type': type.toShortString(),
'title': title,
'options': options != null ? options!.toJson() : null,
'options': options?.toJson(),
'link': link,
'icon': icon,
};
@@ -183,36 +268,44 @@ class FDSource {
/// [FDSourceOptions] defines all options for the different source types which
/// are available.
class FDSourceOptions {
String? fourchan;
FDGitHubOptions? github;
FDGoogleNewsOptions? googlenews;
String? lemmy;
String? mastodon;
String? medium;
String? nitter;
String? pinterest;
String? podcast;
String? reddit;
String? rss;
FDStackOverflowOptions? stackoverflow;
String? tumblr;
String? x;
String? youtube;
FDSourceOptions({
this.fourchan,
this.github,
this.googlenews,
this.lemmy,
this.mastodon,
this.medium,
this.nitter,
this.pinterest,
this.podcast,
this.reddit,
this.rss,
this.stackoverflow,
this.tumblr,
this.x,
this.youtube,
});
factory FDSourceOptions.fromJson(Map<String, dynamic> responseData) {
return FDSourceOptions(
fourchan: responseData.containsKey('fourchan') &&
responseData['fourchan'] != null
? responseData['fourchan']
: null,
github:
responseData.containsKey('github') && responseData['github'] != null
? FDGitHubOptions.fromJson(responseData['github'])
@@ -221,6 +314,9 @@ class FDSourceOptions {
responseData['googlenews'] != null
? FDGoogleNewsOptions.fromJson(responseData['googlenews'])
: null,
lemmy: responseData.containsKey('lemmy') && responseData['lemmy'] != null
? responseData['lemmy']
: null,
mastodon: responseData.containsKey('mastodon') &&
responseData['mastodon'] != null
? responseData['mastodon']
@@ -233,6 +329,10 @@ class FDSourceOptions {
responseData.containsKey('nitter') && responseData['nitter'] != null
? responseData['nitter']
: null,
pinterest: responseData.containsKey('pinterest') &&
responseData['pinterest'] != null
? responseData['pinterest']
: null,
podcast:
responseData.containsKey('podcast') && responseData['podcast'] != null
? responseData['podcast']
@@ -252,9 +352,6 @@ class FDSourceOptions {
responseData.containsKey('tumblr') && responseData['tumblr'] != null
? responseData['tumblr']
: null,
x: responseData.containsKey('x') && responseData['x'] != null
? responseData['x']
: null,
youtube:
responseData.containsKey('youtube') && responseData['youtube'] != null
? responseData['youtube']
@@ -264,17 +361,19 @@ class FDSourceOptions {
Map<String, dynamic> toJson() {
return {
'fourchan': fourchan,
'github': github?.toJson(),
'googlenews': googlenews?.toJson(),
'lemmy': lemmy,
'mastodon': mastodon,
'medium': medium,
'nitter': nitter,
'pinterest': pinterest,
'podcast': podcast,
'reddit': reddit,
'rss': rss,
'stackoverflow': stackoverflow?.toJson(),
'tumblr': tumblr,
'x': x,
'youtube': youtube,
};
}

View File

@@ -376,21 +376,33 @@ class AppRepository with ChangeNotifier {
}
/// [addSource] is called to add a source to the column with the provided
/// [columnId]. The function takes a [source] as parameter. The function calls
/// the `add-source-v1` edge function via the Supabase client to create the
/// source. When the source was created the newly returned source is added to
/// the list of sources of the column with the provided [columnId].
/// [columnId]. Next to [columnId] a user must also provide the [type] and
/// [options] for the source. The function calls the `add-or-update-source-v1`
/// edge function via the Supabase client to create the source. When the
/// source was created the newly returned source is added to the list of
/// sources of the column with the provided [columnId].
///
/// The optional [feedData] parameter is used to provide the feed data for the
/// source. This is can be used to scrape the source data via the client (app)
/// instead of the server (scheduler / worker).
Future<void> addSource(
String columnId,
FDSourceType type,
FDSourceOptions options,
) async {
FDSourceOptions options, [
String? feedData,
]) async {
final result = await Supabase.instance.client.functions.invoke(
'add-source-v1',
'add-or-update-source-v1',
body: {
'columnId': columnId,
'type': type.toShortString(),
'options': options.toJson(),
'source': {
'id': '',
'columnId': columnId,
'userId': '',
'type': type.toShortString(),
'title': '',
'options': options.toJson(),
},
'feedData': feedData,
},
);

View File

@@ -141,7 +141,7 @@ class ItemsRepository with ChangeNotifier {
/// selected source which is stored in the [_filters.sourceIdFilter]
/// field.
if (_filters.sourceIdFilter != '') {
filter = filter.eq('sourceId', sourceIdFilter);
filter = filter.eq('sourceId', _filters.sourceIdFilter);
}
filter = filter.lte('createdAt', _filters.createdAtFilter);
@@ -305,7 +305,7 @@ class ItemsRepository with ChangeNotifier {
for (var i = 0; i < chunks.length; i++) {
await Supabase.instance.client
.from('items')
.update({'isRead': read}).in_('id', chunks[i]);
.update({'isRead': read}).inFilter('id', chunks[i]);
for (var j = 0; j < _items.length; j++) {
if (chunks[i].contains(_items[j].id)) {
_items[j].isRead = read;

View File

@@ -0,0 +1,12 @@
import 'package:flutter/foundation.dart';
/// The [LayoutRepository] is used to store several layout information of the
/// app, which can be modifed or should be modifed within different locations.
class LayoutRepository with ChangeNotifier {
/// [_deckLayoutSmallInitialTabIndex] stores the selected tab index of the
/// [DeckLayoutSmall] widget. This is used that we display the same tab when
/// a user switches between the small and large layout (e.g. portrait and
/// landscape mode on mobile devices) and that we can reset the tab index when
/// a user selects a new deck.
int deckLayoutSmallInitialTabIndex = 0;
}

View File

@@ -56,15 +56,15 @@ const _htmlAuthFinished = '''
</html>
''';
/// The [DesktopLoginManager] is used to authenticate a user with the provided
/// The [DesktopSignInManager] is used to authenticate a user with the provided
/// OAuth [provider] on desktop platforms.
class DesktopLoginManager {
final supabase.Provider provider;
class DesktopSignInManager {
final supabase.OAuthProvider provider;
final Map<String, String>? queryParams;
HttpServer? redirectServer;
DesktopLoginManager({
DesktopSignInManager({
required this.provider,
required this.queryParams,
});

View File

@@ -1,5 +1,7 @@
import 'package:flutter/widgets.dart';
/// Flutter icons FDIcons
/// Copyright (C) 2023 by original authors @ fluttericon.com, fontello.com
/// Copyright (C) 2024 by original authors @ fluttericon.com, fontello.com
/// This font was generated by FlutterIcon.com, which is derived from Fontello.
///
/// To use this font, place it in your fonts/ directory and include the
@@ -11,11 +13,6 @@
/// fonts:
/// - asset: fonts/FDIcons.ttf
///
///
///
import 'package:flutter/widgets.dart';
class FDIcons {
FDIcons._();
@@ -32,6 +29,8 @@ class FDIcons {
IconData(0xe803, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData googlenews =
IconData(0xe804, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData pinterest =
IconData(0xe805, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData medium =
IconData(0xe806, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData nitter =
@@ -64,4 +63,8 @@ class FDIcons {
IconData(0xe814, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData mastodon =
IconData(0xe815, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData lemmy =
IconData(0xe816, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData fourchan =
IconData(0xe817, fontFamily: _kFontFam, fontPackage: _kFontPkg);
}

View File

@@ -0,0 +1,55 @@
import 'package:http/http.dart' as http;
import 'package:feeddeck/models/source.dart';
import 'package:feeddeck/utils/api_exception.dart';
/// [getFeed] returns the feed for the provided [sourceType] and [options]. It
/// can be used to fetch the feed for a source on the client side (app) instead
/// of via the corresponding `add-or-update-source-v1` edge function or via our
/// worker.
///
/// The functions for the different sources must implement the same parsing for
/// the source options as it is done in the edge function.
Future<String> getFeed(FDSourceType sourceType, FDSourceOptions options) async {
switch (sourceType) {
case FDSourceType.reddit:
return getFeedReddit(options.reddit);
default:
throw const ApiException('Unknown source type', 400);
}
}
/// [getFeedReddit] returns the feed for the provided [input]. It is used to
/// fetch the RSS feed for a Reddit source, which can be passed to the
/// `add-or-update-source-v1` edge function.
///
/// The function must implement the same parsing logic as it is done in the
/// `supabase/functions/_shared/feed/reddit.ts` file.
Future<String> getFeedReddit(String? input) async {
if (input == null || input.isEmpty) {
throw const ApiException('No input provided', 400);
}
String url = '';
try {
if (input.startsWith('/r/') || input.startsWith('/u/')) {
url = 'https://www.reddit.com$input.rss';
} else {
final inputUri = Uri.parse(input);
if (inputUri.host.endsWith('reddit.com')) {
if (input.endsWith('.rss')) {
url = input;
} else {
url = '$input.rss';
}
} else {
throw const ApiException('Invalid input', 400);
}
}
} catch (err) {
throw const ApiException('Invalid input', 400);
}
final response = await http.get(Uri.parse(url));
return response.body;
}

View File

@@ -1,32 +0,0 @@
import 'package:flutter/foundation.dart';
import 'package:supabase_flutter/supabase_flutter.dart';
import 'package:feeddeck/repositories/settings_repository.dart';
/// [FDImageType] is a enum value which defines the image type. An image can be
/// related to an item or a source.
enum FDImageType {
item,
source,
}
/// [getImageUrl] returns the correct image url to use for the provided image
/// url:
/// - If the [imageType] is [FDImageType.source] the image is always requested
/// from the Supabase storage.
/// - If the [imageType] is [FDImageType.item] and the app runs on the web, the
/// image is proxied through the Supabase functions.
/// - If the [imageType] is [FDImageType.item] and the app runs on a mobile or
/// desktop device, the image is requested directly from the provided url.
String getImageUrl(FDImageType imageType, String imageUrl) {
if (imageType == FDImageType.source) {
return '${SettingsRepository().supabaseUrl}/storage/v1/object/public/sources/$imageUrl';
}
if (kIsWeb) {
return '${Supabase.instance.client.functionsUrl}/image-proxy-v1?media=${Uri.encodeQueryComponent(imageUrl)}';
}
return imageUrl;
}

View File

@@ -0,0 +1,33 @@
import 'dart:convert';
import 'package:crypto/crypto.dart';
import 'package:sign_in_with_apple/sign_in_with_apple.dart';
import 'package:supabase_flutter/supabase_flutter.dart';
/// [signInWithApple] performs Apple sign in on iOS and macOS.
/// See https://supabase.com/docs/guides/auth/social-login/auth-apple?platform=flutter#using-native-sign-in-with-apple-in-flutter
Future<AuthResponse> signInWithApple() async {
final rawNonce = Supabase.instance.client.auth.generateRawNonce();
final hashedNonce = sha256.convert(utf8.encode(rawNonce)).toString();
final credential = await SignInWithApple.getAppleIDCredential(
scopes: [
AppleIDAuthorizationScopes.email,
AppleIDAuthorizationScopes.fullName,
],
nonce: hashedNonce,
);
final idToken = credential.identityToken;
if (idToken == null) {
throw const AuthException(
'Could not find ID Token from generated credential.',
);
}
return Supabase.instance.client.auth.signInWithIdToken(
provider: OAuthProvider.apple,
idToken: idToken,
nonce: rawNonce,
);
}

View File

@@ -5,6 +5,7 @@ import 'package:scroll_to_index/scroll_to_index.dart';
import 'package:feeddeck/models/source.dart';
import 'package:feeddeck/repositories/app_repository.dart';
import 'package:feeddeck/repositories/layout_repository.dart';
import 'package:feeddeck/utils/constants.dart';
import 'package:feeddeck/widgets/column/column_layout.dart';
import 'package:feeddeck/widgets/column/create/create_column.dart';
@@ -224,10 +225,20 @@ class _DeckLayoutLargeState extends State<DeckLayoutLarge> {
backgroundColor: Constants.background,
selectedIndex: null,
/// When a user selects a destination in the navigation rail
/// we scroll to the corresponding column by using the
/// `scroll_to_index` package.
/// When a user selects a destination in the navigation
/// rail we scroll to the corresponding column by using
/// the `scroll_to_index` package.
onDestinationSelected: (int index) {
/// Before we scroll to the corresponding column, we
/// also update the [deckLayoutSmallInitialTabIndex] in
/// the [LayoutRepository] so that the correct tab is
/// also selected when a user switches to the small
/// layout.
Provider.of<LayoutRepository>(
context,
listen: false,
).deckLayoutSmallInitialTabIndex = index;
_scrollController.scrollToIndex(
index,
preferPosition: AutoScrollPosition.end,
@@ -244,8 +255,8 @@ class _DeckLayoutLargeState extends State<DeckLayoutLarge> {
/// We add two additional items to the navigation rail via
/// the trailing property. These items are used to allow a
/// user to create a new column and to go to the settings of
/// the app.
/// user to create a new column and to go to the settings
/// of the app.
trailing: Expanded(
child: Align(
alignment: Alignment.bottomCenter,

View File

@@ -4,6 +4,7 @@ import 'package:provider/provider.dart';
import 'package:feeddeck/models/source.dart';
import 'package:feeddeck/repositories/app_repository.dart';
import 'package:feeddeck/repositories/layout_repository.dart';
import 'package:feeddeck/utils/constants.dart';
import 'package:feeddeck/widgets/column/column_layout.dart';
import 'package:feeddeck/widgets/column/create/create_column.dart';
@@ -20,6 +21,30 @@ import 'package:feeddeck/widgets/source/source_icon.dart';
class DeckLayoutSmall extends StatelessWidget {
const DeckLayoutSmall({super.key});
/// [_getInitialIndex] returns the initial index for the
/// [DefaultTabController]. The intial index is saved in the
/// [LayoutRepository] so that we can use it when a user switches between the
/// small and large layout or between decks. To not run into errors we have to
/// check that a column which should be used was not already deleted by a
/// user before returning the index. If a column was deleted we reset the
/// index to 0.
int _getInitialIndex(BuildContext context, int columnsLength) {
final deckLayoutSmallInitialTabIndex = Provider.of<LayoutRepository>(
context,
listen: false,
).deckLayoutSmallInitialTabIndex;
if (deckLayoutSmallInitialTabIndex >= columnsLength) {
Provider.of<LayoutRepository>(
context,
listen: false,
).deckLayoutSmallInitialTabIndex = 0;
return 0;
}
return deckLayoutSmallInitialTabIndex;
}
/// [_buildTabs] returns all items for the tab bar. The items are generated
/// by looping thorugh the `columns` defined in the [AppRepository].
///
@@ -124,6 +149,8 @@ class DeckLayoutSmall extends StatelessWidget {
AppRepository app = Provider.of<AppRepository>(context, listen: true);
return DefaultTabController(
key: ValueKey(app.activeDeckId),
initialIndex: _getInitialIndex(context, app.columns.length),
length: app.columns.length,
child: Scaffold(
bottomNavigationBar: SafeArea(
@@ -148,6 +175,18 @@ class DeckLayoutSmall extends StatelessWidget {
),
child: TabBar(
isScrollable: true,
tabAlignment: TabAlignment.start,
dividerHeight: 0,
onTap: (int index) {
/// When the user clicks on a tab we update the index in
/// the [LayoutRepository] so that we can use it as
/// initial index when the widget is rebuild (e.g. when
/// a user switches between the large and small layout).
Provider.of<LayoutRepository>(
context,
listen: false,
).deckLayoutSmallInitialTabIndex = index;
},
tabs: _buildTabs(context),
),
),

View File

@@ -24,7 +24,7 @@ import 'package:flutter/material.dart';
/// ),
/// )
class ElevatedButtonProgressIndicator extends StatelessWidget {
const ElevatedButtonProgressIndicator({Key? key}) : super(key: key);
const ElevatedButtonProgressIndicator({super.key});
@override
Widget build(BuildContext context) {

View File

@@ -39,7 +39,7 @@ class _HomeState extends State<Home> {
});
if (!kIsWeb && (Platform.isIOS || Platform.isAndroid)) {
_appLinks.allUriLinkStream.listen((uri) {
_appLinks.uriLinkStream.listen((uri) {
if (uri
.toString()
.startsWith('app.feeddeck.feeddeck://signin-callback/')) {

View File

@@ -7,9 +7,12 @@ import 'package:feeddeck/models/source.dart';
import 'package:feeddeck/repositories/items_repository.dart';
import 'package:feeddeck/utils/constants.dart';
import 'package:feeddeck/utils/openurl.dart';
import 'package:feeddeck/widgets/item/details/item_details_fourchan.dart';
import 'package:feeddeck/widgets/item/details/item_details_lemmy.dart';
import 'package:feeddeck/widgets/item/details/item_details_mastodon.dart';
import 'package:feeddeck/widgets/item/details/item_details_medium.dart';
import 'package:feeddeck/widgets/item/details/item_details_nitter.dart';
import 'package:feeddeck/widgets/item/details/item_details_pinterest.dart';
import 'package:feeddeck/widgets/item/details/item_details_podcast.dart';
import 'package:feeddeck/widgets/item/details/item_details_reddit.dart';
import 'package:feeddeck/widgets/item/details/item_details_rss.dart';
@@ -59,6 +62,12 @@ class ItemDetails extends StatelessWidget {
Widget _buildDetails() {
switch (source.type) {
case FDSourceType.fourchan:
return ItemDetailsFourChan(
item: item,
source: source,
);
/// Sources with type [FDSourceType.github] do not provide a details view,
/// because we directly open the link, when the user clicks on the
/// corresponding preview item.
@@ -70,6 +79,11 @@ class ItemDetails extends StatelessWidget {
/// corresponding preview item.
case FDSourceType.googlenews:
return Container();
case FDSourceType.lemmy:
return ItemDetailsLemmy(
item: item,
source: source,
);
case FDSourceType.mastodon:
return ItemDetailsMastodon(
item: item,
@@ -85,6 +99,11 @@ class ItemDetails extends StatelessWidget {
item: item,
source: source,
);
case FDSourceType.pinterest:
return ItemDetailsPinterest(
item: item,
source: source,
);
case FDSourceType.podcast:
return ItemDetailsPodcast(
item: item,
@@ -110,11 +129,6 @@ class ItemDetails extends StatelessWidget {
item: item,
source: source,
);
// case FDSourceType.x:
// return ItemDetailsX(
// item: item,
// source: source,
// );
case FDSourceType.youtube:
return ItemDetailsYoutube(
item: item,
@@ -196,7 +210,7 @@ class ItemDetails extends StatelessWidget {
Constants.elevatedButtonSize,
),
),
label: const Text('Open link'),
label: const Text('Open Link'),
onPressed: () => _openUrl(item.link),
icon: const Icon(Icons.launch),
),

View File

@@ -2,13 +2,12 @@ import 'package:flutter/material.dart';
import 'package:feeddeck/models/item.dart';
import 'package:feeddeck/models/source.dart';
import 'package:feeddeck/utils/constants.dart';
import 'package:feeddeck/widgets/item/details/utils/item_description.dart';
import 'package:feeddeck/widgets/item/details/utils/item_media_gallery.dart';
import 'package:feeddeck/widgets/item/details/utils/item_subtitle.dart';
import 'package:feeddeck/widgets/item/details/utils/item_title.dart';
class ItemDetailsX extends StatelessWidget {
const ItemDetailsX({
class ItemDetailsFourChan extends StatelessWidget {
const ItemDetailsFourChan({
super.key,
required this.item,
required this.source,
@@ -23,6 +22,9 @@ class ItemDetailsX extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.stretch,
mainAxisAlignment: MainAxisAlignment.start,
children: [
ItemTitle(
itemTitle: item.title,
),
ItemSubtitle(
item: item,
source: source,
@@ -32,16 +34,6 @@ class ItemDetailsX extends StatelessWidget {
sourceFormat: DescriptionFormat.html,
tagetFormat: DescriptionFormat.markdown,
),
const SizedBox(
height: Constants.spacingExtraSmall,
),
ItemMediaGallery(
itemMedias: item.options != null && item.options!.containsKey('media')
? (item.options!['media'] as List)
.map((item) => item as String)
.toList()
: null,
),
],
);
}

View File

@@ -0,0 +1,90 @@
import 'package:flutter/material.dart';
import 'package:feeddeck/models/item.dart';
import 'package:feeddeck/models/source.dart';
import 'package:feeddeck/widgets/item/details/utils/item_description.dart';
import 'package:feeddeck/widgets/item/details/utils/item_media.dart';
import 'package:feeddeck/widgets/item/details/utils/item_piped/item_piped_video.dart';
import 'package:feeddeck/widgets/item/details/utils/item_subtitle.dart';
import 'package:feeddeck/widgets/item/details/utils/item_title.dart';
import 'package:feeddeck/widgets/item/details/utils/item_videos.dart';
import 'package:feeddeck/widgets/item/details/utils/item_youtube/item_youtube_video.dart';
class ItemDetailsLemmy extends StatelessWidget {
const ItemDetailsLemmy({
super.key,
required this.item,
required this.source,
});
final FDItem item;
final FDSource source;
/// [_buildMedia] builds the media widget for the item. The media widget can
/// display an image, a video or y YouTube video.
///
/// See the `getMedia` function in the `lemmy.ts` file, for a list of
/// extension which are a image / video.
Widget _buildMedia() {
if (item.media != null && item.media! != '') {
final mediaUrl = Uri.parse(item.media!);
if (mediaUrl.path.endsWith('.jpg') ||
mediaUrl.path.endsWith('.jpeg') ||
mediaUrl.path.endsWith('.png') ||
mediaUrl.path.endsWith('.gif')) {
return ItemMedia(
itemMedia: item.media,
);
}
if (mediaUrl.path.endsWith('.mp4')) {
return ItemVideoPlayer(
video: item.media!,
);
}
if (item.media!.startsWith('https://youtu.be/') ||
item.media!.startsWith('https://www.youtube.com/watch?') ||
item.media!.startsWith('https://m.youtube.com/watch?')) {
return ItemYoutubeVideo(
null,
item.media!,
);
}
if (item.media!.startsWith('https://piped.video/watch?v=') ||
item.media!.startsWith('https://piped.video/')) {
return ItemPipedVideo(
null,
item.media!,
);
}
}
return Container();
}
@override
Widget build(BuildContext context) {
return Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
mainAxisAlignment: MainAxisAlignment.start,
children: [
ItemTitle(
itemTitle: item.title,
),
ItemSubtitle(
item: item,
source: source,
),
_buildMedia(),
ItemDescription(
itemDescription: item.description,
sourceFormat: DescriptionFormat.html,
tagetFormat: DescriptionFormat.markdown,
),
],
);
}
}

View File

@@ -5,7 +5,10 @@ import 'package:feeddeck/models/source.dart';
import 'package:feeddeck/utils/constants.dart';
import 'package:feeddeck/widgets/item/details/utils/item_description.dart';
import 'package:feeddeck/widgets/item/details/utils/item_media_gallery.dart';
import 'package:feeddeck/widgets/item/details/utils/item_piped/item_piped_video.dart';
import 'package:feeddeck/widgets/item/details/utils/item_subtitle.dart';
import 'package:feeddeck/widgets/item/details/utils/item_videos.dart';
import 'package:feeddeck/widgets/item/details/utils/item_youtube/item_youtube_video.dart';
class ItemDetailsMastodon extends StatelessWidget {
const ItemDetailsMastodon({
@@ -17,6 +20,116 @@ class ItemDetailsMastodon extends StatelessWidget {
final FDItem item;
final FDSource source;
/// [_getYoutubeUrl] returns a YouTube url when the provided [description]
/// contains a YouTube link. If the [description] does not contain a YouTube
/// link, the function returns `null`.
String? _getYoutubeUrl(String description) {
final exp = RegExp(r'(?:(?:https?|ftp):\/\/)?[\w/\-?=%.]+\.[\w/\-?=%.]+');
final matches = exp.allMatches(description);
for (var match in matches) {
final url = description.substring(match.start, match.end);
if (url.startsWith('https://youtu.be/') ||
url.startsWith('https://www.youtube.com/watch?') ||
url.startsWith('https://m.youtube.com/watch?')) {
return url;
}
}
return null;
}
/// [_getPipedUrl] returns a Piped url when the provided [description]
/// contains a Piped link. If the [description] does not contain a Piped link,
/// the function returns `null`.
String? _getPipedUrl(String description) {
final exp = RegExp(r'(?:(?:https?|ftp):\/\/)?[\w/\-?=%.]+\.[\w/\-?=%.]+');
final matches = exp.allMatches(description);
for (var match in matches) {
final url = description.substring(match.start, match.end);
if (url.startsWith('https://piped.video/watch?v=') ||
url.startsWith('https://piped.video/')) {
return url;
}
}
return null;
}
/// [_buildDescription] builds the description widget for the item. If the
/// description contains a YouTube link, we render the [ItemYoutubeVideo]
/// and the [ItemDescription] widgets. If the description does not contain a
/// YouTube link, we render the [ItemDescription], [ItemMediaGallery] and
/// [ItemVideos] widget.
List<Widget> _buildDescription() {
final youtubeUrl =
item.description != null ? _getYoutubeUrl(item.description!) : null;
if (youtubeUrl != null) {
return [
ItemYoutubeVideo(
item.media,
youtubeUrl,
),
ItemDescription(
itemDescription: item.description,
sourceFormat: DescriptionFormat.html,
tagetFormat: DescriptionFormat.markdown,
disableImages: true,
),
];
}
final pipedUrl =
item.description != null ? _getPipedUrl(item.description!) : null;
if (pipedUrl != null) {
return [
ItemPipedVideo(
item.media,
pipedUrl,
),
ItemDescription(
itemDescription: item.description,
sourceFormat: DescriptionFormat.html,
tagetFormat: DescriptionFormat.markdown,
disableImages: true,
),
];
}
return [
ItemDescription(
itemDescription: item.description,
sourceFormat: DescriptionFormat.html,
tagetFormat: DescriptionFormat.markdown,
disableImages: true,
),
const SizedBox(
height: Constants.spacingExtraSmall,
),
ItemMediaGallery(
itemMedias: item.options != null &&
item.options!.containsKey('media') &&
item.options!['media'] != null
? (item.options!['media'] as List)
.map((item) => item as String)
.toList()
: null,
),
ItemVideos(
videos: item.options != null &&
item.options!.containsKey('videos') &&
item.options!['videos'] != null
? (item.options!['videos'] as List)
.map((item) => item as String)
.toList()
: null,
),
];
}
@override
Widget build(BuildContext context) {
return Column(
@@ -27,21 +140,7 @@ class ItemDetailsMastodon extends StatelessWidget {
item: item,
source: source,
),
ItemDescription(
itemDescription: item.description,
sourceFormat: DescriptionFormat.html,
tagetFormat: DescriptionFormat.markdown,
),
const SizedBox(
height: Constants.spacingExtraSmall,
),
ItemMediaGallery(
itemMedias: item.options != null && item.options!.containsKey('media')
? (item.options!['media'] as List)
.map((item) => item as String)
.toList()
: null,
),
..._buildDescription(),
],
);
}

View File

@@ -5,8 +5,8 @@ import 'package:feeddeck/models/source.dart';
import 'package:feeddeck/utils/constants.dart';
import 'package:feeddeck/widgets/item/details/utils/item_description.dart';
import 'package:feeddeck/widgets/item/details/utils/item_media_gallery.dart';
import 'package:feeddeck/widgets/item/details/utils/item_piped/item_piped_video.dart';
import 'package:feeddeck/widgets/item/details/utils/item_subtitle.dart';
import 'package:feeddeck/widgets/item/details/utils/item_title.dart';
class ItemDetailsNitter extends StatelessWidget {
const ItemDetailsNitter({
@@ -18,18 +18,37 @@ class ItemDetailsNitter extends StatelessWidget {
final FDItem item;
final FDSource source;
@override
Widget build(BuildContext context) {
return Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
mainAxisAlignment: MainAxisAlignment.start,
children: [
ItemTitle(
itemTitle: item.title,
),
ItemSubtitle(
item: item,
source: source,
/// [_getPipedUrl] returns a Piped url when the provided [description]
/// contains a Piped link. If the [description] does not contain a Piped link,
/// the function returns `null`.
String? _getPipedUrl(String description) {
final exp = RegExp(r'(?:(?:https?|ftp):\/\/)?[\w/\-?=%.]+\.[\w/\-?=%.]+');
final matches = exp.allMatches(description);
for (var match in matches) {
final url = description.substring(match.start, match.end);
if (url.startsWith('https://piped.video/watch?v=') ||
url.startsWith('https://piped.video/')) {
return url;
}
}
return null;
}
/// [_buildDescription] builds the description widget for the item. If the
/// description contains a Piped link, we render the [ItemPipedVideo] and the
/// [ItemDescription] widgets. If the description does not contain a Piped
/// link, we render the [ItemDescription] and [ItemMediaGallery] widget.
List<Widget> _buildDescription() {
final pipedUrl =
item.description != null ? _getPipedUrl(item.description!) : null;
if (pipedUrl != null) {
return [
ItemPipedVideo(
item.media,
pipedUrl,
),
ItemDescription(
itemDescription: item.description,
@@ -37,16 +56,40 @@ class ItemDetailsNitter extends StatelessWidget {
tagetFormat: DescriptionFormat.markdown,
disableImages: true,
),
const SizedBox(
height: Constants.spacingExtraSmall,
),
ItemMediaGallery(
itemMedias: item.options != null && item.options!.containsKey('media')
? (item.options!['media'] as List)
.map((item) => item as String)
.toList()
: null,
];
}
return [
ItemDescription(
itemDescription: item.description,
sourceFormat: DescriptionFormat.html,
tagetFormat: DescriptionFormat.markdown,
disableImages: true,
),
const SizedBox(
height: Constants.spacingExtraSmall,
),
ItemMediaGallery(
itemMedias: item.options != null && item.options!.containsKey('media')
? (item.options!['media'] as List)
.map((item) => item as String)
.toList()
: null,
),
];
}
@override
Widget build(BuildContext context) {
return Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
mainAxisAlignment: MainAxisAlignment.start,
children: [
ItemSubtitle(
item: item,
source: source,
),
..._buildDescription(),
],
);
}

View File

@@ -0,0 +1,40 @@
import 'package:flutter/material.dart';
import 'package:feeddeck/models/item.dart';
import 'package:feeddeck/models/source.dart';
import 'package:feeddeck/widgets/item/details/utils/item_description.dart';
import 'package:feeddeck/widgets/item/details/utils/item_subtitle.dart';
import 'package:feeddeck/widgets/item/details/utils/item_title.dart';
class ItemDetailsPinterest extends StatelessWidget {
const ItemDetailsPinterest({
super.key,
required this.item,
required this.source,
});
final FDItem item;
final FDSource source;
@override
Widget build(BuildContext context) {
return Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
mainAxisAlignment: MainAxisAlignment.start,
children: [
ItemTitle(
itemTitle: item.title,
),
ItemSubtitle(
item: item,
source: source,
),
ItemDescription(
itemDescription: item.description,
sourceFormat: DescriptionFormat.html,
tagetFormat: DescriptionFormat.markdown,
),
],
);
}
}

View File

@@ -1,15 +1,13 @@
import 'package:flutter/material.dart';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:feeddeck/models/item.dart';
import 'package:feeddeck/models/source.dart';
import 'package:feeddeck/utils/constants.dart';
import 'package:feeddeck/utils/image_url.dart';
import 'package:feeddeck/widgets/item/details/utils/item_audio_palyer/item_audio_player.dart';
import 'package:feeddeck/widgets/item/details/utils/item_description.dart';
import 'package:feeddeck/widgets/item/details/utils/item_subtitle.dart';
import 'package:feeddeck/widgets/item/details/utils/item_title.dart';
import 'package:feeddeck/widgets/utils/cached_network_image.dart';
class ItemDetailsPodcast extends StatelessWidget {
const ItemDetailsPodcast({
@@ -21,14 +19,6 @@ class ItemDetailsPodcast extends StatelessWidget {
final FDItem item;
final FDSource source;
String? _buildImageUrl() {
if (source.icon != null && source.icon != '') {
return getImageUrl(FDImageType.source, source.icon!);
}
return null;
}
/// [_buildImage] returns an image which is displayed above the
/// [ItemAudioPlayer]. For this image we are using the [source.icon] if it is
/// available. If the [source.icon] is not available, we are not displaying
@@ -55,8 +45,6 @@ class ItemDetailsPodcast extends StatelessWidget {
@override
Widget build(BuildContext context) {
final imageUrl = _buildImageUrl();
return Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
mainAxisAlignment: MainAxisAlignment.start,
@@ -74,7 +62,7 @@ class ItemDetailsPodcast extends StatelessWidget {
/// directly listen to the podcast episode.
Column(
children: [
_buildImage(imageUrl),
_buildImage(source.icon),
const SizedBox(
height: Constants.spacingMiddle,
),
@@ -83,7 +71,7 @@ class ItemDetailsPodcast extends StatelessWidget {
audioFile: item.media!,
audioTitle: item.title,
audioArtist: source.title,
audioArt: imageUrl,
audioArt: getImageUrl(source.icon!),
),
const SizedBox(
height: Constants.spacingMiddle,

View File

@@ -3,8 +3,10 @@ import 'package:flutter/material.dart';
import 'package:feeddeck/models/item.dart';
import 'package:feeddeck/models/source.dart';
import 'package:feeddeck/widgets/item/details/utils/item_description.dart';
import 'package:feeddeck/widgets/item/details/utils/item_piped/item_piped_video.dart';
import 'package:feeddeck/widgets/item/details/utils/item_subtitle.dart';
import 'package:feeddeck/widgets/item/details/utils/item_title.dart';
import 'package:feeddeck/widgets/item/details/utils/item_youtube/item_youtube_video.dart';
class ItemDetailsReddit extends StatelessWidget {
const ItemDetailsReddit({
@@ -16,6 +18,98 @@ class ItemDetailsReddit extends StatelessWidget {
final FDItem item;
final FDSource source;
/// [_getYoutubeUrl] returns a YouTube url when the provided [description]
/// contains a YouTube link. If the [description] does not contain a YouTube
/// link, the function returns `null`.
String? _getYoutubeUrl(String description) {
final exp = RegExp(r'(?:(?:https?|ftp):\/\/)?[\w/\-?=%.]+\.[\w/\-?=%.]+');
final matches = exp.allMatches(description);
for (var match in matches) {
final url = description.substring(match.start, match.end);
if (url.startsWith('https://youtu.be/') ||
url.startsWith('https://www.youtube.com/watch?') ||
url.startsWith('https://m.youtube.com/watch?')) {
return url;
}
}
return null;
}
/// [_getPipedUrl] returns a Piped url when the provided [description]
/// contains a Piped link. If the [description] does not contain a Piped link,
/// the function returns `null`.
String? _getPipedUrl(String description) {
final exp = RegExp(r'(?:(?:https?|ftp):\/\/)?[\w/\-?=%.]+\.[\w/\-?=%.]+');
final matches = exp.allMatches(description);
for (var match in matches) {
final url = description.substring(match.start, match.end);
if (url.startsWith('https://piped.video/watch?v=') ||
url.startsWith('https://piped.video/')) {
return url;
}
}
return null;
}
/// [_buildDescription] builds the description widget for the item. If the
/// description contains a YouTube link, we render the [ItemYoutubeVideo]
/// and the [ItemDescription] widgets. If the description contains a Piped
/// link, we render the [ItemPipedVideo] and the [ItemDescription] widget. If
/// the description does not contain a YouTube or Piped link, we only render
/// the [ItemDescription] widget.
///
/// If the description containes a YouTube link we also have to disable the
/// rendering of images within the [ItemDescription] widget.
List<Widget> _buildDescription() {
final youtubeUrl =
item.description != null ? _getYoutubeUrl(item.description!) : null;
if (youtubeUrl != null) {
return [
ItemYoutubeVideo(
item.media,
youtubeUrl,
),
ItemDescription(
itemDescription: item.description,
sourceFormat: DescriptionFormat.html,
tagetFormat: DescriptionFormat.markdown,
disableImages: true,
),
];
}
final pipedUrl =
item.description != null ? _getPipedUrl(item.description!) : null;
if (pipedUrl != null) {
return [
ItemPipedVideo(
item.media,
pipedUrl,
),
ItemDescription(
itemDescription: item.description,
sourceFormat: DescriptionFormat.html,
tagetFormat: DescriptionFormat.markdown,
disableImages: true,
),
];
}
return [
ItemDescription(
itemDescription: item.description,
sourceFormat: DescriptionFormat.html,
tagetFormat: DescriptionFormat.markdown,
),
];
}
@override
Widget build(BuildContext context) {
return Column(
@@ -29,11 +123,7 @@ class ItemDetailsReddit extends StatelessWidget {
item: item,
source: source,
),
ItemDescription(
itemDescription: item.description,
sourceFormat: DescriptionFormat.html,
tagetFormat: DescriptionFormat.markdown,
),
..._buildDescription(),
],
);
}

View File

@@ -1,11 +1,14 @@
import 'package:flutter/material.dart';
import 'package:html/parser.dart' show parse;
import 'package:feeddeck/models/item.dart';
import 'package:feeddeck/models/source.dart';
import 'package:feeddeck/widgets/item/details/utils/item_description.dart';
import 'package:feeddeck/widgets/item/details/utils/item_media.dart';
import 'package:feeddeck/widgets/item/details/utils/item_subtitle.dart';
import 'package:feeddeck/widgets/item/details/utils/item_title.dart';
import 'package:feeddeck/widgets/item/details/utils/item_videos.dart';
class ItemDetailsRSS extends StatelessWidget {
const ItemDetailsRSS({
@@ -17,6 +20,31 @@ class ItemDetailsRSS extends StatelessWidget {
final FDItem item;
final FDSource source;
/// [_buildMedia] renders an image or video for the item. If the description
/// of the item contains an image we do not render the image, because it could
/// already be rendered via the description.
///
/// Videos are currently always rendered, because they will not be rendered,
/// by the [MarkdownBody] widget.
Widget _buildMedia() {
if (item.options != null &&
item.options!.containsKey('video') &&
item.options!['video'] != null) {
return ItemVideos(videos: [item.options!['video']]);
}
/// Check if the description of the RSS feed contains an image. If this is
/// the case we do not render the image from the [item.media] because the
/// image is already rendered in the [ItemDescription] widget.
if (parse(item.description).querySelectorAll('img').isNotEmpty) {
return Container();
}
return ItemMedia(
itemMedia: item.media,
);
}
@override
Widget build(BuildContext context) {
return Column(
@@ -30,13 +58,11 @@ class ItemDetailsRSS extends StatelessWidget {
item: item,
source: source,
),
ItemMedia(
itemMedia: item.media,
),
_buildMedia(),
ItemDescription(
itemDescription: item.description,
sourceFormat: DescriptionFormat.plain,
tagetFormat: DescriptionFormat.plain,
sourceFormat: DescriptionFormat.html,
tagetFormat: DescriptionFormat.markdown,
),
],
);

View File

@@ -1,17 +1,11 @@
import 'dart:io';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:youtube_player_iframe/youtube_player_iframe.dart';
import 'package:feeddeck/models/item.dart';
import 'package:feeddeck/models/source.dart';
import 'package:feeddeck/utils/constants.dart';
import 'package:feeddeck/widgets/item/details/utils/item_description.dart';
import 'package:feeddeck/widgets/item/details/utils/item_media.dart';
import 'package:feeddeck/widgets/item/details/utils/item_subtitle.dart';
import 'package:feeddeck/widgets/item/details/utils/item_title.dart';
import 'package:feeddeck/widgets/item/details/utils/item_youtube/item_youtube_video.dart';
class ItemDetailsYoutube extends StatelessWidget {
const ItemDetailsYoutube({
@@ -23,22 +17,6 @@ class ItemDetailsYoutube extends StatelessWidget {
final FDItem item;
final FDSource source;
/// [_buildMedia] returns the media element for the item. On the web we are
/// using the [YoutubeVideo] widget to render the video, so that a user can
/// directly play the YouTube video. On all other platforms we display the
/// thumbnail of the video.
Widget _buildMedia() {
if (kIsWeb || Platform.isAndroid || Platform.isIOS) {
return YoutubeVideo(
videoUrl: item.link,
);
}
return ItemMedia(
itemMedia: item.media,
);
}
@override
Widget build(BuildContext context) {
return Column(
@@ -52,7 +30,10 @@ class ItemDetailsYoutube extends StatelessWidget {
item: item,
source: source,
),
_buildMedia(),
ItemYoutubeVideo(
item.media,
item.link,
),
ItemDescription(
itemDescription: item.description,
sourceFormat: DescriptionFormat.plain,
@@ -62,51 +43,3 @@ class ItemDetailsYoutube extends StatelessWidget {
);
}
}
class YoutubeVideo extends StatefulWidget {
const YoutubeVideo({
super.key,
required this.videoUrl,
});
final String videoUrl;
@override
State<YoutubeVideo> createState() => _YoutubeVideoState();
}
class _YoutubeVideoState extends State<YoutubeVideo> {
late YoutubePlayerController _controller;
@override
void initState() {
super.initState();
_controller = YoutubePlayerController(
params: const YoutubePlayerParams(
showControls: true,
showFullscreenButton: false,
),
);
_controller.cueVideoByUrl(mediaContentUrl: widget.videoUrl);
_controller.cueVideoById(
videoId: widget.videoUrl.replaceFirst(
'https://www.youtube.com/watch?v=',
'',
),
);
}
@override
Widget build(BuildContext context) {
return Container(
padding: const EdgeInsets.only(
bottom: Constants.spacingMiddle,
),
child: YoutubePlayer(
controller: _controller,
aspectRatio: 16 / 9,
),
);
}
}

View File

@@ -65,6 +65,13 @@ class _ItemAudioPlayerState extends State<ItemAudioPlayer> {
@override
void dispose() {
/// We have to dispose the [_player] when the widget is disposed, otherwise
/// the audio will continue to play in the background.
///
/// On Linux and Windows the audio will continue to play even if the
/// [_player] is disposed, so that we also call the `pause` method of the
/// [_player] to stop the audio.
_player.pause();
_player.dispose();
super.dispose();
}

View File

@@ -0,0 +1,11 @@
library item_audio_player_init;
import 'item_audio_player_init_stub.dart'
if (dart.library.io) 'item_audio_player_init_native.dart'
if (dart.library.html) 'item_audio_player_init_web.dart';
abstract class ItemAudioPlayerInit {
void init();
factory ItemAudioPlayerInit() => getItemAudioPlayerInit();
}

View File

@@ -0,0 +1,12 @@
import 'package:just_audio_media_kit/just_audio_media_kit.dart';
import 'item_audio_player_init.dart';
class ItemAudioPlayerInitNative implements ItemAudioPlayerInit {
@override
void init() {
JustAudioMediaKit.ensureInitialized();
}
}
ItemAudioPlayerInit getItemAudioPlayerInit() => ItemAudioPlayerInitNative();

View File

@@ -0,0 +1,5 @@
import 'item_audio_player_init.dart';
ItemAudioPlayerInit getItemAudioPlayerInit() => throw UnsupportedError(
'Can not ItemAudioPlayerInit without the packages dart:html or dart:io',
);

View File

@@ -0,0 +1,8 @@
import 'item_audio_player_init.dart';
class ItemAudioPlayerInitWeb implements ItemAudioPlayerInit {
@override
void init() {}
}
ItemAudioPlayerInit getItemAudioPlayerInit() => ItemAudioPlayerInitWeb();

View File

@@ -1,14 +1,12 @@
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter_markdown/flutter_markdown.dart';
import 'package:html2md/html2md.dart' as html2md;
import 'package:supabase_flutter/supabase_flutter.dart';
import 'package:feeddeck/utils/constants.dart';
import 'package:feeddeck/utils/font.dart';
import 'package:feeddeck/utils/openurl.dart';
import 'package:feeddeck/widgets/utils/cached_network_image.dart';
/// The [DescriptionFormat] enum defines the source and target format of a
/// description.
@@ -47,7 +45,7 @@ class ItemDescription extends StatelessWidget {
Widget _buildMarkdown(BuildContext context, String content) {
return MarkdownBody(
selectable: true,
data: content,
data: content.trim(),
styleSheet: MarkdownStyleSheet(
code: TextStyle(
fontFamily: getMonospaceFontFamily(),
@@ -56,6 +54,15 @@ class ItemDescription extends StatelessWidget {
codeblockDecoration: const BoxDecoration(
color: Constants.secondary,
),
blockquoteDecoration: const BoxDecoration(
color: Constants.secondary,
border: Border(
left: BorderSide(
color: Constants.primary,
width: 1,
),
),
),
),
onTapLink: (text, href, title) {
if (href != null) {
@@ -67,12 +74,6 @@ class ItemDescription extends StatelessWidget {
return Container();
}
String imageUrl = uri.toString();
if (kIsWeb) {
imageUrl =
'${Supabase.instance.client.functionsUrl}/image-proxy-v1?media=${Uri.encodeQueryComponent(imageUrl)}';
}
return Container(
padding: const EdgeInsets.only(
bottom: Constants.spacingMiddle,
@@ -87,6 +88,9 @@ class ItemDescription extends StatelessWidget {
isDismissible: true,
useSafeArea: true,
backgroundColor: Colors.black,
constraints: const BoxConstraints(
maxWidth: double.infinity,
),
builder: (BuildContext context) {
return Scaffold(
backgroundColor: Colors.black,
@@ -95,7 +99,7 @@ class ItemDescription extends StatelessWidget {
Center(
child: CachedNetworkImage(
fit: BoxFit.contain,
imageUrl: imageUrl,
imageUrl: uri.toString(),
placeholder: (context, url) => Container(),
errorWidget: (context, url, error) => Container(),
),
@@ -121,7 +125,7 @@ class ItemDescription extends StatelessWidget {
child: CachedNetworkImage(
width: double.infinity,
fit: BoxFit.contain,
imageUrl: imageUrl,
imageUrl: uri.toString(),
placeholder: (context, url) => Container(),
errorWidget: (context, url, error) => Container(),
),
@@ -135,7 +139,7 @@ class ItemDescription extends StatelessWidget {
/// [_buildPlain] renders the provided [content] as plain text.
Widget _buildPlain(String content) {
return SelectableText(
content,
content.trim(),
textAlign: TextAlign.left,
style: const TextStyle(
fontWeight: FontWeight.normal,
@@ -163,7 +167,9 @@ class ItemDescription extends StatelessWidget {
if (sourceFormat == DescriptionFormat.html &&
tagetFormat == DescriptionFormat.plain) {
return _buildPlain(
itemDescription!.replaceAll(RegExp(r'<[^>]*>|&[^;]+;'), ''),
itemDescription!
.replaceAll(RegExp(r'<[^>]*>|&[^;]+;'), ' ')
.replaceAll(RegExp('\\s+'), ' '),
);
}

View File

@@ -1,9 +1,7 @@
import 'package:flutter/material.dart';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:feeddeck/utils/constants.dart';
import 'package:feeddeck/utils/image_url.dart';
import 'package:feeddeck/widgets/utils/cached_network_image.dart';
/// The [ItemMedia] widget displays the media of an item. Based on the provided
/// [itemMedia] value the media is displayed from the Supabase storage or
@@ -22,8 +20,6 @@ class ItemMedia extends StatelessWidget {
return Container();
}
final imageUrl = getImageUrl(FDImageType.item, itemMedia!);
return Container(
padding: const EdgeInsets.only(
bottom: Constants.spacingMiddle,
@@ -38,6 +34,9 @@ class ItemMedia extends StatelessWidget {
isDismissible: true,
useSafeArea: true,
backgroundColor: Colors.black,
constraints: const BoxConstraints(
maxWidth: double.infinity,
),
builder: (BuildContext context) {
return Scaffold(
backgroundColor: Colors.black,
@@ -46,7 +45,7 @@ class ItemMedia extends StatelessWidget {
Center(
child: CachedNetworkImage(
fit: BoxFit.contain,
imageUrl: imageUrl,
imageUrl: itemMedia!,
placeholder: (context, url) => Container(),
errorWidget: (context, url, error) => Container(),
),
@@ -72,7 +71,7 @@ class ItemMedia extends StatelessWidget {
child: CachedNetworkImage(
width: double.infinity,
fit: BoxFit.contain,
imageUrl: imageUrl,
imageUrl: itemMedia!,
placeholder: (context, url) => Container(),
errorWidget: (context, url, error) => Container(),
),

View File

@@ -1,15 +1,14 @@
import 'package:flutter/material.dart';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:carousel_slider/carousel_slider.dart';
import 'package:feeddeck/utils/constants.dart';
import 'package:feeddeck/utils/image_url.dart';
import 'package:feeddeck/widgets/item/details/utils/item_media.dart';
import 'package:feeddeck/widgets/utils/cached_network_image.dart';
/// The [ItemMediaGallery] widget can be used to display multiple media files in
/// a gallery. Similar to the [ItemMedia] widget the provided [itemMedias]
/// values can be displayed from the Supabase storage or directly from the
/// a gallery. Similar to the [ItemMedia] widget the provided [itemMedias]
/// provided url.
class ItemMediaGallery extends StatelessWidget {
const ItemMediaGallery({
@@ -22,8 +21,6 @@ class ItemMediaGallery extends StatelessWidget {
/// [_buildSingleMedia] displays a single media file in the gallery. If the
/// app runs on the web, we proxy the url through the Supabase functions.
Widget _buildSingleMedia(BuildContext context, int itemMediaIndex) {
final imageUrl = getImageUrl(FDImageType.item, itemMedias![itemMediaIndex]);
return MouseRegion(
cursor: SystemMouseCursors.click,
child: GestureDetector(
@@ -34,6 +31,9 @@ class ItemMediaGallery extends StatelessWidget {
isDismissible: true,
useSafeArea: true,
backgroundColor: Colors.black,
constraints: const BoxConstraints(
maxWidth: double.infinity,
),
builder: (BuildContext context) {
return ItemMediaGalleryModal(
initialItemMediaIndex: itemMediaIndex,
@@ -45,7 +45,7 @@ class ItemMediaGallery extends StatelessWidget {
child: CachedNetworkImage(
width: MediaQuery.of(context).size.width,
fit: BoxFit.cover,
imageUrl: imageUrl,
imageUrl: itemMedias![itemMediaIndex],
placeholder: (context, url) => Container(),
errorWidget: (context, url, error) => Container(),
),
@@ -179,7 +179,7 @@ class ItemMediaGalleryModal extends StatelessWidget {
(itemMedia) => Center(
child: CachedNetworkImage(
fit: BoxFit.contain,
imageUrl: getImageUrl(FDImageType.item, itemMedia),
imageUrl: itemMedia,
placeholder: (context, url) => Container(),
errorWidget: (context, url, error) => Container(),
),

View File

@@ -0,0 +1,20 @@
library item_piped_video;
import 'package:flutter/material.dart';
import 'item_piped_video_stub.dart'
if (dart.library.io) 'item_piped_video_native.dart'
if (dart.library.html) 'item_piped_video_web.dart';
/// The [ItemPipedVideo] class implements a widget that displays a video from
/// Piped.
///
/// This is required because we are using different implementations for the web
/// and for all other target platforms (Android, iOS, macOS, Windows, Linux). On
/// the web we display the Piped video via an `iframe` element. On all other
/// platforms we are using the [piped_client] package to fetch the url of the
/// Piped video, which can then be displayed via our [ItemVideoPlayer] widget.
abstract class ItemPipedVideo implements StatefulWidget {
factory ItemPipedVideo(String? imageUrl, String videoUrl) =>
getItemPipedVideo(imageUrl, videoUrl);
}

View File

@@ -0,0 +1,125 @@
import 'package:flutter/material.dart';
import 'package:piped_client/piped_client.dart';
import 'package:feeddeck/widgets/item/details/utils/item_media.dart';
import 'package:feeddeck/widgets/item/details/utils/item_videos.dart';
import 'item_piped_video.dart';
/// The [ItemVideoQuality] class represents a list of video qualities for the
/// requested Piped video and the corresponding audio stream.
class ItemVideoQualitiesAndAudio {
const ItemVideoQualitiesAndAudio({
required this.qualities,
required this.audio,
});
final List<ItemVideoQuality> qualities;
final String audio;
}
/// [_getVideoId] returns the id of the provide video url, which can be used to
/// get the video streams via the Piped API.
String _getVideoId(String videoUrl) {
if (videoUrl.startsWith('https://piped.video/watch?v=')) {
return videoUrl.replaceFirst(
'https://piped.video/watch?v=',
'',
);
}
if (videoUrl.startsWith('https://piped.video/')) {
return videoUrl.replaceFirst(
'https://piped.video/',
'',
);
}
return videoUrl;
}
class ItemPipedVideoNative extends StatefulWidget implements ItemPipedVideo {
const ItemPipedVideoNative({
super.key,
required this.imageUrl,
required this.videoUrl,
});
final String? imageUrl;
final String videoUrl;
@override
State<ItemPipedVideoNative> createState() => _ItemPipedVideoNativeState();
}
class _ItemPipedVideoNativeState extends State<ItemPipedVideoNative> {
final piped = PipedClient();
late Future<ItemVideoQualitiesAndAudio> _futureFetchVideoAndAudioUrls;
/// [_fetchVideoAndAudioUrls] fetches the video and audio urls for the
/// requested Piped video. Since the video streams do not contain the audio
/// stream, we have to fetch the audio stream separately.
Future<ItemVideoQualitiesAndAudio> _fetchVideoAndAudioUrls() async {
final streams = await piped.streams(_getVideoId(widget.videoUrl));
return ItemVideoQualitiesAndAudio(
qualities: streams.videoStreams
.where(
(element) =>
element.mimeType == 'video/mp4' &&
element.format == PipedVideoStreamFormat.mp4,
)
.map(
(element) => ItemVideoQuality(
quality: element.quality,
video: element.url,
),
)
.toList(),
audio: streams.audioStreams
.where((element) => element.mimeType == 'audio/mp4')
.map((element) => element.url)
.first,
);
}
@override
void didChangeDependencies() {
super.didChangeDependencies();
setState(() {
_futureFetchVideoAndAudioUrls = _fetchVideoAndAudioUrls();
});
}
@override
Widget build(BuildContext context) {
return FutureBuilder(
future: _futureFetchVideoAndAudioUrls,
builder: (
BuildContext context,
AsyncSnapshot<ItemVideoQualitiesAndAudio> snapshot,
) {
if (snapshot.connectionState == ConnectionState.none ||
snapshot.connectionState == ConnectionState.waiting ||
snapshot.hasError ||
snapshot.data == null ||
snapshot.data!.qualities.isEmpty ||
snapshot.data!.audio.isEmpty) {
return ItemMedia(itemMedia: widget.imageUrl);
}
return ItemVideoPlayer(
video: snapshot.data!.qualities.first.video,
audio: snapshot.data!.audio,
qualities: snapshot.data!.qualities,
);
},
);
}
}
ItemPipedVideo getItemPipedVideo(String? imageUrl, String videoUrl) =>
ItemPipedVideoNative(
imageUrl: imageUrl,
videoUrl: videoUrl,
);

View File

@@ -0,0 +1,6 @@
import 'item_piped_video.dart';
ItemPipedVideo getItemPipedVideo(String? imageUrl, String videoUrl) =>
throw UnsupportedError(
'Can not ItemPipedVideo without the packages dart:html or dart:io',
);

View File

@@ -0,0 +1,90 @@
import 'dart:html'; // ignore: avoid_web_libraries_in_flutter
import 'dart:ui' as ui;
import 'package:flutter/material.dart';
import 'package:feeddeck/utils/constants.dart';
import 'item_piped_video.dart';
/// [_convertVideoUrl] converts the video url to a format that can be used to
/// embed the video in an iframe.
String _convertVideoUrl(String videoUrl) {
if (videoUrl.startsWith('https://piped.video/watch?v=')) {
return videoUrl.replaceFirst(
'https://piped.video/watch?v=',
'https://piped.video/embed/',
);
}
if (videoUrl.startsWith('https://piped.video/')) {
return videoUrl.replaceFirst(
'https://piped.video/',
'https://piped.video/embed/',
);
}
return videoUrl;
}
class ItemPipedVideoWeb extends StatefulWidget implements ItemPipedVideo {
const ItemPipedVideoWeb({
super.key,
required this.imageUrl,
required this.videoUrl,
});
final String? imageUrl;
final String videoUrl;
@override
State<ItemPipedVideoWeb> createState() => _ItemPipedVideoWebState();
}
class _ItemPipedVideoWebState extends State<ItemPipedVideoWeb> {
final IFrameElement _iframeElement = IFrameElement();
@override
void initState() {
super.initState();
_iframeElement.src = _convertVideoUrl(widget.videoUrl);
_iframeElement.style.border = 'none';
_iframeElement.allowFullscreen = true;
// ignore: undefined_prefixed_name
ui.platformViewRegistry.registerViewFactory(
widget.videoUrl,
(int viewId) => _iframeElement,
);
}
@override
Widget build(BuildContext context) {
return Container(
padding: const EdgeInsets.only(
bottom: Constants.spacingMiddle,
),
child: LayoutBuilder(
builder: (context, constraints) {
return Center(
child: SizedBox(
width: constraints.maxWidth,
height: constraints.maxWidth * 9.0 / 16.0,
child: HtmlElementView(
key: Key(widget.videoUrl),
viewType: widget.videoUrl,
),
),
);
},
),
);
}
}
ItemPipedVideo getItemPipedVideo(String? imageUrl, String videoUrl) =>
ItemPipedVideoWeb(
imageUrl: imageUrl,
videoUrl: videoUrl,
);

View File

@@ -20,26 +20,94 @@ class ItemSubtitle extends StatelessWidget {
final FDItem item;
final FDSource source;
/// [_buildChildren] is used to build the children of the [RichText] widget.
/// Depending on the provided information we will display the source title,
/// the author and the publishing time of the item. We also include an icon
/// for each information.
List<InlineSpan> _buildChildren() {
final List<InlineSpan> children = [];
if (source.title.trim().isNotEmpty) {
children.addAll([
WidgetSpan(
child: Icon(
source.type.icon,
size: 12,
color: Constants.secondaryTextColor,
),
),
TextSpan(
text: ' ${source.title.trim()}',
),
]);
} else {
children.addAll([
WidgetSpan(
child: Icon(
source.type.icon,
size: 12,
color: Constants.secondaryTextColor,
),
),
TextSpan(
text: ' ${source.type.toLocalizedString()}',
),
]);
}
if (item.author != null && item.author!.trim().isNotEmpty) {
children.addAll([
const TextSpan(
text: ' | ',
),
const WidgetSpan(
child: Icon(
Icons.person,
size: 12,
color: Constants.secondaryTextColor,
),
),
TextSpan(
text: ' ${item.author!.trim()}',
),
]);
}
children.addAll([
const TextSpan(
text: ' | ',
),
const WidgetSpan(
child: Icon(
Icons.schedule,
size: 12,
color: Constants.secondaryTextColor,
),
),
TextSpan(
text:
' ${DateFormat.yMMMMd().add_Hm().format(DateTime.fromMillisecondsSinceEpoch(item.publishedAt * 1000))}',
),
]);
return children;
}
@override
Widget build(BuildContext context) {
final sourceType = source.type.toLocalizedString();
final sourceTitle = source.title != '' ? ' / ${source.title}' : '';
final author =
item.author != null && item.author != '' ? ' / ${item.author}' : '';
final publishedAt =
' / ${DateFormat.yMMMMd().add_Hm().format(DateTime.fromMillisecondsSinceEpoch(item.publishedAt * 1000))}';
return Padding(
padding: const EdgeInsets.only(
bottom: Constants.spacingMiddle,
),
child: SelectableText(
'$sourceType$sourceTitle$author$publishedAt',
child: RichText(
textAlign: TextAlign.left,
style: const TextStyle(
color: Constants.secondaryTextColor,
fontWeight: FontWeight.bold,
fontSize: 10,
text: TextSpan(
style: const TextStyle(
color: Constants.secondaryTextColor,
fontWeight: FontWeight.bold,
fontSize: 10,
),
children: _buildChildren(),
),
),
);

View File

@@ -12,6 +12,10 @@ class ItemTitle extends StatelessWidget {
@override
Widget build(BuildContext context) {
if (itemTitle.isEmpty) {
return Container();
}
return SelectableText(
itemTitle,
textAlign: TextAlign.left,

View File

@@ -0,0 +1,292 @@
import 'dart:io';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:media_kit/media_kit.dart';
import 'package:media_kit_video/media_kit_video.dart';
import 'package:feeddeck/utils/constants.dart';
/// The [ItemVideos] widget is used to display a list of videos, which can be
/// played by the user. If the [videos] list is empty or null, the widget will
/// not be displayed.
class ItemVideos extends StatelessWidget {
const ItemVideos({
super.key,
required this.videos,
});
final List<String>? videos;
@override
Widget build(BuildContext context) {
if (videos == null || videos!.isEmpty) {
return Container();
}
return ListView.builder(
shrinkWrap: true,
itemCount: videos!.length,
itemBuilder: (context, index) {
return ItemVideoPlayer(video: videos![index]);
},
);
}
}
/// The [ItemVideoQuality] class is used to store the different qualities of a
/// video. It is used in combination with the [ItemVideoPlayer] widget.
class ItemVideoQuality {
const ItemVideoQuality({
required this.quality,
required this.video,
});
final String quality;
final String video;
}
/// The [ItemVideoPlayer] widget is used to display a video, which can be played
/// by the user. It should be used in combination with the [ItemVideos] widget
/// and is responsible for the actual implementation of the video player.
///
/// If the provided [video] doesn't contain the audio stream it can be passed
/// via the [audio] parameter.
///
/// The optional [qualities] parameter can be used to display a list of
/// different qualities for the video, so that a user can select a lower quality
/// if the video is not loading fast enough.
class ItemVideoPlayer extends StatefulWidget {
const ItemVideoPlayer({
super.key,
required this.video,
this.audio,
this.qualities,
});
final String video;
final String? audio;
final List<ItemVideoQuality>? qualities;
@override
State<ItemVideoPlayer> createState() => _ItemVideoPlayerState();
}
class _ItemVideoPlayerState extends State<ItemVideoPlayer> {
late final player = Player();
late final controller = VideoController(player);
/// [_buildQualityButton] returns a button which can be used to display a list
/// of different qualities for the video, so that a user can select a lower
/// quality if the video is not loading fast enough.
Widget _buildQualityButton() {
return IconButton(
onPressed: () {
showModalBottomSheet(
context: context,
isScrollControlled: true,
isDismissible: true,
useSafeArea: true,
elevation: 0,
backgroundColor: Colors.transparent,
constraints: const BoxConstraints(
maxWidth: Constants.centeredFormMaxWidth,
),
builder: (BuildContext context) {
return SafeArea(
child: Container(
margin: const EdgeInsets.all(
Constants.spacingMiddle,
),
padding: const EdgeInsets.only(
left: Constants.spacingMiddle,
right: Constants.spacingMiddle,
),
decoration: const BoxDecoration(
color: Constants.background,
borderRadius: BorderRadius.all(
Radius.circular(Constants.spacingMiddle),
),
),
child: Wrap(
alignment: WrapAlignment.center,
crossAxisAlignment: WrapCrossAlignment.center,
children: widget.qualities!
.asMap()
.entries
.map((quality) {
if (quality.key == widget.qualities!.length - 1) {
return [
ListTile(
mouseCursor: SystemMouseCursors.click,
onTap: () async {
Navigator.of(context).pop();
await _playerOpen(quality.value.video);
},
title: Text(quality.value.quality),
),
];
}
return [
ListTile(
mouseCursor: SystemMouseCursors.click,
onTap: () async {
Navigator.of(context).pop();
await _playerOpen(quality.value.video);
},
title: Text(quality.value.quality),
),
const Divider(
color: Constants.dividerColor,
height: 1,
thickness: 1,
),
];
})
.expand((e) => e)
.toList(),
),
),
);
},
);
},
icon: const Icon(Icons.tune),
);
}
/// [_buildBottomButtonBar] returns the list of buttons which are displayed in
/// the bottom button bar of the video player. If the [qualities] parameter is
/// not null, a button to select the quality of the video is added to the
/// bottom button bar. If the [isMobile] parameter is true, the bottom button
/// bar contains the default buttons from the [MaterialVideoControlsThemeData]
/// theme, if it is false it contains the default buttons from the
/// [MaterialDesktopVideoControlsThemeData] theme.
List<Widget> _buildBottomButtonBar(bool isMobile) {
if (isMobile) {
if (widget.qualities != null) {
return [
const MaterialPositionIndicator(),
const Spacer(),
_buildQualityButton(),
const MaterialFullscreenButton(),
];
}
return const [
MaterialPositionIndicator(),
Spacer(),
MaterialFullscreenButton(),
];
}
if (widget.qualities != null) {
return [
const MaterialDesktopSkipPreviousButton(),
const MaterialDesktopPlayOrPauseButton(),
const MaterialDesktopSkipNextButton(),
const MaterialDesktopVolumeButton(),
const MaterialDesktopPositionIndicator(),
const Spacer(),
_buildQualityButton(),
const MaterialDesktopFullscreenButton(),
];
}
return const [
MaterialDesktopSkipPreviousButton(),
MaterialDesktopPlayOrPauseButton(),
MaterialDesktopSkipNextButton(),
MaterialDesktopVolumeButton(),
MaterialDesktopPositionIndicator(),
Spacer(),
MaterialDesktopFullscreenButton(),
];
}
/// [_playerOpen] opens the video player with the provided [video] and sets
/// the audio track if it is provided via the [audio] parameter.
Future<void> _playerOpen(String video) async {
await player.open(
Media(video),
play: false,
);
/// Load an external audio track when it is provided via the [audio]
/// parameter.
/// See: https://github.com/media-kit/media-kit?tab=readme-ov-file#load-external-audio-track
if (widget.audio != null) {
await player.setAudioTrack(
AudioTrack.uri(
widget.audio!,
),
);
}
}
@override
void initState() {
super.initState();
WidgetsBinding.instance.addPostFrameCallback((_) {
_playerOpen(widget.video);
});
}
@override
void dispose() {
player.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return Container(
padding: const EdgeInsets.only(
bottom: Constants.spacingMiddle,
),
child: LayoutBuilder(
builder: (context, constraints) {
return Center(
child: SizedBox(
width: constraints.maxWidth,
height: constraints.maxWidth * 9.0 / 16.0,
child: MaterialDesktopVideoControlsTheme(
normal: MaterialDesktopVideoControlsThemeData(
bottomButtonBar: _buildBottomButtonBar(false),
seekBarPositionColor: Constants.primary,
seekBarThumbColor: Constants.primary,
),
fullscreen: const MaterialDesktopVideoControlsThemeData(
seekBarPositionColor: Constants.primary,
seekBarThumbColor: Constants.primary,
),
child: MaterialVideoControlsTheme(
normal: MaterialVideoControlsThemeData(
bottomButtonBar: _buildBottomButtonBar(true),
seekBarPositionColor: Constants.primary,
seekBarThumbColor: Constants.primary,
),
fullscreen: const MaterialVideoControlsThemeData(
seekBarPositionColor: Constants.primary,
seekBarThumbColor: Constants.primary,
),
child: Video(
controller: controller,
controls: kIsWeb ||
Platform.isLinux ||
Platform.isMacOS ||
Platform.isWindows
? MaterialDesktopVideoControls
: MaterialVideoControls,
),
),
),
),
);
},
),
);
}
}

View File

@@ -0,0 +1,27 @@
library item_youtube_video;
import 'package:flutter/material.dart';
import 'item_youtube_video_stub.dart'
if (dart.library.io) 'item_youtube_video_native.dart'
if (dart.library.html) 'item_youtube_video_web.dart';
/// The [ItemYoutubeVideo] class implements a widget that displays a video from
/// YouTube.
///
/// This is required because we are using different implementations for the web
/// and for all other target platforms (Android, iOS, macOS, Windows, Linux). On
/// the web we display the YouTube video via an `iframe` element. On all other
/// platforms we are using the [youtube_explode_dart] package to fetch the url
/// of the YouTube video, which can then be displayed via our [ItemVideoPlayer]
/// widget.
///
/// We decided for this implementation, because on the web we would have to
/// proxy the calls from the [youtube_explode_dart] because of CORS errors.
/// Further with the former implementation via the [youtube_player_iframe]
/// package we were not able to display the video on macOS, Windows and Linux
/// and we were not able to display the video in fullscreen.
abstract class ItemYoutubeVideo implements StatefulWidget {
factory ItemYoutubeVideo(String? imageUrl, String videoUrl) =>
getItemYoutubeVideo(imageUrl, videoUrl);
}

View File

@@ -0,0 +1,86 @@
import 'package:flutter/material.dart';
import 'package:youtube_explode_dart/youtube_explode_dart.dart';
import 'package:feeddeck/widgets/item/details/utils/item_media.dart';
import 'package:feeddeck/widgets/item/details/utils/item_videos.dart';
import 'item_youtube_video.dart';
class ItemYoutubeVideoNative extends StatefulWidget
implements ItemYoutubeVideo {
const ItemYoutubeVideoNative({
super.key,
required this.imageUrl,
required this.videoUrl,
});
final String? imageUrl;
final String videoUrl;
@override
State<ItemYoutubeVideoNative> createState() => _ItemYoutubeVideoNativeState();
}
class _ItemYoutubeVideoNativeState extends State<ItemYoutubeVideoNative> {
final yt = YoutubeExplode();
late Future<List<ItemVideoQuality>> _futureFetchVideoUrls;
Future<List<ItemVideoQuality>> _fetchVideoUrls() async {
final streamManifest = await yt.videos.streamsClient.getManifest(
widget.videoUrl,
);
return streamManifest.muxed
.sortByVideoQuality()
.map(
(element) => ItemVideoQuality(
quality: element.qualityLabel,
video: element.url.toString(),
),
)
.toList();
}
@override
void didChangeDependencies() {
super.didChangeDependencies();
setState(() {
_futureFetchVideoUrls = _fetchVideoUrls();
});
}
@override
void dispose() {
yt.close();
super.dispose();
}
@override
Widget build(BuildContext context) {
return FutureBuilder(
future: _futureFetchVideoUrls,
builder: (
BuildContext context,
AsyncSnapshot<List<ItemVideoQuality>> snapshot,
) {
if (snapshot.connectionState == ConnectionState.none ||
snapshot.connectionState == ConnectionState.waiting ||
snapshot.hasError ||
snapshot.data == null ||
snapshot.data!.isEmpty) {
return ItemMedia(itemMedia: widget.imageUrl);
}
return ItemVideoPlayer(
video: snapshot.data!.first.video,
qualities: snapshot.data,
);
},
);
}
}
ItemYoutubeVideo getItemYoutubeVideo(String? imageUrl, String videoUrl) =>
ItemYoutubeVideoNative(
imageUrl: imageUrl,
videoUrl: videoUrl,
);

View File

@@ -0,0 +1,6 @@
import 'item_youtube_video.dart';
ItemYoutubeVideo getItemYoutubeVideo(String? imageUrl, String videoUrl) =>
throw UnsupportedError(
'Can not ItemYoutubeVideo without the packages dart:html or dart:io',
);

View File

@@ -0,0 +1,97 @@
import 'dart:html'; // ignore: avoid_web_libraries_in_flutter
import 'dart:ui' as ui;
import 'package:flutter/material.dart';
import 'package:feeddeck/utils/constants.dart';
import 'item_youtube_video.dart';
/// [_convertVideoUrl] converts the video url to a format that can be used to
/// embed the video in an iframe.
String _convertVideoUrl(String videoUrl) {
if (videoUrl.startsWith('https://youtu.be/')) {
return videoUrl.replaceFirst(
'https://youtu.be/',
'https://www.youtube-nocookie.com/embed/',
);
}
if (videoUrl.startsWith('https://www.youtube.com/watch?v=')) {
return 'https://www.youtube-nocookie.com/embed/${videoUrl.replaceFirst(
'https://www.youtube.com/watch?v=',
'',
)}';
}
if (videoUrl.startsWith('https://m.youtube.com/watch?v=')) {
return 'https://www.youtube-nocookie.com/embed/${videoUrl.replaceFirst(
'https://m.youtube.com/watch?v=',
'',
)}';
}
return videoUrl;
}
class ItemYoutubeVideoWeb extends StatefulWidget implements ItemYoutubeVideo {
const ItemYoutubeVideoWeb({
super.key,
required this.imageUrl,
required this.videoUrl,
});
final String? imageUrl;
final String videoUrl;
@override
State<ItemYoutubeVideoWeb> createState() => _ItemYoutubeVideoWebState();
}
class _ItemYoutubeVideoWebState extends State<ItemYoutubeVideoWeb> {
final IFrameElement _iframeElement = IFrameElement();
@override
void initState() {
super.initState();
_iframeElement.src = _convertVideoUrl(widget.videoUrl);
_iframeElement.style.border = 'none';
_iframeElement.allowFullscreen = true;
// ignore: undefined_prefixed_name
ui.platformViewRegistry.registerViewFactory(
widget.videoUrl,
(int viewId) => _iframeElement,
);
}
@override
Widget build(BuildContext context) {
return Container(
padding: const EdgeInsets.only(
bottom: Constants.spacingMiddle,
),
child: LayoutBuilder(
builder: (context, constraints) {
return Center(
child: SizedBox(
width: constraints.maxWidth,
height: constraints.maxWidth * 9.0 / 16.0,
child: HtmlElementView(
key: Key(widget.videoUrl),
viewType: widget.videoUrl,
),
),
);
},
),
);
}
}
ItemYoutubeVideo getItemYoutubeVideo(String? imageUrl, String videoUrl) =>
ItemYoutubeVideoWeb(
imageUrl: imageUrl,
videoUrl: videoUrl,
);

View File

@@ -5,11 +5,14 @@ import 'package:provider/provider.dart';
import 'package:feeddeck/models/item.dart';
import 'package:feeddeck/models/source.dart';
import 'package:feeddeck/repositories/items_repository.dart';
import 'package:feeddeck/widgets/item/preview/item_preview_fourchan.dart';
import 'package:feeddeck/widgets/item/preview/item_preview_github.dart';
import 'package:feeddeck/widgets/item/preview/item_preview_googlenews.dart';
import 'package:feeddeck/widgets/item/preview/item_preview_lemmy.dart';
import 'package:feeddeck/widgets/item/preview/item_preview_mastodon.dart';
import 'package:feeddeck/widgets/item/preview/item_preview_medium.dart';
import 'package:feeddeck/widgets/item/preview/item_preview_nitter.dart';
import 'package:feeddeck/widgets/item/preview/item_preview_pinterest.dart';
import 'package:feeddeck/widgets/item/preview/item_preview_podcast.dart';
import 'package:feeddeck/widgets/item/preview/item_preview_reddit.dart';
import 'package:feeddeck/widgets/item/preview/item_preview_rss.dart';
@@ -42,6 +45,11 @@ class ItemPreview extends StatelessWidget {
/// Based on the [source.type] we display a different preview. The preview
/// for each source type is implemented in a separate widget.
switch (source.type) {
case FDSourceType.fourchan:
return ItemPreviewFourChan(
item: item,
source: source,
);
case FDSourceType.github:
return ItemPreviewGithub(
item: item,
@@ -52,6 +60,11 @@ class ItemPreview extends StatelessWidget {
item: item,
source: source,
);
case FDSourceType.lemmy:
return ItemPreviewLemmy(
item: item,
source: source,
);
case FDSourceType.mastodon:
return ItemPreviewMastodon(
item: item,
@@ -67,6 +80,11 @@ class ItemPreview extends StatelessWidget {
item: item,
source: source,
);
case FDSourceType.pinterest:
return ItemPreviewPinterest(
item: item,
source: source,
);
case FDSourceType.podcast:
return ItemPreviewPodcast(
item: item,
@@ -92,11 +110,6 @@ class ItemPreview extends StatelessWidget {
item: item,
source: source,
);
// case FDSourceType.x:
// return ItemPreviewX(
// item: item,
// source: source,
// );
case FDSourceType.youtube:
return ItemPreviewYoutube(
item: item,

View File

@@ -5,11 +5,12 @@ import 'package:feeddeck/models/source.dart';
import 'package:feeddeck/widgets/item/preview/utils/details.dart';
import 'package:feeddeck/widgets/item/preview/utils/item_actions.dart';
import 'package:feeddeck/widgets/item/preview/utils/item_description.dart';
import 'package:feeddeck/widgets/item/preview/utils/item_media_gallery.dart';
import 'package:feeddeck/widgets/item/preview/utils/item_media.dart';
import 'package:feeddeck/widgets/item/preview/utils/item_source.dart';
import 'package:feeddeck/widgets/item/preview/utils/item_title.dart';
class ItemPreviewX extends StatelessWidget {
const ItemPreviewX({
class ItemPreviewFourChan extends StatelessWidget {
const ItemPreviewFourChan({
super.key,
required this.item,
required this.source,
@@ -25,24 +26,23 @@ class ItemPreviewX extends StatelessWidget {
onTap: () => showDetails(context, item, source),
children: [
ItemSource(
sourceTitle: item.author ?? '',
sourceSubtitle: '${source.type.toLocalizedString()}: ${source.title}',
sourceTitle: source.title,
sourceSubtitle: source.type.toLocalizedString(),
sourceType: source.type,
sourceIcon: source.icon,
itemPublishedAt: item.publishedAt,
itemIsRead: item.isRead,
),
ItemTitle(
itemTitle: item.title,
),
ItemMedia(
itemMedia: item.media,
),
ItemDescription(
itemDescription: item.description,
sourceFormat: DescriptionFormat.html,
tagetFormat: DescriptionFormat.markdown,
),
ItemMediaGallery(
itemMedias: item.options != null && item.options!.containsKey('media')
? (item.options!['media'] as List)
.map((item) => item as String)
.toList()
: null,
tagetFormat: DescriptionFormat.plain,
),
],
);

View File

@@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
import 'package:feeddeck/models/item.dart';
import 'package:feeddeck/models/source.dart';
import 'package:feeddeck/utils/image_url.dart';
import 'package:feeddeck/widgets/item/preview/utils/details.dart';
import 'package:feeddeck/widgets/item/preview/utils/item_actions.dart';
import 'package:feeddeck/widgets/item/preview/utils/item_description.dart';
@@ -30,7 +29,6 @@ class ItemPreviewGooglenews extends StatelessWidget {
sourceSubtitle: '${source.type.toLocalizedString()}: ${source.title}',
sourceType: source.type,
sourceIcon: item.media,
sourceIconType: FDImageType.item,
itemPublishedAt: item.publishedAt,
itemIsRead: item.isRead,
),

View File

@@ -0,0 +1,71 @@
import 'package:flutter/material.dart';
import 'package:feeddeck/models/item.dart';
import 'package:feeddeck/models/source.dart';
import 'package:feeddeck/widgets/item/preview/utils/details.dart';
import 'package:feeddeck/widgets/item/preview/utils/item_actions.dart';
import 'package:feeddeck/widgets/item/preview/utils/item_description.dart';
import 'package:feeddeck/widgets/item/preview/utils/item_media.dart';
import 'package:feeddeck/widgets/item/preview/utils/item_source.dart';
import 'package:feeddeck/widgets/item/preview/utils/item_title.dart';
class ItemPreviewLemmy extends StatelessWidget {
const ItemPreviewLemmy({
super.key,
required this.item,
required this.source,
});
final FDItem item;
final FDSource source;
/// [_buildMedia] returns the media of the item if the item has media file.
/// Since we save images and videos within the media property we have to
/// filter out all videos.
///
/// See the `getMedia` function in the `lemmy.ts` file, for a list of
/// extension which are a image / video.
Widget _buildMedia() {
if (item.media != null && item.media! != '') {
final mediaUrl = Uri.parse(item.media!);
if (mediaUrl.path.endsWith('.jpg') ||
mediaUrl.path.endsWith('.jpeg') ||
mediaUrl.path.endsWith('.png') ||
mediaUrl.path.endsWith('.gif')) {
return ItemMedia(
itemMedia: item.media,
);
}
}
return Container();
}
@override
Widget build(BuildContext context) {
return ItemActions(
item: item,
onTap: () => showDetails(context, item, source),
children: [
ItemSource(
sourceTitle: source.title,
sourceSubtitle: source.type.toLocalizedString(),
sourceType: source.type,
sourceIcon: source.icon,
itemPublishedAt: item.publishedAt,
itemIsRead: item.isRead,
),
ItemTitle(
itemTitle: item.title,
),
_buildMedia(),
ItemDescription(
itemDescription: item.description,
sourceFormat: DescriptionFormat.html,
tagetFormat: DescriptionFormat.plain,
),
],
);
}
}

View File

@@ -38,7 +38,9 @@ class ItemPreviewMastodon extends StatelessWidget {
tagetFormat: DescriptionFormat.markdown,
),
ItemMediaGallery(
itemMedias: item.options != null && item.options!.containsKey('media')
itemMedias: item.options != null &&
item.options!.containsKey('media') &&
item.options!['media'] != null
? (item.options!['media'] as List)
.map((item) => item as String)
.toList()

View File

@@ -0,0 +1,50 @@
import 'package:flutter/material.dart';
import 'package:feeddeck/models/item.dart';
import 'package:feeddeck/models/source.dart';
import 'package:feeddeck/widgets/item/preview/utils/details.dart';
import 'package:feeddeck/widgets/item/preview/utils/item_actions.dart';
import 'package:feeddeck/widgets/item/preview/utils/item_description.dart';
import 'package:feeddeck/widgets/item/preview/utils/item_media.dart';
import 'package:feeddeck/widgets/item/preview/utils/item_source.dart';
import 'package:feeddeck/widgets/item/preview/utils/item_title.dart';
class ItemPreviewPinterest extends StatelessWidget {
const ItemPreviewPinterest({
super.key,
required this.item,
required this.source,
});
final FDItem item;
final FDSource source;
@override
Widget build(BuildContext context) {
return ItemActions(
item: item,
onTap: () => showDetails(context, item, source),
children: [
ItemSource(
sourceTitle: source.title,
sourceSubtitle: source.type.toLocalizedString(),
sourceType: source.type,
sourceIcon: source.icon,
itemPublishedAt: item.publishedAt,
itemIsRead: item.isRead,
),
ItemTitle(
itemTitle: item.title,
),
ItemMedia(
itemMedia: item.media,
),
ItemDescription(
itemDescription: item.description,
sourceFormat: DescriptionFormat.html,
tagetFormat: DescriptionFormat.plain,
),
],
);
}
}

View File

@@ -41,7 +41,7 @@ class ItemPreviewRSS extends StatelessWidget {
),
ItemDescription(
itemDescription: item.description,
sourceFormat: DescriptionFormat.plain,
sourceFormat: DescriptionFormat.html,
tagetFormat: DescriptionFormat.plain,
),
],

View File

@@ -9,6 +9,7 @@ import 'package:provider/provider.dart';
import 'package:feeddeck/models/item.dart';
import 'package:feeddeck/repositories/items_repository.dart';
import 'package:feeddeck/utils/constants.dart';
import 'package:feeddeck/utils/openurl.dart';
/// The [ItemActions] widget provides an actions menu for an item, which can be
/// used to quickly mark an item as read or unread and to add or remove a
@@ -62,6 +63,14 @@ class _ItemActionsState extends State<ItemActions> {
} catch (_) {}
}
/// [_openUrl] opens the item url in the default browser of the current
/// device.
Future<void> _openUrl() async {
try {
await openUrl(widget.item.link);
} catch (_) {}
}
/// [_getTapPositionLarge] set the [_tapPosition] which will be used for the
/// actions menu.
void _getTapPositionLarge(TapDownDetails details) {
@@ -70,10 +79,10 @@ class _ItemActionsState extends State<ItemActions> {
});
}
/// [_showActionsMenuLarge] shows a popup menu with all available aactions for
/// [_showActionsMenuLarge] shows a popup menu with all available actions for
/// an item. This means the user can mark an item as read or unread or a user
/// can add or remove a bookmark for an item.
void _showActionsMenuLarge(BuildContext context) async {
void _showActionsMenuLarge() async {
HapticFeedback.heavyImpact();
final RenderObject? overlay =
@@ -126,6 +135,15 @@ class _ItemActionsState extends State<ItemActions> {
: const Text('Add Bookmark'),
),
),
const PopupMenuItem(
value: 'openlink',
child: ListTile(
leading: Icon(
Icons.launch,
),
title: Text('Open Link'),
),
),
],
);
@@ -140,9 +158,19 @@ class _ItemActionsState extends State<ItemActions> {
await _bookmark(context);
}
break;
case 'openlink':
if (mounted) {
await _openUrl();
}
break;
}
}
/// [_showActionsMenuSmall] shows a modal bottom sheet with all available
/// actions for an item. This means the user can mark an item as read or
/// unread or a user can add or remove a bookmark for an item. The actions are
/// the same as we show on large screens via [_showActionsMenuLarge], but the
/// modal bottom sheet is optiomized for small screens.
void _showActionsMenuSmall(BuildContext mainContext) async {
HapticFeedback.heavyImpact();
@@ -157,56 +185,72 @@ class _ItemActionsState extends State<ItemActions> {
maxWidth: Constants.centeredFormMaxWidth,
),
builder: (BuildContext context) {
return Container(
margin: const EdgeInsets.all(
Constants.spacingMiddle,
),
padding: const EdgeInsets.only(
left: Constants.spacingMiddle,
right: Constants.spacingMiddle,
),
decoration: const BoxDecoration(
color: Constants.background,
borderRadius: BorderRadius.all(
Radius.circular(Constants.spacingMiddle),
return SafeArea(
child: Container(
margin: const EdgeInsets.all(
Constants.spacingMiddle,
),
),
child: Wrap(
alignment: WrapAlignment.center,
crossAxisAlignment: WrapCrossAlignment.center,
children: [
ListTile(
mouseCursor: SystemMouseCursors.click,
onTap: () async {
Navigator.of(context).pop();
_read(mainContext);
},
leading: widget.item.isRead
? const Icon(Icons.visibility_off)
: const Icon(Icons.visibility),
title: widget.item.isRead
? const Text('Mark as Unread')
: const Text('Mark as Read'),
padding: const EdgeInsets.only(
left: Constants.spacingMiddle,
right: Constants.spacingMiddle,
),
decoration: const BoxDecoration(
color: Constants.background,
borderRadius: BorderRadius.all(
Radius.circular(Constants.spacingMiddle),
),
const Divider(
color: Constants.dividerColor,
height: 1,
thickness: 1,
),
ListTile(
mouseCursor: SystemMouseCursors.click,
onTap: () async {
Navigator.of(context).pop();
_bookmark(mainContext);
},
leading: widget.item.isBookmarked
? const Icon(Icons.bookmark)
: const Icon(Icons.bookmark_outline),
title: widget.item.isBookmarked
? const Text('Remove Bookmark')
: const Text('Add Bookmark'),
),
],
),
child: Wrap(
alignment: WrapAlignment.center,
crossAxisAlignment: WrapCrossAlignment.center,
children: [
ListTile(
mouseCursor: SystemMouseCursors.click,
onTap: () async {
Navigator.of(context).pop();
_read(mainContext);
},
leading: widget.item.isRead
? const Icon(Icons.visibility_off)
: const Icon(Icons.visibility),
title: widget.item.isRead
? const Text('Mark as Unread')
: const Text('Mark as Read'),
),
const Divider(
color: Constants.dividerColor,
height: 1,
thickness: 1,
),
ListTile(
mouseCursor: SystemMouseCursors.click,
onTap: () async {
Navigator.of(context).pop();
_bookmark(mainContext);
},
leading: widget.item.isBookmarked
? const Icon(Icons.bookmark)
: const Icon(Icons.bookmark_outline),
title: widget.item.isBookmarked
? const Text('Remove Bookmark')
: const Text('Add Bookmark'),
),
const Divider(
color: Constants.dividerColor,
height: 1,
thickness: 1,
),
ListTile(
mouseCursor: SystemMouseCursors.click,
onTap: () async {
Navigator.of(context).pop();
_openUrl();
},
leading: const Icon(Icons.launch),
title: const Text('Open Link'),
),
],
),
),
);
},
@@ -326,12 +370,17 @@ class _ItemActionsState extends State<ItemActions> {
/// On large screens we show an actions menu via `_showActionsMenuLarge`,
/// which is rendered directly at the point where the user pressed on the
/// item.
/// The menu can be opened by a long press or by a secondary tap (right
/// click) on the item.
return MouseRegion(
cursor: SystemMouseCursors.click,
child: GestureDetector(
onTap: widget.onTap,
onTapDown: (details) => _getTapPositionLarge(details),
onLongPress: () => _showActionsMenuLarge(context),
onLongPress: () => _showActionsMenuLarge(),
onSecondaryTapDown:
kIsWeb ? null : (details) => _getTapPositionLarge(details),
onSecondaryTap: kIsWeb ? null : () => _showActionsMenuLarge(),
child: Container(
width: double.infinity,
decoration: const BoxDecoration(

View File

@@ -1,12 +1,12 @@
import 'package:flutter/material.dart';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter_markdown/flutter_markdown.dart';
import 'package:html2md/html2md.dart' as html2md;
import 'package:feeddeck/utils/constants.dart';
import 'package:feeddeck/utils/font.dart';
import 'package:feeddeck/utils/openurl.dart';
import 'package:feeddeck/widgets/utils/cached_network_image.dart';
/// The [DescriptionFormat] enum defines the source and target format of a
/// description.
@@ -46,7 +46,7 @@ class ItemDescription extends StatelessWidget {
),
child: MarkdownBody(
selectable: false,
data: content,
data: content.trim(),
styleSheet: MarkdownStyleSheet(
code: TextStyle(
fontFamily: getMonospaceFontFamily(),
@@ -55,6 +55,15 @@ class ItemDescription extends StatelessWidget {
codeblockDecoration: const BoxDecoration(
color: Constants.secondary,
),
blockquoteDecoration: const BoxDecoration(
color: Constants.secondary,
border: Border(
left: BorderSide(
color: Constants.primary,
width: 1,
),
),
),
),
onTapLink: (text, href, title) {
if (href != null) {
@@ -81,13 +90,21 @@ class ItemDescription extends StatelessWidget {
}
/// [_buildPlain] renders the provided [content] as plain text.
///
/// To not have some trailing newlines, the [content] is trimmed and splitted
/// on newline characters, so that we can filter out empty lines, before the
/// the content is rendered.
Widget _buildPlain(String content) {
if (content == '') {
return Container();
}
return Container(
padding: const EdgeInsets.only(
bottom: Constants.spacingExtraSmall,
),
child: Text(
content,
content.trim().split('\n').where((line) => line != '').join('\n'),
maxLines: 5,
style: const TextStyle(
overflow: TextOverflow.ellipsis,
@@ -117,7 +134,9 @@ class ItemDescription extends StatelessWidget {
if (sourceFormat == DescriptionFormat.html &&
tagetFormat == DescriptionFormat.plain) {
return _buildPlain(
itemDescription!.replaceAll(RegExp(r'<[^>]*>|&[^;]+;'), ''),
itemDescription!
.replaceAll(RegExp(r'<[^>]*>|&[^;]+;'), ' ')
.replaceAll(RegExp('\\s+'), ' '),
);
}

View File

@@ -1,9 +1,7 @@
import 'package:flutter/material.dart';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:feeddeck/utils/constants.dart';
import 'package:feeddeck/utils/image_url.dart';
import 'package:feeddeck/widgets/utils/cached_network_image.dart';
/// The [ItemMedia] widget displays the media of an item. Based on the provided
/// [itemMedia] value the media is displayed from the Supabase storage or
@@ -30,7 +28,7 @@ class ItemMedia extends StatelessWidget {
width: double.infinity,
height: 200,
fit: BoxFit.cover,
imageUrl: getImageUrl(FDImageType.item, itemMedia!),
imageUrl: itemMedia!,
placeholder: (context, url) => Container(),
errorWidget: (context, url, error) => Container(),
),

View File

@@ -1,10 +1,8 @@
import 'package:flutter/material.dart';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:feeddeck/utils/constants.dart';
import 'package:feeddeck/utils/image_url.dart';
import 'package:feeddeck/widgets/item/details/utils/item_media.dart';
import 'package:feeddeck/widgets/utils/cached_network_image.dart';
/// The [ItemMediaGallery] widget can be used to display multiple media files in
/// a gallery. Similar to the [ItemMedia] widget the provided [itemMedias]
@@ -24,12 +22,10 @@ class ItemMediaGallery extends StatelessWidget {
/// [CachedNetworkImage] widget. If the app is running in the web, the url is
/// proxied through the Supabase functions.
Widget _buildSingleMedia(BuildContext context, String itemMedia) {
final imageUrl = getImageUrl(FDImageType.item, itemMedia);
return CachedNetworkImage(
width: MediaQuery.of(context).size.width,
fit: BoxFit.cover,
imageUrl: imageUrl,
imageUrl: itemMedia,
placeholder: (context, url) => Container(),
errorWidget: (context, url, error) => Container(),
);

View File

@@ -4,7 +4,6 @@ import 'package:timeago/timeago.dart' as timeago;
import 'package:feeddeck/models/source.dart';
import 'package:feeddeck/utils/constants.dart';
import 'package:feeddeck/utils/image_url.dart';
import 'package:feeddeck/widgets/source/source_icon.dart';
/// The [ItemSource] widget is used to display the source of an item above the
@@ -16,7 +15,6 @@ class ItemSource extends StatelessWidget {
required this.sourceSubtitle,
required this.sourceType,
required this.sourceIcon,
this.sourceIconType = FDImageType.source,
required this.itemPublishedAt,
required this.itemIsRead,
});
@@ -25,7 +23,6 @@ class ItemSource extends StatelessWidget {
final String sourceSubtitle;
final FDSourceType sourceType;
final String? sourceIcon;
final FDImageType sourceIconType;
final int itemPublishedAt;
final bool itemIsRead;
@@ -72,7 +69,6 @@ class ItemSource extends StatelessWidget {
child: SourceIcon(
type: sourceType,
icon: sourceIcon,
iconType: sourceIconType,
size: 32,
),
),

View File

@@ -27,14 +27,22 @@ class _ResetPasswordState extends State<ResetPassword> {
/// [_validatePassword] validates the email address provided via the
/// [TextField] of the [_passwordController]. The password field can not be
/// empty and must have a minimum length of 6 characters.
/// empty and must have a minimum length of 8 characters. The password must
/// also contain at least one upper case letter, one lower case letter and one
/// number.
String? _validatePassword(String? value) {
if (value == null || value.isEmpty) {
return 'Password is required';
}
if (value.length < 6) {
return 'Password must be a least 6 characters long';
if (value.length < 8) {
return 'Password must be a least 8 characters long';
}
String pattern = r'^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9]).{8,}$';
RegExp regExp = RegExp(pattern);
if (!regExp.hasMatch(value)) {
return 'Password must contain at least one upper case letter, one lower case letter and one number';
}
return null;

View File

@@ -232,78 +232,80 @@ class _SettingsAccountsGithubAddState extends State<SettingsAccountsGithubAdd> {
),
],
),
body: Column(
children: [
Expanded(
child: Padding(
padding: const EdgeInsets.all(Constants.spacingMiddle),
child: SingleChildScrollView(
child: Form(
key: _formKey,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
MarkdownBody(
selectable: true,
data: _helpText,
onTapLink: (text, href, title) {
try {
if (href != null) {
openUrl(href);
}
} catch (_) {}
},
),
const SizedBox(
height: Constants.spacingMiddle,
),
TextFormField(
controller: _tokenController,
keyboardType: TextInputType.text,
autocorrect: false,
enableSuggestions: true,
maxLines: 1,
decoration: const InputDecoration(
border: OutlineInputBorder(),
labelText: 'Token',
body: SafeArea(
child: Column(
children: [
Expanded(
child: Padding(
padding: const EdgeInsets.all(Constants.spacingMiddle),
child: SingleChildScrollView(
child: Form(
key: _formKey,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
MarkdownBody(
selectable: true,
data: _helpText,
onTapLink: (text, href, title) {
try {
if (href != null) {
openUrl(href);
}
} catch (_) {}
},
),
validator: (value) => _validateToken(value),
onFieldSubmitted: (value) => _addAccount(),
),
],
const SizedBox(
height: Constants.spacingMiddle,
),
TextFormField(
controller: _tokenController,
keyboardType: TextInputType.text,
autocorrect: false,
enableSuggestions: true,
maxLines: 1,
decoration: const InputDecoration(
border: OutlineInputBorder(),
labelText: 'Token',
),
validator: (value) => _validateToken(value),
onFieldSubmitted: (value) => _addAccount(),
),
],
),
),
),
),
),
),
const SizedBox(
height: Constants.spacingSmall,
),
const Divider(
color: Constants.dividerColor,
height: 1,
thickness: 1,
),
_buildError(),
Padding(
padding: const EdgeInsets.all(Constants.spacingMiddle),
child: ElevatedButton.icon(
style: ElevatedButton.styleFrom(
maximumSize: const Size.fromHeight(
Constants.elevatedButtonSize,
),
minimumSize: const Size.fromHeight(
Constants.elevatedButtonSize,
),
),
label: const Text('Add Account'),
onPressed: _isLoading ? null : _addAccount,
icon: _isLoading
? const ElevatedButtonProgressIndicator()
: const Icon(Icons.add),
const SizedBox(
height: Constants.spacingSmall,
),
),
],
const Divider(
color: Constants.dividerColor,
height: 1,
thickness: 1,
),
_buildError(),
Padding(
padding: const EdgeInsets.all(Constants.spacingMiddle),
child: ElevatedButton.icon(
style: ElevatedButton.styleFrom(
maximumSize: const Size.fromHeight(
Constants.elevatedButtonSize,
),
minimumSize: const Size.fromHeight(
Constants.elevatedButtonSize,
),
),
label: const Text('Add Account'),
onPressed: _isLoading ? null : _addAccount,
icon: _isLoading
? const ElevatedButtonProgressIndicator()
: const Icon(Icons.add),
),
),
],
),
),
);
}

View File

@@ -18,60 +18,62 @@ class SettingsAccountsActions extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
margin: const EdgeInsets.all(
Constants.spacingMiddle,
),
padding: const EdgeInsets.only(
left: Constants.spacingMiddle,
right: Constants.spacingMiddle,
),
decoration: const BoxDecoration(
color: Constants.background,
borderRadius: BorderRadius.all(
Radius.circular(Constants.spacingMiddle),
return SafeArea(
child: Container(
margin: const EdgeInsets.all(
Constants.spacingMiddle,
),
),
child: Wrap(
alignment: WrapAlignment.center,
crossAxisAlignment: WrapCrossAlignment.center,
children: [
ListTile(
mouseCursor: SystemMouseCursors.click,
onTap: () {
Navigator.of(context).pop();
reconnect();
},
leading: const Icon(
Icons.link,
),
title: const Text(
'Re-Connect',
),
padding: const EdgeInsets.only(
left: Constants.spacingMiddle,
right: Constants.spacingMiddle,
),
decoration: const BoxDecoration(
color: Constants.background,
borderRadius: BorderRadius.all(
Radius.circular(Constants.spacingMiddle),
),
const Divider(
color: Constants.dividerColor,
height: 1,
thickness: 1,
),
ListTile(
mouseCursor: SystemMouseCursors.click,
onTap: () {
Navigator.of(context).pop();
delete();
},
leading: const Icon(
Icons.delete,
color: Constants.error,
),
title: const Text(
'Delete',
style: TextStyle(
color: Constants.error,
),
child: Wrap(
alignment: WrapAlignment.center,
crossAxisAlignment: WrapCrossAlignment.center,
children: [
ListTile(
mouseCursor: SystemMouseCursors.click,
onTap: () {
Navigator.of(context).pop();
reconnect();
},
leading: const Icon(
Icons.link,
),
title: const Text(
'Re-Connect',
),
),
),
],
const Divider(
color: Constants.dividerColor,
height: 1,
thickness: 1,
),
ListTile(
mouseCursor: SystemMouseCursors.click,
onTap: () {
Navigator.of(context).pop();
delete();
},
leading: const Icon(
Icons.delete,
color: Constants.error,
),
title: const Text(
'Delete',
style: TextStyle(
color: Constants.error,
),
),
),
],
),
),
);
}

View File

@@ -4,6 +4,7 @@ import 'package:provider/provider.dart';
import 'package:feeddeck/repositories/app_repository.dart';
import 'package:feeddeck/repositories/items_repository.dart';
import 'package:feeddeck/repositories/layout_repository.dart';
import 'package:feeddeck/utils/constants.dart';
/// The [SettingsDecksSelect] widget shows a list of the users decks, when the
@@ -20,13 +21,18 @@ class _SettingsDecksSelectState extends State<SettingsDecksSelect> {
/// [_selectDeck] sets the provided [deckId] as the active deck. The active
/// deck is updated via the [selectDeck] method of the [AppRepository]. When
/// the active deck is updated the user is redirected to the decks view.
///
/// Before the active deck is changed the [ItemsRepositoryStore] is cleared,
/// to trigger a reload of the items once the deck is loaded.
Future<void> _selectDeck(String deckId) async {
try {
/// Before the active deck is changed the [ItemsRepositoryStore] is
/// cleared, to trigger a reload of the items once the deck is loaded.
ItemsRepositoryStore().clear();
/// We also have to reset the tab index when the user selects a new deck,
/// so that the first tab is selected instead of the tab with the same
/// index as in the previously selected deck.
Provider.of<LayoutRepository>(context, listen: false)
.deckLayoutSmallInitialTabIndex = 0;
await Provider.of<AppRepository>(context, listen: false)
.selectDeck(deckId);
if (!mounted) return;

View File

@@ -166,28 +166,29 @@ class _SettingsPremiumInAppState extends State<SettingsPremiumInApp> {
),
],
),
body: FutureBuilder(
future: _futureFetchOfferings,
builder: (
BuildContext context,
AsyncSnapshot<Offering?> snapshot,
) {
return Column(
children: [
Expanded(
child: Padding(
padding: const EdgeInsets.all(Constants.spacingMiddle),
child: SingleChildScrollView(
child: snapshot.connectionState == ConnectionState.none ||
snapshot.connectionState ==
ConnectionState.waiting ||
snapshot.hasError ||
snapshot.data == null ||
snapshot.data?.monthly == null
? const Text('Loading ...')
: MarkdownBody(
selectable: true,
data: '''
body: SafeArea(
child: FutureBuilder(
future: _futureFetchOfferings,
builder: (
BuildContext context,
AsyncSnapshot<Offering?> snapshot,
) {
return Column(
children: [
Expanded(
child: Padding(
padding: const EdgeInsets.all(Constants.spacingMiddle),
child: SingleChildScrollView(
child: snapshot.connectionState == ConnectionState.none ||
snapshot.connectionState ==
ConnectionState.waiting ||
snapshot.hasError ||
snapshot.data == null ||
snapshot.data?.monthly == null
? const Text('Loading ...')
: MarkdownBody(
selectable: true,
data: '''
You are currently using the free version of FeedDeck, which allows you to add up
to 10 sources for the first 7 days. After that trial period your sources will
not be updated anymore.
@@ -197,57 +198,61 @@ upgrade to a premium account. The premium account costs
${snapshot.data?.monthly?.storeProduct.priceString} per month and can be
canceled at any time.
''',
),
),
),
),
const SizedBox(
height: Constants.spacingSmall,
),
const Divider(
color: Constants.dividerColor,
height: 1,
thickness: 1,
),
Padding(
padding: const EdgeInsets.all(Constants.spacingMiddle),
child: ElevatedButton.icon(
style: ElevatedButton.styleFrom(
backgroundColor: Constants.primary,
foregroundColor: Constants.onPrimary,
maximumSize: const Size.fromHeight(
Constants.elevatedButtonSize,
),
minimumSize: const Size.fromHeight(
Constants.elevatedButtonSize,
),
),
),
label: Text(
snapshot.data?.monthly?.storeProduct.priceString != null
? 'Subscribe to FeedDeck Premium for ${snapshot.data?.monthly?.storeProduct.priceString}'
: 'Subscribe to FeedDeck Premium',
),
onPressed: snapshot.connectionState == ConnectionState.none ||
snapshot.connectionState == ConnectionState.waiting ||
snapshot.hasError ||
snapshot.data == null ||
snapshot.data?.monthly == null ||
_isLoading
? null
: () => _purchase(snapshot.data!.monthly!),
icon: snapshot.connectionState == ConnectionState.none ||
snapshot.connectionState == ConnectionState.waiting ||
snapshot.hasError ||
snapshot.data == null ||
snapshot.data?.monthly == null ||
_isLoading
? const ElevatedButtonProgressIndicator()
: const Icon(FDIcons.feeddeck),
),
),
],
);
},
const SizedBox(
height: Constants.spacingSmall,
),
const Divider(
color: Constants.dividerColor,
height: 1,
thickness: 1,
),
Padding(
padding: const EdgeInsets.all(Constants.spacingMiddle),
child: ElevatedButton.icon(
style: ElevatedButton.styleFrom(
backgroundColor: Constants.primary,
foregroundColor: Constants.onPrimary,
maximumSize: const Size.fromHeight(
Constants.elevatedButtonSize,
),
minimumSize: const Size.fromHeight(
Constants.elevatedButtonSize,
),
),
label: Text(
snapshot.data?.monthly?.storeProduct.priceString != null
? 'Subscribe to FeedDeck Premium for ${snapshot.data?.monthly?.storeProduct.priceString}'
: 'Subscribe to FeedDeck Premium',
),
onPressed:
snapshot.connectionState == ConnectionState.none ||
snapshot.connectionState ==
ConnectionState.waiting ||
snapshot.hasError ||
snapshot.data == null ||
snapshot.data?.monthly == null ||
_isLoading
? null
: () => _purchase(snapshot.data!.monthly!),
icon: snapshot.connectionState == ConnectionState.none ||
snapshot.connectionState ==
ConnectionState.waiting ||
snapshot.hasError ||
snapshot.data == null ||
snapshot.data?.monthly == null ||
_isLoading
? const ElevatedButtonProgressIndicator()
: const Icon(FDIcons.feeddeck),
),
),
],
);
},
),
),
);
}

View File

@@ -87,62 +87,67 @@ class _SettingsPremiumStripeState extends State<SettingsPremiumStripe> {
),
],
),
body: FutureBuilder(
future: _futureFetchCheckoutSessionLink,
builder: (
BuildContext context,
AsyncSnapshot<String> snapshot,
) {
return Column(
children: [
const Expanded(
child: Padding(
padding: EdgeInsets.all(Constants.spacingMiddle),
child: SingleChildScrollView(
child: MarkdownBody(
selectable: true,
data: _settingsPremiumStripeText,
body: SafeArea(
child: FutureBuilder(
future: _futureFetchCheckoutSessionLink,
builder: (
BuildContext context,
AsyncSnapshot<String> snapshot,
) {
return Column(
children: [
const Expanded(
child: Padding(
padding: EdgeInsets.all(Constants.spacingMiddle),
child: SingleChildScrollView(
child: MarkdownBody(
selectable: true,
data: _settingsPremiumStripeText,
),
),
),
),
),
const SizedBox(
height: Constants.spacingSmall,
),
const Divider(
color: Constants.dividerColor,
height: 1,
thickness: 1,
),
Padding(
padding: const EdgeInsets.all(Constants.spacingMiddle),
child: ElevatedButton.icon(
style: ElevatedButton.styleFrom(
backgroundColor: Constants.primary,
foregroundColor: Constants.onPrimary,
maximumSize: const Size.fromHeight(
Constants.elevatedButtonSize,
),
minimumSize: const Size.fromHeight(
Constants.elevatedButtonSize,
),
),
label: const Text('Subscribe to FeedDeck Premium'),
onPressed: snapshot.connectionState == ConnectionState.none ||
snapshot.connectionState == ConnectionState.waiting ||
snapshot.hasError
? null
: () => _openUrl(snapshot.data),
icon: snapshot.connectionState == ConnectionState.none ||
snapshot.connectionState == ConnectionState.waiting ||
snapshot.hasError
? const ElevatedButtonProgressIndicator()
: const Icon(FDIcons.feeddeck),
const SizedBox(
height: Constants.spacingSmall,
),
),
],
);
},
const Divider(
color: Constants.dividerColor,
height: 1,
thickness: 1,
),
Padding(
padding: const EdgeInsets.all(Constants.spacingMiddle),
child: ElevatedButton.icon(
style: ElevatedButton.styleFrom(
backgroundColor: Constants.primary,
foregroundColor: Constants.onPrimary,
maximumSize: const Size.fromHeight(
Constants.elevatedButtonSize,
),
minimumSize: const Size.fromHeight(
Constants.elevatedButtonSize,
),
),
label: const Text('Subscribe to FeedDeck Premium'),
onPressed:
snapshot.connectionState == ConnectionState.none ||
snapshot.connectionState ==
ConnectionState.waiting ||
snapshot.hasError
? null
: () => _openUrl(snapshot.data),
icon: snapshot.connectionState == ConnectionState.none ||
snapshot.connectionState ==
ConnectionState.waiting ||
snapshot.hasError
? const ElevatedButtonProgressIndicator()
: const Icon(FDIcons.feeddeck),
),
),
],
);
},
),
),
);
}

View File

@@ -180,60 +180,65 @@ class _SettingsProfileCustomerPortalModalState
),
],
),
body: FutureBuilder(
future: _futureFetchCustomerPortalLink,
builder: (
BuildContext context,
AsyncSnapshot<String> snapshot,
) {
return Column(
children: [
const Expanded(
child: Padding(
padding: EdgeInsets.all(Constants.spacingMiddle),
child: SingleChildScrollView(
child: MarkdownBody(
selectable: true,
data: _settingsProfileCustomerPortalText,
body: SafeArea(
child: FutureBuilder(
future: _futureFetchCustomerPortalLink,
builder: (
BuildContext context,
AsyncSnapshot<String> snapshot,
) {
return Column(
children: [
const Expanded(
child: Padding(
padding: EdgeInsets.all(Constants.spacingMiddle),
child: SingleChildScrollView(
child: MarkdownBody(
selectable: true,
data: _settingsProfileCustomerPortalText,
),
),
),
),
),
const SizedBox(
height: Constants.spacingSmall,
),
const Divider(
color: Constants.dividerColor,
height: 1,
thickness: 1,
),
Padding(
padding: const EdgeInsets.all(Constants.spacingMiddle),
child: ElevatedButton.icon(
style: ElevatedButton.styleFrom(
maximumSize: const Size.fromHeight(
Constants.elevatedButtonSize,
),
minimumSize: const Size.fromHeight(
Constants.elevatedButtonSize,
),
),
label: const Text('Open Customer Portal'),
onPressed: snapshot.connectionState == ConnectionState.none ||
snapshot.connectionState == ConnectionState.waiting ||
snapshot.hasError
? null
: () => _openUrl(snapshot.data),
icon: snapshot.connectionState == ConnectionState.none ||
snapshot.connectionState == ConnectionState.waiting ||
snapshot.hasError
? const ElevatedButtonProgressIndicator()
: const Icon(Icons.receipt),
const SizedBox(
height: Constants.spacingSmall,
),
),
],
);
},
const Divider(
color: Constants.dividerColor,
height: 1,
thickness: 1,
),
Padding(
padding: const EdgeInsets.all(Constants.spacingMiddle),
child: ElevatedButton.icon(
style: ElevatedButton.styleFrom(
maximumSize: const Size.fromHeight(
Constants.elevatedButtonSize,
),
minimumSize: const Size.fromHeight(
Constants.elevatedButtonSize,
),
),
label: const Text('Open Customer Portal'),
onPressed:
snapshot.connectionState == ConnectionState.none ||
snapshot.connectionState ==
ConnectionState.waiting ||
snapshot.hasError
? null
: () => _openUrl(snapshot.data),
icon: snapshot.connectionState == ConnectionState.none ||
snapshot.connectionState ==
ConnectionState.waiting ||
snapshot.hasError
? const ElevatedButtonProgressIndicator()
: const Icon(Icons.receipt),
),
),
],
);
},
),
),
);
}

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