Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

Commit

Permalink
Dev (#67)
Browse files Browse the repository at this point in the history
* 8 user authentication (#14)

* Update README.md and dependencies

* Add basic app structure and assets

* Implement first models, viewmodels and api calls needed for user auth

* Implement TUM-SSO authentication and update README.md and

* Clean up auth_handler.dart and update routes

* Update userState and userViewModel to use riverpod and rxdart

* Refactor code to improve readability

* Remove unused import

* Clean up code, refactor models, update error-handling

* 31 initial UI views (#53)

* Basic tum login functionality, not yet done internal account

* pushin android and yaml files also

* Added some more views,course overview and setting

* Added mycourses and public courses views,also solved navigation bug

* added bottom bar functionality with solving navigation using route=false

* removed views folder

* changed names of notification file

* Solved navigation bug from notification screen

* Added some photos,cleared login screen and add same on 1 screen and fixed bottom nav bar

* Added reusable widgets,constants,corrrected name for bookmark

* changed bookmarks text to pinned

* added login functionality

* solved login bug

---------

Co-authored-by: ge59dil <[email protected]>

* 32 implement custom errors (#55)

* Rename View->views and ViewModel -> view_model

* Run `dart fix --apply && dart format ./lib`

* Implement error handling for http requests&responses

* 54 set up grpc client (#59)

* Rename `lib/model` -> `lib/models` and `networking/apis` -> `networking/api`

* Update error handling to work with gRPC codes

* Setup proto dir structure

* Implement grpc_handler.dart

* Add (de-)serialization from/to proto

* Implement `fetchUser()` gRPC method in `user_handler.dart` and update `user_viewmodel.dart`

* Add doc

* Fix args & linting in model_generator.dart

* Update dependencies

* Update README.md

* Update `routes.dart` to automatically configure root url

* Update doc

* Add `setup_grpc.sh`

* Tmp (#69)

Update workflow with right bundle id

Co-authored-by: Jakob Körber <[email protected]>

* Update beta release workflow

* 34 clean code base (#83)

* Add config directory for better structure

* Refactor ModelGenerator

* Add Logging in handlers

* Add Logging in handlers

* Add secure storage for the token

* removed Bootstrap

* Add secure storage for the token

* Update `main.dart` to use `StreamBuilder` instead of `StreamProvider`

* Refactor  UserViewModel

* Replace old models with proto models

* Fix linting

* Improve code structure

* Add Theme

* Refactor 'internal_login_screen.dart'

* Refactor

* Refactor: Remove unused TextEditingController instances in WelcomeScreen

- Eliminated declarations of usernameController and passwordController in WelcomeScreen as they were not used.
- Ensured clean and optimized code by removing unnecessary Riverpod provider references.
- Improved overall code readability and maintainability.

* Optimize CourseOverview to Prevent Unnecessary Re-renders

- Resolved issue causing re-renders of AppBar and BottomNavigationBar on tab changes.
- Implemented Column layout to display 'My Courses' and 'Public Courses' sections together, ensuring consistent visibility.
- Added spacing between course sections for better visual clarity and user experience.
- Enhanced layout performance and overall responsiveness of the CourseOverview screen.

* Add code documentation for course_overview and course_section

* Refactor Course Sections for Reusability and Clarity

- Introduced CourseContentScreen to centralize the display logic of course sections.
- Refactored PinnedCourses and DownloadsScreen to use CourseContentScreen, enhancing code reusability.
- Added in-code documentation for clarity and future maintainability.

* Fix INT64 type

* Fix Linting

* Fix colors on TabBar not changing correctly

* Added list view builder in course_view

* changed list view to list view builder in course_view and addressed some trailing commas issue

* added material design switch in setting

* deleteing course outline

* Added base_view for app bar and bottom navigatoe

* Added base_view in course_Screen

* added onViewAll functionality

* no re rendering when click on same page

* Improve the usage of the user Model view.
- Added loading state when clicked on login
    - `handleSSOLogin()`
    - `handleSSOLogin()`
    - Added `BehaviorSubject<bool> isLoading = BehaviorSubject.seeded(false);`

* Refactor `course_card_view.dart` and added documentation for `base_view.dart`, `course_card_view.dart`, `course_overview_view.dart`

* Refactor `ssoAuth` and added documentation

* Refactor `SettingsScreen` and added documentation to `internal_login_view` and `welcome_screen_view`

* Fix in `ssoAuth` when ` Navigator.pushNamed(context, '/home');` called to set the loading state of login to false.

* Fix in `ssoAuth` when ` Navigator.pushNamed(context, '/home');` called to set the loading state of login to false.

* Rename `routes.dart` to `app_config.dart` and moved to the `config` package

* **Refactored** `UserViewModel` and Login Handling**: Moved login logic and `TextEditingController`s into `UserViewModel`

* ## Refactor: Integrate StateNotifier in UserViewModel
- Refactored `UserViewModel` to extend `StateNotifier<UserState>`.
- Eliminated separate `isLoading` BehaviorSubject in `UserViewModel`. All state changes, including loading states, are now handled directly through the unified `UserState` managed by the notifier.

* ## Refactor: Courses views to have `List<VideoCard>` or `List<VideoCard>

* ## Refactor: Courses views to have to make better use of `List.builder` and added a temporary `CourseModel` in course_model.dart that will be replaced once API courses retrieving works.

---------

Co-authored-by: carlobortolan <[email protected]>
Co-authored-by: ge59dil <[email protected]>

* Add redirect after "Continue Without" (#87)

---------

Co-authored-by: Anishyou <[email protected]>
Co-authored-by: ge59dil <[email protected]>
Co-authored-by: Jakob Körber <[email protected]>
Co-authored-by: Achraf Labidi <[email protected]>
  • Loading branch information
5 people authored Dec 3, 2023
1 parent f1cdacc commit 53aaaab
Show file tree
Hide file tree
Showing 115 changed files with 7,232 additions and 184 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/deploy_beta.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Deploy Beta to TestFlight and Play Store

on:
workflow_dispatch:
push:
branches:
- main
Expand Down Expand Up @@ -47,9 +46,9 @@ jobs:
- name: Install Flutter Packages
run: flutter pub get

# - if: matrix.platform == 'ios'
# name: Install CocoaPods
# run: cd ./ios && pod install
- if: matrix.platform == 'ios'
name: Install CocoaPods
run: cd ./ios && pod install

- if: matrix.platform == 'ios'
name: Add SSH Key
Expand Down Expand Up @@ -84,4 +83,4 @@ jobs:
ANDROID_KEYSTORE_FILE: ./upload-keystore
ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}
ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }}
ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }}
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
# The mobile client for [gocast](https://github.com/TUM-Dev/gocast)

This mobile client for [gocast](https://github.com/TUM-Dev/gocast) is currently under development by the [iPraktikum Winter 23/24](https://ase.cit.tum.de/teaching/23w/ipraktikum/) on behalf of the TUM Developers. In order not to influence the grading of the students, we would ask you to refrain from code contributions until **March 2023**. Until then, we look forward to your contributions in our other repositories. Thank you for your understanding!


## Features

- [x] Authentication using internal account
- [x] Authentication using TUM SSO
- [ ] Overview of own and publicly available Lectures
- [ ] Ability to watch lectures (single, multi - view and split - view)
- [ ] Bookmark lectures
- [ ] Automatic notifications if lecture starts
- [ ] Ability to search for lectures
- [ ] Ability to download lectures in a data privacy conform manner (non - exportable and remotely deletable)
- [ ] Ability to answer quizzes and feedback requests

## Config

1. Make sure to have a local [`gocast`](https://github.com/tum-dev/gocast) instance listening on port `8081`.

2. Run `$ flutter run` to start the app.

3. Run `dart fix --apply && dart format ./lib` before commiting new changes.

## Development

| Dependency | Usage | Where to download it |
|------------------------------------------|------------------------------------------|----------------------------------------------|
| `Flutter` (includes the `Dart` compiler) | SDK to develop this app | https://docs.flutter.dev/get-started/install |
| A local instance of [`gocast`](https://github.com/tum-dev/gocast) | API to fetch user data & streams | https://github.com/TUM-Dev/gocast#readme |
2 changes: 2 additions & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="de.tum.gocast_mobile" />
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Generated file.
//
// If you wish to remove Flutter's multidex support, delete this entire file.
//
// Modifications to this file should be done in a copy under a different name
// as this file may be regenerated.

package io.flutter.app;

import android.app.Application;
import android.content.Context;
import androidx.annotation.CallSuper;
import androidx.multidex.MultiDex;

/**
* Extension of {@link android.app.Application}, adding multidex support.
*/
public class FlutterMultiDexApplication extends Application {
@Override
@CallSuper
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
MultiDex.install(this);
}
}
Binary file modified android/app/src/main/res/mipmap-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/course1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/course2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/notification.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/profile_temp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/streamicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions devtools_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
extensions:
1 change: 1 addition & 0 deletions ios/Flutter/Debug.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "Generated.xcconfig"
1 change: 1 addition & 0 deletions ios/Flutter/Release.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Generated.xcconfig"
44 changes: 44 additions & 0 deletions ios/Podfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '11.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}

def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end

File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do
use_frameworks!
use_modular_headers!

flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
target 'RunnerTests' do
inherit! :search_paths
end
end

post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
end
65 changes: 65 additions & 0 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
PODS:
- Flutter (1.0.0)
- flutter_inappwebview (0.0.1):
- Flutter
- flutter_inappwebview/Core (= 0.0.1)
- OrderedSet (~> 5.0)
- flutter_inappwebview/Core (0.0.1):
- Flutter
- OrderedSet (~> 5.0)
- flutter_secure_storage (6.0.0):
- Flutter
- OrderedSet (5.0.0)
- path_provider_foundation (0.0.1):
- Flutter
- FlutterMacOS
- shared_preferences_foundation (0.0.1):
- Flutter
- FlutterMacOS
- uni_links (0.0.1):
- Flutter
- webview_flutter_wkwebview (0.0.1):
- Flutter

DEPENDENCIES:
- Flutter (from `Flutter`)
- flutter_inappwebview (from `.symlinks/plugins/flutter_inappwebview/ios`)
- flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
- uni_links (from `.symlinks/plugins/uni_links/ios`)
- webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/ios`)

SPEC REPOS:
trunk:
- OrderedSet

EXTERNAL SOURCES:
Flutter:
:path: Flutter
flutter_inappwebview:
:path: ".symlinks/plugins/flutter_inappwebview/ios"
flutter_secure_storage:
:path: ".symlinks/plugins/flutter_secure_storage/ios"
path_provider_foundation:
:path: ".symlinks/plugins/path_provider_foundation/darwin"
shared_preferences_foundation:
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
uni_links:
:path: ".symlinks/plugins/uni_links/ios"
webview_flutter_wkwebview:
:path: ".symlinks/plugins/webview_flutter_wkwebview/ios"

SPEC CHECKSUMS:
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
flutter_inappwebview: 3d32228f1304635e7c028b0d4252937730bbc6cf
flutter_secure_storage: 23fc622d89d073675f2eaa109381aefbcf5a49be
OrderedSet: aaeb196f7fef5a9edf55d89760da9176ad40b93c
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126
uni_links: d97da20c7701486ba192624d99bffaaffcfc298a
webview_flutter_wkwebview: 2e2d318f21a5e036e2c3f26171342e95908bd60a

PODFILE CHECKSUM: 70d9d25280d0dd177a5f637cdb0f0b0b12c6a189

COCOAPODS: 1.14.3
Loading

0 comments on commit 53aaaab

Please sign in to comment.