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

refactor: move app logo to a reusable componentLogo component #8

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ dist/
dist/
dist-ssr/
*.tsbuildinfo
package-lock.json
Copy link
Member

@mjamal-dev mjamal-dev Jan 29, 2025

Choose a reason for hiding this comment

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

It is a good practice to not ignore package-lock.json for dependency consistency in some projects and this is a good example of one that does. It primarily solves the "It works on my machine" dilemma by making sure all dependencies have the same version across all contributors.

Copy link
Author

Choose a reason for hiding this comment

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

Thank you for the feedback. I've updated the PR to remove package-lock.json from .gitignore


# Debug files
debug/
Expand Down
27 changes: 27 additions & 0 deletions src/layouts/components/KunafaLogo.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<template>
<!-- Small logo icon , TODO: replace with logo (dynamically) -->
<Icon icon="emojione:up-arrow" class="" />
<!-- System name -->
<span class="text-xl font-semibold text-primary mx-2">Kunafa Vue</span>
</template>

<script>
export default {
name: 'KunafaLogo',
props: {
height: {
type: Number,
default: 24,
},
start: {
type: String,
default: 'primary',
},
end: {
type: String,
default: 'secondary',
},
},
}

</script>
9 changes: 3 additions & 6 deletions src/layouts/components/Sidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,7 @@
</button>
<!-- Logo and system name -->
<router-link class="flex items-center" to="/">
<!-- Small logo icon , TODO: replace with logo (dynamically) -->
<Icon icon="emojione:up-arrow" class="" />
<!-- System name -->
<span class="text-xl font-semibold text-primary mx-2"
>Kunafa Vue</span
>
<KunafaLogo />
</router-link>
</div>

Expand Down Expand Up @@ -185,12 +180,14 @@ import { useRouter } from "vue-router"; // Import useRouter
import SidebarLinkGroup from "../../layouts/components/SidebarLinkGroup.vue";
import { useI18n } from "vue-i18n";
import SelectedLanguage from "@/services/LanguageService.js";
import KunafaLogo from "./KunafaLogo.vue";

export default {
name: "Sidebar",
props: ["sidebarOpen"],
components: {
SidebarLinkGroup,
KunafaLogo,
},
setup(props, { emit }) {
const routes = ref([]);
Expand Down