Skip to content

Commit

Permalink
Merge pull request #33 from markxoe/development
Browse files Browse the repository at this point in the history
Version 0.14.1
  • Loading branch information
markxoe authored Feb 12, 2021
2 parents 3b62556 + c60a156 commit 4993449
Show file tree
Hide file tree
Showing 10 changed files with 115 additions and 56 deletions.
16 changes: 15 additions & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Test And Build
on: [push]
jobs:
doall:
testing:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -16,6 +16,20 @@ jobs:
run: npm test
- name: Building
run: npm run build
buildnative:
needs: testing
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: 12
- name: Installing
run: npm ci
- name: Building
run: npm run build
- name: Copy to native apps
run: npx cap copy
- name: Update Android Dependencies
Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ android {
applicationId "org.toastbrot.ichbineinebienemobile"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 31
versionName "0.14.0"
versionCode 32
versionName "0.14.1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
Expand Down
8 changes: 4 additions & 4 deletions ios/App/App.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -353,12 +353,12 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = App/App.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 25;
CURRENT_PROJECT_VERSION = 26;
DEVELOPMENT_TEAM = 7BZBLBDUSX;
INFOPLIST_FILE = App/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 0.14.0;
MARKETING_VERSION = 0.14.1;
OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\"";
PRODUCT_BUNDLE_IDENTIFIER = org.toastbrot.ichbineinebienemobile;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -375,12 +375,12 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = App/App.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 25;
CURRENT_PROJECT_VERSION = 26;
DEVELOPMENT_TEAM = 7BZBLBDUSX;
INFOPLIST_FILE = App/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 0.14.0;
MARKETING_VERSION = 0.14.1;
PRODUCT_BUNDLE_IDENTIFIER = org.toastbrot.ichbineinebienemobile;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = USE_PUSH;
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ichbineinebiene-mobile",
"version": "0.14.0",
"version": "0.14.1",
"private": true,
"dependencies": {
"@capacitor-community/firebase-analytics": "^0.2.0",
Expand Down
6 changes: 6 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ Mark Oude Elberink

## Changelog

### [0.14.1] Chicken Cats :rooster: :cat:

- Discord Link
- Erweiterte Hall of Fame
- Mini Bug Fix

### [0.14.0] Chicken Cats :rooster: :cat:

- Warnung vor Bann
Expand Down
110 changes: 68 additions & 42 deletions src/pages/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,16 @@ import {
IonToolbar,
isPlatform,
useIonViewWillEnter,
IonFabList,
} from "@ionic/react";
import React, { useContext, useEffect, useState } from "react";
import { refreshOutline, storefront, bug } from "ionicons/icons";
import {
refreshOutline,
storefront,
bug,
logoDiscord,
planet,
} from "ionicons/icons";
import "./Home.css";
import packagejs from "../../package.json";
import releaseNotes from "../other/release-notes.json";
Expand Down Expand Up @@ -55,6 +62,7 @@ import {
rotateSpeedLevel,
nameAtHomePositions,
uploadEvent,
generateToast,
} from "../globals";

import { FirebaseAnalyticsPlugin } from "@capacitor-community/firebase-analytics";
Expand Down Expand Up @@ -206,24 +214,35 @@ const Home: React.FC = () => {
}, [state]);

const reactivatePopup = () => {
const el = document.createElement("ion-alert");
el.header = "Goldene Biene";
el.subHeader = "Verliere alles und bekomme eine Goldene Bienen";
el.message =
"Du hast offiziell die Biene durchgespielt.<br/>" +
"Denn du hast mehr als " +
MAX_VALUE +
"Saltos!<br/>" +
"So geht's weiter: Du verlierst jetzt ALLE Bienen, alle Multiplier und alle Saltos.<br/>" +
"<b>ABER du bekommst eine goldene Biene!</b><br/>" +
"Goldene Bienen haben unterschiedliche Farben!<br/>" +
"Es gibt sowieso keine Alternative";
el.buttons = [
{ text: "Erstmal Screenshot machen", role: "cancel" },
{ text: "Let's do it!", handler: () => resetAndGoldenBee() },
];
document.body.appendChild(el);
el.present();
if (
state.biene.additionalBienen.length > MAX_ARRAY_LENGTH ||
state.biene.multiplierLevel > MAX_VALUE ||
state.biene.clickCounter > MAX_VALUE
) {
const el = document.createElement("ion-alert");
el.header = "Goldene Biene";
el.subHeader = "Verliere alles und bekomme eine Goldene Bienen";
el.message =
"Du hast offiziell die Biene durchgespielt.<br/>" +
"Denn du hast mehr als " +
MAX_VALUE +
"Saltos!<br/>" +
"So geht's weiter: Du verlierst jetzt ALLE Bienen, alle Multiplier und alle Saltos.<br/>" +
"<b>ABER du bekommst eine goldene Biene!</b><br/>" +
"Goldene Bienen haben unterschiedliche Farben!<br/>" +
"Es gibt sowieso keine Alternative";
el.buttons = [
{ text: "Erstmal Screenshot machen", role: "cancel" },
{ text: "Let's do it!", handler: () => resetAndGoldenBee() },
];
document.body.appendChild(el);
el.present();
} else {
generateToast(
"Okay, irgendwas stimmt nicht! Starte die Biene bitte neu!"
);
setDisabled(false);
}
};
const resetAndGoldenBee = () => {
uploadEvent(state, { type: "GoldenBee" });
Expand Down Expand Up @@ -496,30 +515,37 @@ const Home: React.FC = () => {
</IonFab>

<IonFab vertical="bottom" horizontal="start" slot="fixed">
<IonFabButton
color="light"
onClick={() => {
const el = document.createElement("ion-alert");
el.message =
"Du hast einen Bug gefunden oder neue Ideen für die Biene?<br/>Her damit!";
el.header = "Bug oder Idee?";
el.buttons = [
{ text: "Nö", role: "cancel" },
{
text: "Gönnung",
handler: () =>
Plugins.Browser.open({
url:
"https://github.com/markxoe/ich-bin-eine-biene-mobile/issues",
}),
},
];
el.translucent = true;
document.body.appendChild(el);
el.present();
}}>
<IonIcon icon={bug} />
<IonFabButton color="light">
<IonIcon icon={planet} />
</IonFabButton>
<IonFabList side="top">
<IonFabButton
onClick={() => {
const el = document.createElement("ion-alert");
el.message =
"Du hast einen Bug gefunden oder neue Ideen für die Biene?<br/>Her damit!";
el.header = "Bug oder Idee?";
el.buttons = [
{ text: "Nö", role: "cancel" },
{
text: "Gönnung",
handler: () =>
Plugins.Browser.open({
url:
"https://github.com/markxoe/ich-bin-eine-biene-mobile/issues",
}),
},
];
el.translucent = true;
document.body.appendChild(el);
el.present();
}}>
<IonIcon icon={bug} />
</IonFabButton>
<IonFabButton href="https://ichbineinebiene.org/dc/">
<IonIcon icon={logoDiscord} />
</IonFabButton>
</IonFabList>
</IonFab>

<IonModal
Expand Down
12 changes: 10 additions & 2 deletions src/pages/Leaderboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
IonToolbar,
useIonViewWillEnter,
IonText,
IonButton,
} from "@ionic/react";
import Axios from "axios";
import React, { useContext, useState, useEffect } from "react";
Expand All @@ -25,7 +26,7 @@ import avatar from "../res/avatar.svg";
import { AppContext } from "../store/State";

const PageLeaderboard: React.FC = () => {
const showNumber = 30;
const [showNumber, setShowNumber] = useState<number>(30);
const [data, setData] = useState<
{
level: number;
Expand Down Expand Up @@ -158,9 +159,16 @@ const PageLeaderboard: React.FC = () => {
)}
</IonItem>
))}

