diff --git a/.env b/.env index 8e63cd4..1ea1c62 100644 --- a/.env +++ b/.env @@ -1,3 +1,3 @@ -VITE_API_URL="https://stacjownik.spythere.pl" +VITE_API_URL="https://stacjownik.spythere.eu" VITE_API_URL_DEV="http://localhost:3001" -VITE_API_DEV="0" \ No newline at end of file +VITE_API_DEV=0 \ No newline at end of file diff --git a/package.json b/package.json index cb514e3..6dccd87 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "station-manager-2.0", "private": true, - "version": "2.1.0", + "version": "2.2.0", "type": "module", "scripts": { "dev": "vite", diff --git a/src/App.vue b/src/App.vue index 7631ad5..64c9913 100644 --- a/src/App.vue +++ b/src/App.vue @@ -8,11 +8,10 @@ import { defineComponent } from 'vue'; import PopUpCard from './components/PopUpCard.vue'; import { RouterView } from 'vue-router'; -import { AuthState } from './types/types'; -import { baseURL, useStore } from './store'; +import { useStore } from './store'; import useLocalStorage from './mixins/useLocalStorage'; -import axios from 'axios'; import { IUser } from './types/types'; +import client from './common/http'; export default defineComponent({ components: { PopUpCard }, @@ -33,14 +32,7 @@ export default defineComponent({ try { this.tokenLoading = true; - const response = await axios.post( - '/auth/token', - {}, - { - baseURL, - withCredentials: true, - } - ); + const response = await client.post('/auth/token'); this.store.setUserData(response.data); this.$router.push('/'); @@ -86,9 +78,17 @@ html { background-color: #1e2341; color: white; - @media screen and (max-width: 600px) { + @media screen and (max-width: 700px) { font-size: calc(0.7vw + 0.7rem); } + + font-size: 16px; +} + +button, +select, +input { + font-size: inherit; } button { @@ -96,13 +96,13 @@ button { outline: none; border: none; - background-color: #000000; + background-color: #0066ff; color: white; - padding: 0.5rem 0.75rem; - margin: 0.5rem 0; + padding: 0.5em 0.5em; font-weight: bold; + font-size: 0.9em; cursor: pointer; transition: all 75ms; @@ -111,8 +111,9 @@ button { outline: 1px solid gold; } - &:hover { - color: gold; + &:hover, + &:focus-visible { + background-color: lighten($color: #0066ff, $amount: 10%); } } @@ -164,4 +165,3 @@ button { background: #aaa; } - diff --git a/src/common/http.ts b/src/common/http.ts new file mode 100644 index 0000000..07b851b --- /dev/null +++ b/src/common/http.ts @@ -0,0 +1,8 @@ +import axios from 'axios'; + +const client = axios.create({ + baseURL: import.meta.env['VITE_API_URL'], + withCredentials: true, +}); + +export default client; diff --git a/src/components/TableActions.vue b/src/components/TableActions.vue index 878ad00..17652ad 100644 --- a/src/components/TableActions.vue +++ b/src/components/TableActions.vue @@ -1,39 +1,41 @@