Bootswatch to script setup

This commit is contained in:
Matthias 2023-03-23 18:23:14 +01:00
parent e3d5ceff84
commit b1ceb7158a

View File

@ -29,24 +29,20 @@
</div> </div>
</template> </template>
<script lang="ts"> <script setup lang="ts">
import { defineComponent, ref, onMounted } from 'vue'; import { ref, onMounted } from 'vue';
import axios from 'axios'; import axios from 'axios';
import ThemeLightDark from 'vue-material-design-icons/Brightness6.vue'; import ThemeLightDark from 'vue-material-design-icons/Brightness6.vue';
import { FTHTMLStyleElement } from '@/types/styleElement'; import { FTHTMLStyleElement } from '@/types/styleElement';
import { useSettingsStore } from '@/stores/settings'; import { useSettingsStore } from '@/stores/settings';
import { ThemeType } from '@/shared/themes'; import { ThemeType } from '@/shared/themes';
export default defineComponent({ const props = defineProps({
name: 'BootswatchThemeSelect',
components: { ThemeLightDark },
props: {
simple: { simple: {
type: Boolean, type: Boolean,
default: true, default: true,
}, },
}, });
setup(props) {
const activeTheme = ref(''); const activeTheme = ref('');
const themeList = ref<ThemeType[]>([]); const themeList = ref<ThemeType[]>([]);
const settingsStore = useSettingsStore(); const settingsStore = useSettingsStore();
@ -130,16 +126,6 @@ export default defineComponent({
console.error(error); console.error(error);
}); });
}; };
return {
activeTheme,
themeList,
setTheme,
handleClick,
toggleNight,
fetchApi,
};
},
});
</script> </script>
<style scoped></style> <style scoped></style>