This repository has been archived by the owner on Feb 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 63
Fix back to search link for pages in other languages #1350
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
6709400
Fix back to search link for pages in other languages
obulat 6413402
Replace inline svg component with VIcon
obulat 8f646c4
Add back to search link e2e test for localized pages (#1351)
krysal 4996859
Update src/pages/audio/_id.vue
obulat 523f8f0
Remove unnecessary showBackToSearch data property
obulat 9b97cc9
Add POT file
obulat 4cb3d9b
Merge branch 'main' into fix/back_to_search_link
obulat f70e5fd
Update POT file
obulat File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,35 @@ | ||
<template> | ||
<!-- @todo: Separate the absolute container from the link itself. --> | ||
<VLink | ||
v-if="show" | ||
class="px-2 pt-1 md:px-6 md:pt-4 md:pb-2 flex flex-row items-center font-semibold text-dark-charcoal text-xs md:text-sr" | ||
:href="path" | ||
> | ||
<Chevron class="-ms-2" /> | ||
<VIcon :icon-path="chevronIcon" class="-ms-2" /> | ||
{{ $t('single-result.back') }} | ||
</VLink> | ||
</template> | ||
|
||
<script> | ||
import { defineComponent } from '@vue/composition-api' | ||
<script lang="ts"> | ||
import { defineComponent } from '@nuxtjs/composition-api' | ||
|
||
import VIcon from '~/components/VIcon/VIcon.vue' | ||
import VLink from '~/components/VLink.vue' | ||
|
||
import Chevron from '~/assets/icons/chevron-left.svg?inline' | ||
import chevronIcon from '~/assets/icons/chevron-left.svg' | ||
|
||
export default defineComponent({ | ||
components: { | ||
Chevron, | ||
VIcon, | ||
VLink, | ||
}, | ||
data() { | ||
return { | ||
/** @type {undefined|string} */ | ||
path: undefined, | ||
show: false, | ||
} | ||
props: { | ||
path: { | ||
type: String, | ||
required: true, | ||
}, | ||
}, | ||
created() { | ||
if (!this.$nuxt?.context?.from?.fullPath) { | ||
return | ||
} | ||
|
||
this.path = this.$nuxt.context.from.fullPath | ||
if (this.path.startsWith('/search')) { | ||
this.show = true | ||
} | ||
setup() { | ||
return { chevronIcon } | ||
}, | ||
}) | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's nice that at least this removes the warning on files using these imports :)