Skip to content

Commit

Permalink
feat(version): v1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianjnuwu committed Jan 13, 2025
1 parent 0c3ef7c commit 4ff6fb5
Show file tree
Hide file tree
Showing 11 changed files with 44 additions and 71 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"@popperjs/core": "^2.11.8",
"bootstrap": "^5.3.3",
"dotenv": "^16.4.7",
"firebase": "^11.1.0",
"i18next": "^24.2.1",
"jquery": "^3.7.1",
"socket.io-client": "^4.8.1"
Expand Down
2 changes: 1 addition & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import "dotenv/config";
/** @type {import('vite').UserConfig} */
export default defineConfig({
root: "./www",
target: "esnext",
publicDir: "./public",
build: {
outDir: "../build",
Expand All @@ -25,6 +24,7 @@ export default defineConfig({
"@language": "/src/locales",
"@plugin": "/src/plugins",
"@ts": "/src/ts",
"@js": "/src/js",
"@scss": "/src/styles/scss",
},
},
Expand Down
1 change: 0 additions & 1 deletion www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -237,5 +237,4 @@ <h5 class="modal-title" id="room_modalLabel">
</div>
</div>
</body>
<script type="module" src="./src/js/firebase.js" defer></script>
</html>
4 changes: 2 additions & 2 deletions www/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ import "@language/main.ts";
import "@scss/ui.scss";
import "@plugin/admob.ts";
import "@ts/main.ts";
import "@ts/game.ts";
import "@plugin/push-notifications.ts";
import "@ts/game.ts";
import "bootstrap/dist/css/bootstrap.min.css";
import "@js/firebase.mjs";
22 changes: 0 additions & 22 deletions www/src/js/firebase.js

This file was deleted.

28 changes: 28 additions & 0 deletions www/src/js/firebase.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { initializeApp } from 'firebase/app';
import { getAnalytics, logEvent } from 'firebase/analytics';

const app = initializeApp({
apiKey: "AIzaSyBLkMv2N_cnG6q-9spUj01wvxRnfWSr6XY",
authDomain: "cookie-brasil.firebaseapp.com",
projectId: "cookie-brasil",
storageBucket: "cookie-brasil.appspot.com",
messagingSenderId: "202105498916",
appId: "1:202105498916:web:d161e68c42e66c8f8997b1",
measurementId: "G-6KZE06S4SF"
});
const analytics = getAnalytics(app);

logEvent(analytics, 'user_info', {
userAgent: navigator.userAgent,
language: navigator.language,
platform: navigator.platform,
screenWidth: window.screen.width,
screenHeight: window.screen.height,
colorDepth: window.screen.colorDepth,
onlineStatus: navigator.onLine,
connectionType: navigator.connection ? navigator.connection.effectiveType : "unknown",
timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
deviceMemory: navigator.deviceMemory || "unknown",
hardwareConcurrency: navigator.hardwareConcurrency || "unknown",
batteryLevel: navigator.getBattery ? (await navigator.getBattery()).level : "unknown"
});
2 changes: 1 addition & 1 deletion www/src/locales/lang/en-US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
const translation = {
general: {
cookies: "Cookies",
seconds: "cps",
seconds: "Clicks per second",
timeLabel: "Time:",
start: "GO!",
message_now: "Now",
Expand Down
2 changes: 1 addition & 1 deletion www/src/locales/lang/es-ES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
const translation = {
general: {
cookies: "Galletas",
seconds: "cps",
seconds: "Camarillas p/segundo",
timeLabel: "Tiempo:",
start: "¡IR!",
message_now: "Ahora",
Expand Down
2 changes: 1 addition & 1 deletion www/src/locales/lang/pt-BR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
const translation = {
general: {
cookies: "Biscoitos",
seconds: "cps",
seconds: "Cliques p/segundo",
timeLabel: "Tempo:",
start: "JA!",
message_now: "Agora",
Expand Down
9 changes: 9 additions & 0 deletions www/src/plugins/admob.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ import {
} from "@capacitor-community/admob";
import $ from "jquery";


if (window.Capacitor.getPlatform() !== "android") {

console.log(`AdMob: Unsupported platform (${window.Capacitor.getPlatform()})`);

} else {

AdMob.initialize()
.then(() => {
console.log("AdMob initialized.");
Expand Down Expand Up @@ -60,3 +67,5 @@ $("#splash-screen").on("click", () => $show_banner());
$("#start_game").on("click", () => $remove_banner());

$("#game_exit").on("click", () => $show_video());

};
42 changes: 0 additions & 42 deletions www/src/plugins/push-notifications.ts

This file was deleted.

0 comments on commit 4ff6fb5

Please sign in to comment.