diff --git a/api/lib/models/event/item/model.dart b/api/lib/models/event/item/model.dart index f6737966477..7847f774859 100644 --- a/api/lib/models/event/item/model.dart +++ b/api/lib/models/event/item/model.dart @@ -11,7 +11,7 @@ part 'model.g.dart'; enum CalendarItemType { appointment, moment, pending } @freezed -class CalendarItem with _$CalendarItem, DescriptiveModel { +class CalendarItem with _$CalendarItem implements DescriptiveModel { const CalendarItem._(); const factory CalendarItem.fixed({ diff --git a/api/pubspec.lock b/api/pubspec.lock index 98904a9e9ea..751b8f6142f 100644 --- a/api/pubspec.lock +++ b/api/pubspec.lock @@ -21,10 +21,10 @@ packages: dependency: transitive description: name: args - sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596 + sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" url: "https://pub.dev" source: hosted - version: "2.4.2" + version: "2.5.0" async: dependency: transitive description: @@ -109,10 +109,10 @@ packages: dependency: transitive description: name: built_value - sha256: fedde275e0a6b798c3296963c5cd224e3e1b55d0e478d5b7e65e6b540f363a0e + sha256: c7913a9737ee4007efedaffc968c049fd0f3d0e49109e778edc10de9426005cb url: "https://pub.dev" source: hosted - version: "8.9.1" + version: "8.9.2" checked_yaml: dependency: transitive description: @@ -222,10 +222,10 @@ packages: dependency: transitive description: name: frontend_server_client - sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" + sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 url: "https://pub.dev" source: hosted - version: "3.2.0" + version: "4.0.0" glob: dependency: transitive description: @@ -582,10 +582,10 @@ packages: dependency: transitive description: name: vm_service - sha256: e7d5ecd604e499358c5fe35ee828c0298a320d54455e791e9dcf73486bc8d9f0 + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" url: "https://pub.dev" source: hosted - version: "14.1.0" + version: "14.2.1" watcher: dependency: transitive description: @@ -606,10 +606,10 @@ packages: dependency: transitive description: name: web_socket_channel - sha256: "1d8e795e2a8b3730c41b8a98a2dff2e0fb57ae6f0764a1c46ec5915387d257b2" + sha256: "58c6666b342a38816b2e7e50ed0f1e261959630becd4c879c4f26bfa14aa5a42" url: "https://pub.dev" source: hosted - version: "2.4.4" + version: "2.4.5" webkit_inspection_protocol: dependency: transitive description: diff --git a/app/lib/pages/calendar/filter.dart b/app/lib/pages/calendar/filter.dart index fcc7c053286..1bdf10380c9 100644 --- a/app/lib/pages/calendar/filter.dart +++ b/app/lib/pages/calendar/filter.dart @@ -50,7 +50,7 @@ class CalendarFilterView extends StatefulWidget { super.key, this.initialFilter, required this.onChanged, - this.past = true, + this.past = false, }); @override @@ -81,16 +81,9 @@ class _CalendarFilterViewState extends State { final selected = !_filter.hiddenStatuses.contains(status); return InputChip( label: Text(status.getLocalizedName(context)), - avatar: PhosphorIcon(status.icon(PhosphorIconsStyle.light), - color: selected - ? Theme.of(context).colorScheme.onPrimaryContainer - : Theme.of(context).iconTheme.color), + avatar: PhosphorIcon(status.icon(PhosphorIconsStyle.light)), selected: selected, selectedColor: status.getColor(), - labelStyle: TextStyle( - color: selected - ? Theme.of(context).colorScheme.onPrimaryContainer - : null), showCheckmark: false, onSelected: (value) { setState(() { @@ -116,18 +109,9 @@ class _CalendarFilterViewState extends State { ), InputChip( label: Text(AppLocalizations.of(context).event), - avatar: PhosphorIcon(PhosphorIconsLight.calendar, - color: _filter.event != null - ? Theme.of(context).colorScheme.onPrimaryContainer - : Theme.of(context).iconTheme.color), + avatar: const PhosphorIcon(PhosphorIconsLight.calendar), selected: _filter.event != null, - selectedColor: Theme.of(context).colorScheme.primaryContainer, - labelStyle: TextStyle( - color: _filter.event != null - ? Theme.of(context).colorScheme.onPrimaryContainer - : null), showCheckmark: false, - deleteIconColor: Theme.of(context).colorScheme.onPrimaryContainer, onDeleted: _filter.event == null ? null : () { @@ -158,18 +142,9 @@ class _CalendarFilterViewState extends State { ), InputChip( label: Text(AppLocalizations.of(context).group), - avatar: PhosphorIcon(PhosphorIconsLight.folder, - color: _filter.group != null - ? Theme.of(context).colorScheme.onPrimaryContainer - : Theme.of(context).iconTheme.color), + avatar: const PhosphorIcon(PhosphorIconsLight.folder), selected: _filter.group != null, - selectedColor: Theme.of(context).colorScheme.primaryContainer, - labelStyle: TextStyle( - color: _filter.group != null - ? Theme.of(context).colorScheme.onPrimaryContainer - : null), showCheckmark: false, - deleteIconColor: Theme.of(context).colorScheme.onPrimaryContainer, onDeleted: _filter.group == null ? null : () { @@ -200,18 +175,9 @@ class _CalendarFilterViewState extends State { ), InputChip( label: Text(AppLocalizations.of(context).place), - avatar: PhosphorIcon(PhosphorIconsLight.mapPin, - color: _filter.place != null - ? Theme.of(context).colorScheme.onPrimaryContainer - : Theme.of(context).iconTheme.color), + avatar: const PhosphorIcon(PhosphorIconsLight.mapPin), selected: _filter.place != null, - selectedColor: Theme.of(context).colorScheme.primaryContainer, - labelStyle: TextStyle( - color: _filter.place != null - ? Theme.of(context).colorScheme.onPrimaryContainer - : null), showCheckmark: false, - deleteIconColor: Theme.of(context).colorScheme.onPrimaryContainer, onDeleted: _filter.place == null ? null : () { @@ -242,16 +208,9 @@ class _CalendarFilterViewState extends State { if (widget.past) InputChip( label: Text(AppLocalizations.of(context).past), - avatar: PhosphorIcon(PhosphorIconsLight.clockCounterClockwise, - color: _filter.past - ? Theme.of(context).colorScheme.onPrimaryContainer - : Theme.of(context).iconTheme.color), + avatar: const PhosphorIcon( + PhosphorIconsLight.clockCounterClockwise), selected: _filter.past, - selectedColor: Theme.of(context).colorScheme.primaryContainer, - labelStyle: TextStyle( - color: _filter.past - ? Theme.of(context).colorScheme.onPrimaryContainer - : null), showCheckmark: false, onSelected: (value) { setState(() { diff --git a/app/lib/pages/calendar/list.dart b/app/lib/pages/calendar/list.dart index 8becec1e629..a44402721a3 100644 --- a/app/lib/pages/calendar/list.dart +++ b/app/lib/pages/calendar/list.dart @@ -151,6 +151,7 @@ class _CalendarListViewState extends State { CalendarFilterView( initialFilter: widget.filter, onChanged: (value) => widget.onFilterChanged(value), + past: true, ), const SizedBox(height: 8), Expanded( diff --git a/app/lib/pages/events/event.dart b/app/lib/pages/events/event.dart index fab95fca9da..673ba15256f 100644 --- a/app/lib/pages/events/event.dart +++ b/app/lib/pages/events/event.dart @@ -87,6 +87,7 @@ class EventDialog extends StatelessWidget { const SizedBox(height: 16), GroupSelectTile( source: currentSource, + value: currentEvent.groupId, onChanged: (value) { currentEvent = currentEvent.copyWith(groupId: value); }, @@ -94,6 +95,7 @@ class EventDialog extends StatelessWidget { const SizedBox(height: 16), PlaceSelectTile( source: currentSource, + value: currentEvent.placeId, onChanged: (value) { currentEvent = currentEvent.copyWith(placeId: value); }, @@ -101,6 +103,8 @@ class EventDialog extends StatelessWidget { const SizedBox(height: 8), StatefulBuilder( builder: (context, setState) => CheckboxListTile( + secondary: + const Icon(PhosphorIconsLight.circleHalfTilt), title: Text(AppLocalizations.of(context).blocked), value: currentEvent.blocked, onChanged: (value) => setState( diff --git a/app/lib/pages/events/filter.dart b/app/lib/pages/events/filter.dart index a221c7fa4c2..62c2cd87ea8 100644 --- a/app/lib/pages/events/filter.dart +++ b/app/lib/pages/events/filter.dart @@ -60,18 +60,9 @@ class _EventFilterViewState extends State { children: [ InputChip( label: Text(AppLocalizations.of(context).group), - avatar: PhosphorIcon(PhosphorIconsLight.fileText, - color: _filter.group != null - ? Theme.of(context).colorScheme.onPrimaryContainer - : Theme.of(context).iconTheme.color), + avatar: const PhosphorIcon(PhosphorIconsLight.fileText), selected: _filter.group != null, - selectedColor: Theme.of(context).colorScheme.primaryContainer, - labelStyle: TextStyle( - color: _filter.group != null - ? Theme.of(context).colorScheme.onPrimaryContainer - : null), showCheckmark: false, - deleteIconColor: Theme.of(context).colorScheme.onPrimaryContainer, onDeleted: _filter.group == null ? null : () { @@ -101,18 +92,9 @@ class _EventFilterViewState extends State { ), InputChip( label: Text(AppLocalizations.of(context).place), - avatar: PhosphorIcon(PhosphorIconsLight.mapPin, - color: _filter.place != null - ? Theme.of(context).colorScheme.onPrimaryContainer - : Theme.of(context).iconTheme.color), + avatar: const PhosphorIcon(PhosphorIconsLight.mapPin), selected: _filter.place != null, - selectedColor: Theme.of(context).colorScheme.primaryContainer, - labelStyle: TextStyle( - color: _filter.place != null - ? Theme.of(context).colorScheme.onPrimaryContainer - : null), showCheckmark: false, - deleteIconColor: Theme.of(context).colorScheme.onPrimaryContainer, onDeleted: _filter.place == null ? null : () { diff --git a/app/lib/pages/notes/filter.dart b/app/lib/pages/notes/filter.dart index f4ea6ccd163..9b95a737ad7 100644 --- a/app/lib/pages/notes/filter.dart +++ b/app/lib/pages/notes/filter.dart @@ -73,16 +73,8 @@ class _NoteFilterViewState extends State { children: [ InputChip( label: Text(AppLocalizations.of(context).done), - avatar: PhosphorIcon(PhosphorIconsLight.checkSquare, - color: _filter.showDone - ? Theme.of(context).colorScheme.onPrimaryContainer - : Theme.of(context).iconTheme.color), + avatar: const PhosphorIcon(PhosphorIconsLight.checkSquare), selected: _filter.showDone, - selectedColor: Theme.of(context).colorScheme.primaryContainer, - labelStyle: TextStyle( - color: _filter.showDone - ? Theme.of(context).colorScheme.onPrimaryContainer - : null), showCheckmark: false, onSelected: (value) { setState(() { @@ -93,16 +85,8 @@ class _NoteFilterViewState extends State { ), InputChip( label: Text(AppLocalizations.of(context).inProgress), - avatar: PhosphorIcon(PhosphorIconsLight.minusSquare, - color: _filter.showInProgress - ? Theme.of(context).colorScheme.onPrimaryContainer - : Theme.of(context).iconTheme.color), + avatar: const PhosphorIcon(PhosphorIconsLight.minusSquare), selected: _filter.showInProgress, - selectedColor: Theme.of(context).colorScheme.primaryContainer, - labelStyle: TextStyle( - color: _filter.showInProgress - ? Theme.of(context).colorScheme.onPrimaryContainer - : null), showCheckmark: false, onSelected: (value) { setState(() { @@ -113,16 +97,8 @@ class _NoteFilterViewState extends State { ), InputChip( label: Text(AppLocalizations.of(context).todo), - avatar: PhosphorIcon(PhosphorIconsLight.square, - color: _filter.showTodo - ? Theme.of(context).colorScheme.onPrimaryContainer - : Theme.of(context).iconTheme.color), + avatar: const PhosphorIcon(PhosphorIconsLight.square), selected: _filter.showTodo, - selectedColor: Theme.of(context).colorScheme.primaryContainer, - labelStyle: TextStyle( - color: _filter.showTodo - ? Theme.of(context).colorScheme.onPrimaryContainer - : null), showCheckmark: false, onSelected: (value) { setState(() { @@ -133,16 +109,8 @@ class _NoteFilterViewState extends State { ), InputChip( label: Text(AppLocalizations.of(context).note), - avatar: PhosphorIcon(PhosphorIconsLight.note, - color: _filter.showNote - ? Theme.of(context).colorScheme.onPrimaryContainer - : Theme.of(context).iconTheme.color), + avatar: const PhosphorIcon(PhosphorIconsLight.note), selected: _filter.showNote, - selectedColor: Theme.of(context).colorScheme.primaryContainer, - labelStyle: TextStyle( - color: _filter.showNote - ? Theme.of(context).colorScheme.onPrimaryContainer - : null), showCheckmark: false, onSelected: (value) { setState(() { diff --git a/app/lib/pages/settings/contents/personalization.dart b/app/lib/pages/settings/contents/personalization.dart index 1f04b23d605..79808df9fb1 100644 --- a/app/lib/pages/settings/contents/personalization.dart +++ b/app/lib/pages/settings/contents/personalization.dart @@ -48,7 +48,7 @@ class PersonalizationSettingsView extends StatelessWidget { title: Text(AppLocalizations.of(context).design), leading: const PhosphorIcon(PhosphorIconsLight.palette), subtitle: Text(state.design.isEmpty - ? AppLocalizations.of(context).classic + ? AppLocalizations.of(context).systemDefault : state.design.toDisplayString()), onTap: () async { final cubit = context.read(); diff --git a/app/lib/pages/users/filter.dart b/app/lib/pages/users/filter.dart index c354291fa91..d7521d51f0d 100644 --- a/app/lib/pages/users/filter.dart +++ b/app/lib/pages/users/filter.dart @@ -50,18 +50,9 @@ class _UserFilterViewState extends State { children: [ InputChip( label: Text(AppLocalizations.of(context).group), - avatar: PhosphorIcon(PhosphorIconsLight.fileText, - color: _filter.group != null - ? Theme.of(context).colorScheme.onPrimaryContainer - : Theme.of(context).iconTheme.color), + avatar: const PhosphorIcon(PhosphorIconsLight.fileText), selected: _filter.group != null, - selectedColor: Theme.of(context).colorScheme.primaryContainer, - labelStyle: TextStyle( - color: _filter.group != null - ? Theme.of(context).colorScheme.onPrimaryContainer - : null), showCheckmark: false, - deleteIconColor: Theme.of(context).colorScheme.onPrimaryContainer, onDeleted: _filter.group == null ? null : () { diff --git a/docs/community/downloads/download.md b/docs/community/downloads/download.md index 511047f9cab..4bf0ddf9288 100644 --- a/docs/community/downloads/download.md +++ b/docs/community/downloads/download.md @@ -10,34 +10,34 @@ title: Downloads ## Choose your platform diff --git a/docs/community/downloads/web.md b/docs/community/downloads/web.md index e75cce32afb..c62845d3aa2 100644 --- a/docs/community/downloads/web.md +++ b/docs/community/downloads/web.md @@ -17,7 +17,7 @@ All data is stored in your browser. ## Links
- + Main diff --git a/docs/i18n/en/code.json b/docs/i18n/en/code.json index 8026d7e9d05..a354e38e488 100644 --- a/docs/i18n/en/code.json +++ b/docs/i18n/en/code.json @@ -353,5 +353,9 @@ "theme.unlistedContent.message": { "message": "This page is unlisted. Search engines will not index it, and only users having a direct link can access it.", "description": "The unlisted content banner message" + }, + "theme.docs.DocCard.categoryDescription.plurals": { + "message": "{count} items", + "description": "The default description for a category card in the generated index about how many items this category includes" } } diff --git a/docs/package.json b/docs/package.json index beace131fc1..2c6a0beb69f 100644 --- a/docs/package.json +++ b/docs/package.json @@ -44,6 +44,8 @@ }, "packageManager": "pnpm@9.0.6", "devDependencies": { + "@docusaurus/module-type-aliases": "3.2.1", + "@docusaurus/tsconfig": "3.2.1", "markdownlint-cli2": "^0.13.0", "typescript": "^5.4.5" } diff --git a/docs/pnpm-lock.yaml b/docs/pnpm-lock.yaml index 6d98895f9fa..6c3668b908c 100644 --- a/docs/pnpm-lock.yaml +++ b/docs/pnpm-lock.yaml @@ -51,6 +51,12 @@ importers: specifier: ^1.0.37 version: 1.0.37 devDependencies: + '@docusaurus/module-type-aliases': + specifier: 3.2.1 + version: 3.2.1(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@docusaurus/tsconfig': + specifier: 3.2.1 + version: 3.2.1 markdownlint-cli2: specifier: ^0.13.0 version: 0.13.0 @@ -948,6 +954,9 @@ packages: resolution: {integrity: sha512-jAUMkIkFfY+OAhJhv6mV8zlwY6J4AQxJPTgLdR2l+Otof9+QdJjHNh/ifVEu9q0lp3oSPlJj9l05AaP7Ref+cg==} engines: {node: '>=18.0'} + '@docusaurus/tsconfig@3.2.1': + resolution: {integrity: sha512-+biUwtsYW3oChLxYezzA+NIgS3Q9KDRl7add/YT54RXs9Q4rKInebxdHdG6JFs5BaTg45gyjDu0rvNVcGeHODg==} + '@docusaurus/types@3.2.1': resolution: {integrity: sha512-n/toxBzL2oxTtRTOFiGKsHypzn/Pm+sXyw+VSk1UbqbXQiHOwHwts55bpKwbcUgA530Is6kix3ELiFOv9GAMfw==} peerDependencies: @@ -6624,6 +6633,8 @@ snapshots: fs-extra: 11.2.0 tslib: 2.6.2 + '@docusaurus/tsconfig@3.2.1': {} + '@docusaurus/types@3.2.1(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: '@mdx-js/mdx': 3.0.1 diff --git a/docs/src/components/DownloadButton.tsx b/docs/src/components/DownloadButton.tsx index b13b926ba2c..4c8b7754595 100644 --- a/docs/src/components/DownloadButton.tsx +++ b/docs/src/components/DownloadButton.tsx @@ -1,7 +1,76 @@ +import Link from '@docusaurus/Link'; +import Translate from '@docusaurus/Translate'; +import clsx from 'clsx'; import React from 'react' +import UAParser from 'ua-parser-js'; +export function DownloadAppButton({ className }: { className?: string }) { + const [platform, setPlatform] = React.useState(''); + React.useEffect(() => { + const parser = new UAParser(); + const uaPlatform = parser.getOS().name; + // Test if it is a linux distro + if (['Raspbian', 'Debian', 'Ubuntu', 'Linux Mint', 'Fedora', 'Arch', 'CentOS', 'Red Hat', 'Manjaro'].includes(uaPlatform)) { + setPlatform('Linux'); + } else { + setPlatform(uaPlatform); + } + }, []); + return (
+ Download +
    +
  • + {platform === 'Windows' && + + + Download for Windows + + + } + {platform === 'Linux' && + + + Download for Linux + + + } + {platform === 'Android' && + + + Download for Android + + + } +
  • +
  • + + + Open the web app + + +
  • +
  • + + + Downloads + + +
  • +
+
); +} -export default function DownloadButton({className, href, children, after}) { +export default function DownloadButton({ className, href, children, after }) { function onClick() { // Open thank you page after download console.log('Downloading...') diff --git a/docs/src/pages/index.tsx b/docs/src/pages/index.tsx index 4492a83b747..0b696110c9d 100644 --- a/docs/src/pages/index.tsx +++ b/docs/src/pages/index.tsx @@ -8,23 +8,13 @@ import HomepageFeatures from "../components/HomepageFeatures"; import Translate from '@docusaurus/Translate'; import "animate.css/animate.min.css"; import UAParser from 'ua-parser-js'; -import {useDocsVersionCandidates} from '@docusaurus/theme-common/internal'; +import { useDocsVersionCandidates } from '@docusaurus/theme-common/internal'; import { AnimationOnScroll } from 'react-animation-on-scroll'; +import { DownloadAppButton } from '../components/DownloadButton'; function HomepageHeader({ - docsPluginId}) { - const [platform, setPlatform] = React.useState(''); - React.useEffect(() => { - const parser = new UAParser(); - const uaPlatform = parser.getOS().name; - // Test if it is a linux distro - if (['Raspbian', 'Debian', 'Ubuntu', 'Linux Mint', 'Fedora', 'Arch', 'CentOS', 'Red Hat', 'Manjaro'].includes(uaPlatform)) { - setPlatform('Linux'); - } else { - setPlatform(uaPlatform); - } - }, []); - const {siteConfig} = useDocusaurusContext(); + docsPluginId }) { + const { siteConfig } = useDocusaurusContext(); const version = useDocsVersionCandidates(docsPluginId)[0]; return (
@@ -39,84 +29,32 @@ function HomepageHeader({

- + + + Getting started - -
- Download -
    -
  • - {platform === 'Windows' && - - - Download for Windows - - - } - {platform === 'Linux' && - - - Download for Linux - - - } - {platform === 'Android' && - - - Download for Android - - - } -
  • -
  • - - - Open the web app - - -
  • -
  • - - - Downloads - - -
  • -
-
-
-
- Screenshot -
+
+ Screenshot
- + + ); } -export default function Home({docsPluginId}) { +export default function Home({ docsPluginId }) { const { siteConfig } = useDocusaurusContext(); return (