Merge pull request #94 from Flow-Works/93-fix-battery-indicator
93-fix-battery-indicator
This commit is contained in:
commit
de46189d0f
2 changed files with 4 additions and 3 deletions
|
|
@ -2,6 +2,7 @@ import icon from '../../assets/icons/web-browser.svg'
|
|||
import { App } from '../../types'
|
||||
|
||||
import FlowWindow from '../../structures/FlowWindow'
|
||||
import { sanitize } from '../../utils'
|
||||
|
||||
export default class BrowserApp implements App {
|
||||
meta = {
|
||||
|
|
@ -89,7 +90,7 @@ export default class BrowserApp implements App {
|
|||
if (this === tabManager.activeTab) {
|
||||
(win.content.querySelector('.toggle') as HTMLElement).innerHTML = 'toggle_off'
|
||||
}
|
||||
this.iframe.src = win.content.querySelector('input')?.value as string
|
||||
this.iframe.src = sanitize(win.content.querySelector('input')?.value as string)
|
||||
} else {
|
||||
if (this === tabManager.activeTab) {
|
||||
(win.content.querySelector('.toggle') as HTMLElement).innerHTML = 'toggle_on'
|
||||
|
|
@ -167,7 +168,7 @@ export default class BrowserApp implements App {
|
|||
if (tabManager.activeTab.proxy) {
|
||||
tabManager.activeTab.iframe.src = `/service/${xor.encode((win.content.querySelector('.inp') as HTMLInputElement).value)}`
|
||||
} else {
|
||||
tabManager.activeTab.iframe.src = (win.content.querySelector('.inp') as HTMLInputElement).value
|
||||
tabManager.activeTab.iframe.src = sanitize((win.content.querySelector('.inp') as HTMLInputElement).value)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ class StatusBar {
|
|||
iconHTML = 'battery_charging_50'
|
||||
} else if (battery.level >= 0.3) {
|
||||
iconHTML = 'battery_charging_30'
|
||||
} else if (battery.level >= 0.2) {
|
||||
} else if (battery.level >= 0) {
|
||||
iconHTML = 'battery_charging_20'
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue