появление тренировки
Gitea Actions Demo / build_and_push (push) Successful in 1m17s
Details
Gitea Actions Demo / build_and_push (push) Successful in 1m17s
Details
This commit is contained in:
parent
c598b1a57f
commit
f5bf68178f
|
|
@ -85,10 +85,12 @@ import axios from "axios";
|
|||
import { reactive, ref } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import { useForm, useToast } from "vuestic-ui";
|
||||
import { useGlobalStore } from "../../stores/global-store";
|
||||
|
||||
const { validate } = useForm("form");
|
||||
const { push } = useRouter();
|
||||
const { init } = useToast();
|
||||
const globalStore = useGlobalStore();
|
||||
|
||||
const formData = reactive({
|
||||
email: "",
|
||||
|
|
@ -121,6 +123,7 @@ const submit = () => {
|
|||
"attachments",
|
||||
JSON.stringify(response.data.attachments),
|
||||
);
|
||||
globalStore.setAuthenticated(true);
|
||||
init({
|
||||
message: "Вы успешно вошли",
|
||||
color: "success",
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@
|
|||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { AxiosError } from "axios";
|
||||
import { ref } from "vue";
|
||||
import { AxiosError, AxiosInstance } from "axios";
|
||||
import { ref, inject } from "vue";
|
||||
import { useRoute } from "vue-router";
|
||||
import { useToast } from "vuestic-ui/web-components";
|
||||
import WorkoutItemComponent from "./components/WorkoutItem.vue";
|
||||
|
|
@ -27,6 +27,7 @@ import { GetWorkout, InitWorkoutItem } from "./components/GetWorkout";
|
|||
|
||||
const { init } = useToast();
|
||||
const route = useRoute();
|
||||
const axiosAuth = inject("axiosAuth") as AxiosInstance;
|
||||
|
||||
const mapCenter = ref<Array<number>>([37.617644, 55.755819]);
|
||||
const lineCoordinates = ref<Array<Array<number>>>([]);
|
||||
|
|
@ -37,7 +38,7 @@ const dzenLink = ref("");
|
|||
const dataKey = ref(0);
|
||||
|
||||
const initWorkout = (id: string) => {
|
||||
GetWorkout(`/api/v0/workouts/${id}`)
|
||||
GetWorkout(`/api/v0/workouts/${id}`, axiosAuth)
|
||||
.then((d: InitWorkoutItem) => {
|
||||
mapCenter.value = d.mapCenter;
|
||||
lineCoordinates.value = d.lineCoordinates;
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@
|
|||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { AxiosError } from "axios";
|
||||
import { ref } from "vue";
|
||||
import { AxiosError, AxiosInstance } from "axios";
|
||||
import { ref, inject } from "vue";
|
||||
import { useRoute } from "vue-router";
|
||||
import { useToast } from "vuestic-ui/web-components";
|
||||
import WorkoutItemComponent from "./components/WorkoutItem.vue";
|
||||
|
|
@ -26,6 +26,7 @@ import { trimTrack } from "./components/TrimTrack";
|
|||
|
||||
const { init } = useToast();
|
||||
const route = useRoute();
|
||||
const axiosAuth = inject("axiosAuth") as AxiosInstance;
|
||||
|
||||
const mapCenter = ref<Array<number>>([37.617644, 55.755819]);
|
||||
const lineCoordinates = ref<Array<Array<number>>>([]);
|
||||
|
|
@ -35,7 +36,7 @@ const data = ref<ChartDataByMetric>({});
|
|||
const dzenLink = ref("");
|
||||
|
||||
const initWorkout = (id: string) => {
|
||||
GetWorkout(`/api/v0/public/workouts/${id}`)
|
||||
GetWorkout(`/api/v0/public/workouts/${id}`, axiosAuth)
|
||||
.then((d: InitWorkoutItem) => {
|
||||
workoutItem.value = d.workoutItem;
|
||||
if (d.dzenLink != undefined) {
|
||||
|
|
|
|||
|
|
@ -32,8 +32,8 @@ export type InitWorkoutItem = {
|
|||
dzenLink?: string;
|
||||
};
|
||||
|
||||
export const GetWorkout = (url: string) => {
|
||||
const axiosAuth = inject("axiosAuth") as AxiosInstance;
|
||||
export const GetWorkout = (url: string, axiosInstance?: AxiosInstance) => {
|
||||
const axiosAuth = axiosInstance ?? (inject("axiosAuth") as AxiosInstance);
|
||||
const query = axiosAuth.get(url).then((response: AxiosResponse) => {
|
||||
workoutItem = response.data.workout;
|
||||
const times = [];
|
||||
|
|
|
|||
Loading…
Reference in New Issue