Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding an NA icon in case of no flag image in Node details #3276

Merged
merged 2 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@

<v-tooltip class="overflowText" v-if="item.hint && !item.icon" location="top" :text="item.hint">
<template #activator="{ props }">
<span class="flag-avatar" v-if="item.name === 'Flag' && !item.imgSrc">NA</span>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be better if we added some padding top to the span?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

padding is added in flag-avatar class

<p class="font-14" v-bind="props">
{{
item.value && item.value.length > maxLenChar ? item.value.slice(0, maxLenChar) + "..." : item.value
Expand Down Expand Up @@ -144,6 +145,13 @@ export default {
</script>

<style scoped>
.flag-avatar {
padding: 7px;
background-color: var(--primary);
border-radius: 50%;
color: white;
font-weight: 700;
}
.bb-gray {
border-bottom: 1px solid gray;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ export default {
const getCountryFlagSrc = () => {
const conuntryCode = getCountryCode(props.node);

if (conuntryCode.length > 2) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will be great if you fix this country typo

return "";
}
return conuntryCode.toLocaleLowerCase() != "ch"
? `https://www.worldatlas.com/r/w425/img/flag/${conuntryCode?.toLocaleLowerCase()}-flag.jpg`
: `https://www.worldatlas.com/r/w425/img/flag/${conuntryCode?.toLocaleLowerCase()}-flag.png`;
Expand Down
Loading