Skip to content

Commit

Permalink
fix: new color picker allows rgb input
Browse files Browse the repository at this point in the history
Signed-off-by: Craig Bassett <[email protected]>
  • Loading branch information
cadriel committed Jun 17, 2021
1 parent 57132e6 commit b5b87e9
Show file tree
Hide file tree
Showing 4 changed files with 198 additions and 130 deletions.
9 changes: 5 additions & 4 deletions src/components/settings/ThemeSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

<app-color-picker
v-if="theme"
:value="themeColor"
:primary="themeColor"
@change="handleChangeThemeColor"
:title="$t('app.setting.btn.select_theme')"
>
Expand All @@ -61,6 +61,7 @@
<script lang="ts">
import { Component, Mixins } from 'vue-property-decorator'
import StateMixin from '@/mixins/state'
import { IroColor } from '@irojs/iro-core'
import { SupportedTheme, ThemeConfig } from '@/store/config/types'
import ThemePicker from '../ui/AppColorPicker.vue'
Expand Down Expand Up @@ -101,11 +102,11 @@ export default class ThemeSettings extends Mixins(StateMixin) {
return this.theme.currentTheme.primary
}
handleChangeThemeColor (value: any) {
this.setTheme(value.hexString, this.isDark)
handleChangeThemeColor (value: { channel: string; color: IroColor }) {
this.setTheme(value.color.hexString, this.isDark)
this.$store.dispatch('config/saveByPath', {
path: 'uiSettings.theme.currentTheme.primary',
value: value.hexString,
value: value.color.hexString,
server: true
})
}
Expand Down
Loading

0 comments on commit b5b87e9

Please sign in to comment.