Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
27e0427e96 | ||
|
|
f85344e90b | ||
|
|
79e0b64de3 | ||
|
|
7a0dbbd5fb | ||
|
|
fbae62eec9 | ||
|
|
6ca12bc3cc | ||
|
|
1e3650bf92 | ||
|
|
4db86b2195 | ||
|
|
4826fef377 | ||
|
|
6e91222de7 | ||
|
|
9f5b3c88e0 | ||
|
|
a52f79b3bc | ||
|
|
bd8123ba09 | ||
|
|
9fcd5a7a96 | ||
|
|
c9ebed81c6 | ||
|
|
2be0829d35 | ||
|
|
786328c9bd | ||
|
|
6588be886b | ||
|
|
c71766d6ea | ||
|
|
ce499bbed7 | ||
|
|
f9d038825e | ||
|
|
113033ccc6 | ||
|
|
769b27bfbf | ||
|
|
849bc16fe4 | ||
|
|
0d2876baf3 | ||
|
|
483abab330 | ||
|
|
7fbe99bf63 | ||
|
|
e55cc77d98 | ||
|
|
539ee83e73 | ||
|
|
451e63b37d | ||
|
|
0e96ba197f | ||
|
|
eb9c3ccd2c | ||
|
|
28c8123794 | ||
|
|
03e8bc6c99 |
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"projects": {
|
||||
"default": "messaggiswing"
|
||||
}
|
||||
}
|
||||
@@ -21,3 +21,5 @@
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
*.mp4
|
||||
@@ -0,0 +1,43 @@
|
||||
import firebase from "firebase/compat/app";
|
||||
import "firebase/compat/database";
|
||||
import fs from "fs";
|
||||
|
||||
firebase.initializeApp({
|
||||
apiKey: "AIzaSyBWE1l8WV_7eyKT-PMu0Kq2w_WiV0SUhJw",
|
||||
authDomain: "messaggiswing.firebaseapp.com",
|
||||
projectId: "messaggiswing",
|
||||
storageBucket: "messaggiswing.appspot.com",
|
||||
messagingSenderId: "983131964310",
|
||||
appId: "1:983131964310:web:5ef430e42c42d2dfe253b7",
|
||||
measurementId: "G-1CBJZ3B48E",
|
||||
databaseURL:
|
||||
"https://messaggiswing-default-rtdb.europe-west1.firebasedatabase.app",
|
||||
});
|
||||
|
||||
var defaultDatabase = firebase.database();
|
||||
const folder = "capodanno2022";
|
||||
defaultDatabase.ref(`/messaggi/${folder}`).once("value", (s) => {
|
||||
const obj = s.val();
|
||||
const messages = Object.keys(obj).map((d) => obj[d]);
|
||||
var i = 0;
|
||||
function move() {
|
||||
const m = messages[i];
|
||||
const { immagineURL } = m;
|
||||
if (immagineURL) {
|
||||
var d = immagineURL.substring(
|
||||
immagineURL.indexOf("images%2F") + 9,
|
||||
immagineURL.indexOf(".jpg") + 4
|
||||
);
|
||||
|
||||
try {
|
||||
if (fs.existsSync(`./images/${d}`)) {
|
||||
//file exists
|
||||
fs.renameSync(`./images/${d}`, `./images/${folder}/${d}`);
|
||||
}
|
||||
} catch (e) {}
|
||||
}
|
||||
i++;
|
||||
if (i < messages.length) move();
|
||||
}
|
||||
move();
|
||||
});
|
||||
@@ -0,0 +1,970 @@
|
||||
{
|
||||
"name": "admin",
|
||||
"version": "1.0.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "admin",
|
||||
"version": "1.0.0",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"firebase": "^9.19.1",
|
||||
"fs": "^0.0.1-security"
|
||||
}
|
||||
},
|
||||
"node_modules/@firebase/analytics": {
|
||||
"version": "0.9.5",
|
||||
"resolved": "https://registry.npmjs.org/@firebase/analytics/-/analytics-0.9.5.tgz",
|
||||
"integrity": "sha512-hJTVs2jLxPXE7hs7D/jaEsgGivrm7tSEl65kb5NkDBWV7QQBUnRfVML/xra9nTFLLJhAdbExZPHg6HfIuMSYEQ==",
|
||||
"dependencies": {
|
||||
"@firebase/component": "0.6.4",
|
||||
"@firebase/installations": "0.6.4",
|
||||
"@firebase/logger": "0.4.0",
|
||||
"@firebase/util": "1.9.3",
|
||||
"tslib": "^2.1.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@firebase/app": "0.x"
|
||||
}
|
||||
},
|
||||
"node_modules/@firebase/analytics-compat": {
|
||||
"version": "0.2.5",
|
||||
"resolved": "https://registry.npmjs.org/@firebase/analytics-compat/-/analytics-compat-0.2.5.tgz",
|
||||
"integrity": "sha512-ohKUrwSoXvyUJdSLuDr82mOqrzgWKyHMUt9/TfYKkyDXnFjNlBcFBpkpl/UHMAOJe0M60YYXiVCZoGQYldCslA==",
|
||||
"dependencies": {
|
||||
"@firebase/analytics": "0.9.5",
|
||||
"@firebase/analytics-types": "0.8.0",
|
||||
"@firebase/component": "0.6.4",
|
||||
"@firebase/util": "1.9.3",
|
||||
"tslib": "^2.1.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@firebase/app-compat": "0.x"
|
||||
}
|
||||
},
|
||||
"node_modules/@firebase/analytics-types": {
|
||||
"version": "0.8.0",
|
||||
"resolved": "https://registry.npmjs.org/@firebase/analytics-types/-/analytics-types-0.8.0.tgz",
|
||||
"integrity": "sha512-iRP+QKI2+oz3UAh4nPEq14CsEjrjD6a5+fuypjScisAh9kXKFvdJOZJDwk7kikLvWVLGEs9+kIUS4LPQV7VZVw=="
|
||||
},
|
||||
"node_modules/@firebase/app": {
|
||||
"version": "0.9.7",
|
||||
"resolved": "https://registry.npmjs.org/@firebase/app/-/app-0.9.7.tgz",
|
||||
"integrity": "sha512-ADnRXaW4XQF11QYYhZQEJEtOGnmLkGl2FCixCxPighLrmJmGwCZrzSFtwITd8w/EU3dRYaU5Og37VfnY+gKxGw==",
|
||||
"dependencies": {
|
||||
"@firebase/component": "0.6.4",
|
||||
"@firebase/logger": "0.4.0",
|
||||
"@firebase/util": "1.9.3",
|
||||
"idb": "7.0.1",
|
||||
"tslib": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@firebase/app-check": {
|
||||
"version": "0.6.4",
|
||||
"resolved": "https://registry.npmjs.org/@firebase/app-check/-/app-check-0.6.4.tgz",
|
||||
"integrity": "sha512-M9qyVTWkEkHXmgwGtObvXQqKcOe9iKAOPqm0pCe74mzgKVTNq157ff39+fxHPb4nFbipToY+GuvtabLUzkHehQ==",
|
||||
"dependencies": {
|
||||
"@firebase/component": "0.6.4",
|
||||
"@firebase/logger": "0.4.0",
|
||||
"@firebase/util": "1.9.3",
|
||||
"tslib": "^2.1.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@firebase/app": "0.x"
|
||||
}
|
||||
},
|
||||
"node_modules/@firebase/app-check-compat": {
|
||||
"version": "0.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@firebase/app-check-compat/-/app-check-compat-0.3.4.tgz",
|
||||
"integrity": "sha512-s6ON0ixPKe99M1DNYMI2eR5aLwQZgy0z8fuW1tnEbzg5p/N/GKFmqiIHSV4gfp8+X7Fw5NLm7qMfh4xrcPgQCw==",
|
||||
"dependencies": {
|
||||
"@firebase/app-check": "0.6.4",
|
||||
"@firebase/app-check-types": "0.5.0",
|
||||
"@firebase/component": "0.6.4",
|
||||
"@firebase/logger": "0.4.0",
|
||||
"@firebase/util": "1.9.3",
|
||||
"tslib": "^2.1.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@firebase/app-compat": "0.x"
|
||||
}
|
||||
},
|
||||
"node_modules/@firebase/app-check-interop-types": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@firebase/app-check-interop-types/-/app-check-interop-types-0.2.0.tgz",
|
||||
"integrity": "sha512-+3PQIeX6/eiVK+x/yg8r6xTNR97fN7MahFDm+jiQmDjcyvSefoGuTTNQuuMScGyx3vYUBeZn+Cp9kC0yY/9uxQ=="
|
||||
},
|
||||
"node_modules/@firebase/app-check-types": {
|
||||
"version": "0.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@firebase/app-check-types/-/app-check-types-0.5.0.tgz",
|
||||
"integrity": "sha512-uwSUj32Mlubybw7tedRzR24RP8M8JUVR3NPiMk3/Z4bCmgEKTlQBwMXrehDAZ2wF+TsBq0SN1c6ema71U/JPyQ=="
|
||||
},
|
||||
"node_modules/@firebase/app-compat": {
|
||||
"version": "0.2.7",
|
||||
"resolved": "https://registry.npmjs.org/@firebase/app-compat/-/app-compat-0.2.7.tgz",
|
||||
"integrity": "sha512-KYBUKoRrvSGW8jqKgARRsma0lJie9M0zyWhPF3PNjqc9pYsw7SZXp5s5SzsheeCXzIDFydP5uEA4f1Z87D7CxQ==",
|
||||
"dependencies": {
|
||||
"@firebase/app": "0.9.7",
|
||||
"@firebase/component": "0.6.4",
|
||||
"@firebase/logger": "0.4.0",
|
||||
"@firebase/util": "1.9.3",
|
||||
"tslib": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@firebase/app-types": {
|
||||
"version": "0.9.0",
|
||||
"resolved": "https://registry.npmjs.org/@firebase/app-types/-/app-types-0.9.0.tgz",
|
||||
"integrity": "sha512-AeweANOIo0Mb8GiYm3xhTEBVCmPwTYAu9Hcd2qSkLuga/6+j9b1Jskl5bpiSQWy9eJ/j5pavxj6eYogmnuzm+Q=="
|
||||
},
|
||||
"node_modules/@firebase/auth": {
|
||||
"version": "0.22.0",
|
||||
"resolved": "https://registry.npmjs.org/@firebase/auth/-/auth-0.22.0.tgz",
|
||||
"integrity": "sha512-4PiaDJEhJ7FNo48WG0TAlqHiCuRBXxUow2q+0emh+PhmM0cLT1UdqK1EuWWGc5CY+ztNQZUh+Yzeh+nv9tZL0w==",
|
||||
"dependencies": {
|
||||
"@firebase/component": "0.6.4",
|
||||
"@firebase/logger": "0.4.0",
|
||||
"@firebase/util": "1.9.3",
|
||||
"node-fetch": "2.6.7",
|
||||
"tslib": "^2.1.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@firebase/app": "0.x"
|
||||
}
|
||||
},
|
||||
"node_modules/@firebase/auth-compat": {
|
||||
"version": "0.3.7",
|
||||
"resolved": "https://registry.npmjs.org/@firebase/auth-compat/-/auth-compat-0.3.7.tgz",
|
||||
"integrity": "sha512-+r8/++hYZLA/to6Iq8A70LTUsZvhkdT2R4mB4oJGxryJ7vNjpuP5m5hfAd42h/VvX8eT1OXJCENCfEZoDyhksA==",
|
||||
"dependencies": {
|
||||
"@firebase/auth": "0.22.0",
|
||||
"@firebase/auth-types": "0.12.0",
|
||||
"@firebase/component": "0.6.4",
|
||||
"@firebase/util": "1.9.3",
|
||||
"node-fetch": "2.6.7",
|
||||
"tslib": "^2.1.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@firebase/app-compat": "0.x"
|
||||
}
|
||||
},
|
||||
"node_modules/@firebase/auth-interop-types": {
|
||||
"version": "0.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@firebase/auth-interop-types/-/auth-interop-types-0.2.1.tgz",
|
||||
"integrity": "sha512-VOaGzKp65MY6P5FI84TfYKBXEPi6LmOCSMMzys6o2BN2LOsqy7pCuZCup7NYnfbk5OkkQKzvIfHOzTm0UDpkyg=="
|
||||
},
|
||||
"node_modules/@firebase/auth-types": {
|
||||
"version": "0.12.0",
|
||||
"resolved": "https://registry.npmjs.org/@firebase/auth-types/-/auth-types-0.12.0.tgz",
|
||||
"integrity": "sha512-pPwaZt+SPOshK8xNoiQlK5XIrS97kFYc3Rc7xmy373QsOJ9MmqXxLaYssP5Kcds4wd2qK//amx/c+A8O2fVeZA==",
|
||||
"peerDependencies": {
|
||||
"@firebase/app-types": "0.x",
|
||||
"@firebase/util": "1.x"
|
||||
}
|
||||
},
|
||||
"node_modules/@firebase/component": {
|
||||
"version": "0.6.4",
|
||||
"resolved": "https://registry.npmjs.org/@firebase/component/-/component-0.6.4.tgz",
|
||||
"integrity": "sha512-rLMyrXuO9jcAUCaQXCMjCMUsWrba5fzHlNK24xz5j2W6A/SRmK8mZJ/hn7V0fViLbxC0lPMtrK1eYzk6Fg03jA==",
|
||||
"dependencies": {
|
||||
"@firebase/util": "1.9.3",
|
||||
"tslib": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@firebase/database": {
|
||||
"version": "0.14.4",
|
||||
"resolved": "https://registry.npmjs.org/@firebase/database/-/database-0.14.4.tgz",
|
||||
"integrity": "sha512-+Ea/IKGwh42jwdjCyzTmeZeLM3oy1h0mFPsTy6OqCWzcu/KFqRAr5Tt1HRCOBlNOdbh84JPZC47WLU18n2VbxQ==",
|
||||
"dependencies": {
|
||||
"@firebase/auth-interop-types": "0.2.1",
|
||||
"@firebase/component": "0.6.4",
|
||||
"@firebase/logger": "0.4.0",
|
||||
"@firebase/util": "1.9.3",
|
||||
"faye-websocket": "0.11.4",
|
||||
"tslib": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@firebase/database-compat": {
|
||||
"version": "0.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@firebase/database-compat/-/database-compat-0.3.4.tgz",
|
||||
"integrity": "sha512-kuAW+l+sLMUKBThnvxvUZ+Q1ZrF/vFJ58iUY9kAcbX48U03nVzIF6Tmkf0p3WVQwMqiXguSgtOPIB6ZCeF+5Gg==",
|
||||
"dependencies": {
|
||||
"@firebase/component": "0.6.4",
|
||||
"@firebase/database": "0.14.4",
|
||||
"@firebase/database-types": "0.10.4",
|
||||
"@firebase/logger": "0.4.0",
|
||||
"@firebase/util": "1.9.3",
|
||||
"tslib": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@firebase/database-types": {
|
||||
"version": "0.10.4",
|
||||
"resolved": "https://registry.npmjs.org/@firebase/database-types/-/database-types-0.10.4.tgz",
|
||||
"integrity": "sha512-dPySn0vJ/89ZeBac70T+2tWWPiJXWbmRygYv0smT5TfE3hDrQ09eKMF3Y+vMlTdrMWq7mUdYW5REWPSGH4kAZQ==",
|
||||
"dependencies": {
|
||||
"@firebase/app-types": "0.9.0",
|
||||
"@firebase/util": "1.9.3"
|
||||
}
|
||||
},
|
||||
"node_modules/@firebase/firestore": {
|
||||
"version": "3.10.0",
|
||||
"resolved": "https://registry.npmjs.org/@firebase/firestore/-/firestore-3.10.0.tgz",
|
||||
"integrity": "sha512-St6yy2r7zYxJiAEiI19aQJqxVV8LDvlmeK52R9KMn2nZsgdDVOurch1cH7bBl0OxEgfiVxBmAQJLYvZc+qwAgw==",
|
||||
"dependencies": {
|
||||
"@firebase/component": "0.6.4",
|
||||
"@firebase/logger": "0.4.0",
|
||||
"@firebase/util": "1.9.3",
|
||||
"@firebase/webchannel-wrapper": "0.9.0",
|
||||
"@grpc/grpc-js": "~1.7.0",
|
||||
"@grpc/proto-loader": "^0.6.13",
|
||||
"node-fetch": "2.6.7",
|
||||
"tslib": "^2.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10.10.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@firebase/app": "0.x"
|
||||
}
|
||||
},
|
||||
"node_modules/@firebase/firestore-compat": {
|
||||
"version": "0.3.6",
|
||||
"resolved": "https://registry.npmjs.org/@firebase/firestore-compat/-/firestore-compat-0.3.6.tgz",
|
||||
"integrity": "sha512-svS8oV0nwTyoHW5mslFV0gRb3FLpRQGjz2F7nc5imnPUTjSJmAfXECtgs5HG5MSJM/laSimfAeGuQVh5FM1AEw==",
|
||||
"dependencies": {
|
||||
"@firebase/component": "0.6.4",
|
||||
"@firebase/firestore": "3.10.0",
|
||||
"@firebase/firestore-types": "2.5.1",
|
||||
"@firebase/util": "1.9.3",
|
||||
"tslib": "^2.1.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@firebase/app-compat": "0.x"
|
||||
}
|
||||
},
|
||||
"node_modules/@firebase/firestore-types": {
|
||||
"version": "2.5.1",
|
||||
"resolved": "https://registry.npmjs.org/@firebase/firestore-types/-/firestore-types-2.5.1.tgz",
|
||||
"integrity": "sha512-xG0CA6EMfYo8YeUxC8FeDzf6W3FX1cLlcAGBYV6Cku12sZRI81oWcu61RSKM66K6kUENP+78Qm8mvroBcm1whw==",
|
||||
"peerDependencies": {
|
||||
"@firebase/app-types": "0.x",
|
||||
"@firebase/util": "1.x"
|
||||
}
|
||||
},
|
||||
"node_modules/@firebase/functions": {
|
||||
"version": "0.9.4",
|
||||
"resolved": "https://registry.npmjs.org/@firebase/functions/-/functions-0.9.4.tgz",
|
||||
"integrity": "sha512-3H2qh6U+q+nepO5Hds+Ddl6J0pS+zisuBLqqQMRBHv9XpWfu0PnDHklNmE8rZ+ccTEXvBj6zjkPfdxt6NisvlQ==",
|
||||
"dependencies": {
|
||||
"@firebase/app-check-interop-types": "0.2.0",
|
||||
"@firebase/auth-interop-types": "0.2.1",
|
||||
"@firebase/component": "0.6.4",
|
||||
"@firebase/messaging-interop-types": "0.2.0",
|
||||
"@firebase/util": "1.9.3",
|
||||
"node-fetch": "2.6.7",
|
||||
"tslib": "^2.1.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@firebase/app": "0.x"
|
||||
}
|
||||
},
|
||||
"node_modules/@firebase/functions-compat": {
|
||||
"version": "0.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@firebase/functions-compat/-/functions-compat-0.3.4.tgz",
|
||||
"integrity": "sha512-kxVxTGyLV1MBR3sp3mI+eQ6JBqz0G5bk310F8eX4HzDFk4xjk5xY0KdHktMH+edM2xs1BOg0vwvvsAHczIjB+w==",
|
||||
"dependencies": {
|
||||
"@firebase/component": "0.6.4",
|
||||
"@firebase/functions": "0.9.4",
|
||||
"@firebase/functions-types": "0.6.0",
|
||||
"@firebase/util": "1.9.3",
|
||||
"tslib": "^2.1.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@firebase/app-compat": "0.x"
|
||||
}
|
||||
},
|
||||
"node_modules/@firebase/functions-types": {
|
||||
"version": "0.6.0",
|
||||
"resolved": "https://registry.npmjs.org/@firebase/functions-types/-/functions-types-0.6.0.tgz",
|
||||
"integrity": "sha512-hfEw5VJtgWXIRf92ImLkgENqpL6IWpYaXVYiRkFY1jJ9+6tIhWM7IzzwbevwIIud/jaxKVdRzD7QBWfPmkwCYw=="
|
||||
},
|
||||
"node_modules/@firebase/installations": {
|
||||
"version": "0.6.4",
|
||||
"resolved": "https://registry.npmjs.org/@firebase/installations/-/installations-0.6.4.tgz",
|
||||
"integrity": "sha512-u5y88rtsp7NYkCHC3ElbFBrPtieUybZluXyzl7+4BsIz4sqb4vSAuwHEUgCgCeaQhvsnxDEU6icly8U9zsJigA==",
|
||||
"dependencies": {
|
||||
"@firebase/component": "0.6.4",
|
||||
"@firebase/util": "1.9.3",
|
||||
"idb": "7.0.1",
|
||||
"tslib": "^2.1.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@firebase/app": "0.x"
|
||||
}
|
||||
},
|
||||
"node_modules/@firebase/installations-compat": {
|
||||
"version": "0.2.4",
|
||||
"resolved": "https://registry.npmjs.org/@firebase/installations-compat/-/installations-compat-0.2.4.tgz",
|
||||
"integrity": "sha512-LI9dYjp0aT9Njkn9U4JRrDqQ6KXeAmFbRC0E7jI7+hxl5YmRWysq5qgQl22hcWpTk+cm3es66d/apoDU/A9n6Q==",
|
||||
"dependencies": {
|
||||
"@firebase/component": "0.6.4",
|
||||
"@firebase/installations": "0.6.4",
|
||||
"@firebase/installations-types": "0.5.0",
|
||||
"@firebase/util": "1.9.3",
|
||||
"tslib": "^2.1.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@firebase/app-compat": "0.x"
|
||||
}
|
||||
},
|
||||
"node_modules/@firebase/installations-types": {
|
||||
"version": "0.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@firebase/installations-types/-/installations-types-0.5.0.tgz",
|
||||
"integrity": "sha512-9DP+RGfzoI2jH7gY4SlzqvZ+hr7gYzPODrbzVD82Y12kScZ6ZpRg/i3j6rleto8vTFC8n6Len4560FnV1w2IRg==",
|
||||
"peerDependencies": {
|
||||
"@firebase/app-types": "0.x"
|
||||
}
|
||||
},
|
||||
"node_modules/@firebase/logger": {
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/@firebase/logger/-/logger-0.4.0.tgz",
|
||||
"integrity": "sha512-eRKSeykumZ5+cJPdxxJRgAC3G5NknY2GwEbKfymdnXtnT0Ucm4pspfR6GT4MUQEDuJwRVbVcSx85kgJulMoFFA==",
|
||||
"dependencies": {
|
||||
"tslib": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@firebase/messaging": {
|
||||
"version": "0.12.4",
|
||||
"resolved": "https://registry.npmjs.org/@firebase/messaging/-/messaging-0.12.4.tgz",
|
||||
"integrity": "sha512-6JLZct6zUaex4g7HI3QbzeUrg9xcnmDAPTWpkoMpd/GoSVWH98zDoWXMGrcvHeCAIsLpFMe4MPoZkJbrPhaASw==",
|
||||
"dependencies": {
|
||||
"@firebase/component": "0.6.4",
|
||||
"@firebase/installations": "0.6.4",
|
||||
"@firebase/messaging-interop-types": "0.2.0",
|
||||
"@firebase/util": "1.9.3",
|
||||
"idb": "7.0.1",
|
||||
"tslib": "^2.1.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@firebase/app": "0.x"
|
||||
}
|
||||
},
|
||||
"node_modules/@firebase/messaging-compat": {
|
||||
"version": "0.2.4",
|
||||
"resolved": "https://registry.npmjs.org/@firebase/messaging-compat/-/messaging-compat-0.2.4.tgz",
|
||||
"integrity": "sha512-lyFjeUhIsPRYDPNIkYX1LcZMpoVbBWXX4rPl7c/rqc7G+EUea7IEtSt4MxTvh6fDfPuzLn7+FZADfscC+tNMfg==",
|
||||
"dependencies": {
|
||||
"@firebase/component": "0.6.4",
|
||||
"@firebase/messaging": "0.12.4",
|
||||
"@firebase/util": "1.9.3",
|
||||
"tslib": "^2.1.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@firebase/app-compat": "0.x"
|
||||
}
|
||||
},
|
||||
"node_modules/@firebase/messaging-interop-types": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@firebase/messaging-interop-types/-/messaging-interop-types-0.2.0.tgz",
|
||||
"integrity": "sha512-ujA8dcRuVeBixGR9CtegfpU4YmZf3Lt7QYkcj693FFannwNuZgfAYaTmbJ40dtjB81SAu6tbFPL9YLNT15KmOQ=="
|
||||
},
|
||||
"node_modules/@firebase/performance": {
|
||||
"version": "0.6.4",
|
||||
"resolved": "https://registry.npmjs.org/@firebase/performance/-/performance-0.6.4.tgz",
|
||||
"integrity": "sha512-HfTn/bd8mfy/61vEqaBelNiNnvAbUtME2S25A67Nb34zVuCSCRIX4SseXY6zBnOFj3oLisaEqhVcJmVPAej67g==",
|
||||
"dependencies": {
|
||||
"@firebase/component": "0.6.4",
|
||||
"@firebase/installations": "0.6.4",
|
||||
"@firebase/logger": "0.4.0",
|
||||
"@firebase/util": "1.9.3",
|
||||
"tslib": "^2.1.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@firebase/app": "0.x"
|
||||
}
|
||||
},
|
||||
"node_modules/@firebase/performance-compat": {
|
||||
"version": "0.2.4",
|
||||
"resolved": "https://registry.npmjs.org/@firebase/performance-compat/-/performance-compat-0.2.4.tgz",
|
||||
"integrity": "sha512-nnHUb8uP9G8islzcld/k6Bg5RhX62VpbAb/Anj7IXs/hp32Eb2LqFPZK4sy3pKkBUO5wcrlRWQa6wKOxqlUqsg==",
|
||||
"dependencies": {
|
||||
"@firebase/component": "0.6.4",
|
||||
"@firebase/logger": "0.4.0",
|
||||
"@firebase/performance": "0.6.4",
|
||||
"@firebase/performance-types": "0.2.0",
|
||||
"@firebase/util": "1.9.3",
|
||||
"tslib": "^2.1.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@firebase/app-compat": "0.x"
|
||||
}
|
||||
},
|
||||
"node_modules/@firebase/performance-types": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@firebase/performance-types/-/performance-types-0.2.0.tgz",
|
||||
"integrity": "sha512-kYrbr8e/CYr1KLrLYZZt2noNnf+pRwDq2KK9Au9jHrBMnb0/C9X9yWSXmZkFt4UIdsQknBq8uBB7fsybZdOBTA=="
|
||||
},
|
||||
"node_modules/@firebase/remote-config": {
|
||||
"version": "0.4.4",
|
||||
"resolved": "https://registry.npmjs.org/@firebase/remote-config/-/remote-config-0.4.4.tgz",
|
||||
"integrity": "sha512-x1ioTHGX8ZwDSTOVp8PBLv2/wfwKzb4pxi0gFezS5GCJwbLlloUH4YYZHHS83IPxnua8b6l0IXUaWd0RgbWwzQ==",
|
||||
"dependencies": {
|
||||
"@firebase/component": "0.6.4",
|
||||
"@firebase/installations": "0.6.4",
|
||||
"@firebase/logger": "0.4.0",
|
||||
"@firebase/util": "1.9.3",
|
||||
"tslib": "^2.1.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@firebase/app": "0.x"
|
||||
}
|
||||
},
|
||||
"node_modules/@firebase/remote-config-compat": {
|
||||
"version": "0.2.4",
|
||||
"resolved": "https://registry.npmjs.org/@firebase/remote-config-compat/-/remote-config-compat-0.2.4.tgz",
|
||||
"integrity": "sha512-FKiki53jZirrDFkBHglB3C07j5wBpitAaj8kLME6g8Mx+aq7u9P7qfmuSRytiOItADhWUj7O1JIv7n9q87SuwA==",
|
||||
"dependencies": {
|
||||
"@firebase/component": "0.6.4",
|
||||
"@firebase/logger": "0.4.0",
|
||||
"@firebase/remote-config": "0.4.4",
|
||||
"@firebase/remote-config-types": "0.3.0",
|
||||
"@firebase/util": "1.9.3",
|
||||
"tslib": "^2.1.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@firebase/app-compat": "0.x"
|
||||
}
|
||||
},
|
||||
"node_modules/@firebase/remote-config-types": {
|
||||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/@firebase/remote-config-types/-/remote-config-types-0.3.0.tgz",
|
||||
"integrity": "sha512-RtEH4vdcbXZuZWRZbIRmQVBNsE7VDQpet2qFvq6vwKLBIQRQR5Kh58M4ok3A3US8Sr3rubYnaGqZSurCwI8uMA=="
|
||||
},
|
||||
"node_modules/@firebase/storage": {
|
||||
"version": "0.11.2",
|
||||
"resolved": "https://registry.npmjs.org/@firebase/storage/-/storage-0.11.2.tgz",
|
||||
"integrity": "sha512-CtvoFaBI4hGXlXbaCHf8humajkbXhs39Nbh6MbNxtwJiCqxPy9iH3D3CCfXAvP0QvAAwmJUTK3+z9a++Kc4nkA==",
|
||||
"dependencies": {
|
||||
"@firebase/component": "0.6.4",
|
||||
"@firebase/util": "1.9.3",
|
||||
"node-fetch": "2.6.7",
|
||||
"tslib": "^2.1.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@firebase/app": "0.x"
|
||||
}
|
||||
},
|
||||
"node_modules/@firebase/storage-compat": {
|
||||
"version": "0.3.2",
|
||||
"resolved": "https://registry.npmjs.org/@firebase/storage-compat/-/storage-compat-0.3.2.tgz",
|
||||
"integrity": "sha512-wvsXlLa9DVOMQJckbDNhXKKxRNNewyUhhbXev3t8kSgoCotd1v3MmqhKKz93ePhDnhHnDs7bYHy+Qa8dRY6BXw==",
|
||||
"dependencies": {
|
||||
"@firebase/component": "0.6.4",
|
||||
"@firebase/storage": "0.11.2",
|
||||
"@firebase/storage-types": "0.8.0",
|
||||
"@firebase/util": "1.9.3",
|
||||
"tslib": "^2.1.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@firebase/app-compat": "0.x"
|
||||
}
|
||||
},
|
||||
"node_modules/@firebase/storage-types": {
|
||||
"version": "0.8.0",
|
||||
"resolved": "https://registry.npmjs.org/@firebase/storage-types/-/storage-types-0.8.0.tgz",
|
||||
"integrity": "sha512-isRHcGrTs9kITJC0AVehHfpraWFui39MPaU7Eo8QfWlqW7YPymBmRgjDrlOgFdURh6Cdeg07zmkLP5tzTKRSpg==",
|
||||
"peerDependencies": {
|
||||
"@firebase/app-types": "0.x",
|
||||
"@firebase/util": "1.x"
|
||||
}
|
||||
},
|
||||
"node_modules/@firebase/util": {
|
||||
"version": "1.9.3",
|
||||
"resolved": "https://registry.npmjs.org/@firebase/util/-/util-1.9.3.tgz",
|
||||
"integrity": "sha512-DY02CRhOZwpzO36fHpuVysz6JZrscPiBXD0fXp6qSrL9oNOx5KWICKdR95C0lSITzxp0TZosVyHqzatE8JbcjA==",
|
||||
"dependencies": {
|
||||
"tslib": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@firebase/webchannel-wrapper": {
|
||||
"version": "0.9.0",
|
||||
"resolved": "https://registry.npmjs.org/@firebase/webchannel-wrapper/-/webchannel-wrapper-0.9.0.tgz",
|
||||
"integrity": "sha512-BpiZLBWdLFw+qFel9p3Zs1jD6QmH7Ii4aTDu6+vx8ShdidChZUXqDhYJly4ZjSgQh54miXbBgBrk0S+jTIh/Qg=="
|
||||
},
|
||||
"node_modules/@grpc/grpc-js": {
|
||||
"version": "1.7.3",
|
||||
"resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.7.3.tgz",
|
||||
"integrity": "sha512-H9l79u4kJ2PVSxUNA08HMYAnUBLj9v6KjYQ7SQ71hOZcEXhShE/y5iQCesP8+6/Ik/7i2O0a10bPquIcYfufog==",
|
||||
"dependencies": {
|
||||
"@grpc/proto-loader": "^0.7.0",
|
||||
"@types/node": ">=12.12.47"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^8.13.0 || >=10.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@grpc/grpc-js/node_modules/@grpc/proto-loader": {
|
||||
"version": "0.7.6",
|
||||
"resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.7.6.tgz",
|
||||
"integrity": "sha512-QyAXR8Hyh7uMDmveWxDSUcJr9NAWaZ2I6IXgAYvQmfflwouTM+rArE2eEaCtLlRqO81j7pRLCt81IefUei6Zbw==",
|
||||
"dependencies": {
|
||||
"@types/long": "^4.0.1",
|
||||
"lodash.camelcase": "^4.3.0",
|
||||
"long": "^4.0.0",
|
||||
"protobufjs": "^7.0.0",
|
||||
"yargs": "^16.2.0"
|
||||
},
|
||||
"bin": {
|
||||
"proto-loader-gen-types": "build/bin/proto-loader-gen-types.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/@grpc/grpc-js/node_modules/protobufjs": {
|
||||
"version": "7.2.3",
|
||||
"resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.3.tgz",
|
||||
"integrity": "sha512-TtpvOqwB5Gdz/PQmOjgsrGH1nHjAQVCN7JG4A6r1sXRWESL5rNMAiRcBQlCAdKxZcAbstExQePYG8xof/JVRgg==",
|
||||
"hasInstallScript": true,
|
||||
"dependencies": {
|
||||
"@protobufjs/aspromise": "^1.1.2",
|
||||
"@protobufjs/base64": "^1.1.2",
|
||||
"@protobufjs/codegen": "^2.0.4",
|
||||
"@protobufjs/eventemitter": "^1.1.0",
|
||||
"@protobufjs/fetch": "^1.1.0",
|
||||
"@protobufjs/float": "^1.0.2",
|
||||
"@protobufjs/inquire": "^1.1.0",
|
||||
"@protobufjs/path": "^1.1.2",
|
||||
"@protobufjs/pool": "^1.1.0",
|
||||
"@protobufjs/utf8": "^1.1.0",
|
||||
"@types/node": ">=13.7.0",
|
||||
"long": "^5.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@grpc/grpc-js/node_modules/protobufjs/node_modules/long": {
|
||||
"version": "5.2.1",
|
||||
"resolved": "https://registry.npmjs.org/long/-/long-5.2.1.tgz",
|
||||
"integrity": "sha512-GKSNGeNAtw8IryjjkhZxuKB3JzlcLTwjtiQCHKvqQet81I93kXslhDQruGI/QsddO83mcDToBVy7GqGS/zYf/A=="
|
||||
},
|
||||
"node_modules/@grpc/proto-loader": {
|
||||
"version": "0.6.13",
|
||||
"resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.6.13.tgz",
|
||||
"integrity": "sha512-FjxPYDRTn6Ec3V0arm1FtSpmP6V50wuph2yILpyvTKzjc76oDdoihXqM1DzOW5ubvCC8GivfCnNtfaRE8myJ7g==",
|
||||
"dependencies": {
|
||||
"@types/long": "^4.0.1",
|
||||
"lodash.camelcase": "^4.3.0",
|
||||
"long": "^4.0.0",
|
||||
"protobufjs": "^6.11.3",
|
||||
"yargs": "^16.2.0"
|
||||
},
|
||||
"bin": {
|
||||
"proto-loader-gen-types": "build/bin/proto-loader-gen-types.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/@protobufjs/aspromise": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz",
|
||||
"integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ=="
|
||||
},
|
||||
"node_modules/@protobufjs/base64": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz",
|
||||
"integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg=="
|
||||
},
|
||||
"node_modules/@protobufjs/codegen": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz",
|
||||
"integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg=="
|
||||
},
|
||||
"node_modules/@protobufjs/eventemitter": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz",
|
||||
"integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q=="
|
||||
},
|
||||
"node_modules/@protobufjs/fetch": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz",
|
||||
"integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==",
|
||||
"dependencies": {
|
||||
"@protobufjs/aspromise": "^1.1.1",
|
||||
"@protobufjs/inquire": "^1.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@protobufjs/float": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz",
|
||||
"integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ=="
|
||||
},
|
||||
"node_modules/@protobufjs/inquire": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz",
|
||||
"integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q=="
|
||||
},
|
||||
"node_modules/@protobufjs/path": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz",
|
||||
"integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA=="
|
||||
},
|
||||
"node_modules/@protobufjs/pool": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz",
|
||||
"integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw=="
|
||||
},
|
||||
"node_modules/@protobufjs/utf8": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz",
|
||||
"integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw=="
|
||||
},
|
||||
"node_modules/@types/long": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz",
|
||||
"integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA=="
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "18.15.11",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.11.tgz",
|
||||
"integrity": "sha512-E5Kwq2n4SbMzQOn6wnmBjuK9ouqlURrcZDVfbo9ftDDTFt3nk7ZKK4GMOzoYgnpQJKcxwQw+lGaBvvlMo0qN/Q=="
|
||||
},
|
||||
"node_modules/ansi-regex": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
|
||||
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/ansi-styles": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
|
||||
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
|
||||
"dependencies": {
|
||||
"color-convert": "^2.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/cliui": {
|
||||
"version": "7.0.4",
|
||||
"resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz",
|
||||
"integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==",
|
||||
"dependencies": {
|
||||
"string-width": "^4.2.0",
|
||||
"strip-ansi": "^6.0.0",
|
||||
"wrap-ansi": "^7.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/color-convert": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
||||
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
|
||||
"dependencies": {
|
||||
"color-name": "~1.1.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=7.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/color-name": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
|
||||
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
|
||||
},
|
||||
"node_modules/emoji-regex": {
|
||||
"version": "8.0.0",
|
||||
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
|
||||
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
|
||||
},
|
||||
"node_modules/escalade": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
|
||||
"integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==",
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/faye-websocket": {
|
||||
"version": "0.11.4",
|
||||
"resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.4.tgz",
|
||||
"integrity": "sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g==",
|
||||
"dependencies": {
|
||||
"websocket-driver": ">=0.5.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/firebase": {
|
||||
"version": "9.19.1",
|
||||
"resolved": "https://registry.npmjs.org/firebase/-/firebase-9.19.1.tgz",
|
||||
"integrity": "sha512-MeukV4NIk6usV1ZbnoA36gumK62JzxOZmF6OZyqkFwJ7edpAEyYNZXvExQlFsvnx2ery0UwNIvu4pKIZS3HiEQ==",
|
||||
"dependencies": {
|
||||
"@firebase/analytics": "0.9.5",
|
||||
"@firebase/analytics-compat": "0.2.5",
|
||||
"@firebase/app": "0.9.7",
|
||||
"@firebase/app-check": "0.6.4",
|
||||
"@firebase/app-check-compat": "0.3.4",
|
||||
"@firebase/app-compat": "0.2.7",
|
||||
"@firebase/app-types": "0.9.0",
|
||||
"@firebase/auth": "0.22.0",
|
||||
"@firebase/auth-compat": "0.3.7",
|
||||
"@firebase/database": "0.14.4",
|
||||
"@firebase/database-compat": "0.3.4",
|
||||
"@firebase/firestore": "3.10.0",
|
||||
"@firebase/firestore-compat": "0.3.6",
|
||||
"@firebase/functions": "0.9.4",
|
||||
"@firebase/functions-compat": "0.3.4",
|
||||
"@firebase/installations": "0.6.4",
|
||||
"@firebase/installations-compat": "0.2.4",
|
||||
"@firebase/messaging": "0.12.4",
|
||||
"@firebase/messaging-compat": "0.2.4",
|
||||
"@firebase/performance": "0.6.4",
|
||||
"@firebase/performance-compat": "0.2.4",
|
||||
"@firebase/remote-config": "0.4.4",
|
||||
"@firebase/remote-config-compat": "0.2.4",
|
||||
"@firebase/storage": "0.11.2",
|
||||
"@firebase/storage-compat": "0.3.2",
|
||||
"@firebase/util": "1.9.3"
|
||||
}
|
||||
},
|
||||
"node_modules/fs": {
|
||||
"version": "0.0.1-security",
|
||||
"resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz",
|
||||
"integrity": "sha512-3XY9e1pP0CVEUCdj5BmfIZxRBTSDycnbqhIOGec9QYtmVH2fbLpj86CFWkrNOkt/Fvty4KZG5lTglL9j/gJ87w=="
|
||||
},
|
||||
"node_modules/get-caller-file": {
|
||||
"version": "2.0.5",
|
||||
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
|
||||
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
|
||||
"engines": {
|
||||
"node": "6.* || 8.* || >= 10.*"
|
||||
}
|
||||
},
|
||||
"node_modules/http-parser-js": {
|
||||
"version": "0.5.8",
|
||||
"resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.8.tgz",
|
||||
"integrity": "sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q=="
|
||||
},
|
||||
"node_modules/idb": {
|
||||
"version": "7.0.1",
|
||||
"resolved": "https://registry.npmjs.org/idb/-/idb-7.0.1.tgz",
|
||||
"integrity": "sha512-UUxlE7vGWK5RfB/fDwEGgRf84DY/ieqNha6msMV99UsEMQhJ1RwbCd8AYBj3QMgnE3VZnfQvm4oKVCJTYlqIgg=="
|
||||
},
|
||||
"node_modules/is-fullwidth-code-point": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
|
||||
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/lodash.camelcase": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz",
|
||||
"integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA=="
|
||||
},
|
||||
"node_modules/long": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz",
|
||||
"integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA=="
|
||||
},
|
||||
"node_modules/node-fetch": {
|
||||
"version": "2.6.7",
|
||||
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",
|
||||
"integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",
|
||||
"dependencies": {
|
||||
"whatwg-url": "^5.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "4.x || >=6.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"encoding": "^0.1.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"encoding": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/protobufjs": {
|
||||
"version": "6.11.3",
|
||||
"resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.3.tgz",
|
||||
"integrity": "sha512-xL96WDdCZYdU7Slin569tFX712BxsxslWwAfAhCYjQKGTq7dAU91Lomy6nLLhh/dyGhk/YH4TwTSRxTzhuHyZg==",
|
||||
"hasInstallScript": true,
|
||||
"dependencies": {
|
||||
"@protobufjs/aspromise": "^1.1.2",
|
||||
"@protobufjs/base64": "^1.1.2",
|
||||
"@protobufjs/codegen": "^2.0.4",
|
||||
"@protobufjs/eventemitter": "^1.1.0",
|
||||
"@protobufjs/fetch": "^1.1.0",
|
||||
"@protobufjs/float": "^1.0.2",
|
||||
"@protobufjs/inquire": "^1.1.0",
|
||||
"@protobufjs/path": "^1.1.2",
|
||||
"@protobufjs/pool": "^1.1.0",
|
||||
"@protobufjs/utf8": "^1.1.0",
|
||||
"@types/long": "^4.0.1",
|
||||
"@types/node": ">=13.7.0",
|
||||
"long": "^4.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"pbjs": "bin/pbjs",
|
||||
"pbts": "bin/pbts"
|
||||
}
|
||||
},
|
||||
"node_modules/require-directory": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
|
||||
"integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/safe-buffer": {
|
||||
"version": "5.2.1",
|
||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
|
||||
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/feross"
|
||||
},
|
||||
{
|
||||
"type": "patreon",
|
||||
"url": "https://www.patreon.com/feross"
|
||||
},
|
||||
{
|
||||
"type": "consulting",
|
||||
"url": "https://feross.org/support"
|
||||
}
|
||||
]
|
||||
},
|
||||
"node_modules/string-width": {
|
||||
"version": "4.2.3",
|
||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
|
||||
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
|
||||
"dependencies": {
|
||||
"emoji-regex": "^8.0.0",
|
||||
"is-fullwidth-code-point": "^3.0.0",
|
||||
"strip-ansi": "^6.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/strip-ansi": {
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
|
||||
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
|
||||
"dependencies": {
|
||||
"ansi-regex": "^5.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/tr46": {
|
||||
"version": "0.0.3",
|
||||
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
|
||||
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
|
||||
},
|
||||
"node_modules/tslib": {
|
||||
"version": "2.5.0",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz",
|
||||
"integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg=="
|
||||
},
|
||||
"node_modules/webidl-conversions": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
|
||||
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="
|
||||
},
|
||||
"node_modules/websocket-driver": {
|
||||
"version": "0.7.4",
|
||||
"resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz",
|
||||
"integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==",
|
||||
"dependencies": {
|
||||
"http-parser-js": ">=0.5.1",
|
||||
"safe-buffer": ">=5.1.0",
|
||||
"websocket-extensions": ">=0.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/websocket-extensions": {
|
||||
"version": "0.1.4",
|
||||
"resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz",
|
||||
"integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==",
|
||||
"engines": {
|
||||
"node": ">=0.8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/whatwg-url": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
|
||||
"integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
|
||||
"dependencies": {
|
||||
"tr46": "~0.0.3",
|
||||
"webidl-conversions": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/wrap-ansi": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
|
||||
"integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
|
||||
"dependencies": {
|
||||
"ansi-styles": "^4.0.0",
|
||||
"string-width": "^4.1.0",
|
||||
"strip-ansi": "^6.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/chalk/wrap-ansi?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/y18n": {
|
||||
"version": "5.0.8",
|
||||
"resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
|
||||
"integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/yargs": {
|
||||
"version": "16.2.0",
|
||||
"resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz",
|
||||
"integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==",
|
||||
"dependencies": {
|
||||
"cliui": "^7.0.2",
|
||||
"escalade": "^3.1.1",
|
||||
"get-caller-file": "^2.0.5",
|
||||
"require-directory": "^2.1.1",
|
||||
"string-width": "^4.2.0",
|
||||
"y18n": "^5.0.5",
|
||||
"yargs-parser": "^20.2.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/yargs-parser": {
|
||||
"version": "20.2.9",
|
||||
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz",
|
||||
"integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==",
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"name": "admin",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"firebase": "^9.19.1",
|
||||
"fs": "^0.0.1-security"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
import firebase from "firebase/compat/app";
|
||||
import "firebase/compat/database";
|
||||
import "firebase/compat/storage";
|
||||
import fs from "fs";
|
||||
|
||||
firebase.initializeApp({
|
||||
apiKey: "AIzaSyBWE1l8WV_7eyKT-PMu0Kq2w_WiV0SUhJw",
|
||||
authDomain: "messaggiswing.firebaseapp.com",
|
||||
projectId: "messaggiswing",
|
||||
storageBucket: "messaggiswing.appspot.com",
|
||||
messagingSenderId: "983131964310",
|
||||
appId: "1:983131964310:web:5ef430e42c42d2dfe253b7",
|
||||
measurementId: "G-1CBJZ3B48E",
|
||||
databaseURL:
|
||||
"https://messaggiswing-default-rtdb.europe-west1.firebasedatabase.app",
|
||||
});
|
||||
|
||||
var defaultDatabase = firebase.database();
|
||||
var storageRef = firebase.storage().ref();
|
||||
const folder = "danisqualo";
|
||||
defaultDatabase.ref(`/messaggi/${folder}`).once("value", (s) => {
|
||||
const obj = s.val();
|
||||
const messages = Object.keys(obj).map((d) => {
|
||||
return {
|
||||
key: d,
|
||||
...obj[d],
|
||||
};
|
||||
});
|
||||
var i = 0;
|
||||
function move() {
|
||||
const m = messages[i];
|
||||
const { immagineURL } = m;
|
||||
if (immagineURL) {
|
||||
var url = immagineURL.substring(
|
||||
immagineURL.lastIndexOf("%2F") + 3,
|
||||
immagineURL.indexOf(".jpg") + 4
|
||||
);
|
||||
console.log(url);
|
||||
storageRef
|
||||
.child(`images/${folder}/${url}`)
|
||||
.getDownloadURL()
|
||||
.then((url) => {
|
||||
defaultDatabase
|
||||
.ref(`/messaggi/${folder}/${m.key}/immagineURL`)
|
||||
.set(url);
|
||||
});
|
||||
}
|
||||
i++;
|
||||
if (i < messages.length) move();
|
||||
}
|
||||
move();
|
||||
});
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"rules": {
|
||||
".read": true,
|
||||
".write": true
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 632 B |
|
After Width: | Height: | Size: 1.5 KiB |
@@ -0,0 +1 @@
|
||||
{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}
|
||||
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"database": {
|
||||
"rules": "database.rules.json"
|
||||
},
|
||||
"hosting": {
|
||||
"public": "build",
|
||||
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
|
||||
"headers": [
|
||||
{
|
||||
"source": "**/.jpg",
|
||||
"headers": [
|
||||
{
|
||||
"key": "Cache-Control",
|
||||
"value": "max-age=3000000"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"rewrites": [
|
||||
{
|
||||
"source": "**",
|
||||
"destination": "/index.html"
|
||||
}
|
||||
]
|
||||
},
|
||||
"storage": {
|
||||
"rules": "storage.rules"
|
||||
}
|
||||
}
|
||||
@@ -2,26 +2,37 @@
|
||||
"name": "messaggi",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"homepage": "https://letsswing.it/messaggi",
|
||||
"homepage": "/",
|
||||
"dependencies": {
|
||||
"@emotion/react": "^11.10.5",
|
||||
"@emotion/styled": "^11.10.5",
|
||||
"@mui/icons-material": "^5.11.0",
|
||||
"@mui/material": "^5.11.1",
|
||||
"@testing-library/jest-dom": "^5.16.5",
|
||||
"@testing-library/react": "^13.4.0",
|
||||
"@testing-library/user-event": "^13.5.0",
|
||||
"firebase": "^8.10.1",
|
||||
"exif-js": "^2.3.0",
|
||||
"firebase": "^9.17.2",
|
||||
"localforage": "^1.10.0",
|
||||
"match-sorter": "^6.3.1",
|
||||
"moment": "^2.30.1",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-hook-form": "^7.41.0",
|
||||
"react-router-dom": "^6.6.1",
|
||||
"react-scripts": "5.0.1",
|
||||
"sass": "^1.60.0",
|
||||
"sort-by": "^1.2.0",
|
||||
"uuid": "^9.0.1",
|
||||
"web-vitals": "^2.1.4"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": [
|
||||
"react-app"
|
||||
]
|
||||
},
|
||||
"scripts": {
|
||||
"go": "npm run build && rm ./build/*.mp4 && scp -r ./build danilo@enne2.net:www/letsswingchat/",
|
||||
"start": "react-scripts start",
|
||||
"build": "react-scripts build",
|
||||
"test": "react-scripts test",
|
||||
|
||||
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 15 KiB |
@@ -1,14 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<html lang="it">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="theme-color" content="#000000" />
|
||||
<meta
|
||||
name="description"
|
||||
content="Web site created using create-react-app"
|
||||
/>
|
||||
<meta name="description" content="Let's swing Chat!" />
|
||||
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
|
||||
|
||||
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
|
||||
|
||||
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 39 KiB |
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"short_name": "React App",
|
||||
"name": "Create React App Sample",
|
||||
"short_name": "Chat Let's Swing!",
|
||||
"name": "Chat Let's Swing!",
|
||||
"icons": [
|
||||
{
|
||||
"src": "favicon.ico",
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
import React, { useEffect, useState } from "react";
|
||||
import firebase from "firebase/app";
|
||||
import { Stack } from "@mui/system";
|
||||
import { CheckboxListSecondary } from "./index";
|
||||
|
||||
export const Admin = () => {
|
||||
const [messaggi, cambiaMessaggi] = useState([]);
|
||||
|
||||
useEffect(() => {
|
||||
// Get a reference to the messages node in the Realtime Database
|
||||
var messagesRef = firebase.database().ref("/messaggi");
|
||||
console.log(messagesRef);
|
||||
|
||||
messagesRef.on("value", function (snapshot) {
|
||||
var messaggi = snapshot.val();
|
||||
console.log(messaggi);
|
||||
messaggi = Object.keys(messaggi).map((d) => messaggi[d]);
|
||||
cambiaMessaggi(messaggi);
|
||||
});
|
||||
|
||||
messagesRef.on("child_changed", function (snapshot) {
|
||||
var messaggio = snapshot.val();
|
||||
const i = messaggi.findIndex((m) => messaggio.timestamp === m.timestamp);
|
||||
});
|
||||
}, []);
|
||||
|
||||
let element;
|
||||
if (!messaggi.length) {
|
||||
element = <div>nessun messaggio</div>;
|
||||
} else {
|
||||
element = (
|
||||
<CheckboxListSecondary
|
||||
messaggi={messaggi}
|
||||
onChecked={(m) => {
|
||||
firebase
|
||||
.database()
|
||||
.ref("messaggi/" + m.id)
|
||||
.update({
|
||||
approvato: !m.approvato,
|
||||
});
|
||||
}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<Stack>
|
||||
<h2>Admin</h2>
|
||||
{element}
|
||||
</Stack>
|
||||
);
|
||||
};
|
||||
@@ -14,6 +14,10 @@
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
html {
|
||||
background: black;
|
||||
}
|
||||
|
||||
#myVideo {
|
||||
position: fixed;
|
||||
left: 50%;
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
import React from "react";
|
||||
import ArrowForwardIcon from "@mui/icons-material/ArrowForward";
|
||||
import ArrowBackIcon from "@mui/icons-material/ArrowBack";
|
||||
import IconButton from "@mui/material/IconButton";
|
||||
import CloseIcon from "@mui/icons-material/Close";
|
||||
import { Stack } from "@mui/system";
|
||||
|
||||
export function Buttons(
|
||||
indiceCorrente,
|
||||
cambiaindiceCorrente,
|
||||
messaggi,
|
||||
setMainMessage
|
||||
) {
|
||||
return (
|
||||
<Stack
|
||||
style={{
|
||||
display: "flex",
|
||||
width: "100vw",
|
||||
}}
|
||||
direction="row"
|
||||
>
|
||||
<Stack
|
||||
style={{
|
||||
display: "flex",
|
||||
width: "70vw",
|
||||
margin: "0 auto",
|
||||
justifyContent: "space-between",
|
||||
}}
|
||||
direction="row"
|
||||
>
|
||||
{indiceCorrente > 0 && (
|
||||
<IconButton onClick={() => cambiaindiceCorrente(indiceCorrente - 1)}>
|
||||
<ArrowBackIcon style={{ fontSize: "3rem", color: "#ddd" }} />
|
||||
</IconButton>
|
||||
)}
|
||||
|
||||
<IconButton onClick={() => setMainMessage(null)}>
|
||||
<CloseIcon style={{ fontSize: "3rem", color: "#ddd" }} />
|
||||
</IconButton>
|
||||
|
||||
{indiceCorrente < messaggi.length - 1 && (
|
||||
<IconButton onClick={() => cambiaindiceCorrente(indiceCorrente + 1)}>
|
||||
<ArrowForwardIcon style={{ fontSize: "3rem", color: "#ddd" }} />
|
||||
</IconButton>
|
||||
)}
|
||||
</Stack>
|
||||
</Stack>
|
||||
);
|
||||
}
|
||||
@@ -33,7 +33,7 @@ function Countdown({ duration, onComplete }) {
|
||||
}
|
||||
}, 1000);
|
||||
let seconds = timeLeft % 60;
|
||||
return <div>{seconds}</div>;
|
||||
return <span>{seconds}</span>;
|
||||
}
|
||||
|
||||
export default Countdown;
|
||||
|
||||
@@ -1,29 +1,33 @@
|
||||
import React, { useState } from "react";
|
||||
import firebase from "firebase/app";
|
||||
import "firebase/storage";
|
||||
import firebase from "firebase/compat/app";
|
||||
import "firebase/compat/storage";
|
||||
import { Stack } from "@mui/system";
|
||||
import { Button } from "@mui/material";
|
||||
import { useParams } from "react-router-dom";
|
||||
import { v4 as uuidv4 } from "uuid";
|
||||
|
||||
const IDLE = 0;
|
||||
const IMAGE_SET = 1;
|
||||
const UPLOADING = 2;
|
||||
const DONE = 3;
|
||||
|
||||
function ImageUpload({ onImageURLSet }) {
|
||||
function ImageUpload({ onImageURLSet, onImageUploading }) {
|
||||
const { evento } = useParams();
|
||||
const [state, setState] = useState();
|
||||
const [image, setImage] = useState(null);
|
||||
const [imageUrl, setImageUrl] = useState("");
|
||||
const [progress, setProgress] = useState(0);
|
||||
|
||||
const handleChange = (e) => {
|
||||
const imgRef = `images/${evento}/${uuidv4()}_${image.name}`;
|
||||
if (e.target.files[0]) {
|
||||
// setState(1);
|
||||
let image = e.target.files[0];
|
||||
|
||||
const uploadTask = firebase
|
||||
.storage()
|
||||
.ref(`images/${image.name}`)
|
||||
.put(image);
|
||||
onImageUploading(true);
|
||||
const uploadTask = firebase.storage(imgRef).ref().put(image, {
|
||||
cacheControl: "public,max-age=3000000",
|
||||
contentType: "image/jpeg",
|
||||
});
|
||||
|
||||
setState(UPLOADING);
|
||||
|
||||
@@ -41,8 +45,7 @@ function ImageUpload({ onImageURLSet }) {
|
||||
() => {
|
||||
firebase
|
||||
.storage()
|
||||
.ref("images")
|
||||
.child(image.name)
|
||||
.ref(imgRef)
|
||||
.getDownloadURL()
|
||||
.then((url) => {
|
||||
setImageUrl(url);
|
||||
@@ -61,22 +64,38 @@ function ImageUpload({ onImageURLSet }) {
|
||||
default:
|
||||
case IDLE:
|
||||
componente = (
|
||||
<>
|
||||
<Stack
|
||||
style={{ justifyContent: "center", alignItems: "center" }}
|
||||
direction="row"
|
||||
>
|
||||
<input
|
||||
style={{ display: "none" }}
|
||||
id="raised-button-file"
|
||||
id="camera-input"
|
||||
multiple
|
||||
type="file"
|
||||
accept="image/*"
|
||||
capture="camera"
|
||||
onChange={handleChange}
|
||||
/>
|
||||
<label htmlFor="raised-button-file">
|
||||
<label htmlFor="camera-input">
|
||||
<Button style={{ padding: 20, width: "100%" }} component="span">
|
||||
scatta una foto
|
||||
</Button>
|
||||
</label>
|
||||
<input
|
||||
style={{ display: "none" }}
|
||||
id="gallery-input"
|
||||
multiple
|
||||
type="file"
|
||||
accept="image/*"
|
||||
onChange={handleChange}
|
||||
/>
|
||||
<label htmlFor="gallery-input">
|
||||
<Button style={{ padding: 20, width: "100%" }} component="span">
|
||||
Aggiungi un'immagine
|
||||
</Button>
|
||||
</label>
|
||||
</>
|
||||
</Stack>
|
||||
);
|
||||
break;
|
||||
case IMAGE_SET:
|
||||
@@ -85,7 +104,7 @@ function ImageUpload({ onImageURLSet }) {
|
||||
spacing={2}
|
||||
style={{ justifyContent: "center", alignItems: "center" }}
|
||||
>
|
||||
<img style={{ width: 200 }} src={URL.createObjectURL(image)} />
|
||||
<img style={{ width: 100 }} src={URL.createObjectURL(image)} />
|
||||
<Stack
|
||||
spacing={4}
|
||||
style={{ width: "100%", justifyContent: "center" }}
|
||||
@@ -98,7 +117,7 @@ function ImageUpload({ onImageURLSet }) {
|
||||
>
|
||||
riprova
|
||||
</Button>
|
||||
<Button onClick={handleUpload}>carica</Button>
|
||||
<Button>carica</Button>
|
||||
</Stack>
|
||||
</Stack>
|
||||
);
|
||||
@@ -107,6 +126,7 @@ function ImageUpload({ onImageURLSet }) {
|
||||
case UPLOADING:
|
||||
componente = (
|
||||
<div style={{ width: "100%" }}>
|
||||
<p style={{ fontFamily: "Lineatura" }}>un attimo sto caricando...</p>
|
||||
<progress style={{ width: "100%" }} value={progress} max="100" />
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -1,91 +0,0 @@
|
||||
import logoSrc from "./logo_p.svg";
|
||||
import React, { useState } from "react";
|
||||
import firebase from "firebase/app";
|
||||
import TextField from "@mui/material/TextField";
|
||||
import { Container, Stack } from "@mui/system";
|
||||
import { Button, Typography } from "@mui/material";
|
||||
import { useForm } from "react-hook-form";
|
||||
import Countdown from "./Countdown";
|
||||
import ImageUpload from "./ImageUpload";
|
||||
|
||||
export const MyForm = () => {
|
||||
const [mandato, cambiaMandato] = useState(false);
|
||||
const [immagineURL, cambiaimmagineURL] = useState(null);
|
||||
const { register, handleSubmit } = useForm();
|
||||
const onSubmit = ({ testo, autore }) => {
|
||||
cambiaMandato(true);
|
||||
var postListRef = firebase.database().ref("messaggi");
|
||||
var newPostRef = postListRef.push();
|
||||
const update = {
|
||||
id: newPostRef.key,
|
||||
autore,
|
||||
testo,
|
||||
timestamp: firebase.database.ServerValue.TIMESTAMP,
|
||||
approvato: true,
|
||||
};
|
||||
if (immagineURL) update.immagineURL = immagineURL;
|
||||
newPostRef.set(update);
|
||||
};
|
||||
|
||||
const onImageURLSet = (url) => {
|
||||
cambiaimmagineURL(url);
|
||||
};
|
||||
|
||||
if (mandato) {
|
||||
return (
|
||||
<Stack>
|
||||
<div>mandato e mo aspetti</div>
|
||||
<Countdown onComplete={() => cambiaMandato(false)} duration={5} />
|
||||
</Stack>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<Container maxWidth="sm" style={{ marginTop: 20 }}>
|
||||
<div style={{ textAlign: "center" }}>
|
||||
<img
|
||||
src={logoSrc}
|
||||
style={{
|
||||
width: 200,
|
||||
}}
|
||||
/>
|
||||
<Typography
|
||||
variant="h5"
|
||||
style={{ marginBottom: 40, fontFamily: "Lineatura" }}
|
||||
>
|
||||
Manda un messaggio!
|
||||
</Typography>
|
||||
</div>
|
||||
<form onSubmit={handleSubmit(onSubmit)}>
|
||||
<Stack spacing={2}>
|
||||
<TextField
|
||||
multiline
|
||||
rows={4}
|
||||
{...register("testo", { required: true, maxLength: 20 })}
|
||||
id="outlined-basic"
|
||||
label="messaggio"
|
||||
variant="outlined"
|
||||
/>
|
||||
<TextField
|
||||
{...register("autore", { pattern: /^[A-Za-z]+$/i })}
|
||||
id="outlined-basic"
|
||||
label="da"
|
||||
variant="outlined"
|
||||
/>
|
||||
<ImageUpload onImageURLSet={onImageURLSet} />
|
||||
<Button
|
||||
className="okbutton"
|
||||
type="submit"
|
||||
style={{
|
||||
padding: "30px 0px",
|
||||
fontSize: 20,
|
||||
fontFamily: "Lineatura",
|
||||
}}
|
||||
variant="contained"
|
||||
>
|
||||
ok
|
||||
</Button>
|
||||
</Stack>
|
||||
</form>
|
||||
</Container>
|
||||
);
|
||||
};
|
||||
@@ -1,184 +0,0 @@
|
||||
import React, { useEffect, useState } from "react";
|
||||
import firebase from "firebase/app";
|
||||
import { Button, Grid, Stack } from "@mui/material";
|
||||
import videoSrc from "./video.mp4";
|
||||
import logoSrc from "./logo.svg";
|
||||
import { useInterval } from "./Countdown";
|
||||
|
||||
window.debug = false;
|
||||
|
||||
export const Proiezione = () => {
|
||||
const [messaggi, cambiaMessaggi] = useState([]);
|
||||
const [messaggiApprovati, cambiaMessaggiApprovati] = useState([]);
|
||||
const [indiceCorrente, cambiaindiceCorrente] = useState(0);
|
||||
|
||||
useEffect(() => {
|
||||
var messagesRef = firebase.database().ref("/messaggi");
|
||||
|
||||
messagesRef.on("child_added", function (snapshot) {
|
||||
console.log("child_added");
|
||||
var messaggio = snapshot.val();
|
||||
cambiaMessaggi((oldArray) => {
|
||||
const newArray = [...oldArray, messaggio].sort(
|
||||
(a, b) => b.timestamp - a.timestamp
|
||||
);
|
||||
cambiaMessaggiApprovati(newArray.filter((d) => d.approvato));
|
||||
return newArray;
|
||||
});
|
||||
});
|
||||
|
||||
messagesRef.on("child_changed", function (snapshot) {
|
||||
console.log("child_changed");
|
||||
const messaggio = snapshot.val();
|
||||
cambiaMessaggi((oldArray) => {
|
||||
const newArray = [...oldArray];
|
||||
newArray.forEach((d, i, a) => {
|
||||
if (d.id === messaggio.id) a[i] = messaggio;
|
||||
});
|
||||
cambiaMessaggiApprovati(newArray.filter((d) => d.approvato));
|
||||
return newArray;
|
||||
});
|
||||
});
|
||||
}, []);
|
||||
|
||||
const nextMessage = () => {
|
||||
if (!messaggiApprovati.length) return;
|
||||
const newIndice = (indiceCorrente + 1) % messaggiApprovati.length;
|
||||
cambiaindiceCorrente(newIndice);
|
||||
};
|
||||
|
||||
const ContainerMessaggio = ({ messaggiApprovati, indiceCorrente }) => {
|
||||
if (!messaggiApprovati.length) {
|
||||
return <div>nessun messaggio</div>;
|
||||
} else {
|
||||
return (
|
||||
<Messaggio
|
||||
messaggiApprovati={messaggiApprovati}
|
||||
indiceCorrente={indiceCorrente}
|
||||
nextMessage={nextMessage}
|
||||
/>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div>
|
||||
<VideoComponent />
|
||||
<ContainerMessaggio
|
||||
messaggiApprovati={messaggiApprovati}
|
||||
indiceCorrente={indiceCorrente}
|
||||
/>
|
||||
<img
|
||||
src={logoSrc}
|
||||
style={{
|
||||
width: 120,
|
||||
position: "absolute",
|
||||
top: 20,
|
||||
right: 20,
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
const Immagine = ({ url }) => {
|
||||
return (
|
||||
<div
|
||||
style={{
|
||||
height: 400,
|
||||
width: 400,
|
||||
borderRadius: "50%",
|
||||
backgroundSize: "cover",
|
||||
backgroundImage: `url("${url}")`,
|
||||
backgroundPositionX: "center",
|
||||
}}
|
||||
></div>
|
||||
);
|
||||
};
|
||||
|
||||
const Messaggio = ({ nextMessage, messaggiApprovati, indiceCorrente }) => {
|
||||
const [timeLeft, setTimeLeft] = useState(6);
|
||||
const [fadeProp, setFadeProp] = useState("in");
|
||||
const [messaggioDaMostrare, setMessaggioDaMostrare] = useState(null);
|
||||
|
||||
useEffect(() => {
|
||||
if (messaggiApprovati[indiceCorrente] != messaggioDaMostrare) {
|
||||
setFadeProp("out");
|
||||
setTimeout(() => {
|
||||
setMessaggioDaMostrare(messaggiApprovati[indiceCorrente]);
|
||||
setFadeProp("in");
|
||||
}, 1000);
|
||||
}
|
||||
}, [messaggiApprovati, indiceCorrente]);
|
||||
|
||||
useInterval(() => {
|
||||
if (timeLeft === 1) {
|
||||
setFadeProp("out");
|
||||
setTimeout(() => {
|
||||
nextMessage();
|
||||
}, 2000);
|
||||
} else {
|
||||
setTimeLeft(timeLeft - 1);
|
||||
}
|
||||
}, 1000);
|
||||
|
||||
return (
|
||||
<div className={"fade-" + fadeProp}>
|
||||
<div
|
||||
style={{
|
||||
position: "absolute",
|
||||
fontFamily: "Lineatura",
|
||||
width: "100%",
|
||||
height: "100vh",
|
||||
fontWeight: "bold",
|
||||
color: "white",
|
||||
display: "flex",
|
||||
justifyContent: "space-around",
|
||||
alignContent: "center",
|
||||
alignItems: "center",
|
||||
textAlign: "center",
|
||||
}}
|
||||
>
|
||||
{messaggioDaMostrare && (
|
||||
<div>
|
||||
{messaggioDaMostrare.immagineURL && (
|
||||
<Immagine url={messaggioDaMostrare.immagineURL} />
|
||||
)}
|
||||
<h1
|
||||
style={{
|
||||
textShadow:
|
||||
"0px 0px 10px rgba(0,0,0,100), 0px 0px 10px rgba(0,0,0,100), 0px 0px 10px rgba(0,0,0,100)",
|
||||
}}
|
||||
>
|
||||
{messaggioDaMostrare.testo}
|
||||
</h1>
|
||||
<p
|
||||
style={{
|
||||
display: "inline-block",
|
||||
background: "black",
|
||||
padding: "0px 6px",
|
||||
paddingBottom: "4px",
|
||||
}}
|
||||
>
|
||||
da {messaggioDaMostrare.autore}
|
||||
</p>
|
||||
|
||||
{debug && (
|
||||
<div>
|
||||
<Button onClick={() => nextMessage()}>next</Button>
|
||||
{timeLeft}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
const VideoComponent = React.memo(() => {
|
||||
return (
|
||||
<video autoPlay muted loop id="myVideo">
|
||||
<source src={videoSrc} type="video/mp4" />
|
||||
</video>
|
||||
);
|
||||
});
|
||||
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
@@ -0,0 +1,22 @@
|
||||
<svg width="730" height="729" viewBox="0 0 730 729" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="364.753" cy="364.384" r="364.306" fill="black" style="fill:black;fill-opacity:1;"/>
|
||||
<path d="M315.856 615.891L304.136 619.566C303.414 617.285 302.185 615.314 300.451 613.653C298.776 611.958 296.759 610.79 294.4 610.151C290.654 609.136 287.105 609.589 283.754 611.511C280.404 613.433 278.221 616.267 277.206 620.013C276.19 623.76 276.644 627.308 278.566 630.659C280.487 634.009 283.322 636.192 287.068 637.208C289.427 637.847 291.751 637.881 294.04 637.31C296.389 636.705 298.45 635.601 300.226 633.996L308.486 643.086C305.137 646.101 301.307 648.141 296.997 649.207C292.687 650.273 288.312 650.205 283.872 649.001C276.842 647.096 271.54 643.028 267.966 636.797C264.358 630.507 263.507 623.847 265.412 616.817C267.304 609.833 271.396 604.538 277.685 600.93C283.975 597.322 290.612 596.465 297.596 598.357C302.036 599.561 305.847 601.71 309.029 604.807C312.212 607.903 314.487 611.598 315.856 615.891Z" fill="white" style="fill:white;fill-opacity:1;"/>
|
||||
<path d="M370.024 609.813L365.76 659.946L353.585 658.911L355.199 639.932L330.849 637.861L329.235 656.84L317.059 655.804L321.323 605.671L333.499 606.706L331.884 625.685L356.235 627.756L357.849 608.777L370.024 609.813Z" fill="white" style="fill:white;fill-opacity:1;"/>
|
||||
<path d="M392.075 650.333L389.502 658.913L376.206 660.302L392.782 607.982L406.793 606.518L433.825 654.282L420.528 655.671L416.238 647.808L392.075 650.333ZM409.893 636.186L401.139 620.189L395.881 637.65L409.893 636.186Z" fill="white" style="fill:white;fill-opacity:1;"/>
|
||||
<path d="M440.765 612.639L431.042 615.234L427.891 603.428L459.142 595.087L462.293 606.892L452.57 609.488L462.395 646.294L450.589 649.445L440.765 612.639Z" fill="white" style="fill:white;fill-opacity:1;"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M261.583 172.438L271.016 318.929L305.085 300.156L310.518 310.015L260.922 337.344L250.35 173.161L261.583 172.438Z" fill="white" style="fill:white;fill-opacity:1;"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M458.473 134.822L464.078 134.591L463.615 123.344C462.971 123.37 462.326 123.391 461.681 123.413C460.26 123.46 458.837 123.506 457.42 123.61C457.1 123.633 456.653 123.671 456.086 123.732C454.951 123.853 453.335 124.064 451.297 124.431C447.222 125.166 441.456 126.522 434.471 129.021C422.249 133.394 406.335 141.251 389.26 155.335L384.83 125.403L373.694 127.051L379.187 164.166C361.692 179.37 344.787 185.69 332.191 188.223C325.559 189.557 320.093 189.846 316.338 189.809C314.461 189.791 313.014 189.692 312.068 189.602C311.594 189.557 311.246 189.515 311.032 189.487C310.925 189.472 310.852 189.462 310.813 189.456L310.786 189.452L310.785 189.451L310.781 189.451L305.252 188.514L303.371 199.612C304.008 199.72 304.645 199.834 305.282 199.948C306.7 200.201 308.118 200.455 309.545 200.645C309.896 200.692 310.386 200.75 311.006 200.809C312.247 200.927 314.012 201.044 316.229 201.066C320.662 201.109 326.916 200.766 334.411 199.259C347.358 196.655 363.925 190.589 381.111 177.165L399.788 303.365L410.923 301.717L391.208 168.499C409.198 152.421 425.98 144.015 438.263 139.62C444.614 137.348 449.775 136.144 453.293 135.51C455.052 135.193 456.4 135.019 457.28 134.925C457.719 134.878 458.042 134.852 458.24 134.837C458.339 134.83 458.407 134.826 458.443 134.824L458.468 134.822L458.469 134.822L458.473 134.822Z" fill="white" style="fill:white;fill-opacity:1;"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M510.375 185.602L516.478 361.734L505.228 362.124L499.125 185.991L510.375 185.602Z" fill="white" style="fill:white;fill-opacity:1;"/>
|
||||
<path d="M520.859 385.824C520.859 390.724 516.887 394.695 511.987 394.695C507.087 394.695 503.115 390.724 503.115 385.824C503.115 380.925 507.087 376.953 511.987 376.953C516.887 376.953 520.859 380.925 520.859 385.824Z" fill="white" style="fill:white;fill-opacity:1;"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M511.987 386.514C512.369 386.514 512.677 386.204 512.677 385.824C512.677 385.444 512.369 385.135 511.987 385.135C511.605 385.135 511.297 385.444 511.297 385.824C511.297 386.204 511.605 386.514 511.987 386.514ZM511.987 394.695C516.887 394.695 520.859 390.724 520.859 385.824C520.859 380.925 516.887 376.953 511.987 376.953C507.087 376.953 503.115 380.925 503.115 385.824C503.115 390.724 507.087 394.695 511.987 394.695Z" fill="white" style="fill:white;fill-opacity:1;"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M438.197 171.433L419.807 190.057L411.797 182.147L430.187 163.523L438.197 171.433Z" fill="white" style="fill:white;fill-opacity:1;"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M310.528 361.492L325.303 449.189L314.941 453.044L285.323 404.219L295.469 456.504L285.12 460.477L232.182 372.442L241.829 366.641L278.349 427.373L268.271 375.437L278.609 371.446L309.319 422.071L299.427 363.362L310.528 361.492Z" fill="white" style="fill:white;fill-opacity:1;"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M396.841 349.907C396.521 349.708 396.266 349.616 395.633 349.803C395.588 349.817 394.914 350.073 393.786 351.539C392.704 352.945 391.532 355.042 390.358 357.86C388.014 363.482 385.984 371.183 384.5 379.91C381.773 395.941 381.055 414.412 383.078 428.171L383.737 432.007L372.668 434.053C372.407 432.731 372.172 431.366 371.964 429.965L357.232 344.231L368.327 342.324L373.943 375.006C375.461 366.952 377.486 359.482 379.967 353.53C381.358 350.192 382.974 347.131 384.864 344.675C386.707 342.279 389.189 339.968 392.445 339.007C396.117 337.923 399.701 338.429 402.787 340.349C405.651 342.131 407.722 344.894 409.255 347.761C412.311 353.473 414.199 361.44 415.348 369.761C417.668 386.564 417.276 407.225 415.278 420.64L414.449 426.207L403.315 424.549L404.144 418.982C405.987 406.609 406.368 387.026 404.197 371.301C403.1 363.359 401.427 356.992 399.329 353.071C398.286 351.122 397.383 350.244 396.841 349.907Z" fill="white" style="fill:white;fill-opacity:1;"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M340.519 364.5L353.389 441.44L342.286 443.297L329.416 366.357L340.519 364.5Z" fill="white" style="fill:white;fill-opacity:1;"/>
|
||||
<path d="M340.615 343.332C340.615 348.232 336.643 352.203 331.743 352.203C326.843 352.203 322.871 348.232 322.871 343.332C322.871 338.433 326.843 334.461 331.743 334.461C336.643 334.461 340.615 338.433 340.615 343.332Z" fill="white" style="fill:white;fill-opacity:1;"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M331.743 344.021C332.125 344.021 332.433 343.712 332.433 343.332C332.433 342.952 332.125 342.643 331.743 342.643C331.361 342.643 331.053 342.952 331.053 343.332C331.053 343.712 331.361 344.021 331.743 344.021ZM331.743 352.203C336.643 352.203 340.615 348.232 340.615 343.332C340.615 338.433 336.643 334.461 331.743 334.461C326.843 334.461 322.871 338.433 322.871 343.332C322.871 348.232 326.843 352.203 331.743 352.203Z" fill="white" style="fill:white;fill-opacity:1;"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M478.038 314.564L477.501 308.961L466.295 310.036L466.833 315.638C467.143 318.878 467.487 322.549 467.852 326.561C466.346 325.48 464.618 324.667 462.657 324.26C458.455 323.388 454.491 324.651 451.202 326.765C447.944 328.86 445.016 331.98 442.473 335.606C437.374 342.876 433.171 353.108 430.79 364.578C428.408 376.047 428.191 387.107 429.973 395.805C430.863 400.144 432.306 404.172 434.462 407.391C436.637 410.639 439.771 413.375 443.973 414.248C448.175 415.12 452.139 413.857 455.428 411.743C458.687 409.648 461.614 406.528 464.157 402.901C467.446 398.212 470.363 392.289 472.658 385.598C473.879 402.855 474.883 419.814 475.297 433.263C451.929 439.713 424.961 447.271 394.91 456.074C370.881 463.112 353.015 470.625 340.93 478.088C334.889 481.818 330.101 485.653 326.71 489.572C323.335 493.473 321.054 497.802 320.752 502.43C320.104 512.402 328.389 518.966 338.367 522.752C348.792 526.707 363.738 528.847 382.297 528.847C435.424 528.847 462.646 519.175 475.871 502.269C482.487 493.81 485.127 484.104 486.18 474.346C486.974 466.984 486.889 459.159 486.807 451.644V451.644V451.643C486.783 449.385 486.759 447.156 486.759 444.975C486.759 443.95 486.752 442.886 486.741 441.787C493.851 439.832 500.596 437.986 506.965 436.244L506.969 436.242C521.892 432.159 534.75 428.64 545.398 425.611L550.812 424.071L547.732 413.244L542.318 414.784C531.868 417.756 519.108 421.248 504.249 425.315C498.616 426.857 492.682 428.481 486.457 430.19C485.228 395.35 480.537 340.624 478.038 314.564ZM398.074 466.877C426.962 458.415 452.874 451.138 475.501 444.885L475.501 444.975C475.501 447.452 475.527 449.874 475.552 452.246C475.631 459.61 475.704 466.504 474.988 473.139C474.061 481.727 471.855 489.132 467.004 495.333C457.295 507.745 435.1 517.59 382.297 517.59C364.381 517.59 350.975 515.495 342.36 512.227C333.298 508.789 331.857 505.142 331.986 503.161C332.074 501.812 332.807 499.73 335.222 496.938C337.62 494.167 341.397 491.03 346.845 487.666C357.737 480.94 374.544 473.769 398.074 466.877ZM460.369 335.282C460.865 335.385 461.748 335.788 462.815 337.38C463.901 339.002 464.923 341.518 465.629 344.963C467.037 351.833 466.965 361.305 464.818 371.642C462.672 381.978 458.967 390.697 454.941 396.438C452.922 399.318 450.982 401.219 449.34 402.274C447.728 403.311 446.758 403.329 446.261 403.226C445.765 403.123 444.882 402.72 443.816 401.127C442.73 399.506 441.707 396.99 441.001 393.545C439.593 386.675 439.666 377.202 441.812 366.866C443.958 356.53 447.663 347.811 451.689 342.069C453.709 339.19 455.648 337.289 457.29 336.233C458.902 335.197 459.873 335.179 460.369 335.282Z" fill="white" style="fill:white;fill-opacity:1;"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M196.279 311.836C192.967 314.797 189.941 320.573 189.941 330.659C189.941 339.127 193.054 347.837 198.236 357.05C203.425 366.275 210.393 375.508 217.658 385.104L217.907 385.432C224.991 394.788 232.344 404.5 237.91 414.336C243.547 424.299 247.658 434.902 247.658 446.004C247.658 470.846 230.858 484.893 213.082 484.612C204.352 484.475 195.64 480.839 189.152 473.652C182.65 466.448 178.684 456.032 178.684 442.788V437.16H189.941V442.788C189.941 453.756 193.189 461.324 197.508 466.109C201.843 470.91 207.561 473.267 213.26 473.357C224.342 473.531 236.401 464.975 236.401 446.004C236.401 437.662 233.297 429.043 228.112 419.88C222.921 410.706 215.953 401.5 208.683 391.899L208.671 391.882C201.51 382.425 194.054 372.577 188.425 362.569C182.785 352.542 178.684 341.86 178.684 330.659C178.684 318.377 182.415 309.132 188.776 303.444C195.156 297.74 203.452 296.295 210.944 298.301C226.321 302.418 237.161 320.125 228.828 343.489L226.937 348.791L216.334 345.009L218.225 339.708C224.743 321.432 215.976 311.302 208.033 309.175C203.864 308.059 199.573 308.891 196.279 311.836Z" fill="white" style="fill:white;fill-opacity:1;"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M366.577 249.756C362.674 260.903 351.965 273.467 337.17 273.467L333.61 273.467C333.805 276.602 334.261 279.643 334.991 282.485C336.755 289.347 339.977 294.568 344.478 297.558C346.566 298.945 350.399 299.837 354.373 299.022C358.117 298.253 361.638 296.046 363.718 291.628L366.115 286.536L376.3 291.332L373.902 296.424C370.127 304.441 363.409 308.659 356.636 310.049C350.093 311.392 343.131 310.178 338.249 306.935C330.703 301.922 326.29 293.854 324.088 285.286C321.881 276.695 321.754 267.116 323.17 258.213C324.583 249.337 327.597 240.714 332.054 234.15C336.459 227.661 342.93 222.325 351.264 222.325C354.918 222.325 358.262 223.136 361.074 224.898C363.913 226.678 365.862 229.213 367.022 232.061C369.261 237.553 368.568 244.068 366.577 249.756ZM333.973 262.21C334.065 261.465 334.17 260.722 334.288 259.982C335.512 252.286 338.065 245.336 341.367 240.472C344.721 235.532 348.198 233.582 351.264 233.582C353.26 233.582 354.427 234.017 355.095 234.436C355.735 234.837 356.235 235.418 356.598 236.31C357.407 238.296 357.451 241.753 355.952 246.036C352.873 254.831 345.236 262.21 337.17 262.21L333.973 262.21Z" fill="white" style="fill:white;fill-opacity:1;"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M424.361 223.617C423.309 209.869 434.19 201.624 445.094 200.851C456.912 200.013 464.245 208.776 466.558 212.575L469.484 217.383L459.868 223.236L456.941 218.428C455.41 215.91 451.354 211.692 445.89 212.08C439.512 212.532 435.13 216.808 435.586 222.759C435.721 224.527 436.88 226.603 440.312 229.352C443.212 231.675 446.883 233.828 451.126 236.318C451.915 236.781 452.725 237.256 453.553 237.746C458.572 240.715 464.161 244.178 468.586 248.525C473.11 252.968 476.737 258.645 477.26 266.013C477.77 273.211 475.31 279.22 470.969 283.514C466.744 287.694 461.044 289.967 455.323 290.569C444.059 291.755 430.595 286.499 425.958 272.946L424.136 267.621L434.787 263.977L436.609 269.303C439.105 276.598 446.614 280.167 454.145 279.374C457.821 278.987 460.973 277.569 463.052 275.512C465.016 273.568 466.313 270.791 466.031 266.809C465.76 262.997 463.94 259.74 460.698 256.555C457.358 253.275 452.864 250.417 447.821 247.434C447.096 247.005 446.353 246.57 445.601 246.13C441.392 243.666 436.874 241.021 433.275 238.138C429.023 234.732 424.856 230.083 424.361 223.617Z" fill="white" style="fill:white;fill-opacity:1;"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
@@ -1,72 +1,146 @@
|
||||
import "./App.css";
|
||||
import React from "react";
|
||||
import React, { useState } from "react";
|
||||
import ReactDOM from "react-dom/client";
|
||||
import { BrowserRouter as Router, Routes, Route, Link } from "react-router-dom";
|
||||
import firebase from "firebase/app";
|
||||
import "firebase/database";
|
||||
|
||||
import List from "@mui/material/List";
|
||||
import ListItem from "@mui/material/ListItem";
|
||||
import ListItemButton from "@mui/material/ListItemButton";
|
||||
import ListItemText from "@mui/material/ListItemText";
|
||||
import Checkbox from "@mui/material/Checkbox";
|
||||
import { Proiezione } from "./Proiezione";
|
||||
import { MyForm } from "./MyForm";
|
||||
import { Admin } from "./Admin";
|
||||
import {
|
||||
BrowserRouter as Router,
|
||||
Routes,
|
||||
Route,
|
||||
Link,
|
||||
useParams,
|
||||
} from "react-router-dom";
|
||||
import firebase from "firebase/compat/app";
|
||||
import "firebase/compat/database";
|
||||
import "firebase/compat/analytics";
|
||||
import { ProjectionPage } from "./routes/ProjectionPage";
|
||||
import { MyFormPage } from "./routes/MyFormPage";
|
||||
import { AdminPage } from "./routes/AdminPage";
|
||||
import { GalleryPage } from "./routes/GalleryPage";
|
||||
import { HomePage } from "./routes/HomePage";
|
||||
import { Button, CssBaseline, ThemeProvider, createTheme } from "@mui/material";
|
||||
import EXIF from "exif-js";
|
||||
|
||||
const firebaseConfig = {
|
||||
apiKey: "AIzaSyBWE1l8WV_7eyKT-PMu0Kq2w_WiV0SUhJw",
|
||||
authDomain: "messaggiswing.firebaseapp.com",
|
||||
databaseURL:
|
||||
"https://messaggiswing-default-rtdb.europe-west1.firebasedatabase.app",
|
||||
projectId: "messaggiswing",
|
||||
storageBucket: "messaggiswing.appspot.com",
|
||||
messagingSenderId: "983131964310",
|
||||
appId: "1:983131964310:web:5ef430e42c42d2dfe253b7",
|
||||
databaseURL:
|
||||
"https://messaggiswing-default-rtdb.europe-west1.firebasedatabase.app",
|
||||
measurementId: "G-1CBJZ3B48E",
|
||||
};
|
||||
|
||||
firebase.initializeApp(firebaseConfig);
|
||||
firebase.analytics();
|
||||
|
||||
export function CheckboxListSecondary({ messaggi, onChecked }) {
|
||||
return (
|
||||
<List
|
||||
dense
|
||||
sx={{ width: "100%", maxWidth: 360, bgcolor: "background.paper" }}
|
||||
>
|
||||
{messaggi.map((m) => {
|
||||
const labelId = `checkbox-list-secondary-label-${m.timestamp}`;
|
||||
return (
|
||||
<ListItem
|
||||
key={m.timestamp}
|
||||
secondaryAction={
|
||||
<Checkbox
|
||||
edge="end"
|
||||
onChange={() => onChecked(m)}
|
||||
checked={m.approvato}
|
||||
inputProps={{ "aria-labelledby": labelId }}
|
||||
/>
|
||||
}
|
||||
disablePadding
|
||||
>
|
||||
<ListItemButton>
|
||||
<ListItemText
|
||||
id={labelId}
|
||||
primary={`"${m.testo}" da ${m.autore}`}
|
||||
/>
|
||||
</ListItemButton>
|
||||
</ListItem>
|
||||
);
|
||||
})}
|
||||
</List>
|
||||
);
|
||||
function parseDate(s) {
|
||||
var b = s.split(/\D/);
|
||||
return new Date(b[0], b[1] - 1, b[2], b[3], b[4], b[5]);
|
||||
}
|
||||
|
||||
const darkTheme = createTheme({
|
||||
palette: {
|
||||
mode: "dark",
|
||||
background: "black",
|
||||
},
|
||||
});
|
||||
|
||||
const Upload = () => {
|
||||
const { evento } = useParams();
|
||||
const [uploadedFiles, setUploadedFiles] = useState([]);
|
||||
|
||||
const handleUploadFiles = (files) => {
|
||||
let index = 0;
|
||||
|
||||
function upload() {
|
||||
const image = files[index];
|
||||
EXIF.getData(image, function () {
|
||||
var time = EXIF.getTag(this, "DateTime");
|
||||
if (time) {
|
||||
const timestamp = new Date(parseDate(time)).getTime();
|
||||
const uploadTask = firebase
|
||||
.storage()
|
||||
.ref(`images/${evento}/${image.name}`)
|
||||
.put(image, {
|
||||
cacheControl: "public,max-age=3000000",
|
||||
contentType: "image/jpeg",
|
||||
});
|
||||
|
||||
uploadTask.on(
|
||||
"state_changed",
|
||||
(snapshot) => {
|
||||
const progress = Math.round(
|
||||
(snapshot.bytesTransferred / snapshot.totalBytes) * 100
|
||||
);
|
||||
console.log(progress);
|
||||
},
|
||||
(error) => {
|
||||
console.log(error);
|
||||
},
|
||||
(d) => {
|
||||
// all done
|
||||
console.log(d);
|
||||
// var postListRef = firebase.database().ref(`messaggi/${evento}`);
|
||||
// var newPostRef = postListRef.push();
|
||||
// const update = {
|
||||
// id: newPostRef.key,
|
||||
// timestamp,
|
||||
// approvato: true,
|
||||
// immagineURL: "",
|
||||
// };
|
||||
|
||||
// newPostRef.set(update);
|
||||
|
||||
// if (++index < files.length) {
|
||||
// upload();
|
||||
// }
|
||||
}
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
upload();
|
||||
};
|
||||
|
||||
const handleFileEvent = (e) => {
|
||||
const chosenFiles = Array.prototype.slice.call(e.target.files);
|
||||
handleUploadFiles(chosenFiles);
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="App">
|
||||
<input
|
||||
id="fileUpload"
|
||||
type="file"
|
||||
multiple
|
||||
accept="image/jpg"
|
||||
onChange={handleFileEvent}
|
||||
/>
|
||||
|
||||
<Button variant="contained">Upload Files</Button>
|
||||
|
||||
<div className="uploaded-files-list">
|
||||
{uploadedFiles.map((file) => (
|
||||
<div>{file.name}</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
ReactDOM.createRoot(document.getElementById("root")).render(
|
||||
<Router>
|
||||
<Routes>
|
||||
<Route path="/" element={<MyForm />} />
|
||||
<Route path="proiezione" element={<Proiezione />} />
|
||||
<Route path="admin" element={<Admin />} />
|
||||
</Routes>
|
||||
</Router>
|
||||
<ThemeProvider theme={darkTheme}>
|
||||
<CssBaseline />
|
||||
<Router>
|
||||
<Routes>
|
||||
<Route path="/" element={<HomePage />} />
|
||||
<Route path="/:evento" element={<MyFormPage />} />
|
||||
<Route path="/eventi/:evento" element={<GalleryPage />} />
|
||||
<Route path="proiezione/:evento" element={<ProjectionPage />} />
|
||||
<Route path="admin/:evento" element={<AdminPage />} />
|
||||
<Route path="upload/:evento" element={<Upload />} />
|
||||
</Routes>
|
||||
</Router>
|
||||
</ThemeProvider>
|
||||
);
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
import IconButton from "@mui/material/IconButton";
|
||||
import DeleteIcon from "@mui/icons-material/Delete";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import firebase from "firebase/compat/app";
|
||||
import { Stack } from "@mui/system";
|
||||
import { useParams } from "react-router-dom";
|
||||
import { Checkbox } from "@mui/material";
|
||||
|
||||
function CheckboxListSecondary({ messaggi, evento, onChecked }) {
|
||||
return (
|
||||
<Stack sx={{ background: "white" }} spacing={4}>
|
||||
{messaggi.map((m) => {
|
||||
const labelId = `checkbox-list-secondary-label-${m.timestamp}`;
|
||||
return (
|
||||
<Stack spacing={3} direction="row" key={m.timestamp}>
|
||||
<Checkbox
|
||||
edge="end"
|
||||
onChange={() => onChecked(m)}
|
||||
checked={m.approvato}
|
||||
inputProps={{ "aria-labelledby": labelId }}
|
||||
/>
|
||||
|
||||
<div
|
||||
style={{
|
||||
background: `url("${m.immagineURL}")`,
|
||||
backgroundSize: "cover",
|
||||
width: 50,
|
||||
height: 50,
|
||||
}}
|
||||
/>
|
||||
|
||||
<p style={{ maxWidth: 200, width: 200 }}>
|
||||
{`"${m.testo}"`}
|
||||
{m.autore && <span>da {m.autore}</span>}
|
||||
</p>
|
||||
<IconButton
|
||||
variant="outlined"
|
||||
onClick={() => {
|
||||
console.log(`messaggi/${evento}/${m.id}`);
|
||||
firebase.database().ref(`messaggi/${evento}/${m.id}`).remove();
|
||||
}}
|
||||
>
|
||||
<DeleteIcon />
|
||||
</IconButton>
|
||||
</Stack>
|
||||
);
|
||||
})}
|
||||
</Stack>
|
||||
);
|
||||
}
|
||||
|
||||
export const AdminPage = () => {
|
||||
const [messaggi, cambiaMessaggi] = useState([]);
|
||||
const { evento } = useParams();
|
||||
|
||||
useEffect(() => {
|
||||
// Get a reference to the messages node in the Realtime Database
|
||||
var messagesRef = firebase.database().ref(`/messaggi/${evento}`);
|
||||
console.log(messagesRef);
|
||||
|
||||
messagesRef.on("value", function (snapshot) {
|
||||
var messaggi = snapshot.val();
|
||||
if (messaggi) {
|
||||
messaggi = Object.keys(messaggi).map((d) => messaggi[d]);
|
||||
cambiaMessaggi(messaggi);
|
||||
}
|
||||
});
|
||||
|
||||
messagesRef.on("child_changed", function (snapshot) {
|
||||
messagesRef.once("value", function (snapshot) {
|
||||
var messaggi = snapshot.val();
|
||||
if (messaggi) {
|
||||
messaggi = Object.keys(messaggi).map((d) => messaggi[d]);
|
||||
cambiaMessaggi(messaggi);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
messagesRef.on("child_removed", function (snapshot) {
|
||||
messagesRef.once("value", function (snapshot) {
|
||||
var messaggi = snapshot.val();
|
||||
if (messaggi) {
|
||||
messaggi = Object.keys(messaggi).map((d) => messaggi[d]);
|
||||
console.log("sdaf");
|
||||
cambiaMessaggi(messaggi);
|
||||
} else {
|
||||
cambiaMessaggi([]);
|
||||
}
|
||||
});
|
||||
});
|
||||
}, []);
|
||||
|
||||
let element;
|
||||
if (!messaggi.length) {
|
||||
element = <div>nessun messaggio</div>;
|
||||
} else {
|
||||
element = (
|
||||
<CheckboxListSecondary
|
||||
evento={evento}
|
||||
messaggi={messaggi}
|
||||
onChecked={(m) => {
|
||||
firebase
|
||||
.database()
|
||||
.ref(`/messaggi/${evento}/` + m.id)
|
||||
.update({
|
||||
approvato: !m.approvato,
|
||||
});
|
||||
}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<Stack>
|
||||
<h2>Admin</h2>
|
||||
{element}
|
||||
</Stack>
|
||||
);
|
||||
};
|
||||
@@ -0,0 +1,268 @@
|
||||
import React, { useEffect, useState } from "react";
|
||||
|
||||
import { useParams } from "react-router-dom";
|
||||
import firebase from "firebase/compat/app";
|
||||
|
||||
import { Stack } from "@mui/system";
|
||||
import logoSrc from "../assets/logo_chat.svg";
|
||||
import { Box, Button, CircularProgress, Container, Grid } from "@mui/material";
|
||||
import { VideoComponent } from "./ProjectionPage";
|
||||
import { Buttons } from "../Buttons";
|
||||
import moment from "moment";
|
||||
import { Logo } from "./HomePage";
|
||||
|
||||
export const GalleryPage = () => {
|
||||
const { evento } = useParams();
|
||||
const [mainMessage, setMainMessage] = useState(null);
|
||||
const [messages, setMessages] = useState([]);
|
||||
const [eventDetails, setEventDetails] = useState(null);
|
||||
|
||||
useEffect(() => {
|
||||
const eventRef = firebase.database().ref(`/eventi/${evento}`);
|
||||
eventRef.once("value", function (s) {
|
||||
setEventDetails(s.val());
|
||||
});
|
||||
const messagesRef = firebase.database().ref(`/messaggi/${evento}`);
|
||||
messagesRef.once("value", function (snapshot) {
|
||||
const messaggiObject = snapshot.val();
|
||||
const messaggi = Object.keys(messaggiObject)
|
||||
.map((d) => {
|
||||
return messaggiObject[d];
|
||||
})
|
||||
.filter((d) => d.approvato)
|
||||
.sort((a, b) => a.timestamp - b.timestamp);
|
||||
setMessages(messaggi);
|
||||
});
|
||||
}, [evento]);
|
||||
|
||||
if (!eventDetails) return <></>;
|
||||
return (
|
||||
<div style={{ background: "black" }}>
|
||||
<Logo />
|
||||
<Container
|
||||
style={{
|
||||
fontFamily: "Lineatura",
|
||||
fontWeight: "bold",
|
||||
color: "white",
|
||||
zIndex: 1,
|
||||
position: "relative",
|
||||
top: 0,
|
||||
}}
|
||||
>
|
||||
{mainMessage == null ? (
|
||||
<GridView
|
||||
eventDetails={eventDetails}
|
||||
setMainMessage={setMainMessage}
|
||||
messages={messages}
|
||||
/>
|
||||
) : (
|
||||
<ContenitoreMessaggio
|
||||
messages={messages}
|
||||
setMainMessage={setMainMessage}
|
||||
mainMessage={mainMessage}
|
||||
/>
|
||||
)}
|
||||
</Container>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
const GridView = ({ eventDetails, messages, setMainMessage }) => {
|
||||
return (
|
||||
<>
|
||||
<h1
|
||||
style={{
|
||||
fontSize: "4.6rem",
|
||||
}}
|
||||
>
|
||||
{eventDetails.title}
|
||||
</h1>
|
||||
{messages.length && (
|
||||
<GridThumbs messages={messages} setMainMessage={setMainMessage} />
|
||||
)}
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
const Timestamp = ({ message }) => {
|
||||
return <p>alle {moment(message.timestamp).format("HH:MM")}</p>;
|
||||
};
|
||||
|
||||
const GridThumbs = ({ messages, setMainMessage }) => {
|
||||
const getElement = (message) => {
|
||||
let element;
|
||||
if (message.immagineURL) {
|
||||
element = (
|
||||
<img
|
||||
onClick={() => {
|
||||
setMainMessage(message);
|
||||
}}
|
||||
width="100%"
|
||||
height="auto"
|
||||
sx={{ border: "4px solid white" }}
|
||||
src={message.immagineURL}
|
||||
alt={message.message}
|
||||
/>
|
||||
);
|
||||
} else {
|
||||
element = (
|
||||
<h1
|
||||
style={{
|
||||
fontSize: "1.2rem",
|
||||
textAlign: "center",
|
||||
textShadow:
|
||||
"0px 0px 10px rgba(0,0,0,100), 0px 0px 10px rgba(0,0,0,100), 0px 0px 10px rgba(0,0,0,100)",
|
||||
}}
|
||||
>
|
||||
{message.testo}
|
||||
</h1>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div style={{ textAlign: "center" }}>
|
||||
{element}
|
||||
{message.autore && (
|
||||
<div>
|
||||
<p
|
||||
style={{
|
||||
fontSize: 20,
|
||||
margin: 0,
|
||||
display: "inline-block",
|
||||
background: "black",
|
||||
padding: "0px 6px",
|
||||
paddingBottom: "4px",
|
||||
}}
|
||||
>
|
||||
da {message.autore}
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
<Timestamp message={message} />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
return (
|
||||
<Grid xs={12} sm={12} container spacing={2}>
|
||||
{messages.map((message, index) => (
|
||||
<Grid item xs={6} sm={4} key={index}>
|
||||
<Box
|
||||
my={4}
|
||||
p={2}
|
||||
sx={{ overflow: "hidden", height: "100%" }}
|
||||
display="flex"
|
||||
alignItems="center"
|
||||
justifyContent="center"
|
||||
>
|
||||
{getElement(message)}
|
||||
</Box>
|
||||
</Grid>
|
||||
))}
|
||||
</Grid>
|
||||
);
|
||||
};
|
||||
|
||||
const ContenitoreMessaggio = ({ messages, setMainMessage, mainMessage }) => {
|
||||
const [indiceCorrente, cambiaindiceCorrente] = useState(
|
||||
messages.findIndex((d) => d === mainMessage)
|
||||
);
|
||||
const messaggioDaMostrare = messages[indiceCorrente];
|
||||
return (
|
||||
<Stack sx={{ zIndex: 1 }} alignItems={"center"} justifyContent={"center"}>
|
||||
{messaggioDaMostrare.immagineURL && (
|
||||
<ImagePlaceholder
|
||||
messaggioDaMostrare={messaggioDaMostrare}
|
||||
style={{
|
||||
maxWidth: "100%",
|
||||
maxHeight: "80vh",
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
<Messaggio messaggioDaMostrare={messaggioDaMostrare} />
|
||||
|
||||
{Buttons(indiceCorrente, cambiaindiceCorrente, messages, setMainMessage)}
|
||||
</Stack>
|
||||
);
|
||||
};
|
||||
|
||||
function ImagePlaceholder({ messaggioDaMostrare }) {
|
||||
const [imageLoaded, setImageLoaded] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
console.log("go");
|
||||
setImageLoaded(false);
|
||||
|
||||
if (messaggioDaMostrare.immagineURL) {
|
||||
const image = new Image();
|
||||
image.onload = () => {
|
||||
setImageLoaded(true);
|
||||
};
|
||||
image.src = messaggioDaMostrare.immagineURL;
|
||||
} else {
|
||||
setImageLoaded(true);
|
||||
}
|
||||
}, [messaggioDaMostrare.immagineURL]);
|
||||
|
||||
if (imageLoaded) {
|
||||
return (
|
||||
<div>
|
||||
{messaggioDaMostrare.immagineURL && (
|
||||
<img
|
||||
alt=""
|
||||
src={messaggioDaMostrare.immagineURL}
|
||||
style={{
|
||||
maxWidth: "100%",
|
||||
maxHeight: "65vh",
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "space-around",
|
||||
width: "100%",
|
||||
}}
|
||||
>
|
||||
<CircularProgress />
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
const Messaggio = ({ messaggioDaMostrare }) => {
|
||||
return (
|
||||
<>
|
||||
<h1
|
||||
style={{
|
||||
fontSize: messaggioDaMostrare.immagineURL ? 20 : 50,
|
||||
textShadow:
|
||||
"0px 0px 10px rgba(0,0,0,100), 0px 0px 10px rgba(0,0,0,100), 0px 0px 10px rgba(0,0,0,100)",
|
||||
}}
|
||||
>
|
||||
{messaggioDaMostrare.testo}
|
||||
</h1>
|
||||
{messaggioDaMostrare.autore && (
|
||||
<div>
|
||||
<p
|
||||
style={{
|
||||
fontSize: 20,
|
||||
margin: 0,
|
||||
display: "inline-block",
|
||||
background: "black",
|
||||
padding: "0px 6px",
|
||||
paddingBottom: "4px",
|
||||
}}
|
||||
>
|
||||
da {messaggioDaMostrare.autore}
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
<Timestamp message={messaggioDaMostrare} />
|
||||
</>
|
||||
);
|
||||
};
|
||||
@@ -0,0 +1,77 @@
|
||||
import React, { useEffect, useState } from "react";
|
||||
import firebase from "firebase/compat/app";
|
||||
import { CircularProgress, Container, Stack, Typography } from "@mui/material";
|
||||
import logoSrc from "../assets/logo_chat.svg";
|
||||
|
||||
export const HomePage = () => {
|
||||
const [eventi, cambiaEventi] = useState([]);
|
||||
|
||||
useEffect(() => {
|
||||
var messagesRef = firebase.database().ref(`/eventi`);
|
||||
|
||||
messagesRef.once("value", function (snapshot) {
|
||||
const eventiObject = snapshot.val();
|
||||
console.log(eventiObject);
|
||||
const e = Object.keys(eventiObject)
|
||||
.map((d) => {
|
||||
return { key: d, ...eventiObject[d] };
|
||||
})
|
||||
.sort((a, b) => {
|
||||
return parseInt(a.timestamp) - parseInt(b.timestamp);
|
||||
})
|
||||
.map((d, i) => {
|
||||
const color = `hsl(${i * 10}, 75%, 70%`;
|
||||
return (
|
||||
<div key={d.key}>
|
||||
<a
|
||||
style={{
|
||||
textDecoration: "none",
|
||||
display: "inline-block",
|
||||
color,
|
||||
fontFamily: "Lineatura",
|
||||
borderBottom: `1px solid ${color}`,
|
||||
}}
|
||||
href={`/eventi/${d.key}`}
|
||||
>
|
||||
{d.title}
|
||||
</a>
|
||||
</div>
|
||||
);
|
||||
});
|
||||
cambiaEventi(e);
|
||||
});
|
||||
}, []);
|
||||
|
||||
if (!eventi) return <div></div>;
|
||||
return (
|
||||
<Container maxWidth="md">
|
||||
<img
|
||||
alt="logo"
|
||||
src={logoSrc}
|
||||
style={{
|
||||
width: 120,
|
||||
position: "absolute",
|
||||
top: 20,
|
||||
right: 20,
|
||||
}}
|
||||
/>
|
||||
<Stack
|
||||
spacing={2}
|
||||
sx={{
|
||||
paddingTop: 20,
|
||||
}}
|
||||
>
|
||||
<Typography
|
||||
variant="p"
|
||||
style={{
|
||||
fontFamily: "Lineatura",
|
||||
}}
|
||||
>
|
||||
I nostri eventi
|
||||
</Typography>
|
||||
{eventi.length === 0 && <CircularProgress size={20} />}
|
||||
{eventi}
|
||||
</Stack>
|
||||
</Container>
|
||||
);
|
||||
};
|
||||
@@ -0,0 +1,86 @@
|
||||
import React, { useEffect, useState } from "react";
|
||||
import firebase from "firebase/compat/app";
|
||||
import { CircularProgress, Container, Stack, Typography } from "@mui/material";
|
||||
import logoSrc from "../assets/logo_chat.svg";
|
||||
|
||||
export const HomePage = () => {
|
||||
const [eventi, cambiaEventi] = useState([]);
|
||||
|
||||
useEffect(() => {
|
||||
var messagesRef = firebase.database().ref(`/eventi`);
|
||||
|
||||
messagesRef.once("value", function (snapshot) {
|
||||
const eventiObject = snapshot.val();
|
||||
console.log(eventiObject);
|
||||
const e = Object.keys(eventiObject)
|
||||
.map((d) => {
|
||||
return { key: d, ...eventiObject[d] };
|
||||
})
|
||||
.sort((a, b) => {
|
||||
return parseInt(a.timestamp) - parseInt(b.timestamp);
|
||||
})
|
||||
.map((d, i) => {
|
||||
const color = `hsl(${i * 10}, 75%, 70%`;
|
||||
return (
|
||||
<div key={d.key}>
|
||||
<a
|
||||
style={{
|
||||
textDecoration: "none",
|
||||
display: "inline-block",
|
||||
color,
|
||||
fontSize: "1.5rem",
|
||||
fontFamily: "Lineatura",
|
||||
borderBottom: `2px solid ${color}`,
|
||||
}}
|
||||
href={`/eventi/${d.key}`}
|
||||
>
|
||||
{d.title}
|
||||
</a>
|
||||
</div>
|
||||
);
|
||||
});
|
||||
cambiaEventi(e);
|
||||
});
|
||||
}, []);
|
||||
|
||||
if (!eventi) return <div></div>;
|
||||
return (
|
||||
<Container maxWidth="md">
|
||||
<Logo />
|
||||
<Stack
|
||||
spacing={2}
|
||||
sx={{
|
||||
paddingTop: 20,
|
||||
}}
|
||||
>
|
||||
<Typography
|
||||
variant="p"
|
||||
style={{
|
||||
color: "white",
|
||||
fontFamily: "Lineatura",
|
||||
}}
|
||||
>
|
||||
I nostri eventi
|
||||
</Typography>
|
||||
{eventi.length === 0 && <CircularProgress size={20} />}
|
||||
{eventi}
|
||||
</Stack>
|
||||
</Container>
|
||||
);
|
||||
};
|
||||
|
||||
export const Logo = () => {
|
||||
return (
|
||||
<img
|
||||
alt="logo"
|
||||
src={logoSrc}
|
||||
style={{
|
||||
width: 120,
|
||||
position: "absolute",
|
||||
zIndex: 2,
|
||||
top: 20,
|
||||
right: 20,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
};
|
||||
@@ -0,0 +1,127 @@
|
||||
import logoSrc from "../assets/logo_chat.svg";
|
||||
import React, { useState } from "react";
|
||||
import firebase from "firebase/compat/app";
|
||||
import TextField from "@mui/material/TextField";
|
||||
import { Container, Stack } from "@mui/system";
|
||||
import { Button, Typography } from "@mui/material";
|
||||
import { useForm } from "react-hook-form";
|
||||
import Countdown from "../Countdown";
|
||||
import ImageUpload from "../ImageUpload";
|
||||
import { useParams } from "react-router-dom";
|
||||
|
||||
export const MyFormPage = () => {
|
||||
const { evento } = useParams();
|
||||
const [mandato, setMandato] = useState(false);
|
||||
const [imageUploading, setImageUploading] = useState(false);
|
||||
const [immagineURL, cambiaimmagineURL] = useState(null);
|
||||
const { register, handleSubmit, reset } = useForm();
|
||||
const onSubmit = ({ testo, autore }, e) => {
|
||||
reset("", {
|
||||
keepValues: false,
|
||||
});
|
||||
setMandato(true);
|
||||
cambiaimmagineURL(null);
|
||||
var postListRef = firebase.database().ref(`messaggi/${evento}`);
|
||||
var newPostRef = postListRef.push();
|
||||
const update = {
|
||||
id: newPostRef.key,
|
||||
autore,
|
||||
testo,
|
||||
timestamp: firebase.database.ServerValue.TIMESTAMP,
|
||||
approvato: true,
|
||||
};
|
||||
if (immagineURL) update.immagineURL = immagineURL;
|
||||
newPostRef.set(update);
|
||||
};
|
||||
|
||||
const onImageURLSet = (url) => {
|
||||
cambiaimmagineURL(url);
|
||||
};
|
||||
|
||||
if (mandato) {
|
||||
return (
|
||||
<div
|
||||
style={{
|
||||
fontFamily: "Lineatura",
|
||||
height: "100vh",
|
||||
width: "100%",
|
||||
textAlign: "center",
|
||||
}}
|
||||
>
|
||||
<Typography
|
||||
style={{
|
||||
fontFamily: "Lineatura",
|
||||
}}
|
||||
variant="h2"
|
||||
>
|
||||
mandato!
|
||||
</Typography>
|
||||
<h1 style={{ fontFamily: "LineaturaLight" }}>
|
||||
puoi rimandere un altro messaggio in...
|
||||
<Countdown onComplete={() => setMandato(false)} duration={5} />
|
||||
</h1>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<Container maxWidth="sm" style={{ color: "white", marginTop: 20 }}>
|
||||
<div style={{ textAlign: "center" }}>
|
||||
<img
|
||||
alt="logo"
|
||||
src={logoSrc}
|
||||
style={{
|
||||
width: 200,
|
||||
marginBottom: 20,
|
||||
}}
|
||||
/>
|
||||
<Typography
|
||||
variant="h5"
|
||||
style={{ marginBottom: 40, fontFamily: "Lineatura" }}
|
||||
>
|
||||
Manda un messaggio!
|
||||
</Typography>
|
||||
</div>
|
||||
<form onSubmit={handleSubmit(onSubmit)}>
|
||||
<Stack spacing={2}>
|
||||
<TextField
|
||||
multiline
|
||||
rows={4}
|
||||
{...register("testo")}
|
||||
id="outlined-basic"
|
||||
label="messaggio"
|
||||
variant="outlined"
|
||||
/>
|
||||
<TextField
|
||||
{...register("autore")}
|
||||
id="outlined-basic"
|
||||
label="da"
|
||||
variant="outlined"
|
||||
/>
|
||||
<ImageUpload
|
||||
onImageUploading={() => {
|
||||
setImageUploading(true);
|
||||
}}
|
||||
onImageURLSet={(b) => {
|
||||
onImageURLSet(b);
|
||||
setImageUploading(false);
|
||||
}}
|
||||
/>
|
||||
{!imageUploading && (
|
||||
<Button
|
||||
className="okbutton"
|
||||
type="submit"
|
||||
style={{
|
||||
padding: "30px 0px",
|
||||
fontSize: 20,
|
||||
fontFamily: "Lineatura",
|
||||
}}
|
||||
variant="contained"
|
||||
>
|
||||
ok
|
||||
</Button>
|
||||
)}
|
||||
</Stack>
|
||||
</form>
|
||||
</Container>
|
||||
);
|
||||
};
|
||||
@@ -0,0 +1,193 @@
|
||||
import React, { useEffect, useState } from "react";
|
||||
import firebase from "firebase/compat/app";
|
||||
import logoSrc from "../assets/logo_chat.svg";
|
||||
import { useParams } from "react-router-dom";
|
||||
|
||||
const SHOW_MESSAGE_TIME = 6000;
|
||||
|
||||
window.debug = false;
|
||||
|
||||
export const ProjectionPage = () => {
|
||||
const { evento } = useParams();
|
||||
const [messaggi, cambiaMessaggi] = useState([]);
|
||||
const [messaggiApprovati, cambiaMessaggiApprovati] = useState([]);
|
||||
|
||||
useEffect(() => {
|
||||
var messagesRef = firebase.database().ref(`/messaggi/${evento}`);
|
||||
|
||||
messagesRef.on("child_added", function (snapshot) {
|
||||
console.log("child_added");
|
||||
var messaggio = snapshot.val();
|
||||
cambiaMessaggi((oldArray) => {
|
||||
const newArray = [...oldArray, messaggio].sort(
|
||||
(a, b) => b.timestamp - a.timestamp
|
||||
);
|
||||
cambiaMessaggiApprovati(newArray.filter((d) => d.approvato));
|
||||
return newArray;
|
||||
});
|
||||
});
|
||||
|
||||
messagesRef.on("child_removed", function (snapshot) {
|
||||
console.log("child_removed");
|
||||
var messaggio = snapshot.val();
|
||||
cambiaMessaggi((oldArray) => {
|
||||
const newArray = [];
|
||||
oldArray.forEach((d) => {
|
||||
if (d.id !== messaggio.id) {
|
||||
newArray.push(d);
|
||||
}
|
||||
});
|
||||
newArray.sort((a, b) => b.timestamp - a.timestamp);
|
||||
cambiaMessaggiApprovati(newArray.filter((d) => d.approvato));
|
||||
return newArray;
|
||||
});
|
||||
});
|
||||
|
||||
messagesRef.on("child_changed", function (snapshot) {
|
||||
console.log("child_changed");
|
||||
const messaggio = snapshot.val();
|
||||
cambiaMessaggi((oldArray) => {
|
||||
const newArray = [...oldArray];
|
||||
newArray.forEach((d, i, a) => {
|
||||
if (d.id === messaggio.id) a[i] = messaggio;
|
||||
});
|
||||
cambiaMessaggiApprovati(newArray.filter((d) => d.approvato));
|
||||
return newArray;
|
||||
});
|
||||
});
|
||||
|
||||
messagesRef.onDisconnect();
|
||||
}, []);
|
||||
|
||||
const ContainerMessaggio = ({ messaggiApprovati }) => {
|
||||
if (!messaggiApprovati.length) {
|
||||
return <div>nessun messaggio</div>;
|
||||
} else {
|
||||
return <Messaggio messaggiApprovati={messaggiApprovati} />;
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div>
|
||||
<VideoComponent />
|
||||
<ContainerMessaggio messaggiApprovati={messaggiApprovati} />
|
||||
<img
|
||||
src={logoSrc}
|
||||
style={{
|
||||
width: 120,
|
||||
position: "absolute",
|
||||
top: 20,
|
||||
right: 20,
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
const Messaggio = ({ messaggiApprovati }) => {
|
||||
const [fadeProp, setFadeProp] = useState("in");
|
||||
const [messaggioDaMostrare, setMessaggioDaMostrare] = useState(null);
|
||||
const [indiceCorrente, cambiaindiceCorrente] = useState(0);
|
||||
const [imageWidth, setImageWidth] = useState(0);
|
||||
const [rotation, setRotation] = useState(0);
|
||||
const nextMessage = () => {
|
||||
const newIndice = (indiceCorrente + 1) % messaggiApprovati.length;
|
||||
cambiaindiceCorrente(newIndice);
|
||||
};
|
||||
|
||||
const showNextMessage = (newMessage) => {
|
||||
setFadeProp("in");
|
||||
setMessaggioDaMostrare(newMessage);
|
||||
setTimeout(() => {
|
||||
nextMessage();
|
||||
}, SHOW_MESSAGE_TIME);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
const newMessage = messaggiApprovati[indiceCorrente];
|
||||
if (newMessage !== messaggioDaMostrare) {
|
||||
setFadeProp("out");
|
||||
const timeout = setTimeout(() => {
|
||||
console.log(newMessage.immagineURL);
|
||||
if (newMessage.immagineURL) {
|
||||
const img = new Image();
|
||||
img.onload = (i) => {
|
||||
setImageWidth(img.width > img.height ? 800 : 400);
|
||||
setRotation(Math.random() * 10 - 5);
|
||||
showNextMessage(newMessage);
|
||||
};
|
||||
img.src = newMessage.immagineURL;
|
||||
} else {
|
||||
showNextMessage(newMessage);
|
||||
}
|
||||
}, 3000);
|
||||
return () => clearTimeout(timeout);
|
||||
}
|
||||
}, [indiceCorrente]);
|
||||
|
||||
return (
|
||||
<div className={"fade-" + fadeProp}>
|
||||
<div
|
||||
style={{
|
||||
position: "absolute",
|
||||
fontFamily: "Lineatura",
|
||||
width: "100%",
|
||||
height: "100vh",
|
||||
fontWeight: "bold",
|
||||
color: "white",
|
||||
display: "flex",
|
||||
justifyContent: "space-around",
|
||||
alignContent: "center",
|
||||
alignItems: "center",
|
||||
textAlign: "center",
|
||||
}}
|
||||
>
|
||||
{messaggioDaMostrare && (
|
||||
<div>
|
||||
{messaggioDaMostrare.immagineURL && (
|
||||
<img
|
||||
src={messaggioDaMostrare.immagineURL}
|
||||
style={{
|
||||
border: "10px solid #ccc",
|
||||
width: imageWidth,
|
||||
transformOrigin: "50% 50%",
|
||||
transform: `rotate(${rotation}deg)`,
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
<h1
|
||||
style={{
|
||||
fontSize: messaggioDaMostrare.immagineURL ? 20 : 50,
|
||||
textShadow:
|
||||
"0px 0px 10px rgba(0,0,0,100), 0px 0px 10px rgba(0,0,0,100), 0px 0px 10px rgba(0,0,0,100)",
|
||||
}}
|
||||
>
|
||||
{messaggioDaMostrare.testo}
|
||||
</h1>
|
||||
{messaggioDaMostrare.autore && (
|
||||
<p
|
||||
style={{
|
||||
fontSize: 20,
|
||||
display: "inline-block",
|
||||
background: "black",
|
||||
padding: "0px 6px",
|
||||
paddingBottom: "4px",
|
||||
}}
|
||||
>
|
||||
da {messaggioDaMostrare.autore}
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export const VideoComponent = React.memo(() => {
|
||||
return (
|
||||
<video autoPlay muted loop id="myVideo">
|
||||
<source src={"https://letsswing.it/video.mp4"} type="video/mp4" />
|
||||
</video>
|
||||
);
|
||||
});
|
||||
@@ -0,0 +1,8 @@
|
||||
rules_version = '2';
|
||||
service firebase.storage {
|
||||
match /b/{bucket}/o {
|
||||
match /{allPaths=**} {
|
||||
allow read, write: if false;
|
||||
}
|
||||
}
|
||||
}
|
||||