daily pastebin goal
58%
SHARE
TWEET

Untitled

a guest Dec 13th, 2018 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE html>
  2. <html>
  3.  
  4. <head>
  5.   <meta charset="utf-8">
  6.  
  7.   <title>H2O Supreme</title>
  8.   <!-- Stylesheets -->
  9.     <link rel="stylesheet" href="../styles/main.css">
  10.     <link rel="stylesheet" href="../styles/login.css">
  11.   <!--  scripts -->
  12.   <script src="../js/index.js" charset="utf-8"></script>
  13.   <script src="https://www.gstatic.com/firebasejs/5.7.0/firebase.js"></script>
  14. </head>
  15.  
  16. <body>
  17.   <div id="title-bar">
  18.     <div id="title-bar-btns">
  19.        <span id="min-btn" class=" dot"></span>
  20.        <span id="close-btn" class=" dot"></span>
  21.     </div>
  22.   </div>
  23.   <div class="container">
  24.         <br/>
  25.         <div class="form-group">
  26.             <label for="pwd" id="keyInput">Key</label>
  27.             <br>
  28.             <br>
  29.             <input type="text" class="form-control" id="txtEmail" placeholder="Email">
  30.             <br>
  31.             <br>
  32.             <input type="text" class="form-control" id="txtPwd" placeholder="Key">
  33.             <button class="btn btn-default" id="btn-login">Authenticate</button>
  34.         </div>
  35.         <p  id="lbl"></p>
  36.     </div>
  37.  <script>
  38.   const ipc = require('electron').ipcRenderer;
  39.   var config = {
  40.     apiKey: "AIzaSyByG30NeF7q2M-Rszi0gG0XzHmfoG-P7Xc",
  41.     authDomain: "h2o-supreme-903a1.firebaseapp.com",
  42.     databaseURL: "https://h2o-supreme-903a1.firebaseio.com",
  43.     projectId: "h2o-supreme-903a1",
  44.     storageBucket: "h2o-supreme-903a1.appspot.com",
  45.     messagingSenderId: "1084670112086"
  46.   };
  47.   firebase.initializeApp(config);
  48.  
  49.   document.getElementById('btn-login').addEventListener("click", () => {
  50.         let passP = document.getElementById('lbl');
  51.         /**/
  52.         let txtPwd=document.getElementById('txtPwd').value;
  53.         let txtEmail=document.getElementById('txtEmail').value;
  54.  
  55.         firebase.auth().signInWithEmailAndPassword(txtEmail, txtPwd).then(function(){
  56.           function sendIpc(){
  57.             ipc.sendSync('entry-accepted', 'success');
  58.           }
  59.             passP.innerHTML = `<p class="loading">Loading...</p>`
  60.             setTimeout(sendIpc, 2000);
  61.         }).catch(function(error){
  62.           if(error != null){
  63.             passP.innerHTML = `<p>Error Ocurred</p>`
  64.           }
  65.         });
  66.       });
  67.      
  68.        </script>
  69. </body>
  70.  
  71. </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top