king
2024-10-11 6ca240a14ccf55d4e0a94fff77e95f64db2cdfcc
src/mob/colorsketch/index.jsx
@@ -12,7 +12,6 @@
  '#eb2f96', '#aeb303', '#c32539', '#1d3661', '#ffd591', '#ffe58f', '#fffb8f', '#eaff8f', '#b7eb8f', '#87e8de', '#91d5ff',
  '#adc6ff', '#EBE9E9', '#d9d9d9', 'rgba(0, 0, 0, 0.65)', 'rgba(0, 0, 0, 0.85)', '#000000', '#ffffff', 'transparent'
]
const _href = window.location.href.split('#')[0]
let loading = false
class ColorSketch extends Component {
@@ -79,7 +78,7 @@
  getColors = (appColors) => {
    let colors = JSON.parse(JSON.stringify(presetColors))
    let normal_colors = localStorage.getItem(_href + 'normal_colors')
    let normal_colors = localStorage.getItem(window.GLOB.sysSign + 'normal_colors')
    if (normal_colors) {
      try {
@@ -135,7 +134,7 @@
    const { initVal, color } = this.state
    
    if (!status && color && color !== initVal && color !== 'rgba(0, 0, 0, 0)' && color !== 'transparent' && !/rgba\(\d+,\s*\d+,\s*\d+,\s*0\)/.test(color)) {
      let normal_colors = localStorage.getItem(_href + 'normal_colors')
      let normal_colors = localStorage.getItem(window.GLOB.sysSign + 'normal_colors')
      if (normal_colors) {
        try {
@@ -154,7 +153,7 @@
        normal_colors.length = 10
      }
      localStorage.setItem(_href + 'normal_colors', JSON.stringify(normal_colors))
      localStorage.setItem(window.GLOB.sysSign + 'normal_colors', JSON.stringify(normal_colors))
    }
  }