Skip to content

Commit

Permalink
Merge pull request #22 from joaovitoriasilva/v0.3.3
Browse files Browse the repository at this point in the history
Fixed margins mobile & removed alpha version banner
  • Loading branch information
joaovitoriasilva authored Aug 26, 2024
2 parents cd411b3 + f1f0e21 commit 0b4bdae
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 97 deletions.
2 changes: 1 addition & 1 deletion backend/app/config.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Constant related to version
API_VERSION = "v0.3.2"
API_VERSION = "v0.3.3"
2 changes: 1 addition & 1 deletion frontend/app/src/components/FooterComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
</form>
</div>
<div class="mt-3 col">
<p class="text-center text-muted">&copy; {{ new Date().getFullYear() === 2023 ? '2023' : '2023 - ' + new Date().getFullYear() }} Endurain • <a class="link-body-emphasis" href="https://github.com/joaovitoriasilva/endurain" role="button"><font-awesome-icon :icon="['fab', 'fa-github']" /></a> • <a class="link-body-emphasis" href="https://fosstodon.org/@endurain"><font-awesome-icon :icon="['fab', 'fa-mastodon']" /></a> • v0.3.2</p>
<p class="text-center text-muted">&copy; {{ new Date().getFullYear() === 2023 ? '2023' : '2023 - ' + new Date().getFullYear() }} Endurain • <a class="link-body-emphasis" href="https://github.com/joaovitoriasilva/endurain" role="button"><font-awesome-icon :icon="['fab', 'fa-github']" /></a> • <a class="link-body-emphasis" href="https://fosstodon.org/@endurain"><font-awesome-icon :icon="['fab', 'fa-mastodon']" /></a> • v0.3.3</p>
<p class="text-center text-muted"><img src="/src/assets/strava/api_logo_cptblWith_strava_horiz_light.png" alt="Compatible with STRAVA image" height="25" /></p>
</div>
</div>
Expand Down
9 changes: 0 additions & 9 deletions frontend/app/src/components/Navbar/NavbarComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,6 @@
</div>
</div>
</nav>
<div class="alert alert-warning alert-dismissible d-flex align-items-center mx-2 my-2 justify-content-center"
role="alert">
<font-awesome-icon :icon="['fas', 'triangle-exclamation']" />
<div class="ms-2">
<span>
{{ $t("navbar.warningZone") }}
</span>
</div>
</div>
</template>

<script>
Expand Down
172 changes: 86 additions & 86 deletions frontend/app/src/views/HomeView.vue
Original file line number Diff line number Diff line change
@@ -1,108 +1,108 @@
<template>
<div class="container mt-4">
<div class="row row-gap-3">
<!-- sidebar zone -->
<div class="col-lg-3 col-md-12">
<div class="d-none d-lg-block mt-3 mb-3 d-flex justify-content-center">
<!-- user name and photo zone -->
<div v-if="isLoading">
<LoadingComponent />
</div>
<div v-else>
<div class="justify-content-center d-flex" v-if="authStore.user">
<UserAvatarComponent :userProp="authStore.user" :width=120 :height=120 />
</div>
<div class="text-center mt-3 mb-3 fw-bold" v-if="authStore.user.id">
<router-link :to="{ name: 'user', params: { id: authStore.user.id }}" class="link-body-emphasis link-underline-opacity-0 link-underline-opacity-100-hover">
{{ authStore.user.name}}
</router-link>
</div>
<div class="row row-gap-3">
<!-- sidebar zone -->
<div class="col-lg-3 col-md-12">
<div class="d-none d-lg-block mt-3 mb-3 d-flex justify-content-center">
<!-- user name and photo zone -->
<div v-if="isLoading">
<LoadingComponent />
</div>
<div v-else>
<div class="justify-content-center d-flex" v-if="authStore.user">
<UserAvatarComponent :userProp="authStore.user" :width=120 :height=120 />
</div>
<!-- user stats zone -->
<div v-if="isLoading">
<LoadingComponent />
<div class="text-center mt-3 mb-3 fw-bold" v-if="authStore.user.id">
<router-link :to="{ name: 'user', params: { id: authStore.user.id }}" class="link-body-emphasis link-underline-opacity-0 link-underline-opacity-100-hover">
{{ authStore.user.name}}
</router-link>
</div>
<UserDistanceStatsComponent :thisWeekDistances="thisWeekDistances" :thisMonthDistances="thisMonthDistances" v-else />
</div>
<a class="w-100 btn btn-primary mb-4" href="#" role="button" data-bs-toggle="modal" data-bs-target="#addActivityModal">
{{ $t("homeView.buttonAddActivity") }}
</a>
<!-- user stats zone -->
<div v-if="isLoading">
<LoadingComponent />
</div>
<UserDistanceStatsComponent :thisWeekDistances="thisWeekDistances" :thisMonthDistances="thisMonthDistances" v-else />
</div>

<!-- Modal add actvity -->
<div class="modal fade" id="addActivityModal" tabindex="-1" aria-labelledby="addActivityModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title fs-5" id="addActivityModalLabel">
<!-- add activity button -->
<a class="w-100 btn btn-primary" href="#" role="button" data-bs-toggle="modal" data-bs-target="#addActivityModal">
{{ $t("homeView.buttonAddActivity") }}
</a>

