Skip to content

Commit

Permalink
$ Fix naming, import code style
Browse files Browse the repository at this point in the history
  • Loading branch information
PikachuEXE committed Jul 29, 2023
1 parent d570574 commit 43894e1
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 15 deletions.
7 changes: 2 additions & 5 deletions src/renderer/components/ft-input/ft-input.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import { defineComponent } from 'vue'
import FtTooltip from '../ft-tooltip/ft-tooltip.vue'
import { mapActions } from 'vuex'
import {
IsKeyboardEventKeyPrintableChar,
isNullOrEmpty,
} from '../../helpers/strings'
import { isKeyboardEventKeyPrintableChar, isNullOrEmpty } from '../../helpers/strings'

export default defineComponent({
name: 'FtInput',
Expand Down Expand Up @@ -260,7 +257,7 @@ export default defineComponent({
if (!isArrow) {
const selectedOptionValue = this.searchStateKeyboardSelectedOptionValue
// Keyboard selected & is char
if (!isNullOrEmpty(selectedOptionValue) && IsKeyboardEventKeyPrintableChar(event.key)) {
if (!isNullOrEmpty(selectedOptionValue) && isKeyboardEventKeyPrintableChar(event.key)) {
// Update input based on KB selected suggestion value instead of current input value
event.preventDefault()
this.handleInput(`${selectedOptionValue}${event.key}`)
Expand Down
4 changes: 1 addition & 3 deletions src/renderer/helpers/api/invidious.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import store from '../../store/index'
import { stripHTML, toLocalePublicationString } from '../utils'
import {
isNullOrEmpty,
} from '../strings'
import { isNullOrEmpty } from '../strings'
import autolinker from 'autolinker'

function getCurrentInstance() {
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/helpers/strings.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function isNullOrEmpty(_string) {
* @param {string} eventKey the string from KeyboardEvent.key to process
* @returns {boolean} whether the string from KeyboardEvent.key is a printable char or not
*/
export function IsKeyboardEventKeyPrintableChar(eventKey) {
export function isKeyboardEventKeyPrintableChar(eventKey) {
// Most printable chars are all strings with length 1 (except Unicode)
// https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_key_values
// https://www.w3.org/TR/DOM-Level-3-Events-key/
Expand Down
4 changes: 1 addition & 3 deletions src/renderer/views/Channel/Channel.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ import ChannelAbout from '../../components/channel-about/channel-about.vue'

import autolinker from 'autolinker'
import { copyToClipboard, extractNumberFromString, formatNumber, showToast } from '../../helpers/utils'
import {
isNullOrEmpty,
} from '../../helpers/strings'
import { isNullOrEmpty } from '../../helpers/strings'
import packageDetails from '../../../../package.json'
import {
invidiousAPICall,
Expand Down
4 changes: 1 addition & 3 deletions src/renderer/views/Hashtag/Hashtag.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ import FtLoader from '../../components/ft-loader/ft-loader.vue'
import packageDetails from '../../../../package.json'
import { getHashtagLocal, parseLocalListVideo } from '../../helpers/api/local'
import { copyToClipboard, showToast } from '../../helpers/utils'
import {
isNullOrEmpty,
} from '../../helpers/strings'
import { isNullOrEmpty } from '../../helpers/strings'
import { getHashtagInvidious } from '../../helpers/api/invidious'

export default defineComponent({
Expand Down

0 comments on commit 43894e1

Please sign in to comment.