chore: lint files

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
braks
2023-03-31 21:30:23 +02:00
committed by Braks
parent 9d597ff454
commit f61e5beb02
69 changed files with 623 additions and 424 deletions
+2 -2
View File
@@ -8,12 +8,12 @@ import Additional from './flows/Additional.vue'
const el = ref<HTMLDivElement>()
const instances: VueFlowStore[] = []
const onLoad = (instance: VueFlowStore) => {
function onLoad(instance: VueFlowStore) {
instances.push(instance)
instance.fitView()
}
const fitViews = () => {
function fitViews() {
instances.forEach((i) => i.fitView())
}
+3 -3
View File
@@ -226,7 +226,7 @@ function setElements() {
const { stop } = useResizeObserver(el, useDebounceFn(setElements, 5))
onBeforeUnmount(stop)
const scrollTo = () => {
function scrollTo() {
const el = document.getElementById('acknowledgement')
if (el) {
el.scrollIntoView({ behavior: 'smooth' })
@@ -235,7 +235,7 @@ const scrollTo = () => {
const animationClassNames = ['checker-gb', 'checker-op', 'checker-yg', 'checker-ss']
const shuffle = (a: any[]) => {
function shuffle(a: any[]) {
for (let i = a.length - 1; i > 0; i--) {
const j = Math.floor(Math.random() * (i + 1))
;[a[i], a[j]] = [a[j], a[i]]
@@ -243,7 +243,7 @@ const shuffle = (a: any[]) => {
return a
}
const createAnimationDurations = () => {
function createAnimationDurations() {
return animationClassNames.map((className) => {
const duration = 5 + Math.random() * 5
+3 -1
View File
@@ -59,7 +59,9 @@ watch(
{ immediate: true },
)
const onChange = ({ color: c, val }: { color: keyof Colors; val: number }) => (color.value[c] = Number(val))
function onChange({ color: c, val }: { color: keyof Colors; val: number }) {
return (color.value[c] = Number(val))
}
const nodeColor: MiniMapNodeFunc = (node) => {
switch (node.id) {
+2 -2
View File
@@ -1,6 +1,6 @@
import confetti from 'canvas-confetti'
export const fireworks = (colors?: string[]) => {
export function fireworks(colors?: string[]) {
return new Promise((resolve) => {
const duration = 15 * 1000
const animationEnd = Date.now() + duration
@@ -38,7 +38,7 @@ export const fireworks = (colors?: string[]) => {
})
}
export const cheer = (colors: string[]) => {
export function cheer(colors: string[]) {
return new Promise((resolve) => {
const end = Date.now() + 2 * 1000
+30 -15
View File
@@ -12,35 +12,50 @@ interface RGBNodeProps extends NodeProps {
blue: number
}
}
const props = defineProps<RGBNodeProps>()
const emit = defineEmits(['change'])
let color = 'red'
switch (props.data?.color) {
case 'r':
color = 'red'
break
case 'g':
color = 'green'
break
case 'b':
color = 'blue'
break
const currentColor = computed(() => {
let color
switch (props.data?.color) {
case 'r':
color = 'red'
break
case 'g':
color = 'green'
break
case 'b':
color = 'blue'
break
default:
color = 'red'
}
return color
})
function onChange(e: any) {
return emit('change', { color: currentColor.value, val: e.target.value })
}
const onChange = (e: any) => emit('change', { color, val: e.target.value })
</script>
<template>
<div class="px-4 py-2 bg-white rounded-md border-2 border-solid border-black text-left transform scale-75 lg:scale-100">
<div class="text-md" :style="{ color }">{{ `${color} Amount`.toUpperCase() }}</div>
<div class="text-md" :style="{ color: currentColor }">{{ `${currentColor} Amount`.toUpperCase() }}</div>
<input
v-model="props.amount[color]"
:model-value="amount[currentColor]"
class="slider nodrag"
:style="{ '--color': color }"
:style="{ '--color': currentColor }"
type="range"
min="0"
max="255"
@input="onChange"
/>
<Handle type="source" :position="Position.Right" :style="{ backgroundColor: color }" />
</div>
</template>