<IonItem hidden={data.length < showNumber}>
Und noch {data.length - showNumber} weitere...
</IonItem>
<IonItem hidden={data.length < showNumber}>
<IonButton onClick={() => setShowNumber((i) => i + 20)}>
20 mehr anzeigen
</IonButton>
</IonItem>

<IonCard>
<IonCardHeader>
<IonCardTitle>So wirst du Erster</IonCardTitle>
Expand All @@ -172,7 +180,7 @@ const PageLeaderboard: React.FC = () => {
<br />
Multiplier zählen weniger als eine Biene
<br />
Goldene Bienen bringen 10000 Punkte
Goldene Bienen bringen 100000 Punkte
</IonCardContent>
</IonCard>
</IonContent>
Expand Down
4 changes: 3 additions & 1 deletion src/pages/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,9 @@ const PageSettings: React.FC = () => {
</a>
</p>
<p>
<a className="no-decoration" href="https://moritz-lerch.de">
<a
className="no-decoration"
href="https://github.com/MoritzLerch">
Moritz
</a>
</p>
Expand Down
7 changes: 5 additions & 2 deletions src/pages/Store.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,13 @@ import Confetti from "react-confetti";
import { FirebaseAnalyticsPlugin } from "@capacitor-community/firebase-analytics";
import { generateName } from "../functions/namegenerator";
import { MAX_VALUE } from "../other/const";
import { useLocation } from "react-router";
const Firebase = Plugins.FirebaseAnalytics as FirebaseAnalyticsPlugin;

const StorePage: React.FC = () => {
const { state, dispatch } = useContext(AppContext);
const [showThx, setShowThx] = useState<boolean>(false);
const location = useLocation();

const additionalBeePrice = getAdditionalBeePrice(state);
const rotateSpeedLevelPrice = getRotateSpeedLevelPrice(state);
Expand All @@ -74,14 +76,15 @@ const StorePage: React.FC = () => {
});

useEffect(() => {
if (state.dataLoadedFromMemory) uploadData(state);
if (state.dataLoadedFromMemory && location.pathname.includes("store"))
uploadData(state);
// Generate Random Name, if User has no Name
if (!state.userName && state.dataLoadedFromMemory)
dispatch({
type: "setUserName",
payload: generateName(),
});
}, [state, dispatch]);
}, [state, dispatch, location.pathname]);

useEffect(() => {
const _values: { name: string; value: string }[] = [
Expand Down

0 comments on commit 4993449

Please sign in to comment.