From d825379a0162ecfc68ae13c5cda25a28181f779b Mon Sep 17 00:00:00 2001 From: Jan Bader Date: Fri, 4 Feb 2022 16:34:16 +0000 Subject: [PATCH] Try to use tailwind --- web/src/App.vue | 36 ++++++------- web/src/dialogs/NewBudget.vue | 99 +++++++++++------------------------ web/src/index.css | 3 ++ web/src/main.ts | 6 +-- web/src/pages/Dashboard.vue | 12 ++--- web/src/pages/Index.vue | 16 +++--- web/src/pages/Login.vue | 33 ++++-------- web/tailwind.config.js | 5 +- web/vite.config.js | 4 -- 9 files changed, 78 insertions(+), 136 deletions(-) create mode 100644 web/src/index.css diff --git a/web/src/App.vue b/web/src/App.vue index fe08b65..680443b 100644 --- a/web/src/App.vue +++ b/web/src/App.vue @@ -24,30 +24,27 @@ export default defineComponent({ diff --git a/web/src/dialogs/NewBudget.vue b/web/src/dialogs/NewBudget.vue index 07caffc..5556f28 100644 --- a/web/src/dialogs/NewBudget.vue +++ b/web/src/dialogs/NewBudget.vue @@ -1,75 +1,40 @@ - \ No newline at end of file diff --git a/web/src/index.css b/web/src/index.css new file mode 100644 index 0000000..bd6213e --- /dev/null +++ b/web/src/index.css @@ -0,0 +1,3 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; \ No newline at end of file diff --git a/web/src/main.ts b/web/src/main.ts index e6b7cdd..bd28323 100644 --- a/web/src/main.ts +++ b/web/src/main.ts @@ -1,17 +1,13 @@ import { createApp } from 'vue' import App from './App.vue' +import './index.css' import router from './router/routes.js' import { store, key } from './store/index.js' -import vuetify from './plugins/vuetify' -import { loadFonts } from './plugins/webfontloader' import { SET_CURRENT_ACCOUNT, SET_CURRENT_BUDGET } from './store/action-types' -loadFonts() - const app = createApp(App) app.use(router) app.use(store, key) -app.use(vuetify) app.mount('#app') router.beforeEach(async (to, from, next) => { diff --git a/web/src/pages/Dashboard.vue b/web/src/pages/Dashboard.vue index 1bfd725..6965b05 100644 --- a/web/src/pages/Dashboard.vue +++ b/web/src/pages/Dashboard.vue @@ -10,13 +10,13 @@ export default defineComponent({ \ No newline at end of file diff --git a/web/src/pages/Index.vue b/web/src/pages/Index.vue index e58bec6..7dc6d55 100644 --- a/web/src/pages/Index.vue +++ b/web/src/pages/Index.vue @@ -7,12 +7,12 @@ export default defineComponent({ \ No newline at end of file diff --git a/web/src/pages/Login.vue b/web/src/pages/Login.vue index f3905be..a3ce283 100644 --- a/web/src/pages/Login.vue +++ b/web/src/pages/Login.vue @@ -6,7 +6,7 @@ import { defineComponent } from "vue"; export default defineComponent({ data() { return { - error: [], + error: "", login: { user: "", password: "" @@ -18,14 +18,14 @@ export default defineComponent({ this.$store.commit(TITLE, "Login"); }, methods: { - formSubmit(e) { + formSubmit(e : MouseEvent) { e.preventDefault(); this.$store.dispatch(LOGIN, this.$data.login) .then(x => { this.$data.error = ""; this.$router.replace("/dashboard"); }) - .catch(x => this.$data.error = ["The entered credentials are invalid!"]); + .catch(x => this.$data.error = "The entered credentials are invalid!"); // TODO display invalidCredentials // TODO redirect to dashboard on success @@ -35,29 +35,14 @@ export default defineComponent({ \ No newline at end of file diff --git a/web/tailwind.config.js b/web/tailwind.config.js index 9843c05..8b26c47 100644 --- a/web/tailwind.config.js +++ b/web/tailwind.config.js @@ -1,5 +1,8 @@ module.exports = { - content: [], + content: [ + "./index.html", + "./src/**/*.{vue,js,ts,jsx,tsx}" + ], theme: { extend: {}, }, diff --git a/web/vite.config.js b/web/vite.config.js index e39209e..8e1b264 100644 --- a/web/vite.config.js +++ b/web/vite.config.js @@ -1,6 +1,5 @@ import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' -import vuetify from '@vuetify/vite-plugin' import path from 'path' @@ -9,9 +8,6 @@ export default defineConfig({ plugins: [ vue(), // https://github.com/vuetifyjs/vuetify-loader/tree/next/packages/vite-plugin - vuetify({ - autoImport: true, - }), ], define: { 'process.env': {} }, resolve: {