A self hosted chat application with end-to-end encrypted messaging.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
776 B

4 years ago
4 years ago
4 years ago
4 years ago
  1. import { changePassphrase } from "./pages/user/ChangePassphrase";
  2. import { EncryptionServiceFactory } from "../common/service/EncryptionServiceFactory";
  3. import log from "loglevel";
  4. import { AlertifyNotificationService } from "../common/service/AlertifyNotificationService";
  5. import { stats } from "./pages/Home";
  6. import { Credentials } from "../common/global/Credentials";
  7. log.setLevel("TRACE");
  8. const es = EncryptionServiceFactory.getEncryptionService();
  9. const ns = new AlertifyNotificationService();
  10. const authToken = Credentials.authToken
  11. $("#changePassphraseForm").on("submit", (event) => {
  12. event.preventDefault();
  13. changePassphrase(es, ns, authToken);
  14. });
  15. const pathMatcher = (path: string) => window.location.pathname == path
  16. if(pathMatcher("/admin")) {
  17. stats()
  18. }