This repository has been archived by the owner on Apr 25, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #97 from CCXXXI/dev
Dev
- Loading branch information
Showing
27 changed files
with
308 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
ignore: | ||
- flutter_web_plugins | ||
- package_info_plus_web | ||
- shared_preferences_web |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import 'package:flutter_settings_screens/flutter_settings_screens.dart'; | ||
import 'package:get/get.dart'; | ||
|
||
import '../utils/gu.dart'; | ||
|
||
class SettingsLogic extends GetxController { | ||
bool get loggedIn => id != null; | ||
|
||
String? get id => Settings.getValue('id', null); | ||
|
||
String? get username => Settings.getValue('username', null); | ||
|
||
void login() => gu(); // todo | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:font_awesome_flutter/font_awesome_flutter.dart'; | ||
import 'package:get/get.dart'; | ||
|
||
import '../utils/messages.dart'; | ||
import 'settings_logic.dart'; | ||
|
||
class SettingsPage extends StatelessWidget { | ||
SettingsPage({Key? key}) : super(key: key); | ||
|
||
final logic = Get.put(SettingsLogic()); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return ListView( | ||
children: [ | ||
user(), | ||
const Divider(), | ||
const Placeholder(), | ||
], | ||
); | ||
} | ||
|
||
Widget user() => logic.loggedIn | ||
? ListTile( | ||
leading: const Icon(Icons.person), | ||
trailing: const Icon(Icons.logout), | ||
title: Text(logic.username!), | ||
subtitle: Text(logic.id!), | ||
) | ||
: ListTile( | ||
leading: const FaIcon(FontAwesomeIcons.userSecret), | ||
trailing: const Icon(Icons.login), | ||
title: Text('Anonymous'.s), | ||
subtitle: Text('Tap to login.'.s), | ||
onTap: logic.login, | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import 'package:get/get.dart'; | ||
|
||
class TimetableLogic extends GetxController {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:get/get.dart'; | ||
|
||
import 'timetable_logic.dart'; | ||
|
||
class TimetablePage extends StatelessWidget { | ||
TimetablePage({Key? key}) : super(key: key); | ||
|
||
final logic = Get.put(TimetableLogic()); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return const Placeholder(color: Colors.green); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import 'package:get/get.dart'; | ||
|
||
class ToolboxLogic extends GetxController {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:get/get.dart'; | ||
|
||
import 'toolbox_logic.dart'; | ||
|
||
class ToolboxPage extends StatelessWidget { | ||
ToolboxPage({Key? key}) : super(key: key); | ||
|
||
final logic = Get.put(ToolboxLogic()); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return const Placeholder(color: Colors.red); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import 'dart:math'; | ||
|
||
import 'package:get/get.dart'; | ||
|
||
final _random = Random(); | ||
|
||
String _r(int i) => '🕊' * _random.nextInt((Get.width / i - 1).floor()); | ||
|
||
void gu() { | ||
Get.snackbar(_r(24), _r(20)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,14 @@ | ||
import 'package:get/get.dart'; | ||
|
||
import 'pangu.dart'; | ||
|
||
// package_info_plus 1.0.6 cannot get real info on windows | ||
// record them manually | ||
const appName = 'ECNU Timetable'; | ||
const packageName = 'io.github.ccxxxi.ecnu_timetable'; | ||
const version = '0.2.0'; | ||
const buildNumber = '3'; | ||
const version = '0.3.0'; | ||
const buildNumber = '4'; | ||
|
||
extension Messages on String { | ||
String get t { | ||
return spacingText(tr); | ||
String get s { | ||
return spacingText(this); | ||
} | ||
} |
Oops, something went wrong.