Compare commits

..

No commits in common. "75025fcae3235e343deeeb851d186eafdabc7d01" and "664387f7e23af2c93eb43c1ea28e3977658ccc62" have entirely different histories.

4 changed files with 49 additions and 63 deletions

8
.idea/workspace.xml generated
View file

@ -5,8 +5,10 @@
</component>
<component name="ChangeListManager">
<list default="true" id="5e320804-68c9-4504-97d5-d421de3438b2" name="Changes" comment="">
<change beforePath="$PROJECT_DIR$/.idea/web.iml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/web.iml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/components/LoadingIcon.vue" beforeDir="false" afterPath="$PROJECT_DIR$/src/components/LoadingIcon.vue" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/pages/lists/[id].vue" beforeDir="false" afterPath="$PROJECT_DIR$/src/pages/lists/[id].vue" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/pages/lists/index.vue" beforeDir="false" afterPath="$PROJECT_DIR$/src/pages/lists/index.vue" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/pages/schedule/index.vue" beforeDir="false" afterPath="$PROJECT_DIR$/src/pages/schedule/index.vue" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
@ -64,7 +66,7 @@
"RunOnceActivity.git.unshallow": "true",
"WebServerToolWindowFactoryState": "false",
"code.cleanup.on.save": "true",
"git-widget-placeholder": "main",
"git-widget-placeholder": "unauthenticated-requests",
"last_opened_file_path": "/home/tiradoe/Projects/movie-night/web/src/types",
"list.type.of.created.stylesheet": "CSS",
"node.js.detected.package.eslint": "true",
@ -142,7 +144,7 @@
<workItem from="1745179755243" duration="40533000" />
<workItem from="1745366380362" duration="223000" />
<workItem from="1745366610986" duration="319000" />
<workItem from="1745366940811" duration="4297000" />
<workItem from="1745366940811" duration="1222000" />
</task>
<servers />
</component>

Binary file not shown.

View file

@ -7,14 +7,9 @@
class="flex absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2"
loop
muted
src="/assets/img/movie-loader.webm"
type="video/webm"
>
<source
src="/assets/img/movie-loader.mp4"
type="video/mp4; codecs='hvc1'"
/>
<source src="/assets/img/movie-loader.webm" type="video/webm" />
</video>
/>
</template>
<style scoped></style>

View file

@ -1,18 +1,47 @@
<template>
<div class="p-5 sm:p-0">
<div
v-if="schedule && schedule?.showings.length < 1 && !loading"
class="p-5"
>
<span>No Showings Found</span>
</div>
<LoadingIcon v-if="loading" />
<div v-else>
<div
v-if="schedule && schedule?.showings.length < 1 && !loading"
class="p-5"
<ul class="flex flex-col gap-5">
<li
v-for="showing in schedule?.showings"
class="p-5 movie-card neon-border"
>
<span>No Showings Found</span>
</div>
<div class="sm:grid grid-cols-2 lg:grid-cols-3">
<img
:src="showing.movie.poster"
alt="Movie Poster"
class="mx-auto mb-5 sm:mb-0 sm:mx-0 neon-border bg-black schedule-poster"
/>
<div class="self-center text-left">
<h5 class="text-center sm:text-left mb-3 text-xl">
{{ showing.movie.title }}
</h5>
<h5 class="text-center sm:text-left mb-3">
{{ formatDate(showing.showtime) }}
</h5>
<span class="">{{ showing.movie.plot }}</span>
</div>
</div>
</li>
</ul>
<!-- PREVIOUS SHOWINGS -->
<div id="previous-showings" class="mt-5 list-group">
<span
class="block mb-5 hover-pointer underline"
@click="getSchedule(true)"
>
Previous Showings
</span>
<ul class="flex flex-col gap-5">
<li
v-for="showing in schedule?.showings"
class="p-5 movie-card neon-border"
>
<li v-for="showing in past_showings" class="p-5 movie-card neon-border">
<div class="sm:grid grid-cols-2 lg:grid-cols-3">
<img
:src="showing.movie.poster"
@ -21,48 +50,13 @@
/>
<div class="self-center text-left">
<h5 class="text-center sm:text-left mb-3 text-xl">
{{ showing.movie.title }}
</h5>
<h5 class="text-center sm:text-left mb-3">
{{ formatDate(showing.showtime) }}
</h5>
<h5 class="text-xl mb-3">{{ showing.movie.title }}</h5>
<h5 class="mb-3">{{ formatDate(showing.showtime) }}</h5>
<span class="">{{ showing.movie.plot }}</span>
</div>
</div>
</li>
</ul>
<!-- PREVIOUS SHOWINGS -->
<LoadingIcon v-if="loadingPrevious" />
<div v-else id="previous-showings" class="mt-5 list-group">
<span
class="block mb-5 hover-pointer underline"
@click="getSchedule(true)"
>
Previous Showings
</span>
<ul class="flex flex-col gap-5">
<li
v-for="showing in past_showings"
class="p-5 movie-card neon-border"
>
<div class="sm:grid grid-cols-2 lg:grid-cols-3">
<img
:src="showing.movie.poster"
alt="Movie Poster"
class="mx-auto mb-5 sm:mb-0 sm:mx-0 neon-border bg-black schedule-poster"
/>
<div class="self-center text-left">
<h5 class="text-xl mb-3">{{ showing.movie.title }}</h5>
<h5 class="mb-3">{{ formatDate(showing.showtime) }}</h5>
<span class="">{{ showing.movie.plot }}</span>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
</template>
@ -78,7 +72,6 @@ const past_showings = defineModel<Showing[]>("past_showings", {
default: [],
});
const loading = ref(true);
const loadingPrevious = ref(false);
const got_previous = ref(false);
const months = [
"January",
@ -103,9 +96,7 @@ const formatDate = function (date_string: string) {
};
const getSchedule = async function (previous = false) {
if (previous) loadingPrevious.value = true;
else loading.value = true;
loading.value = true;
let config = useRuntimeConfig();
if (got_previous.value) {
return false;
@ -133,7 +124,6 @@ const getSchedule = async function (previous = false) {
schedule.value = data;
}
loading.value = false;
loadingPrevious.value = false;
})
.catch((err) => {
switch (err.statusCode) {
@ -143,7 +133,6 @@ const getSchedule = async function (previous = false) {
break;
case 404:
alert("Unable to find schedule");
navigateTo("/");
break;
}
});