Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 40 additions & 11 deletions assets/translations/da.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
"show": "Vis kort"
}
},
"areas": {
"commonArea": "Fællesområdet",
"niche": "Nichen"
},
"boardgames": {
"fastavalGame": "Er et Fastaval spil",
"gameAvailable": {
Expand Down Expand Up @@ -135,28 +139,23 @@
"store1": {
"day1": "Onsdag",
"day2": "Tor-Lør",
"day3": "Søndag",
"title": "Epic Panda @ B45"
"day3": "Søndag"
},
"store2": {
"day1": "Fredag",
"day2": "Lørdag",
"day3": "Søndag",
"title": "Allroleplaying @ A07"
"day3": "Søndag"
},
"store3": {
"day1": "Onsdag",
"day2": "Tor-Lør",
"day3": "Søndag",
"title": "Grandmas Gaming Goodies @ A07"
"day3": "Søndag"
},
"store4": {
"day1": "Tor-Lør",
"title": "Bunkern Esbjerg @ Fællesområdet"
"day1": "Tor-Lør"
},
"store5": {
"day1": "Lørdag",
"title": "Artist Alley popup shops @ Fællesområdet"
"day1": "Lørdag"
},
"title": "Butikker"
},
Expand Down Expand Up @@ -272,6 +271,36 @@
"short": "Ons"
}
},
"days": {
"wed": {
"long": "Onsdag",
"short": "Ons"
},
"thu": {
"long": "Torsdag",
"short": "Tor"
},
"fri": {
"long": "Fredag",
"short": "Fre"
},
"sat": {
"long": "Lørdag",
"short": "Lør"
},
"sun": {
"long": "Søndag",
"short": "Søn"
},
"mon": {
"long": "Mandag",
"short": "Man"
},
"tue": {
"long": "Tirsdag",
"short": "Tir"
}
},
"screenTitle": {
"boardgames": "Brætspil",
"favorites": "Favoritter",
Expand All @@ -286,4 +315,4 @@
"settings": {
"title": "Indstillinger"
}
}
}
51 changes: 40 additions & 11 deletions assets/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
"show": "Show map"
}
},
"areas": {
"commonArea": "Common Area",
"niche": "The Niche"
},
"boardgames": {
"fastavalGame": "is a Fastaval game",
"gameAvailable": {
Expand Down Expand Up @@ -135,28 +139,23 @@
"store1": {
"day1": "Wednesday",
"day2": "Thu-Sat",
"day3": "Sunday",
"title": "Epic Panda @ B45"
"day3": "Sunday"
},
"store2": {
"day1": "Friday",
"day2": "Saturday",
"day3": "Sunday",
"title": "Allroleplaying @ A07"
"day3": "Sunday"
},
"store3": {
"day1": "Wednesday",
"day2": "Thu-Sat",
"day3": "Sunday",
"title": "Grandmas Gaming Goodies @ A07"
"day3": "Sunday"
},
"store4": {
"day1": "Thu-Sat",
"title": "Bunkern Esbjerg @ Common Area"
"day1": "Thu-Sat"
},
"store5": {
"day1": "Saturday",
"title": "Artist Alley popup shops @ Common Area"
"day1": "Saturday"
},
"title": "Shops"
},
Expand Down Expand Up @@ -272,6 +271,36 @@
"short": "Wed"
}
},
"days": {
"wed": {
"long": "Wednesday",
"short": "Wed"
},
"thu": {
"long": "Thursday",
"short": "Thu"
},
"fri": {
"long": "Friday",
"short": "Fri"
},
"sat": {
"long": "Saturday",
"short": "Sat"
},
"sun": {
"long": "Sunday",
"short": "Sun"
},
"mon": {
"long": "Monday",
"short": "Mon"
},
"tue": {
"long": "Tuesday",
"short": "Tue"
}
},
"screenTitle": {
"boardgames": "Board Games",
"favorites": "Favorites",
Expand All @@ -286,4 +315,4 @@
"settings": {
"title": "Settings"
}
}
}
12 changes: 6 additions & 6 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 33;
CURRENT_PROJECT_VERSION = 34;
ENABLE_BITCODE = NO;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
Expand All @@ -400,7 +400,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.2.11;
MARKETING_VERSION = 1.2.12;
PRODUCT_BUNDLE_IDENTIFIER = dk.fastaval.fastavappen;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
Expand Down Expand Up @@ -541,7 +541,7 @@
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 33;
CURRENT_PROJECT_VERSION = 34;
ENABLE_BITCODE = NO;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
Expand All @@ -553,7 +553,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.2.11;
MARKETING_VERSION = 1.2.12;
PRODUCT_BUNDLE_IDENTIFIER = dk.fastaval.fastavappen;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
Expand All @@ -576,7 +576,7 @@
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 33;
CURRENT_PROJECT_VERSION = 34;
ENABLE_BITCODE = NO;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
Expand All @@ -588,7 +588,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.2.11;
MARKETING_VERSION = 1.2.12;
PRODUCT_BUNDLE_IDENTIFIER = dk.fastaval.fastavappen;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
Expand Down
32 changes: 24 additions & 8 deletions lib/controllers/app.controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,20 @@ class AppController extends GetxController {
if (user.id == 0) return;

fetchingUser(true);
User newUser = await fetchUser(user.id.toString(), user.password);
newUser.password = user.password;
try {
User newUser = await fetchUser(user.id.toString(), user.password);
newUser.password = user.password;

await UserService().setUser(newUser);
updateUser(newUser);
fetchingUser(false);
await UserService().setUser(newUser);
updateUser(newUser);
} catch (e) {
// If fetching the user fails (e.g. invalid stored credentials), logout
// and prevent the exception from bubbling up during app init.
logout();
return;
} finally {
fetchingUser(false);
}
}

