-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
82 additions
and
17 deletions.
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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<template> | ||
<v-row v-if="images" class="my-2"> | ||
<v-col class="pa-2" cols="1" v-for="image in images" :key="image.id"> | ||
<a :href="image.url" target="_blank"><v-img | ||
:src="`https://web-shot.ir/api/gallery/${image.id}?width=200&height=150`"></v-img></a> | ||
</v-col> | ||
</v-row> | ||
<v-progress-circular v-if="pending" indeterminate class="my-5" color="primary" /> | ||
<v-alert class="my-5 text-start" v-if="error" :text="$t('fetch-data.error.server')" type="error" variant="tonal" | ||
closable></v-alert> | ||
</template> | ||
<script lang="ts"> | ||
import { defineComponent } from 'vue'; | ||
interface IImage { | ||
id: number; | ||
url: string; | ||
} | ||
export default defineComponent({ | ||
async setup(app) { | ||
let images: IImage[] | undefined; | ||
let pending: boolean = true; | ||
let error: boolean = false; | ||
try { | ||
const params = new URLSearchParams({ 'count': app.count }); | ||
images = await $fetch(`https://web-shot.ir/api/gallery?${params.toString()}`); | ||
} | ||
catch { | ||
error = true; | ||
} | ||
finally{ | ||
pending = false; | ||
} | ||
return { images, error, pending }; | ||
}, | ||
props:{ | ||
count: { | ||
type: String, | ||
required: true | ||
} | ||
}, | ||
created(){ | ||
this.sendImageNum(); | ||
}, | ||
methods:{ | ||
sendImageNum(){ | ||
this.$emit("imagesNum", this.images ? this.images.length : 0) | ||
} | ||
} | ||
}) | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,5 +44,6 @@ | |
"contact.content": "If you have any questions or comments, you can contact [email protected]. We will answer you within one working day.", | ||
"contact.subtitle": "Ways of communication", | ||
"contact.ways.email": "Email:", | ||
"contact.ways.phone": "Phone:" | ||
"contact.ways.phone": "Phone:", | ||
"fetch-data.error.server": "Server error" | ||
} |
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 |
---|---|---|
|
@@ -38,11 +38,12 @@ | |
"documents.options.table.content.description.viewportHeight": "تصویر صفحه وب سایت در ارتفاع مشخص شده ذخیره خواهد شد (حداقل: 320 و حداکثر: 4096)", | ||
"gallery.title": "گالری تصاویر", | ||
"gallery.content.part1": "نگاهی به تصاویر وب شات از", | ||
"gallery.content.part2": "وبسایت های برتر. ", | ||
"gallery.content.part2": "وبسایت برتر. ", | ||
"gallery.content.part3": "رابط برنامه نویسی ما تصاویری با کیفیت بالا را دریافت می کند و آنها را بر روی یک زیر ساخت شبکه نگهداری می کند تا در سریع ترین زمان آنها را تحویل دهد.", | ||
"contact.title": "تماس با ما", | ||
"contact.content": "اگر سوال و یا نظری دارید میتوانید با ایمیل [email protected] در ارتباط باشد. به فاصله ی یک روز کاری پاسختان را خواهیم داد. ", | ||
"contact.subtitle": "راه های ارتباطی", | ||
"contact.ways.email": "ایمیل:", | ||
"contact.ways.phone": "تلفن:" | ||
"contact.ways.phone": "تلفن:", | ||
"fetch-data.error.server": "خطای سرور" | ||
} |
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