diff --git a/README.md b/README.md index 03b692c..80b6022 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ Az összes (ugyan azon verzióhoz tartozó) contribution meg fog jelenni a relea **vrolandd, TMarccci:** head developer -**dwe., xou, SebRHQ:** designer +**dwe., xou:** designer **Péter:** video editor diff --git a/filcnaplo/.gitignore b/filcnaplo/.gitignore index 29a3a50..24476c5 100644 --- a/filcnaplo/.gitignore +++ b/filcnaplo/.gitignore @@ -27,6 +27,7 @@ migrate_working_dir/ .dart_tool/ .flutter-plugins .flutter-plugins-dependencies +.packages .pub-cache/ .pub/ /build/ diff --git a/filcnaplo/ios/Runner.xcodeproj/project.pbxproj b/filcnaplo/ios/Runner.xcodeproj/project.pbxproj index 790b003..df89d5d 100644 --- a/filcnaplo/ios/Runner.xcodeproj/project.pbxproj +++ b/filcnaplo/ios/Runner.xcodeproj/project.pbxproj @@ -253,9 +253,9 @@ 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3127F74F28EAEC8A00C2EFB3 /* Embed Foundation Extensions */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 71459C0EB905E05018E3D78F /* [CP] Embed Pods Frameworks */, - 3127F74F28EAEC8A00C2EFB3 /* Embed Foundation Extensions */, ); buildRules = ( ); diff --git a/filcnaplo/ios/livecard/livecard.swift b/filcnaplo/ios/livecard/livecard.swift index ab37a77..f873311 100644 --- a/filcnaplo/ios/livecard/livecard.swift +++ b/filcnaplo/ios/livecard/livecard.swift @@ -91,14 +91,15 @@ struct LockScreenLiveActivityView: View { Text(timerInterval: lesson!.date, countsDown: true) .multilineTextAlignment(.center) .frame(width: 85) - .font(.title) + .font(.title2) .monospacedDigit() .padding(.trailing, CGFloat(24)) } .activityBackgroundTint( - lesson!.color == "#676767" - ? nil - : Color(hex: lesson!.color) + lesson!.color != "#676767" + ? Color(hex: lesson!.color) + // Ha nem megy hat nem megy + : Color.clear ) } } @@ -118,12 +119,22 @@ struct LiveCardWidget: Widget { DynamicIslandExpandedRegion(.leading) { VStack { Spacer() - Image(systemName: lesson!.icon) - .resizable() - .aspectRatio(contentMode: .fit) - .frame(width: CGFloat(30), height: CGFloat(30)) - .padding(.leading, CGFloat(6)) - .padding(.bottom, CGFloat(6)) + ProgressView( + timerInterval: lesson!.date, + countsDown: true, + label: { + Image(systemName: lesson!.icon) + .resizable() + .aspectRatio(contentMode: .fit) + .frame(width: CGFloat(32), height: CGFloat(32)) + }, + currentValueLabel: { + Image(systemName: lesson!.icon) + .resizable() + .aspectRatio(contentMode: .fit) + .frame(width: CGFloat(32), height: CGFloat(32)) + } + ).progressViewStyle(.circular) } } DynamicIslandExpandedRegion(.center) { @@ -136,7 +147,7 @@ struct LiveCardWidget: Widget { Text(lesson!.description) .lineLimit(2) .font(.caption) - } + }.padding(EdgeInsets(top: 0.0, leading: 5.0, bottom: 0.0, trailing: 0.0)) } DynamicIslandExpandedRegion(.trailing) { VStack { @@ -156,7 +167,8 @@ struct LiveCardWidget: Widget { Image(systemName: lesson!.icon) } .font(.caption2) - } compactTrailing: { + } + compactTrailing: { Text(timerInterval: lesson!.date, countsDown: true) .multilineTextAlignment(.center) .frame(width: 40) @@ -164,22 +176,29 @@ struct LiveCardWidget: Widget { /// Collapsed } minimal: { - VStack(alignment: .center) { - Image(systemName: lesson!.icon) - .resizable() - .aspectRatio(contentMode: .fit) - .frame(width: CGFloat(12), height: CGFloat(12)) - - Text(timerInterval: lesson!.date, countsDown: true) - .multilineTextAlignment(.center) - .monospacedDigit() - .font(.system(size: CGFloat(10))) - } + VStack(alignment: .center, content: { + ProgressView( + timerInterval: lesson!.date, + countsDown: true, + label: { + Image(systemName: lesson!.icon) + .resizable() + .aspectRatio(contentMode: .fit) + .frame(width: CGFloat(12), height: CGFloat(12)) + }, + currentValueLabel: { + Image(systemName: lesson!.icon) + .resizable() + .aspectRatio(contentMode: .fit) + .frame(width: CGFloat(12), height: CGFloat(12)) + } + ).progressViewStyle(.circular) + }) } .keylineTint( - lesson!.color == "#676767" - ? nil - : Color(hex: lesson!.color) + lesson!.color != "#676767" + ? Color(hex: lesson!.color) + : Color.clear ) } } diff --git a/filcnaplo/lib/api/providers/live_card_provider.dart b/filcnaplo/lib/api/providers/live_card_provider.dart index e7d9120..ccb278c 100644 --- a/filcnaplo/lib/api/providers/live_card_provider.dart +++ b/filcnaplo/lib/api/providers/live_card_provider.dart @@ -88,7 +88,7 @@ class LiveCardProvider extends ChangeNotifier { // Debugging static DateTime _now() { - // return DateTime(2023, 8, 31, 8, 0); + // return DateTime(2023, 9, 27, 9, 30); return DateTime.now(); } @@ -120,7 +120,7 @@ class LiveCardProvider extends ChangeNotifier { "index": currentLesson != null ? '${currentLesson!.lessonIndex}. ' : "", "title": currentLesson != null - ? ShortSubject.resolve(subject: currentLesson?.subject).capital() + ? currentLesson?.subject.renamedTo ?? ShortSubject.resolve(subject: currentLesson?.subject).capital() : "", "subtitle": currentLesson?.room.replaceAll("_", " ") ?? "", "description": currentLesson?.description ?? "", @@ -131,7 +131,7 @@ class LiveCardProvider extends ChangeNotifier { _delay.inMilliseconds) .toString(), "nextSubject": nextLesson != null - ? ShortSubject.resolve(subject: nextLesson?.subject).capital() + ? nextLesson?.subject.renamedTo ?? ShortSubject.resolve(subject: nextLesson?.subject).capital() : "", "nextRoom": nextLesson?.room.replaceAll("_", " ") ?? "", }; @@ -160,7 +160,7 @@ class LiveCardProvider extends ChangeNotifier { _delay.inMilliseconds) .toString(), "nextSubject": (nextLesson != null - ? ShortSubject.resolve(subject: nextLesson?.subject) + ? nextLesson?.subject.renamedTo ?? ShortSubject.resolve(subject: nextLesson?.subject).capital() : "") .capital(), "nextRoom": nextLesson?.room.replaceAll("_", " ") ?? "",