Skip to content

Commit 30fd2f5

Browse files
author
root
committed
feat: update AdMob integration and project files
- Modified `capacitor.config.ts` to update plugin configuration.
1 parent 40b01f5 commit 30fd2f5

File tree

10 files changed

+67
-26
lines changed

10 files changed

+67
-26
lines changed

.husky/pre-commit

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1+
git status
2+
git add .
13
npm run lint
24
npm run format
3-
45
echo "Done!"

android/app/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
/build/*
22
!/build/.npmkeep
3+
assets/

biome.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@
2626
}
2727
},
2828
"files": {
29-
"ignore": ["node_modules", "android"]
29+
"ignore": ["node_modules", "build", "android"]
3030
}
3131
}

capacitor.config.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ import { CapacitorConfig } from "@capacitor/cli";
44
const config: CapacitorConfig = {
55
appId: "uwu.cookie.app",
66
appName: "Cookie",
7-
webDir: "www",
8-
bundledWebRuntime: false,
7+
webDir: "build",
98
plugins: {
109
AdMob: {
1110
androidAppId: "ca-app-pub-6690516270288705~6535066913",

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"pre-commit": "cz"
2020
},
2121
"hooks": {
22-
"prepare-commit-msg": "exec < /dev/tty && npx cz --hook || true"
22+
"prepare-commit-msg": "npx --no -- commitlint --edit $1; exec < /dev/tty && npx cz --hook || true"
2323
},
2424
"dependencies": {
2525
"@capacitor-community/admob": "^6.1.0",

tsconfig.json

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"compilerOptions": {
3+
"target": "ESNext",
4+
"outDir": "build",
5+
"useDefineForClassFields": true,
6+
"module": "ESNext",
7+
"lib": ["ESNext", "DOM"],
8+
"moduleResolution": "Node",
9+
"strict": true,
10+
"resolveJsonModule": true,
11+
"isolatedModules": true,
12+
"esModuleInterop": true,
13+
"noEmit": true,
14+
"noUnusedLocals": true,
15+
"noUnusedParameters": true,
16+
"noImplicitReturns": true,
17+
"skipLibCheck": true
18+
}
19+
}

www/index.html

+17-20
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@
99
<link rel="manifest" href="manifest.json">
1010
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
1111
<link rel="stylesheet" href="./res/styles/ui.css" type="text/css" media="all" />
12+
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" rel="stylesheet">
1213
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js" integrity="sha512-v2CJ7UaYy4JwqLDIrZUI/4hqeoQieOmAZNXBeQyjo21dadnwR+8ZaIJVT8EE2iyI61OV8e6M8PP2/4hpQINQ/g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
1314
<script src="https://cdnjs.cloudflare.com/ajax/libs/eruda/3.4.1/eruda.min.js" integrity="sha512-3RVqOZtMevFOLeXCp0/Wl7np/l3J3MMysaFDUhNh+hdKx+Wb0lMXuHwA6CZ/+4DfYZM01Om1as8g+mnTaQH9vA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
14-
<script type="module" src="./res/js/AdMob.js"></script>
15+
<script type="module" src="./res/plugins/AdMob.ts"></script>
1516
</head>
1617
<body class="ui-cookie">
1718

@@ -21,29 +22,25 @@
2122
</div>
2223
</splash-screen>
2324

25+
<div class="d-flex flex-column justify-content-center align-items-center">
26+
<button id="show_banner" class="btn btn-custom">
27+
<i class="fas fa-image"></i> Mostrar Banner
28+
</button>
2429

30+
<button id="hide_banner" class="btn btn-custom">
31+
<i class="fas fa-eye-slash"></i> Esconder Banner
32+
</button>
2533

34+
<button id="show_video" class="btn btn-custom">
35+
<i class="fas fa-video"></i> Mostrar Video
36+
</button>
2637

27-
<!---
28-
29-
<button id="show_banner">
30-
Mostrar Banner
31-
</button>
32-
33-
<button id="hide_banner">
34-
Esconder Banner
35-
</button>
36-
37-
<button id="show_video">
38-
Mostrar Video
39-
</button>
40-
41-
<button id="award">
42-
Mostrar Premio
43-
</button>
44-
45-
--->
38+
<button id="award" class="btn btn-custom">
39+
<i class="fas fa-trophy"></i> Mostrar Premio
40+
</button>
41+
</div>
4642

43+
4744
<script>
4845
eruda.init();
4946
</script>

www/res/js/AdMob.js www/res/plugins/AdMob.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const { AdMob } = window.Capacitor.Plugins;
1+
import { AdMob } from "@capacitor-community/admob";
22

33
$(document).ready(() => {
44
// Initialize AdMob plugin

www/res/styles/ui.css

+23
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,26 @@
5959
opacity: 0.8;
6060
}
6161
}
62+
63+
.btn-custom {
64+
background-color: transparent;
65+
color: #333;
66+
border: 2px solid #333;
67+
border-radius: 50px;
68+
width: 200px;
69+
height: 50px;
70+
font-size: 16px;
71+
display: flex;
72+
align-items: center;
73+
justify-content: center;
74+
margin: 10px;
75+
transition: all 0.3s ease;
76+
}
77+
78+
.btn-custom:hover {
79+
border-color: #555;
80+
}
81+
82+
.btn-custom i {
83+
margin-right: 10px;
84+
}

www/vite-env.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/// <reference types="vite/client" />

0 commit comments

Comments
 (0)