add credits for images

This commit is contained in:
otsmr 2025-03-23 11:11:23 +01:00
parent 81a4a3cfe1
commit 444edf0230
17 changed files with 189 additions and 17 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 192 KiB

View file

@ -1,6 +1,7 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:twonly/src/database/twonly_database.dart'; import 'package:twonly/src/database/twonly_database.dart';
import 'package:twonly/src/views/contact/contact_verify_view.dart';
class VerifiedShield extends StatelessWidget { class VerifiedShield extends StatelessWidget {
final Contact contact; final Contact contact;
@ -11,13 +12,13 @@ class VerifiedShield extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return GestureDetector( return GestureDetector(
// onTap: () { onTap: () {
// Navigator.push(context, MaterialPageRoute( Navigator.push(context, MaterialPageRoute(
// builder: (context) { builder: (context) {
// return ContactVerifyView(contact); return ContactVerifyView(contact);
// }, },
// )); ));
// }, },
child: Tooltip( child: Tooltip(
message: contact.verified message: contact.verified
? "You verified this contact" ? "You verified this contact"

View file

@ -67,7 +67,8 @@
"settingsHelpSupport": "Support-Center", "settingsHelpSupport": "Support-Center",
"settingsHelpDiagnostics": "Diagnoseprotokoll", "settingsHelpDiagnostics": "Diagnoseprotokoll",
"settingsHelpVersion": "Version", "settingsHelpVersion": "Version",
"settingsHelpLicenses": "Lizenzen", "settingsHelpLicenses": "Lizenzen (Source-Code)",
"settingsHelpCredits": "Lizenzen (Bilder)",
"settingsHelpLegal": "Nutzungsbedingungen & Datenschutzrichtlinie", "settingsHelpLegal": "Nutzungsbedingungen & Datenschutzrichtlinie",
"settingsAppearanceTheme": "Theme", "settingsAppearanceTheme": "Theme",
"settingsAccountDeleteAccount": "Konto löschen", "settingsAccountDeleteAccount": "Konto löschen",

View file

@ -68,7 +68,8 @@
"settingsHelpDiagnostics": "Diagnostic protocol", "settingsHelpDiagnostics": "Diagnostic protocol",
"settingsHelpSupport": "Support Center", "settingsHelpSupport": "Support Center",
"settingsHelpVersion": "Version", "settingsHelpVersion": "Version",
"settingsHelpLicenses": "Licenses", "settingsHelpLicenses": "Licenses (Source-Code)",
"settingsHelpCredits": "Licenses (Images)",
"settingsHelpLegal": "Terms & Privacy Policy", "settingsHelpLegal": "Terms & Privacy Policy",
"settingsAppearanceTheme": "Theme", "settingsAppearanceTheme": "Theme",
"settingsAccountDeleteAccount": "Delete account", "settingsAccountDeleteAccount": "Delete account",

View file

@ -136,6 +136,8 @@ Future notifyContactsAboutProfileChange() async {
for (Contact contact in contacts) { for (Contact contact in contacts) {
if (contact.myAvatarCounter < user.avatarCounter!) { if (contact.myAvatarCounter < user.avatarCounter!) {
twonlyDatabase.contactsDao.updateContact(contact.userId,
ContactsCompanion(myAvatarCounter: Value(user.avatarCounter!)));
encryptAndSendMessage( encryptAndSendMessage(
null, null,
contact.userId, contact.userId,

View file

@ -197,7 +197,7 @@ Future<client.Response> handleNewMessage(int fromUserId, Uint8List body) async {
break; break;
case MessageKind.acceptRequest: case MessageKind.acceptRequest:
final update = ContactsCompanion(accepted: Value(true)); final update = ContactsCompanion(accepted: Value(true));
twonlyDatabase.contactsDao.updateContact(fromUserId, update); await twonlyDatabase.contactsDao.updateContact(fromUserId, update);
localPushNotificationNewMessage(fromUserId.toInt(), message, 8888888); localPushNotificationNewMessage(fromUserId.toInt(), message, 8888888);
notifyContactsAboutProfileChange(); notifyContactsAboutProfileChange();
break; break;

View file

@ -68,6 +68,7 @@ class _SearchUsernameView extends State<SearchUsernameView> {
), ),
); );
} }
notifyContactsAboutProfileChange();
} }
} else { } else {
showAlertDialog(context, context.lang.searchUsernameNotFound, showAlertDialog(context, context.lang.searchUsernameNotFound,

View file

@ -0,0 +1,164 @@
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:twonly/src/utils/misc.dart';
import 'package:url_launcher/url_launcher.dart';
class UrlListTitle extends StatelessWidget {
final String title;
final String url;
final String? subtitle;
const UrlListTitle(
{super.key, required this.title, required this.url, this.subtitle});
@override
Widget build(BuildContext context) {
return ListTile(
title: Text(title),
subtitle: subtitle == null ? null : Text(subtitle!),
onTap: () {
launchUrl(Uri.parse(url));
},
trailing: FaIcon(FontAwesomeIcons.arrowUpRightFromSquare, size: 15),
);
}
}
class CreditsView extends StatelessWidget {
const CreditsView({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(context.lang.settingsHelpCredits),
),
body: ListView(
children: [
UrlListTitle(
title: "twonly Logo",
subtitle: "by Font Awesome (modified)",
url: "https://fontawesome.com/icons/link?f=classic&s=solid",
),
UrlListTitle(
title: "Most Icons",
subtitle: "by Font Awesome",
url: "https://github.com/FortAwesome/Font-Awesome",
),
UrlListTitle(
title: "Animated Emoji",
subtitle: "CC BY 4.0",
url: "https://googlefonts.github.io/noto-emoji-animation/",
),
UrlListTitle(
title: "Avatar Icons",
url: "https://github.com/RoadTripMoustache/avatar_maker",
),
const Divider(),
ListTile(
title: Center(
child: Text(
"Animations",
style: TextStyle(fontWeight: FontWeight.bold),
)),
),
UrlListTitle(
title: "Free selfie fast Animation",
subtitle: "Brandon Ambuila",
url:
"https://lottiefiles.com/free-animation/selfie-fast-JZx4Ftrg1E",
),
UrlListTitle(
title: "Free Security status - Safe Animation",
subtitle: "Yogesh Pal",
url:
"https://lottiefiles.com/free-animation/security-status-safe-CePJPAwLVx",
),
UrlListTitle(
title: "Free send mail Animation",
subtitle: "jignesh gajjar",
url: "https://lottiefiles.com/free-animation/send-mail-3pvzm2kmNq",
),
UrlListTitle(
title: "Free Present for you Animation",
subtitle: "Tatsiana Melnikova",
url:
"https://lottiefiles.com/free-animation/present-for-you-QalWyuNptY",
),
UrlListTitle(
title: "Free Take a photo Animation",
subtitle: "Nguyễn Như Lân",
url:
"https://lottiefiles.com/free-animation/take-a-photo-CzOUerxwPP?color-palette=true",
),
UrlListTitle(
title: "Kostenlose Valentine's Day-Animation",
subtitle: "Strezha",
url:
"https://lottiefiles.com/de/free-animation/valentines-day-1UiMkPHnPK?color-palette=true",
),
const Divider(),
ListTile(
title: Center(
child: Text(
"Filters",
style: TextStyle(fontWeight: FontWeight.bold),
)),
),
UrlListTitle(
title: "Germany",
subtitle: "by GDJ",
url:
"https://pixabay.com/vectors/republic-germany-deutschland-map-1220652/",
),
UrlListTitle(
title: "Frankfurt am Main",
subtitle: "by GDJ",
url:
"https://pixabay.com/vectors/frankfurt-germany-skyline-cityscape-3166262/",
),
UrlListTitle(
title: "Avo Cardio",
subtitle: "by RalfDesign",
url:
"https://pixabay.com/illustrations/avocado-cartoon-funny-cardio-gym-4570642/",
),
UrlListTitle(
title: "Sloth",
subtitle: "by RalfDesign",
url:
"https://pixabay.com/illustrations/sloth-swimming-summer-pool-cartoon-4575121/",
),
UrlListTitle(
title: "Sloth",
subtitle: "by RalfDesign",
url:
"https://pixabay.com/illustrations/sloth-swimming-summer-pool-cartoon-4575121/",
),
UrlListTitle(
title: "Duck",
subtitle: "by lachkegeetanjali",
url:
"https://pixabay.com/de/vectors/ente-gans-meme-lustig-k%C3%A4mpfen-8409656/",
),
UrlListTitle(
title: "Lol",
subtitle: "TheDigitalArtist",
url:
"https://pixabay.com/de/illustrations/lachen-lustig-l%C3%A4cheln-spa%C3%9F-meme-7820654/",
),
UrlListTitle(
title: "Yolo",
subtitle: "TheDigitalArtist",
url:
"https://pixabay.com/illustrations/yolo-meme-modern-live-once-phrase-7820660/",
),
UrlListTitle(
title: "Hide The Pain Arold",
url: "https://hidethepainharold.com/",
),
],
),
);
}
}

View file

@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:package_info_plus/package_info_plus.dart'; import 'package:package_info_plus/package_info_plus.dart';
import 'package:twonly/src/utils/misc.dart'; import 'package:twonly/src/utils/misc.dart';
import 'package:twonly/src/views/settings/credits_view.dart';
import 'package:twonly/src/views/settings/diagnostics_view.dart'; import 'package:twonly/src/views/settings/diagnostics_view.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
@ -44,6 +45,14 @@ class HelpView extends StatelessWidget {
showLicensePage(context: context); showLicensePage(context: context);
}, },
), ),
ListTile(
title: Text(context.lang.settingsHelpCredits),
onTap: () {
Navigator.push(context, MaterialPageRoute(builder: (context) {
return CreditsView();
}));
},
),
ListTile( ListTile(
title: Text(context.lang.settingsHelpDiagnostics), title: Text(context.lang.settingsHelpDiagnostics),
onTap: () async { onTap: () async {
@ -57,7 +66,6 @@ class HelpView extends StatelessWidget {
title: Text(context.lang.settingsHelpLegal), title: Text(context.lang.settingsHelpLegal),
onTap: () { onTap: () {
launchUrl(Uri.parse("https://twonly.eu/legal")); launchUrl(Uri.parse("https://twonly.eu/legal"));
// showLicensePage(context: context);
}, },
trailing: trailing:
FaIcon(FontAwesomeIcons.arrowUpRightFromSquare, size: 15), FaIcon(FontAwesomeIcons.arrowUpRightFromSquare, size: 15),

View file

@ -86,7 +86,6 @@ flutter:
assets: assets:
# Add assets from the images directory to the application. # Add assets from the images directory to the application.
- assets/images/ - assets/images/
- assets/images/onboarding/ricky_the_greedy_racoon.png
- assets/animated_icons/ - assets/animated_icons/
- assets/animations/ - assets/animations/
- assets/filters/ - assets/filters/