Skip to content

Commit acb868a

Browse files
authored
Change Github action button (#106)
fix minor ui issues Fixes #105
1 parent 1c28d53 commit acb868a

File tree

8 files changed

+75
-28
lines changed

8 files changed

+75
-28
lines changed

src/App.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ watch(() => layout.activeLanguage, () => {
4242
<n-message-provider placement="bottom-right">
4343
<n-dialog-provider>
4444
<router-view />
45+
<GithubButton />
4546
</n-dialog-provider>
4647
</n-message-provider>
4748
</n-notification-provider>

src/components.d.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ declare module 'vue' {
2222
DashboardPage: typeof import('./components/Dahboard/DashboardPage.vue')['default']
2323
DonutChart: typeof import('./components/DonutChart.vue')['default']
2424
Editor: typeof import('./components/Editor.vue')['default']
25+
GithubButton: typeof import('./components/GithubButton.vue')['default']
2526
LanguageSelect: typeof import('./components/LanguageSelect.vue')['default']
2627
LineChart: typeof import('./components/LineChart.vue')['default']
2728
Navbar: typeof import('./components/Navbar.vue')['default']
@@ -30,7 +31,12 @@ declare module 'vue' {
3031
NConfigProvider: typeof import('naive-ui')['NConfigProvider']
3132
NDataTable: typeof import('naive-ui')['NDataTable']
3233
NDialogProvider: typeof import('naive-ui')['NDialogProvider']
34+
NDrawer: typeof import('naive-ui')['NDrawer']
35+
NDrawerContent: typeof import('naive-ui')['NDrawerContent']
3336
NDropdown: typeof import('naive-ui')['NDropdown']
37+
NFloatButton: typeof import('naive-ui')['NFloatButton']
38+
NForm: typeof import('naive-ui')['NForm']
39+
NFormItem: typeof import('naive-ui')['NFormItem']
3440
NIcon: typeof import('naive-ui')['NIcon']
3541
NInput: typeof import('naive-ui')['NInput']
3642
NLayout: typeof import('naive-ui')['NLayout']
@@ -41,7 +47,9 @@ declare module 'vue' {
4147
NNotificationProvider: typeof import('naive-ui')['NNotificationProvider']
4248
NPageHeader: typeof import('naive-ui')['NPageHeader']
4349
NPopselect: typeof import('naive-ui')['NPopselect']
50+
NSpace: typeof import('naive-ui')['NSpace']
4451
NTooltip: typeof import('naive-ui')['NTooltip']
52+
NTreeSelect: typeof import('naive-ui')['NTreeSelect']
4553
OrderManagement: typeof import('./components/Orders/OrderManagement.vue')['default']
4654
ProductsManagement: typeof import('./components/Products/ProductsManagement.vue')['default']
4755
ReviewManagement: typeof import('./components/Review/ReviewManagement.vue')['default']

src/components/Category/CategoryStatics.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import {
99
<h2 class="card-title">
1010
Statics
1111
</h2>
12-
<DashboardCard :icon="UserIcon" title="Registers" :progress="10" :value="250" />
13-
<DashboardCard :icon="UserIcon" title="Registers" :progress="10" :value="250" />
12+
<DashboardCard class="w-full sm:w-full md:w-full" :icon="UserIcon" title="Registers" :progress="10" :value="250" />
13+
<DashboardCard class="w-full sm:w-full md:w-full" :icon="UserIcon" title="Registers" :progress="10" :value="250" />
1414
<DonutChart />
1515
</div>
1616
</template>

src/components/GithubButton.vue

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<script setup>
2+
3+
</script>
4+
5+
<template>
6+
<div class="float-button">
7+
<n-tooltip placement="top" trigger="hover">
8+
<template #trigger>
9+
<a href="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/doroudi/yummyadmin" block target="_blank">
10+
<n-button strong round type="primary" class="pulse-animated" flex space-between py-5 px-3>
11+
<NIcon size="1.6rem" class="mr-2">
12+
<svg
13+
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
14+
viewBox="0 0 32 32"
15+
>
16+
<path
17+
d="M16 2a14 14 0 0 0-4.43 27.28c.7.13 1-.3 1-.67v-2.38c-3.89.84-4.71-1.88-4.71-1.88a3.71 3.71 0 0 0-1.62-2.05c-1.27-.86.1-.85.1-.85a2.94 2.94 0 0 1 2.14 1.45a3 3 0 0 0 4.08 1.16a2.93 2.93 0 0 1 .88-1.87c-3.1-.36-6.37-1.56-6.37-6.92a5.4 5.4 0 0 1 1.44-3.76a5 5 0 0 1 .14-3.7s1.17-.38 3.85 1.43a13.3 13.3 0 0 1 7 0c2.67-1.81 3.84-1.43 3.84-1.43a5 5 0 0 1 .14 3.7a5.4 5.4 0 0 1 1.44 3.76c0 5.38-3.27 6.56-6.39 6.91a3.33 3.33 0 0 1 .95 2.59v3.84c0 .46.25.81 1 .67A14 14 0 0 0 16 2z"
18+
fill-rule="evenodd" fill="currentColor"
19+
/>
20+
</svg>
21+
</NIcon>
22+
23+
<span>GitHub</span>
24+
</n-button>
25+
</a>
26+
</template>
27+
<span> Support Project with giving star in Github </span>
28+
</n-tooltip>
29+
</div>
30+
</template>
31+
32+
<style lang="scss" scoped>
33+
.float-button {
34+
position: absolute;
35+
right: 40px;
36+
bottom: 30px;
37+
z-index: 100;
38+
}
39+
40+
.pulse-animated {
41+
-webkit-animation: pulse 4s infinite;
42+
-moz-animation: pulse 4s infinite;
43+
animation: pulse 4s infinite;
44+
}
45+
46+
@keyframes pulse {
47+
0% {
48+
box-shadow: 0 0 0 0 rgba(#36ad6a, 0.5);
49+
}
50+
51+
70% {
52+
box-shadow: 0 0 0 14px rgba(#36ad6a, 0);
53+
}
54+
55+
100% {
56+
box-shadow: 0 0 0 0 rgba(#36ad6a, 0);
57+
}
58+
}
59+
</style>

src/components/Navbar.vue

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,6 @@ const { isRtl } = storeToRefs(layoutStore)
99
<n-page-header class="p-2 navbar">
1010
<template #extra>
1111
<div class="flex items-center">
12-
<n-tooltip placement="bottom" trigger="hover">
13-
<template #trigger>
14-
<a href="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/doroudi/yummyadmin" target="_blank">
15-
<n-button text class="m-1">
16-
<NIcon size="1.4rem">
17-
<svg
18-
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
19-
viewBox="0 0 32 32"
20-
>
21-
<path
22-
d="M16 2a14 14 0 0 0-4.43 27.28c.7.13 1-.3 1-.67v-2.38c-3.89.84-4.71-1.88-4.71-1.88a3.71 3.71 0 0 0-1.62-2.05c-1.27-.86.1-.85.1-.85a2.94 2.94 0 0 1 2.14 1.45a3 3 0 0 0 4.08 1.16a2.93 2.93 0 0 1 .88-1.87c-3.1-.36-6.37-1.56-6.37-6.92a5.4 5.4 0 0 1 1.44-3.76a5 5 0 0 1 .14-3.7s1.17-.38 3.85 1.43a13.3 13.3 0 0 1 7 0c2.67-1.81 3.84-1.43 3.84-1.43a5 5 0 0 1 .14 3.7a5.4 5.4 0 0 1 1.44 3.76c0 5.38-3.27 6.56-6.39 6.91a3.33 3.33 0 0 1 .95 2.59v3.84c0 .46.25.81 1 .67A14 14 0 0 0 16 2z"
23-
fill-rule="evenodd" fill="currentColor"
24-
/>
25-
</svg>
26-
</NIcon>
27-
</n-button>
28-
</a>
29-
</template>
30-
<span> Find project in github </span>
31-
</n-tooltip>
32-
3312
<ThemeSwitch class="mx-4" />
3413
<LanguageSelect class="mx-4" />
3514
<UserProfile class="mx-4" />

src/layouts/default.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<n-layout :native-scrollbar="false" position="static">
1010
<div class="main-content flex-1 bg-slate-100 dark:bg-slate-800 dark:text-white my-2 mr-2">
1111
<Navbar />
12-
<div class="p-0 md:p-3 relative">
12+
<div class="px-0 py-1 md:p-3 md:pb-15 relative">
1313
<router-view v-slot="{ Component, route }">
1414
<transition name="route" mode="out-in">
1515
<div :key="route">

src/layouts/home.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ const collapsed = ref(false)
55
<template>
66
<n-layout has-sider>
77
<n-layout-sider
8-
bordered collapse-mode="width" :collapsed-width="64" :width="300" :collapsed="collapsed" show-trigger
9-
@collapse="collapsed = true" @expand="collapsed = false"
8+
bordered collapse-mode="width" :collapsed-width="64" :width="300" :collapsed="collapsed"
9+
show-trigger @collapse="collapsed = true" @expand="collapsed = false"
1010
>
1111
<Sidebar />
1212
</n-layout-sider>
13-
<n-layout-content>
13+
<n-layout-content pb-5>
1414
<div class="main-content dark:text-white">
1515
<Navbar />
1616
<RouterView />

src/styles/utils/_animations.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,4 @@
6565

6666
.route-leave-active {
6767
transition: all 0.3s ease-in;
68-
}
68+
}

0 commit comments

Comments
 (0)