Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AppMainElement

Polymer element for the main UI

Hierarchy

Index

Constructors

Static constructor

  • Returns AppMainElement

Events

onAcceptPermissionsClicked

  • onAcceptPermissionsClicked(): Promise<void>

onAvatarClicked

  • onAvatarClicked(): void

Protected onChromeMessage

  • onChromeMessage(request: IMsgType, sender: MessageSender, response: ChromeMsg.ResponseCB): boolean

Protected onChromeStorageChanged

  • onChromeStorageChanged(changes: object): void
  • Item in chrome.storage changed

    Parameters

    • changes: object

      details on changes

      • [key: string]: StorageChange

    Returns void

onConfirmDialogTapped

  • onConfirmDialogTapped(): void

onDenyPermissionsClicked

  • onDenyPermissionsClicked(): Promise<void>

onErrorDialogConfirmTapped

  • onErrorDialogConfirmTapped(): void

Protected onHighlighted

  • onHighlighted(highlightInfo: TabHighlightInfo): Promise<void>

Protected onSWMessage

  • onSWMessage(ev: ServiceWorkerMessageEvent): Promise<void>
  • Fired when a message is posted from our service worker

    Parameters

    • ev: ServiceWorkerMessageEvent

      message from service worker

    Returns Promise<void>

onSelectedPageChanged

  • onSelectedPageChanged(): Promise<void>

Protected onStorageChanged

  • onStorageChanged(ev: StorageEvent): void

Properties

Protected appDrawer

appDrawer: AppDrawerElement

Protected appDrawerLayout

appDrawerLayout: AppDrawerLayoutElement

avatar

avatar: string = ""

User photo

Protected confirmDialog

confirmDialog: ConfirmDialogElement

Protected confirmFn

confirmFn: function

Function to call on confirm dialog confirm button click

Type declaration

    • (): void
    • Returns void

Protected errorConfirmFn

errorConfirmFn: function | undefined

Function to call on error dialog confirm button click

Protected errorDialog

errorDialog: ErrorDialogElement

Protected mainMenu

mainMenu: PaperListboxElement

Protected mainPageEl

mainPageEl: MainPageElement

Protected mainPages

mainPages: NeonAnimatedPagesElement

Protected messageToast

messageToast: PaperToastElement

Protected onHighlightRoute

onHighlightRoute: string = ""

Route to use on tab highlight, blank keep current

Protected pages

pages: IPage[] = []

Concatenation of all the app's pages

pagesLabels

pagesLabels: IPage[] = []

Array of IPage objects for the Label objects

pagesOne

pagesOne: IPage[] = [{label: 'Clips', route: 'page-main',icon: 'myicons:content-paste', fn: null, url: null,ready: true, disabled: false, divider: false,insertion: 'mainInsertion', obj: MainPageElement, el: null,},{label: 'Manage account', route: 'page-signin',icon: 'myicons:account-circle', fn: null, url: null,ready: false, disabled: false, divider: false,insertion: 'signInInsertion', obj: SigninPageElement, el: null,},{label: 'Manage backups', route: 'page-backup',icon: 'myicons:cloud', fn: null, url: null,ready: false, disabled: false, divider: false,insertion: 'backupInsertion', obj: BackupPageElement, el: null,},{label: 'Query remote devices', route: 'page-devices',icon: 'myicons:phonelink', fn: null, url: null,ready: false, disabled: false, divider: false,insertion: 'devicesInsertion', obj: DevicesPageElement, el: null,},{label: 'Manage labels', route: 'page-labels',icon: 'myicons:label', fn: null, url: null,ready: false, disabled: false, divider: false,insertion: 'labelsInsertion', obj: LabelsPageElement, el: null,},]

Array of IPage objects

pagesTwo

pagesTwo: IPage[] = [{label: ChromeLocale.localize('menu_settings'), route: 'page-settings',icon: 'myicons:settings', fn: null, url: null,ready: false, disabled: false, divider: true,insertion: 'settingsInsertion', obj: SettingsPageElement, el: null,},{label: ChromeLocale.localize('menu_permission'), route: 'page-permissions',icon: 'myicons:perm-data-setting', fn: this.showPermissionsDialog.bind(this), url: null,ready: true, disabled: false, divider: false,insertion: null, obj: null, el: null,},{label: ChromeLocale.localize('menu_error'), route: 'page-error',icon: 'myicons:error', fn: null, url: null,ready: false, disabled: false, divider: true,insertion: 'errorInsertion', obj: ErrorPageElement, el: null,},{label: ChromeLocale.localize('menu_help'), route: 'page-help',icon: 'myicons:help', fn: null, url: null,ready: false, divider: false, disabled: false,insertion: 'helpInsertion', obj: HelpPageElement, el: null,},{label: ChromeLocale.localize('menu_android'), route: 'page-android',icon: 'myicons:android', fn: null, url: AppMainElement.ANDROID_URI,ready: true, divider: false, disabled: false,insertion: null, obj: null, el: null,},{label: ChromeLocale.localize('menu_rate'), route: 'page-rate',icon: 'myicons:grade', fn: null, url: `${AppMainElement.EXT_URI}reviews`,ready: true, divider: false, disabled: false,insertion: null, obj: null, el: null,},{label: ChromeLocale.localize('menu_screensaver'), route: 'page-screensaver',icon: 'myicons:extension', fn: null, url: AppMainElement.SCREEN_SAVER_URI,ready: true, divider: true, disabled: false,insertion: null, obj: null, el: null,},]

