forked from firka/student-legacy
finished main premium authentication shit
This commit is contained in:
parent
de1e9fd8f4
commit
af13555afb
@ -17,16 +17,26 @@
|
|||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
<intent-filter android:autoVerify="true">
|
<!-- Deep Links -->
|
||||||
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.VIEW" />
|
<action android:name="android.intent.action.VIEW" />
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
<category android:name="android.intent.category.BROWSABLE" />
|
<category android:name="android.intent.category.BROWSABLE" />
|
||||||
<!-- Accepts URIs that begin with https://api.refilcapp.hu -->
|
<!-- Accepts URIs that begin with YOUR_SCHEME://YOUR_HOST -->
|
||||||
|
<data
|
||||||
|
android:scheme="refilcapp"
|
||||||
|
android:host="refilc.hu" />
|
||||||
|
</intent-filter>
|
||||||
|
<!-- <intent-filter android:autoVerify="true">
|
||||||
|
<action android:name="android.intent.action.VIEW" />
|
||||||
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
<category android:name="android.intent.category.BROWSABLE" />
|
||||||
|
<!- Accepts URIs that begin with https://api.refilc.hu ->
|
||||||
<data
|
<data
|
||||||
android:scheme="https"
|
android:scheme="https"
|
||||||
android:host="api.refilcapp.hu"
|
android:host="api.refilc.hu"
|
||||||
android:pathPrefix="/v1/auth/callback" />
|
android:pathPrefix="/v2/rf-plus/auth/finish" />
|
||||||
</intent-filter>
|
</intent-filter> -->
|
||||||
<intent-filter android:autoVerify="true">
|
<intent-filter android:autoVerify="true">
|
||||||
<action android:name="android.intent.action.VIEW" />
|
<action android:name="android.intent.action.VIEW" />
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
@ -27,8 +27,11 @@ class FilcAPI {
|
|||||||
static const ads = "$baseUrl/v1/private/ads";
|
static const ads = "$baseUrl/v1/private/ads";
|
||||||
static const config = "$baseUrl/v1/private/config";
|
static const config = "$baseUrl/v1/private/config";
|
||||||
static const reportApi = "$baseUrl/v1/private/crash-report";
|
static const reportApi = "$baseUrl/v1/private/crash-report";
|
||||||
static const premiumApi = "https://api.filcnaplo.hu/premium/activate";
|
static const rfPlus = "$baseUrl/v2/rf-plus";
|
||||||
// static const premiumScopesApi = "https://api.filcnaplo.hu/premium/scopes";
|
static const plusAuthLogin = "$rfPlus/auth/login";
|
||||||
|
static const plusAuthCallback = "$rfPlus/auth/callback";
|
||||||
|
static const plusActivation = "$rfPlus/activate";
|
||||||
|
static const plusScopes = "$rfPlus/scopes";
|
||||||
|
|
||||||
// Updates
|
// Updates
|
||||||
static const repo = "refilc/naplo";
|
static const repo = "refilc/naplo";
|
||||||
|
@ -6,7 +6,6 @@ import 'package:filcnaplo/models/config.dart';
|
|||||||
import 'package:filcnaplo/models/icon_pack.dart';
|
import 'package:filcnaplo/models/icon_pack.dart';
|
||||||
import 'package:filcnaplo/theme/colors/accent.dart';
|
import 'package:filcnaplo/theme/colors/accent.dart';
|
||||||
import 'package:filcnaplo/theme/colors/dark_mobile.dart';
|
import 'package:filcnaplo/theme/colors/dark_mobile.dart';
|
||||||
import 'package:refilc_plus/models/premium_scopes.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:uuid/uuid.dart';
|
import 'package:uuid/uuid.dart';
|
||||||
|
|
||||||
@ -338,9 +337,9 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
customHighlightColor: const Color(0xff222222),
|
customHighlightColor: const Color(0xff222222),
|
||||||
customIconColor: const Color(0x00000000),
|
customIconColor: const Color(0x00000000),
|
||||||
shadowEffect: true,
|
shadowEffect: true,
|
||||||
premiumScopes: [PremiumScopes.all],
|
premiumScopes: [],
|
||||||
premiumAccessToken: "igen",
|
premiumAccessToken: "",
|
||||||
premiumLogin: "igen",
|
premiumLogin: "",
|
||||||
lastAccountId: "",
|
lastAccountId: "",
|
||||||
renameSubjectsEnabled: false,
|
renameSubjectsEnabled: false,
|
||||||
renameSubjectsItalics: false,
|
renameSubjectsItalics: false,
|
||||||
|
@ -22,8 +22,8 @@ class PremiumScreen extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final middleColor = Theme.of(context).brightness == Brightness.dark
|
final middleColor = Theme.of(context).brightness == Brightness.dark
|
||||||
? const Color.fromARGB(255, 20, 57, 46)
|
? const Color.fromARGB(255, 20, 33, 57)
|
||||||
: const Color.fromARGB(255, 10, 140, 123);
|
: const Color.fromARGB(255, 10, 55, 140);
|
||||||
|
|
||||||
final future = FilcAPI.getSupporters();
|
final future = FilcAPI.getSupporters();
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ class PremiumScreen extends StatelessWidget {
|
|||||||
begin: Alignment.topCenter,
|
begin: Alignment.topCenter,
|
||||||
end: Alignment.bottomCenter,
|
end: Alignment.bottomCenter,
|
||||||
colors: [
|
colors: [
|
||||||
const Color(0xff124F3D),
|
const Color.fromARGB(255, 65, 51, 143),
|
||||||
middleColor,
|
middleColor,
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -85,25 +85,36 @@ class PremiumScreen extends StatelessWidget {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
const SizedBox(height: 64.0),
|
const SizedBox(height: 64.0),
|
||||||
Image.asset("assets/images/logo.png"),
|
Row(
|
||||||
|
children: [
|
||||||
|
Image.asset(
|
||||||
|
"assets/icons/ic_rounded.png",
|
||||||
|
width: 69.0,
|
||||||
|
height: 69.0,
|
||||||
|
),
|
||||||
|
const SizedBox(
|
||||||
|
width: 15.0,
|
||||||
|
),
|
||||||
|
const Text(
|
||||||
|
"reFilc+",
|
||||||
|
style: TextStyle(
|
||||||
|
fontWeight: FontWeight.w800,
|
||||||
|
fontSize: 35.0,
|
||||||
|
color: Colors.white),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
const SizedBox(height: 12.0),
|
const SizedBox(height: 12.0),
|
||||||
const Text(
|
const Text(
|
||||||
"Még több filc.",
|
"Még több reFilc, olcsóbban, mint bármi más!*",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
fontSize: 25.0,
|
fontSize: 25.0,
|
||||||
color: Colors.white),
|
color: Colors.white),
|
||||||
),
|
),
|
||||||
const Text(
|
|
||||||
"reFilc Premium.",
|
|
||||||
style: TextStyle(
|
|
||||||
fontWeight: FontWeight.w800,
|
|
||||||
fontSize: 35.0,
|
|
||||||
color: Colors.white),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 15.0),
|
const SizedBox(height: 15.0),
|
||||||
Text(
|
Text(
|
||||||
"Támogasd a filcet, és szerezz cserébe pár kényelmes jutalmat!",
|
"Támogasd a QwIT** csapatát, és szerezz cserébe pár kényelmes jutalmat!",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
// ignore_for_file: no_leading_underscores_for_local_identifiers, use_build_context_synchronously, deprecated_member_use
|
// ignore_for_file: no_leading_underscores_for_local_identifiers, use_build_context_synchronously, deprecated_member_use
|
||||||
|
|
||||||
import 'package:filcnaplo/api/providers/update_provider.dart';
|
import 'package:filcnaplo/api/providers/update_provider.dart';
|
||||||
|
import 'package:filcnaplo/theme/colors/accent.dart';
|
||||||
|
import 'package:filcnaplo/theme/observer.dart';
|
||||||
import 'package:filcnaplo_kreta_api/providers/absence_provider.dart';
|
import 'package:filcnaplo_kreta_api/providers/absence_provider.dart';
|
||||||
import 'package:filcnaplo_kreta_api/providers/event_provider.dart';
|
import 'package:filcnaplo_kreta_api/providers/event_provider.dart';
|
||||||
import 'package:filcnaplo_kreta_api/providers/exam_provider.dart';
|
import 'package:filcnaplo_kreta_api/providers/exam_provider.dart';
|
||||||
@ -35,6 +37,7 @@ import 'package:filcnaplo_mobile_ui/screens/settings/modify_subject_names.dart';
|
|||||||
import 'package:filcnaplo_mobile_ui/screens/settings/notifications_screen.dart';
|
import 'package:filcnaplo_mobile_ui/screens/settings/notifications_screen.dart';
|
||||||
import 'package:filcnaplo_mobile_ui/screens/settings/privacy_view.dart';
|
import 'package:filcnaplo_mobile_ui/screens/settings/privacy_view.dart';
|
||||||
import 'package:filcnaplo_mobile_ui/screens/settings/settings_helper.dart';
|
import 'package:filcnaplo_mobile_ui/screens/settings/settings_helper.dart';
|
||||||
|
import 'package:refilc_plus/providers/premium_provider.dart';
|
||||||
import 'package:refilc_plus/ui/mobile/settings/app_icon_screen.dart';
|
import 'package:refilc_plus/ui/mobile/settings/app_icon_screen.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
@ -1130,19 +1133,18 @@ class SettingsScreenState extends State<SettingsScreen>
|
|||||||
),
|
),
|
||||||
// if (Provider.of<PremiumProvider>(context, listen: false)
|
// if (Provider.of<PremiumProvider>(context, listen: false)
|
||||||
// .hasPremium)
|
// .hasPremium)
|
||||||
// PanelButton(
|
PanelButton(
|
||||||
// leading: const Icon(FeatherIcons.key),
|
leading: const Icon(FeatherIcons.key),
|
||||||
// title: const Text("Remove Premium"),
|
title: const Text("Remove Premium"),
|
||||||
// onPressed: () {
|
onPressed: () {
|
||||||
// Provider.of<PremiumProvider>(context, listen: false)
|
Provider.of<PremiumProvider>(context, listen: false)
|
||||||
// .activate(removePremium: true);
|
.activate(removePremium: true);
|
||||||
// settings.update(
|
settings.update(
|
||||||
// accentColor: AccentColor.filc, store: true);
|
accentColor: AccentColor.filc, store: true);
|
||||||
// Provider.of<ThemeModeObserver>(context,
|
Provider.of<ThemeModeObserver>(context, listen: false)
|
||||||
// listen: false)
|
.changeTheme(settings.theme);
|
||||||
// .changeTheme(settings.theme);
|
},
|
||||||
// },
|
),
|
||||||
// ),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user