mirror of
https://github.com/Dadechin/XRoomDashboardFront.git
synced 2025-07-20 17:14:35 +00:00
Compare commits
No commits in common. "3f74408f0239b41ebad3c968a697cd94b4a36a89" and "249189f2ed62de46a1026b7d18787355ea7a3fd4" have entirely different histories.
3f74408f02
...
249189f2ed
Binary file not shown.
Before Width: | Height: | Size: 10 KiB |
Binary file not shown.
Before Width: | Height: | Size: 22 KiB |
|
@ -23,17 +23,12 @@
|
||||||
|
|
||||||
<span class="card-subtitle">{{ item.subtitle }}</span>
|
<span class="card-subtitle">{{ item.subtitle }}</span>
|
||||||
|
|
||||||
<a
|
<router-link
|
||||||
v-if="item.downloadUrl"
|
to="/dashboard/download"
|
||||||
:href="item.downloadUrl"
|
:class="item.buttonText === 'دانلود اپلیکیشن' ? 'active-button' : 'disabled-button'"
|
||||||
target="_blank"
|
|
||||||
class="active-button"
|
|
||||||
>
|
>
|
||||||
دانلود اپلیکیشن (نسخه {{ item.version }})
|
|
||||||
</a>
|
|
||||||
<div v-else class="disabled-button">
|
|
||||||
{{ item.buttonText }}
|
{{ item.buttonText }}
|
||||||
</div>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -47,8 +42,12 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'DashboardPage',
|
name: 'DashboardPage',
|
||||||
|
components: {
|
||||||
|
|
||||||
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
platforms: [
|
platforms: [
|
||||||
|
@ -57,10 +56,7 @@ export default {
|
||||||
subtitle: "Meta Quest 2, Meta Quest Pro, Meta Quest 3",
|
subtitle: "Meta Quest 2, Meta Quest Pro, Meta Quest 3",
|
||||||
img: require("@/assets/img/image11.png"),
|
img: require("@/assets/img/image11.png"),
|
||||||
imgStyle: "width: 70px;height: 80px;",
|
imgStyle: "width: 70px;height: 80px;",
|
||||||
buttonText: "بزودی",
|
buttonText: "دانلود اپلیکیشن",
|
||||||
type: "metaquest",
|
|
||||||
downloadUrl: "",
|
|
||||||
version: ""
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Windows",
|
title: "Windows",
|
||||||
|
@ -68,57 +64,13 @@ export default {
|
||||||
img: require("@/assets/img/image10.png"),
|
img: require("@/assets/img/image10.png"),
|
||||||
imgStyle: "width: 90px;height: 80px;",
|
imgStyle: "width: 90px;height: 80px;",
|
||||||
buttonText: "بزودی",
|
buttonText: "بزودی",
|
||||||
type: "windows",
|
|
||||||
downloadUrl: "",
|
|
||||||
version: ""
|
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: "Android",
|
|
||||||
subtitle: "For mobile devices",
|
|
||||||
// img: require("@/assets/img/android-icon.png"), // Add your Android icon
|
|
||||||
img: require("@/assets/img/android.png"),
|
|
||||||
|
|
||||||
imgStyle: "width: 70px;height: 80px;",
|
|
||||||
buttonText: "بزودی",
|
|
||||||
type: "android",
|
|
||||||
downloadUrl: "",
|
|
||||||
version: ""
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
},
|
|
||||||
async mounted() {
|
|
||||||
try {
|
|
||||||
const response = await fetch('http://my.xroomapp.com:8000/latest-download/');
|
|
||||||
const downloadData = await response.json();
|
|
||||||
|
|
||||||
this.updatePlatformsWithDownloadData(downloadData);
|
|
||||||
} catch (error) {
|
|
||||||
console.error('Error fetching download data:', error);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
updatePlatformsWithDownloadData(downloadData) {
|
|
||||||
this.platforms = this.platforms.map(platform => {
|
|
||||||
const downloadItem = downloadData.find(item => item.type === platform.type);
|
|
||||||
|
|
||||||
if (downloadItem && downloadItem.file) {
|
|
||||||
return {
|
|
||||||
...platform,
|
|
||||||
downloadUrl: "http://my.xroomapp.com:8000"+downloadItem.file,
|
|
||||||
version: downloadItem.version,
|
|
||||||
buttonText: `دانلود اپلیکیشن (نسخه ${downloadItem.version})`
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
return platform;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
||||||
/* Base styles applied across all screen sizes */
|
/* Base styles applied across all screen sizes */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user