Skip to content
This repository has been archived by the owner on Aug 19, 2022. It is now read-only.

Commit

Permalink
feat: rewrite stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Tricked-dev committed Feb 27, 2022
1 parent f99413a commit 235b9f3
Show file tree
Hide file tree
Showing 14 changed files with 763 additions and 464 deletions.
11 changes: 1 addition & 10 deletions lib/config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class Config {

static Future<void> initDb() async {
isar = await Isar.open(
schemas: [InstalledModSchema],
schemas: [InstalledModSchema, VersionSchema],
name: "data",
directory: Config.appDir,
inspector: true,
Expand Down Expand Up @@ -80,13 +80,4 @@ class Config {
static bool get icons {
return _icons;
}

static set newMenu(bool v) {
Config.preferences?.setBool("new_menu", v);
_newMenu = v;
}

static bool get newMenu {
return _newMenu;
}
}
4 changes: 0 additions & 4 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import 'package:path_provider/path_provider.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:tmodinstaller/config.dart';
import 'package:tmodinstaller/src/models/models.dart';
import 'package:tmodinstaller/src/screens/login.dart';
import 'package:tmodinstaller/src/screens/modlist.dart';
import 'package:tmodinstaller/src/screens/settings.dart';
import 'package:tmodinstaller/src/screens/updater.dart';
Expand All @@ -29,7 +28,6 @@ import 'package:url_launcher/link.dart';
import 'package:url_strategy/url_strategy.dart';
import 'package:window_manager/window_manager.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:simple_auth_flutter/simple_auth_flutter.dart';

void main(List<String> args) async {
WidgetsFlutterBinding.ensureInitialized();
Expand Down Expand Up @@ -129,7 +127,6 @@ class _TModInstallerPageState extends State<TModInstallerPage> {
@override
void initState() {
super.initState();
SimpleAuthFlutter.init(context);
}

int index = 0;
Expand Down Expand Up @@ -216,7 +213,6 @@ class _TModInstallerPageState extends State<TModInstallerPage> {

@override
Widget build(BuildContext context) {
return LoginStatefulWidget();
final appTheme = context.watch<AppTheme>();
final List<String> lastversions = [
"1.8.9",
Expand Down
238 changes: 0 additions & 238 deletions lib/src/models/auth.dart

This file was deleted.

8 changes: 8 additions & 0 deletions lib/src/models/models.dart
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,11 @@ class InstalledMod {
late String repo;
late String mcv;
}

@Collection()
class Version {
@Id()
int? id;
late String moddir;
late String version;
}
Loading

0 comments on commit 235b9f3

Please sign in to comment.