Future<void> login(String id, String password) async {
Expand All @@ -75,15 +83,23 @@ class AppController extends GetxController {
}

void logout() {
var boardCtrl = Get.find<BoardGameController>();
// Only attempt to access BoardGameController if it's been registered
BoardGameController? boardCtrl;
if (Get.isRegistered<BoardGameController>()) {
boardCtrl = Get.find<BoardGameController>();
}

UserService().removeUser();
user.id = 0;
user.password = '';
loggedIn(false);
updateNavIndex(0);
Fluttertoast.showToast(msg: tr('logout.message'));

boardCtrl.availableBoardgames.clear();
boardCtrl.chosenBoardgames.clear();
// If the controller exists, clear its selections. Otherwise skip.
if (boardCtrl != null) {
boardCtrl.availableBoardgames.clear();
boardCtrl.chosenBoardgames.clear();
}
}
}
68 changes: 0 additions & 68 deletions lib/core/constants/app_constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,72 +29,4 @@ class AppConstants {
"value": "+4598512300",
"name": "98 51 23 00",
};

static const Map<String, String> heroForcePhoneNumber = {
"value": "+4593903568",
"name": "93 90 35 68",
};

static const Map<String, String> dutyGeneralPhoneNumber = {
"value": "+4593903569",
"name": "93 90 35 69",
};

static const Map<String, String> safetyHostPhoneNumber = {
"value": "+4593903567",
"name": "93 90 35 67",
};

// Service Opening Hours
static const Map<String, Map<String, String>> serviceOpeningHours = {
"bar": {
"day1": "17:00 - 02:00",
},
"boardGames": {
"day1": "09:00 - 02:00",
"day2": "09:00 - 15:00",
},
"coffeeCafe": {
"day1": "11:00 - 01:00",
"day2": "09:00 - 01:00",
"day3": "09:00 - 15:00",
},
"information": {
"day1": "15:00 - 20:30",
"day2": "09:30 - 20:30",
"day3": "09:30 - 17:00",
},
"kiosk": {
"day1": "08:00 - 20:00",
"day2": "08:00 - 16:00",
},
"ottosLivingRoom": {
"day1": "15:00 - 01:00",
},
};

// Store Opening Hours
static const Map<String, Map<String, String>> storeOpeningHours = {
"store1": {
"day1": "15:00 - 23:00",
"day2": "10:00 - 23:00",
"day3": "10:00 - 15:00",
},
"store2": {
"day1": "11:00 - 18:00",
"day2": "13:00 - 17:00",
"day3": "14:00 - 17:00",
},
"store3": {
"day1": "15:00 - 20:00",
"day2": "09:30 - 20:00",
"day3": "09:30 - 18:00",
},
"store4": {
"day1": "10:00 - 22:00",
},
"store5": {
"day1": "12:00 - 18:00",
},
};
}
2 changes: 1 addition & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ void main() async {

await Get.put(SettingsController()).init();
await Get.put(AppController()).init();
await Get.put(ProgramController()).init();
await Get.put(BoardGameController()).init();
await Get.put(ProgramController()).init();
await Get.put(NotificationController()).init();

runApp(
Expand Down
Loading
Loading