Array of IPage objects

permission

permission: STATE = Permissions.STATE.notSet

Tabs permission status

Protected permissionsDialog

permissionsDialog: PaperDialogElement

Protected prevRoute

prevRoute: string = ""

Previous IPage

route

route: string = ""

Current IPage

showErrorConfirmButton

showErrorConfirmButton: boolean = false

Show confirm button on error dialog

Static Protected ANDROID_URI

ANDROID_URI: "https://play.google.com/store/apps/details?id=com.weebly.opus1269.clipman" = "https://play.google.com/store/apps/details?id=com.weebly.opus1269.clipman"

Path to the android app in the Play Store

Static Protected EXT_URI

EXT_URI: string = `https://chrome.google.com/webstore/detail/pushy-clipboard/${chrome.runtime.id}/`

Path to the extension in the Web Store

Static Protected SCREEN_SAVER_URI

SCREEN_SAVER_URI: "https://chrome.google.com/webstore/detail/photo-screen-saver/kohpcmlfdjfdggcjmjhhbcbankgmppgc" = "https://chrome.google.com/webstore/detail/photo-screen-saver/kohpcmlfdjfdggcjmjhhbcbankgmppgc"

Path to my screensaver extension

Accessors

avatarDisplay

  • get avatarDisplay(): "none" | "inline"

permissionStatus

  • get permissionStatus(): string

Static template

  • get template(): HTMLTemplateElement

Methods

Protected buildLabelPages

  • buildLabelPages(): Promise<IPage[]>

Protected buildPages

  • buildPages(): Promise<void>

Protected checkOptionalPermissions

  • checkOptionalPermissions(): void

connectedCallback

  • connectedCallback(): void
  • Called when the element is added to a document. Can be called multiple times during the lifetime of an element.

    Returns void

disconnectedCallback

  • disconnectedCallback(): void
  • Called when the element is removed from a document. Can be called multiple times during the lifetime of an element.

    Returns void

Protected fireEvent

  • fireEvent(name: string, detailValue?: any): void
  • Dispatch an event

    Parameters

    • name: string

      event name

    • Optional detailValue: any

      optional value

    Returns void

Protected getPage

  • getPage(route: string): undefined | IPage

Protected getPagesLabelsIdx

  • getPagesLabelsIdx(label: string): number

Protected initializePages

  • initializePages(): Promise<void>

ready

  • ready(): Promise<void>
  • Called during Polymer-specific element initialization. Called once, the first time the element is attached to the document.

    Returns Promise<void>

Protected routeChanged

  • routeChanged(route: string | undefined, oldRoute: string | undefined): void

Protected setBackupMenuState

  • setBackupMenuState(): void

Protected setDevicesMenuState

  • setDevicesMenuState(): void

Protected setErrorMenuState

  • setErrorMenuState(): Promise<void>

Protected setHighlightRoute

  • setHighlightRoute(): void

showConfirmDialog

  • showConfirmDialog(text: string, title: string, confirmLabel: string, fn: function): void
  • Display a confirm dialog

    Parameters

    • text: string

      dialog text

    • title: string

      dialog title

    • confirmLabel: string

      confirm button text

    • fn: function

      function to call on confirm button click

        • (): void
        • Returns void

    Returns void

showErrorDialog

  • showErrorDialog(title: string, text: string, method?: undefined | string, showConfirmButton?: undefined | false | true, fn?: undefined | function): void
  • Display an error dialog

    Parameters

    • title: string

      dialog title

    • text: string

      dialog text

    • Optional method: undefined | string

      calling method name

    • Optional showConfirmButton: undefined | false | true

      show confirm button

    • Optional fn: undefined | function

      function to call on confirm button click

    Returns void

showMessageToast

  • showMessageToast(text: string, duration: number): void
  • Display a message toast

    Parameters

    • text: string

      text to display

    • duration: number

      duration to show for in milliSecs - 0 or negative for persistent message

    Returns void

Protected showPage

  • showPage(page: IPage): void

Protected showPermissionsDialog

  • showPermissionsDialog(): void

Protected sortLabelPages

  • sortLabelPages(pageA: IPage, pageB: IPage): 0 | 1 | -1

updateLabels

  • updateLabels(): Promise<void>

Static localize

  • localize(name: string, def?: undefined | string): string
  • Localize a string

    Parameters

    • name: string

      name from _locales

    • Optional def: undefined | string

      optional default value if name not found

    Returns string

Static setColors

  • setColors(isDark: boolean): void

Generated using TypeDoc