Reference Source
import {UI} from './assets/ui.js'
public class | source

UI

A general UI class which calls jQuery DOM operations

Static Method Summary

Static Public Methods
public static

enableDownloadButton(torrent: Torrent)

Enable the download button for the given torrent.

public static

Hide all download related elements

public static

Hide loading spinner

public static

Switch Peercats view; Hide upload features

public static

removeTorrent(infoHash: string)

Remove a given torrent from the view

public static

Hide download related elements

public static

Show a message that the file is not available

public static

showShareModal(torrent: Torrent)

Show the share modal view for the given torrent,.

public static

Show loading spinner

public static

Show upload related elements

Static Public Methods

public static enableDownloadButton(torrent: Torrent) source

Enable the download button for the given torrent.

Params:

NameTypeAttributeDescription
torrent Torrent

public static hideDownloadFeatures() source

Hide all download related elements

public static hideSpinner() source

Hide loading spinner

public static hideUploadFeatures() source

Switch Peercats view; Hide upload features

public static removeTorrent(infoHash: string) source

Remove a given torrent from the view

Params:

NameTypeAttributeDescription
infoHash string

public static showDownloadFeatures() source

Hide download related elements

public static showFailedToDownloadMessage() source

Show a message that the file is not available

public static showShareModal(torrent: Torrent) source

Show the share modal view for the given torrent,.

Params:

NameTypeAttributeDescription
torrent Torrent

public static showSpinner() source

Show loading spinner

public static showUploadFeatures() source

Show upload related elements