Merge branch 'shadi/develop' of https://git2.tavasi.ir/front/base_ui into main

This commit is contained in:
mustafa-rezae 2025-04-16 18:54:52 +03:30
commit 517f6c0eac
10 changed files with 195 additions and 7 deletions

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" viewBox="0 0 24 24"><defs><linearGradient id="a" x1="0.5" y1="0.124" x2="0.5" y2="1" gradientUnits="objectBoundingBox"><stop offset="0" stop-color="#bdc7d2"/><stop offset="1" stop-color="#bdc7d2"/></linearGradient></defs><g transform="translate(-62.872 2.5)"><g transform="translate(67.741 4.901)"><path d="M91.379,146.986H80.858a1.954,1.954,0,0,0-1.947,2.117l.911,10.866a1.954,1.954,0,0,0,1.947,1.79h8.7a1.954,1.954,0,0,0,1.947-1.79l.911-10.866a1.954,1.954,0,0,0-1.947-2.117Zm.518,2-.911,10.866a.52.52,0,0,1-.518.477h-8.7a.52.52,0,0,1-.518-.477l-.911-10.866a.52.52,0,0,1,.518-.564H91.379A.52.52,0,0,1,91.9,148.983Z" transform="translate(-78.888 -146.969)" fill="url(#a)"/><path d="M89.983,161.292h-8.7a1.97,1.97,0,0,1-1.963-1.806L78.41,148.62a1.97,1.97,0,0,1,1.963-2.135H90.895a1.97,1.97,0,0,1,1.963,2.135l-.911,10.866a1.97,1.97,0,0,1-1.963,1.806Zm-9.609-14.773a1.937,1.937,0,0,0-1.93,2.1l.911,10.866a1.937,1.937,0,0,0,1.93,1.775h8.7a1.937,1.937,0,0,0,1.93-1.775l.911-10.866a1.937,1.937,0,0,0-1.93-2.1H80.374Zm9.609,13.34h-8.7a.54.54,0,0,1-.535-.492L79.839,148.5a.537.537,0,0,1,.535-.582H90.895a.537.537,0,0,1,.535.582l-.911,10.866A.54.54,0,0,1,89.983,159.858Zm-9.609-11.906a.5.5,0,0,0-.5.546l.911,10.866a.506.506,0,0,0,.5.461h8.7a.506.506,0,0,0,.5-.461L91.4,148.5a.5.5,0,0,0-.5-.546Z" transform="translate(-78.404 -146.485)" fill="url(#a)"/></g><g transform="translate(67.372)"><path d="M68.589,4.627H82.321a.717.717,0,0,0,0-1.433h-2.6v-.74A1.956,1.956,0,0,0,77.765.5H73.146a1.956,1.956,0,0,0-1.954,1.954v.74h-2.6a.717.717,0,1,0,0,1.433Zm4.037-2.173a.52.52,0,0,1,.52-.52h4.619a.52.52,0,0,1,.52.52v.707h-5.66Z" transform="translate(-67.855 -0.483)" fill="url(#a)"/><path d="M81.838,4.16H68.105a.733.733,0,0,1,0-1.467h2.586V1.97A1.973,1.973,0,0,1,72.662,0h4.619a1.973,1.973,0,0,1,1.97,1.97v.723h2.586a.733.733,0,1,1,0,1.467ZM68.105,2.727a.7.7,0,0,0,0,1.4H81.838a.7.7,0,1,0,0-1.4h-2.62V1.97A1.939,1.939,0,0,0,77.281.033H72.662A1.939,1.939,0,0,0,70.725,1.97v.757Zm9.713-.032H72.125V1.97a.538.538,0,0,1,.537-.537h4.619a.537.537,0,0,1,.537.537Zm-5.66-.033h5.626V1.97a.5.5,0,0,0-.5-.5H72.662a.5.5,0,0,0-.5.5v.691Z" transform="translate(-67.372)" fill="url(#a)"/></g><g transform="translate(70.992 8.423)"><path d="M177.505,252.894a.717.717,0,1,0-1.43.095l.416,6.3a.717.717,0,0,0,.714.669l.048,0a.717.717,0,0,0,.668-.762Z" transform="translate(-176.057 -252.208)" fill="url(#a)"/><path d="M176.721,259.49a.735.735,0,0,1-.731-.685l-.416-6.3a.733.733,0,1,1,1.464-.1l.416,6.3a.734.734,0,0,1-.684.78Zm-.415-7.731-.047,0a.7.7,0,0,0-.652.745l.416,6.3a.7.7,0,1,0,1.4-.092l-.416-6.3A.7.7,0,0,0,176.306,251.759Z" transform="translate(-175.572 -251.726)" fill="url(#a)"/></g><g transform="translate(74.238 8.423)"><path d="M273.8,252.226a.717.717,0,0,0-.717.717v6.3a.717.717,0,0,0,1.433,0v-6.3A.717.717,0,0,0,273.8,252.226Z" transform="translate(-273.065 -252.209)" fill="url(#a)"/><path d="M273.315,259.49a.734.734,0,0,1-.733-.733v-6.3a.733.733,0,1,1,1.467,0v6.3A.734.734,0,0,1,273.315,259.49Zm0-7.731a.7.7,0,0,0-.7.7v6.3a.7.7,0,1,0,1.4,0v-6.3A.7.7,0,0,0,273.315,251.759Z" transform="translate(-272.582 -251.726)" fill="url(#a)"/></g><g transform="translate(77.068 8.423)"><path d="M358.833,252.226a.717.717,0,0,0-.762.668l-.416,6.3a.717.717,0,0,0,.668.762l.048,0a.717.717,0,0,0,.714-.669l.416-6.3A.717.717,0,0,0,358.833,252.226Z" transform="translate(-357.636 -252.208)" fill="url(#a)"/><path d="M357.887,259.49l-.049,0a.734.734,0,0,1-.684-.78l.416-6.3a.733.733,0,0,1,1.464.1l-.416,6.3A.735.735,0,0,1,357.887,259.49Zm.415-7.731a.7.7,0,0,0-.7.654l-.416,6.3a.7.7,0,1,0,1.4.092l.416-6.3a.7.7,0,0,0-.652-.745Z" transform="translate(-357.153 -251.726)" fill="url(#a)"/></g></g><path d="M0,0H24V24H0Z" fill="none"/></svg>

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

