mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-23 03:25:15 +00:00
Correctly type StyleElement
This commit is contained in:
parent
a440c3272e
commit
cb780817f3
|
@ -36,6 +36,7 @@ import axios from 'axios';
|
|||
import ThemeLightDark from 'vue-material-design-icons/Brightness6.vue';
|
||||
import { themeList } from '@/shared/themes';
|
||||
import { mapActions } from 'vuex';
|
||||
import { FTHTMLStyleElement } from '@/types/styleElement';
|
||||
|
||||
export default Vue.extend({
|
||||
name: 'BootswatchThemeSelect',
|
||||
|
@ -78,7 +79,7 @@ export default Vue.extend({
|
|||
);
|
||||
// Reset all bootswatch styles
|
||||
bw.forEach((style, index) => {
|
||||
(bw[index] as any).disabled = true;
|
||||
(bw[index] as FTHTMLStyleElement).disabled = true;
|
||||
});
|
||||
if (this.simple && this.activeTheme) {
|
||||
// Only transition if simple mode is active
|
||||
|
@ -100,10 +101,10 @@ export default Vue.extend({
|
|||
bw[index].id = themeName;
|
||||
} else if (style.id === themeName) {
|
||||
// If it's a style that has been imported already.
|
||||
(bw[index] as any).disabled = false;
|
||||
(bw[index] as FTHTMLStyleElement).disabled = false;
|
||||
} else {
|
||||
// All other style themes should be disabled.
|
||||
(bw[index] as any).disabled = true;
|
||||
(bw[index] as FTHTMLStyleElement).disabled = true;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
>
|
||||
<PlayIcon />
|
||||
</button>
|
||||
<ForceBuyForm :modal-show="forcebuyShow" @close="this.$bvModal.hide('forcebuy-modal')" />
|
||||
<ForceBuyForm :modal-show="forcebuyShow" @close="$bvModal.hide('forcebuy-modal')" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
7
src/types/styleElement.ts
Normal file
7
src/types/styleElement.ts
Normal file
|
@ -0,0 +1,7 @@
|
|||
/**
|
||||
* Workaround style to enable "disabled" element on Style element.
|
||||
* Can probably be removed in a future Typescript update (once the Root element types disabled correctly).
|
||||
*/
|
||||
export interface FTHTMLStyleElement extends HTMLStyleElement {
|
||||
disabled: boolean;
|
||||
}
|
Loading…
Reference in New Issue
Block a user