How to use the @fortawesome/fontawesome-svg-core.dom.watch function in @fortawesome/fontawesome-svg-core

To help you get started, we’ve selected a few @fortawesome/fontawesome-svg-core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Studio-Link / app / src / webui / src / icons.js View on Github external
library.add(faLongArrowAltRight)
library.add(faRss)
library.add(faDotCircle)
library.add(faPhone)
library.add(faMicrophoneSlash)
library.add(faPhoneSlash)
library.add(faUserPlus)
library.add(faAddressBook)
library.add(faPhoneSquare)
library.add(faPlusCircle)
library.add(faEdit)
library.add(faTrashAlt)

// Replace any existing <i> tags with <svg> and set up a MutationObserver to
// continue doing this as the DOM changes.
dom.watch()
</svg></i>
github Luzifer / password / js / src / index.js View on Github external
import 'bootstrap'

// Styles
import './style.scss'

// FontAwesome 5
import {
  library,
  dom
} from '@fortawesome/fontawesome-svg-core'
import {
  faCog
} from '@fortawesome/free-solid-svg-icons'

library.add(faCog)
dom.watch()

// Application code
import storage from './storage.js'

let now = () => {
  let d = new Date()
  return d.getTime()
}

let stopRefresh = () => {
  clearInterval(window.ticker)
  $('#focusedInput').select()
  return false
}