@ -9,6 +9,7 @@
data-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false"
data-bs-toggle="dropdown"
>
<span class="tavasi tavasi-more-vert"></span>
</button>
@ -34,7 +35,8 @@
>
<!-- put below line if authorization is ok. -->
<!-- v-can="action.can" -->
<NuxtImg :src="prepareIcon(action)" alt="" class="img-fluid" />
<MyNuxtImg :iconName="action.icon"></MyNuxtImg>
<!-- <NuxtImg :src="prepareIcon(action)" alt="" class="img-fluid" /> -->
{{ action.title }}
</button>
</div>
@ -48,7 +50,7 @@
>
<!-- put below line if authorization is ok. -->
<!-- v-can="action.can" -->
<NuxtImg :src="prepareIcon(action)" alt="" class="img-fluid" />
<MyNuxtImg :iconName="action.icon"></MyNuxtImg>
{{ action.title }}
</button>
</div>

View File

@ -0,0 +1,35 @@
<template>
<NuxtImg :src="imgSrc" alt="" class="img-fluid" />
</template>
<script>
/**
* @vue-prop {Array} list - لیست
* @vue-prop {*} clickedItem - آیتمی که کلیک شده است
* @vue-prop {*} contextMenu - منو که از سمت والد دریافت میگردد
* @vue-prop {*} parentComponent - کامپوننت والد
*/
export default {
// contextMenu: right click actions
// list: folder or file list.
// clickedItem: selected item in the loop.
props: ["iconName"],
async mounted() {
let res = "";
try {
res = await import(`assets/common/img/${this.iconName}.svg`);
} catch (err) {
res = await import(`assets/common/img/icomoon/SVG/${this.iconName}.svg`);
}
this.imgSrc = res.default;
},
data() {
return {
imgSrc: "",
};
},
};
</script>

View File

@ -8,8 +8,8 @@ export default defineNuxtPlugin((nuxtApp) => {
const api = $fetch.create({
onRequest({ request, options, error }) {
options.baseURL =
config.public.NUXT_PUBLIC_BASE_URL +
config.public.NUXT_PUBLIC_API_NAME +
config.public.NUXT_PUBLIC_BASE_URL +
config.public.NUXT_PUBLIC_API_NAME +
options.baseURL;
if (token) {
@ -38,10 +38,10 @@ export default defineNuxtPlugin((nuxtApp) => {
// Add custom methods for GET, POST, and DELETE
const http = {
getRequest: (url, options = {}) => api(url, { method: "GET", ...options }),
postRequest: (url, body, options = {}) =>
getRequest: (url: string, options = {}) => api(url, { method: "GET", ...options }),
postRequest: (url: string, body: any, options = {}) =>
api(url, { method: "POST", body, ...options }),
deleteRequest: (url, options = {}) =>
deleteRequest: (url: string, options = {}) =>
api(url, { method: "DELETE", ...options }),
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 490 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 783 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 263 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 304 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 1.2 MiB