diff --git a/src/components/BaseComponents/NavBar.vue b/src/components/BaseComponents/NavBar.vue index f12e691777c15a59e01ec4b1eec9d3002c621556..39941c5321ede2b107b3750ae38f38d198202e67 100644 --- a/src/components/BaseComponents/NavBar.vue +++ b/src/components/BaseComponents/NavBar.vue @@ -13,21 +13,21 @@ <ul class="flex"> <li> <PlusIcon - class="m-6 cursor-pointer h-7" + class="m-6 cursor-pointer h-7 text-primary-medium" alt="Legg til" @click="$router.push('/newItem')" /> </li> <li> <ChatAlt2Icon - class="m-6 cursor-pointer h-7" + class="m-6 cursor-pointer h-7 text-primary-medium" alt="Meldinger" @click="$router.push('/messages')" /> </li> <li> <UserCircleIcon - class="m-6 cursor-pointer h-7" + class="m-6 cursor-pointer h-7 text-primary-medium" alt="Profil" @click="loadProfile" /> diff --git a/src/components/TimepickerComponents/DatepickerRange/DatepickerRange.vue b/src/components/TimepickerComponents/DatepickerRange/DatepickerRange.vue index 53c92481e3318bfe86ccc699f80c6ed24ffbceb7..49fd65dc1249dc57add5e7c73d69a60bca2a1736 100644 --- a/src/components/TimepickerComponents/DatepickerRange/DatepickerRange.vue +++ b/src/components/TimepickerComponents/DatepickerRange/DatepickerRange.vue @@ -26,22 +26,6 @@ :blockedDaysRange="blockedDaysRange" ></calendar-component> </div> - <div class="split"></div> - <div> - <month-selector - @back="back" - type="monghM" - @forward="forward('monghM')" - :month="monghM" - ></month-selector> - <calendar-component - :month="monghM" - :start="startDate" - :end="endDate" - @selectDate="selectDate" - :blockedDaysRange="blockedDaysRange" - ></calendar-component> - </div> </div> <div class="footer"> <p v-if="error" class="error">{{ errorMessage }}</p> diff --git a/src/views/CommunityViews/CommunityView.vue b/src/views/CommunityViews/CommunityView.vue index 4bf6345d4af82773fc196bc0847648692b1bd3e0..69005196841e3efcdcc9acc14fa3d4440cff733c 100644 --- a/src/views/CommunityViews/CommunityView.vue +++ b/src/views/CommunityViews/CommunityView.vue @@ -6,7 +6,7 @@ Mine grupper </div> <UserAddIcon - class="cursor-pointer max-h-6 max-w-6 float-right grow" + class="cursor-pointer max-h-6 max-w-6 float-right grow text-primary-dark" @click="$router.push('/newCommunity')" alt="Opprett ny gruppe" /> @@ -32,15 +32,9 @@ <!-- Search field --> <div class="relative mt-1 mx-2" id="searchComponent"> <span class="absolute inset-y-0 left-0 flex items-center pl-3"> - <svg class="w-5 h-5 text-gray-400" viewBox="0 0 24 24" fill="none"> - <path - d="M21 21L15 15M17 10C17 13.866 13.866 17 10 17C6.13401 17 3 13.866 3 10C3 6.13401 6.13401 3 10 3C13.866 3 17 6.13401 17 10Z" - stroke="currentColor" - stroke-width="2" - stroke-linecap="round" - stroke-linejoin="round" - ></path> - </svg> + <div class="w-5 h-5 text-gray-400"> + <SearchIcon /> + </div> </span> <input @@ -75,7 +69,7 @@ <script> import CommunityList from "@/components/CommunityComponents/CommunityList.vue"; import { getMyGroups, getVisibleGroups } from "@/utils/apiutil"; -import { UserAddIcon } from "@heroicons/vue/outline"; +import { UserAddIcon, SearchIcon } from "@heroicons/vue/outline"; import PaginationTemplate from "@/components/BaseComponents/PaginationTemplate"; export default { @@ -102,6 +96,7 @@ export default { CommunityList, UserAddIcon, PaginationTemplate, + SearchIcon, }, computed: { searchPublicCommunities() { @@ -152,26 +147,21 @@ export default { this.updatePageMyCommunities(this.currentPageMyCommunities - 1); } }, - //Triggers when search field input is changed - searchWritten: function () { + searchWritten() { //This method triggers when search input field is changed - if (this.search.length > 0) { - this.showPaginated = false; - this.showSearched = true; - } else { - this.showPaginated = true; - this.showSearched = false; - } + this.showPaginated = this.search.length < 1; + this.showSearched = this.search.length > 0; + }, + async load() { + this.publicCommunities = await getVisibleGroups(); + this.loggedIn = this.$store.state.user.token !== null; + if (!this.loggedIn) return; + this.myCommunities = await getMyGroups(); }, }, - async beforeMount() { - this.publicCommunities = await getVisibleGroups(); - this.loggedIn = this.$store.state.user.token !== null; - if (!this.loggedIn) return; - this.myCommunities = await getMyGroups(); - - // Double loop is bad; find a better way to do this - // Loops through both arrays and removes myCommunities from public + async mounted() { + await this.load(); + //Double loop not bad :) for (var i = 0; i < this.publicCommunities.length; i++) { for (var j = 0; j < this.myCommunities.length; j++) { if (