Skip to content

Commit

Permalink
テスト
Browse files Browse the repository at this point in the history
  • Loading branch information
X-20A committed Mar 21, 2024
1 parent bac1300 commit 42d5bdb
Show file tree
Hide file tree
Showing 2 changed files with 134 additions and 1 deletion.
112 changes: 111 additions & 1 deletion compass/dist/main.js

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions compass/src/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import 'jquery-ui/ui/widgets/resizable';
import Decimal from 'decimal.js';
import cytoscape from 'cytoscape';
import { generate } from "gkcoi";
import { initializeApp } from "firebase/app";
import { getFirestore, collection, addDoc } from "firebase/firestore";
$(function() {
/*
s_dataはship.js
Expand Down Expand Up @@ -114,6 +116,19 @@ $(function() {
let track = []; //最後の軌跡

let cy = null;

//firebase(エラーログ)関連
const firebaseConfig = {
apiKey: "AIzaSyDyh01YFd5B_HmBHHKyT9FFj2MVLIqHWkY",
authDomain: "compass-sim-error-log.firebaseapp.com",
projectId: "compass-sim-error-log",
storageBucket: "compass-sim-error-log.appspot.com",
messagingSenderId: "340060275816",
appId: "1:340060275816:web:7843f0d752e8387787a7dd",
measurementId: "G-GR0L54BP2M"
};
const app = initializeApp(firebaseConfig);
const db = getFirestore(app);

//海域が入力されたら適正かチェックしてフラグ切替
$('.areas').on('click', function() {
Expand Down Expand Up @@ -9372,6 +9387,7 @@ $(function() {
console.log(`speed : ${speed}`);
console.log(rate);
console.log('終わり');
postErrorLog();
return;
}
}
Expand Down Expand Up @@ -10127,4 +10143,11 @@ $(function() {
}
return res;
}
//エラーログ送信
async function postErrorLog() {
await addDoc(collection(db, area),{
area: area,
deck: JSON.stringify(i_json)
});
}
});

0 comments on commit 42d5bdb

Please sign in to comment.