diff --git a/index.html b/index.html
index ce8a0cf..ca47302 100644
--- a/index.html
+++ b/index.html
@@ -16,7 +16,9 @@
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,300..600,0,0"
/>
+
+
Cycle Rider Ala Strava for Russian/Belorussian
diff --git a/public/favicon.svg b/public/favicon.svg
new file mode 100644
index 0000000..4deea2a
--- /dev/null
+++ b/public/favicon.svg
@@ -0,0 +1,44 @@
+
diff --git a/public/site.webmanifest b/public/site.webmanifest
index fa99de7..2547093 100644
--- a/public/site.webmanifest
+++ b/public/site.webmanifest
@@ -2,6 +2,11 @@
"name": "",
"short_name": "",
"icons": [
+ {
+ "src": "/favicon.svg",
+ "sizes": "any",
+ "type": "image/svg+xml"
+ },
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
diff --git a/server/template.ts b/server/template.ts
index e398393..b1b7b89 100644
--- a/server/template.ts
+++ b/server/template.ts
@@ -48,7 +48,7 @@ export function renderTemplate(options: TemplateOptions): string {
${meta.ogImage ? `` : ""}
-
+
${assetTags}
${jsonLdScript}
diff --git a/src/pages/workouts/WorkoutUpload.vue b/src/pages/workouts/WorkoutUpload.vue
index 38f8ff2..f8147c0 100644
--- a/src/pages/workouts/WorkoutUpload.vue
+++ b/src/pages/workouts/WorkoutUpload.vue
@@ -10,16 +10,6 @@
:hideFileList="true"
dropzone
/>
-
-
Фото тренировки (опционально)
-
-
@@ -37,7 +27,6 @@ const { init } = useToast();
const router = useRouter();
const inProgress = ref(false);
let file: File | undefined = undefined;
-const photoFiles = ref([]);
type ErrorItem = {
code_string: string;
@@ -47,31 +36,6 @@ type Error = {
detail: ErrorItem;
};
-async function uploadPhotos(workoutId: string): Promise {
- const total = photoFiles.value.length;
- if (total === 0) {
- return true;
- }
- const results = await Promise.allSettled(
- photoFiles.value.map((photo) => {
- const formData = new FormData();
- formData.append("file", photo);
- return axiosAuth.post(`/api/v0/workouts/${workoutId}/photos`, formData);
- }),
- );
- const failed = results.filter(
- (r): r is PromiseRejectedResult => r.status === "rejected",
- ).length;
- if (failed > 0) {
- init({
- message: `Часть фото не загружена (${failed} из ${total})`,
- color: "error",
- });
- return false;
- }
- return true;
-}
-
function onFileChanged() {
if (file == undefined) {
init({
@@ -91,25 +55,13 @@ function onFileChanged() {
attachment_id: response.data.id,
name: "Новая тренировка",
})
- .then(async (response: AxiosResponse) => {
+ .then((response: AxiosResponse) => {
const workoutId = response.data.id;
- const hasPhotos = photoFiles.value.length > 0;
- if (hasPhotos) {
- const ok = await uploadPhotos(workoutId);
- if (ok) {
- init({
- message: "Тренировка успешно загружена!",
- color: "success",
- });
- }
- } else {
- init({
- message: "Тренировка успешно загружена!",
- color: "success",
- });
- }
+ init({
+ message: "Тренировка успешно загружена!",
+ color: "success",
+ });
inProgress.value = false;
- photoFiles.value = [];
router.push({
name: "workout_item",
params: { id: workoutId },
@@ -117,7 +69,6 @@ function onFileChanged() {
})
.catch((error: AxiosError) => {
inProgress.value = false;
- photoFiles.value = [];
if (error.status == 400) {
let err = error.response?.data;
if (err.detail.code_string == "ObjectExists") {
@@ -136,7 +87,6 @@ function onFileChanged() {
})
.catch(function () {
inProgress.value = false;
- photoFiles.value = [];
init({
message: "Что-то пошло не так.",
color: "error",
@@ -144,12 +94,3 @@ function onFileChanged() {
});
}
-