<!-- Modal add actvity -->
<div class="modal fade" id="addActivityModal" tabindex="-1" aria-labelledby="addActivityModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title fs-5" id="addActivityModalLabel">
{{ $t("homeView.buttonAddActivity") }}
</h1>
<!--<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>-->
</div>
<form @submit.prevent="submitUploadFileForm">
<div class="modal-body">
<!-- date fields -->
<label for="activityGpxFileAdd"><b>* {{ $t("homeView.fieldLabelUploadGPXFile") }}</b></label>
<input class="form-control mt-1 mb-1" type="file" name="activityGpxFileAdd" accept=".gpx" required>
<p>* {{ $t("generalItens.requiredField") }}</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">
{{ $t("generalItens.buttonClose") }}
</button>
<button type="submit" class="btn btn-success" data-bs-dismiss="modal">
{{ $t("homeView.buttonAddActivity") }}
</h1>
<!--<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>-->
</button>
</div>
<form @submit.prevent="submitUploadFileForm">
<div class="modal-body">
<!-- date fields -->
<label for="activityGpxFileAdd"><b>* {{ $t("homeView.fieldLabelUploadGPXFile") }}</b></label>
<input class="form-control mt-1 mb-1" type="file" name="activityGpxFileAdd" accept=".gpx" required>
<p>* {{ $t("generalItens.requiredField") }}</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">
{{ $t("generalItens.buttonClose") }}
</button>
<button type="submit" class="btn btn-success" data-bs-dismiss="modal">
{{ $t("homeView.buttonAddActivity") }}
</button>
</div>
</form>
</div>
</form>
</div>
</div>
</div>
<!-- activities zone -->
<div class="col">

<!-- radio button -->
<!-- <div class="btn-group mb-3 d-flex" role="group" aria-label="Activities radio toggle button group"> -->
<!-- user activities -->
<!-- <input type="radio" class="btn-check" name="btnradio" id="btnRadioUserActivities" autocomplete="off" value="userActivities" v-model="selectedActivityView">
<label class="btn btn-outline-primary w-100" for="btnRadioUserActivities">{{ $t("homeView.radioUserActivities") }}</label> -->
<!-- user followers activities -->
<!-- <input type="radio" class="btn-check" name="btnradio" id="btnRadioFollowersActivities" autocomplete="off" value="followersActivities" v-model="selectedActivityView">
<label class="btn btn-outline-primary w-100" for="btnRadioFollowersActivities">{{ $t("homeView.radioFollowerActivities") }}</label>
</div> -->
</div>
<!-- activities zone -->
<div class="col">

<!-- radio button -->
<!-- <div class="btn-group mb-3 d-flex" role="group" aria-label="Activities radio toggle button group"> -->
<!-- user activities -->
<div id="userActivitiesDiv" v-show="selectedActivityView === 'userActivities'">
<div v-if="isLoading">
<LoadingComponent />
</div>
<div v-else>
<!-- Checking if userActivities is loaded and has length -->
<div v-if="userActivities && userActivities.length">
<!-- Iterating over userActivities to display them -->
<div class="card mb-3" v-for="activity in userActivities" :key="activity.id">
<div class="card-body">
<ActivitySummaryComponent :activity="activity" :source="'home'"/>
</div>
<ActivityMapComponent class="mx-3 mb-3" :activity="activity" :source="'home'"/>
<!-- <input type="radio" class="btn-check" name="btnradio" id="btnRadioUserActivities" autocomplete="off" value="userActivities" v-model="selectedActivityView">
<label class="btn btn-outline-primary w-100" for="btnRadioUserActivities">{{ $t("homeView.radioUserActivities") }}</label> -->
<!-- user followers activities -->
<!-- <input type="radio" class="btn-check" name="btnradio" id="btnRadioFollowersActivities" autocomplete="off" value="followersActivities" v-model="selectedActivityView">
<label class="btn btn-outline-primary w-100" for="btnRadioFollowersActivities">{{ $t("homeView.radioFollowerActivities") }}</label>
</div> -->

<!-- user activities -->
<div id="userActivitiesDiv" v-show="selectedActivityView === 'userActivities'">
<div v-if="isLoading">
<LoadingComponent />
</div>
<div v-else>
<!-- Checking if userActivities is loaded and has length -->
<div v-if="userActivities && userActivities.length">
<!-- Iterating over userActivities to display them -->
<div class="card mb-3" v-for="activity in userActivities" :key="activity.id">
<div class="card-body">
<ActivitySummaryComponent :activity="activity" :source="'home'"/>
</div>
<ActivityMapComponent class="mx-3 mb-3" :activity="activity" :source="'home'"/>
</div>
<!-- Displaying a message or component when there are no activities -->
<NoItemsFoundComponent v-else />
</div>
<!-- Displaying a message or component when there are no activities -->
<NoItemsFoundComponent v-else />
</div>
</div>

<!-- user followers activities -->
<div id="followersActivitiesDiv" v-show="selectedActivityView === 'followersActivities'">
<div v-if="isLoading">
<LoadingComponent />
</div>
<div v-else>
<div v-if="followedUserActivities && followedUserActivities.length">
<!-- user followers activities -->
<div id="followersActivitiesDiv" v-show="selectedActivityView === 'followersActivities'">
<div v-if="isLoading">
<LoadingComponent />
</div>
<div v-else>
<div v-if="followedUserActivities && followedUserActivities.length">

</div>
<NoItemsFoundComponent v-else />
</div>
<NoItemsFoundComponent v-else />
</div>
</div>
</div>
Expand Down

0 comments on commit 0b4bdae

Please sign in to comment.