This commit is contained in:
Zakary Timson 2019-09-02 12:56:19 -04:00
parent 285a9ede4d
commit e220e23b24
7 changed files with 56 additions and 16 deletions

View File

@ -12,5 +12,15 @@
"destination": "/index.html"
}
]
},
"firestore": {
"rules": "firestore.rules",
"indexes": "firestore.indexes.json"
},
"functions": {
"predeploy": [
"npm --prefix \"$RESOURCE_DIR\" run lint",
"npm --prefix \"$RESOURCE_DIR\" run build"
]
}
}

4
firestore.indexes.json Normal file
View File

@ -0,0 +1,4 @@
{
"indexes": [],
"fieldOverrides": []
}

8
firestore.rules Normal file
View File

@ -0,0 +1,8 @@
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /Maps/{document=**} {
allow read, write;
}
}
}

8
functions/.gitignore vendored Normal file
View File

@ -0,0 +1,8 @@
## Compiled JavaScript files
**/*.js
**/*.js.map
# Typescript v1 declaration files
typings/
node_modules/

10
functions/src/index.ts Normal file
View File

@ -0,0 +1,10 @@
import * as functions from 'firebase-functions';
import * as cor from 'cors';
const cors = cor({origin: true});
exports.helloWorld = functions.https.onRequest((req, res) => {
return cors(req, res, () => {
res.status(200).send('Hello World!');
});
});

View File

@ -1,18 +1,18 @@
export const Adjectives = [
'strict',
'Strict',
'poor',
'old',
'hot',
'huge',
'scared',
'large',
'tall',
'antique',
'complete',
'offbeat',
'selective',
'unwilling',
'lively',
'nebulous',
'deranged'
'Old',
'Hot',
'Huge',
'Scared',
'Large',
'Tall',
'Antique',
'Complete',
'Offbeat',
'Selective',
'Unwilling',
'Lively',
'Nebulous',
'Deranged'
];

View File

@ -38,7 +38,7 @@ export class MapComponent implements OnDestroy, OnInit {
menu: ToolbarItem[];
constructor(public physicsService: PhysicsService, private syncService: SyncService, private snackBar: MatSnackBar, private bottomSheet: MatBottomSheet, private dialog: MatDialog, private route: ActivatedRoute) {
this.name = Adjectives[Math.floor(Math.random() * Adjectives.length)] + ' ' + Nouns[Math.floor(Math.random() * Nouns.length)];
this.name = Adjectives[Math.floor(Math.random() * Adjectives.length)] + Nouns[Math.floor(Math.random() * Nouns.length)];
this.menu = [
{name: 'Marker', icon: 'room', toggle: true, onEnabled: this.startMarker, onDisabled: this.unsub},