let restartRefresh = () => {
github TheIdentitySelector / thiss-js / src / cta / index.js View on Github external
import { dom, library } from '@fortawesome/fontawesome-svg-core';
import { faPlusSquare } from '@fortawesome/free-solid-svg-icons/faPlusSquare';

library.add(faPlusSquare);
dom.watch();

import {DiscoveryService, ds_response_url} from "@theidentityselector/thiss-ds";
import {DiscoveryComponent} from "../component";

import '../assets/cta.scss'
import '../assets/ra21icon.svg';

let mdq = process.env.MDQ_URL;
let persistence = process.env.PERSISTENCE_URL;
let context;
let defaultText = "Your Institution";
let login_initiator_url = window.xprops.loginInitiatorURL || window.xprops.loginHandlerURL;
let discovery_request = window.xprops.discoveryRequest;
let discovery_response = window.xprops.discoveryResponse;

if (!discovery_request)
github bkimminich / juice-shop / frontend / src / app / product-details / product-details.component.ts View on Github external
import { ProductReviewEditComponent } from '../product-review-edit/product-review-edit.component'
import { UserService } from '../Services/user.service'
import { ProductReviewService } from '../Services/product-review.service'
import { Component, Inject, OnDestroy, OnInit } from '@angular/core'
import { MAT_DIALOG_DATA, MatDialog } from '@angular/material/dialog'
import { dom, library } from '@fortawesome/fontawesome-svg-core'
import { faArrowCircleLeft, faCrown, faPaperPlane, faThumbsUp, faUserEdit } from '@fortawesome/free-solid-svg-icons'
import { FormControl, Validators } from '@angular/forms'
import { MatSnackBar } from '@angular/material/snack-bar'
import { SnackBarHelperService } from '../Services/snack-bar-helper.service'
import { Review } from '../Models/review.model'
import { Product } from '../Models/product.model'

library.add(faPaperPlane, faArrowCircleLeft, faUserEdit, faThumbsUp, faCrown)
dom.watch()

@Component({
  selector: 'app-product-details',
  templateUrl: './product-details.component.html',
  styleUrls: ['./product-details.component.scss']
})
export class ProductDetailsComponent implements OnInit, OnDestroy {

  public author: string = 'Anonymous'
  public reviews$: any
  public userSubscription: any
  public reviewControl: FormControl = new FormControl('',[Validators.maxLength(160)])
  constructor (private dialog: MatDialog,
    @Inject(MAT_DIALOG_DATA) public data: { productData: Product}, private productReviewService: ProductReviewService,
    private userService: UserService, private snackBar: MatSnackBar, private snackBarHelperService: SnackBarHelperService) { }
github bkimminich / juice-shop / frontend / src / app / token-sale / token-sale.component.ts View on Github external
import { ConfigurationService } from '../Services/configuration.service'
import { Component, OnInit } from '@angular/core'
import { dom, library } from '@fortawesome/fontawesome-svg-core'
import { faBitcoin } from '@fortawesome/free-brands-svg-icons'
import { faCommentAlt, faComments, faGraduationCap, faUniversity } from '@fortawesome/free-solid-svg-icons'
import { faCommentAlt as farCommentAlt, faComments as farComments } from '@fortawesome/free-regular-svg-icons'

library.add(faBitcoin, faUniversity, faGraduationCap, faCommentAlt, faComments, farCommentAlt, farComments)
dom.watch()

@Component({
  selector: 'app-token-sale',
  templateUrl: './token-sale.component.html',
  styleUrls: ['./token-sale.component.scss']
})
export class TokenSaleComponent implements OnInit {

  public altcoinName = 'Juicycoin'
  constructor (private configurationService: ConfigurationService) { }

  ngOnInit () {
    this.configurationService.getApplicationConfiguration().subscribe((config: any) => {
      if (config && config.application && config.application.altcoinName) {
        this.altcoinName = config.application.altcoinName
      }
github tutsprime / laravel-qa / resources / js / fontawesome.js View on Github external
import { config, library, dom } from '@fortawesome/fontawesome-svg-core'

config.autoReplaceSvg = 'nest'

import { faCaretUp, faCaretDown, faStar, faCheck, faSpinner } from '@fortawesome/free-solid-svg-icons'

library.add(faCaretUp, faCaretDown, faCheck, faStar, faSpinner);

dom.watch()
github bkimminich / juice-shop / frontend / src / app / change-password / change-password.component.ts View on Github external
import { AbstractControl, FormControl, Validators } from '@angular/forms'
import { UserService } from '../Services/user.service'
import { Component } from '@angular/core'
import { dom, library } from '@fortawesome/fontawesome-svg-core'
import { faSave } from '@fortawesome/free-solid-svg-icons'
import { faEdit } from '@fortawesome/free-regular-svg-icons'
import { FormSubmitService } from '../Services/form-submit.service'
import { TranslateService } from '@ngx-translate/core'

library.add(faSave, faEdit)
dom.watch()

@Component({
  selector: 'app-change-password',
  templateUrl: './change-password.component.html',
  styleUrls: ['./change-password.component.scss']
})
export class ChangePasswordComponent {

  public passwordControl: FormControl = new FormControl('', [Validators.required])
  public newPasswordControl: FormControl = new FormControl('', [Validators.required, Validators.minLength(5), Validators.maxLength(20)])
  public repeatNewPasswordControl: FormControl = new FormControl('', [Validators.required, Validators.minLength(5), Validators.maxLength(20), matchValidator(this.newPasswordControl)])
  public error: any
  public confirmation: any

  constructor (private userService: UserService, private formSubmitService: FormSubmitService, private translate: TranslateService) { }
github bkimminich / juice-shop / frontend / src / app / error-page / error-page.component.ts View on Github external
import { TranslateService } from '@ngx-translate/core'
import { Component, OnInit } from '@angular/core'
import { ActivatedRoute } from '@angular/router'
import { dom, library } from '@fortawesome/fontawesome-svg-core'
import { faUserSlash } from '@fortawesome/free-solid-svg-icons'

library.add(faUserSlash)
dom.watch()

@Component({
  selector: 'app-error-page',
  templateUrl: './error-page.component.html',
  styleUrls: ['./error-page.component.scss']
})
export class ErrorPageComponent implements OnInit {

  public error: string | null = null

  constructor (private route: ActivatedRoute, private translate: TranslateService) {
  }

  ngOnInit () {
    const errorKey = this.route.snapshot.queryParams['error']
    if (errorKey) {