|
| 1 | +<!doctype html> |
| 2 | +<!-- |
| 3 | + Copyright 2016 Google Inc. All rights reserved. |
| 4 | + Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | + you may not use this file except in compliance with the License. |
| 6 | + You may obtain a copy of the License at |
| 7 | + https://www.apache.org/licenses/LICENSE-2.0 |
| 8 | + Unless required by applicable law or agreed to in writing, software |
| 9 | + distributed under the License is distributed on an "AS IS" BASIS, |
| 10 | + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 11 | + See the License for the specific language governing permissions and |
| 12 | + limitations under the License |
| 13 | +--> |
| 14 | +<html lang="en"> |
| 15 | +<head> |
| 16 | + <meta charset="utf-8"> |
| 17 | + <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
| 18 | + <meta name="description" content="Demonstrates of to authorize Firebase with Instagram Auth using Firebase Functions"> |
| 19 | + <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| 20 | + <title>Firebase Functions demo send FCM notifications</title> |
| 21 | + |
| 22 | + <!-- Material Design Lite --> |
| 23 | + <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons"> |
| 24 | + <link rel="stylesheet" href="https://code.getmdl.io/1.1.3/material.blue_grey-orange.min.css"> |
| 25 | + <script defer src="https://code.getmdl.io/1.1.3/material.min.js"></script> |
| 26 | + |
| 27 | + <link rel="stylesheet" href="main.css"> |
| 28 | +</head> |
| 29 | +<body> |
| 30 | +<div class="demo-layout mdl-layout mdl-js-layout mdl-layout--fixed-header"> |
| 31 | + |
| 32 | + <!-- Header section containing title --> |
| 33 | + <header class="mdl-layout__header mdl-color-text--white mdl-color--light-blue-700"> |
| 34 | + <div class="mdl-cell mdl-cell--12-col mdl-cell--12-col-tablet mdl-grid"> |
| 35 | + <div class="mdl-layout__header-row mdl-cell mdl-cell--12-col mdl-cell--12-col-tablet mdl-cell--8-col-desktop"> |
| 36 | + <h3>Send FCM notifications demo</h3> |
| 37 | + </div> |
| 38 | + </div> |
| 39 | + </header> |
| 40 | + <main class="mdl-layout__content mdl-color--grey-100"> |
| 41 | + <div class="mdl-cell--12-col mdl-cell--12-col-tablet mdl-grid"> |
| 42 | + |
| 43 | + <!-- Card containing the sign-in UI --> |
| 44 | + <div id="demo-signed-out-card" class="mdl-card mdl-shadow--2dp mdl-cell"> |
| 45 | + <div class="mdl-card__supporting-text mdl-color-text--grey-600"> |
| 46 | + <p> |
| 47 | + This web application demonstrates how you can send FCM notifications using Functions and a web client. |
| 48 | + <strong>Now sign in and activate notifications for your user!</strong> |
| 49 | + </p> |
| 50 | + <button id="demo-sign-in-button" class="mdl-color-text--grey-700 mdl-button--raised mdl-button mdl-js-button mdl-js-ripple-effect"><i class="material-icons">account_circle</i> Sign in with Google</button> |
| 51 | + </div> |
| 52 | + </div> |
| 53 | + |
| 54 | + <!-- Card containing the signed-in UI --> |
| 55 | + <div id="demo-signed-in-card" class="mdl-card mdl-shadow--2dp mdl-cell"> |
| 56 | + <div class="mdl-card__supporting-text mdl-color-text--grey-600"> |
| 57 | + <p> |
| 58 | + Welcome <span id="demo-name-container"></span> |
| 59 | + </p> |
| 60 | + <div id="demo-fcm-error-container"></div> |
| 61 | + <button id="demo-sign-out-button" class="mdl-color-text--grey-700 mdl-button--raised mdl-button mdl-js-button mdl-js-ripple-effect">Sign out</button> |
| 62 | + <button id="demo-delete-button" class="mdl-color-text--grey-700 mdl-button--raised mdl-button mdl-js-button mdl-js-ripple-effect">Delete account</button> |
| 63 | + </div> |
| 64 | + </div> |
| 65 | + |
| 66 | + <!-- Card containing the users to follow --> |
| 67 | + <div id="demo-all-users-card" class="mdl-card mdl-shadow--2dp mdl-cell mdl-cell--9-col"> |
| 68 | + <div class="mdl-card__supporting-text mdl-color-text--grey-600"> |
| 69 | + <p> |
| 70 | + Here are all the users. If they have enabled notifications they will get a notification when you start following them. |
| 71 | + </p> |
| 72 | + </div> |
| 73 | + <div id="demo-all-users-list"></div> |
| 74 | + </div> |
| 75 | + </div> |
| 76 | + |
| 77 | + <!-- Snackbar --> |
| 78 | + <div id="demo-snackbar" aria-live="assertive" aria-atomic="true" aria-relevant="text" class="mdl-snackbar mdl-js-snackbar"> |
| 79 | + <div class="mdl-snackbar__text"></div> |
| 80 | + <button type="button" class="mdl-snackbar__action"></button> |
| 81 | + </div> |
| 82 | + </main> |
| 83 | +</div> |
| 84 | + |
| 85 | + |
| 86 | +<!-- Import and configure the Firebase SDK --> |
| 87 | +<!-- These scripts are made available when the app is served or deployed on Firebase Hosting --> |
| 88 | +<!-- If you do not serve/host your project using Firebase Hosting see https://firebase.google.com/docs/web/setup --> |
| 89 | +<script src="/__/firebase/10.0.0/firebase-app-compat.js"></script> |
| 90 | +<script src="/__/firebase/10.0.0/firebase-auth-compat.js"></script> |
| 91 | +<script src="/__/firebase/10.0.0/firebase-messaging-compat.js"></script> |
| 92 | +<script src="/__/firebase/10.0.0/firebase-database-compat.js"></script> |
| 93 | +<script src="/__/firebase/init.js"></script> |
| 94 | + |
| 95 | +<script src="main.js"></script> |
| 96 | +</body> |
| 97 | +</html> |
0 commit comments