added fixes for rollup build error
This commit is contained in:
parent
1f2303abf5
commit
ccc2422aa4
15 changed files with 1326 additions and 1561 deletions
|
@ -15,7 +15,6 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
const supportsHEVC = ref(false);
|
||||
const props = defineProps(["showQuote"]);
|
||||
|
||||
onMounted(() => {
|
||||
const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
import placeholderPoster from "assets/img/poster-placeholder.svg";
|
||||
|
||||
const imgRef = ref<HTMLImageElement | null>(null);
|
||||
const props = defineProps(["image"]);
|
||||
const props = defineProps<{ image: string }>();
|
||||
|
||||
const handleImageError = function (event: Event) {
|
||||
(event.target as HTMLImageElement).classList.remove("lazyload");
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<script lang="ts" setup>
|
||||
import type { MovieList } from "~/types/movielist";
|
||||
|
||||
const lists = defineModel<MovieList[]>("lists", { default: [] });
|
||||
const lists = ref<MovieList[]>([]);
|
||||
|
||||
const addList = async function () {
|
||||
let config = useRuntimeConfig();
|
||||
|
|
|
@ -26,7 +26,7 @@ const loading = ref(false);
|
|||
const emit = defineEmits<{
|
||||
(e: "show-modal", movie: Movie): void;
|
||||
}>();
|
||||
const movies = defineModel<Movie[]>("movie_list", { default: [] });
|
||||
const movies = ref<Movie[]>([]);
|
||||
|
||||
const showModal = (movie: Movie) => {
|
||||
emit("show-modal", movie);
|
||||
|
|
|
@ -28,25 +28,9 @@ import { useCookie } from "#app";
|
|||
import type { Schedule } from "~/types/schedule";
|
||||
import { $fetch } from "ofetch";
|
||||
|
||||
const showings = defineModel<Showing[]>("showings", { default: [] });
|
||||
const previous_showings = defineModel<Showing[]>("previous_showings", {
|
||||
default: [],
|
||||
});
|
||||
const showings = ref<Showing[]>([]);
|
||||
const previous_showings = ref<Showing[]>([]);
|
||||
const got_previous = ref(false);
|
||||
const months = [
|
||||
"January",
|
||||
"February",
|
||||
"March",
|
||||
"April",
|
||||
"May",
|
||||
"June",
|
||||
"July",
|
||||
"August",
|
||||
"September",
|
||||
"October",
|
||||
"November",
|
||||
"December",
|
||||
];
|
||||
|
||||
onMounted(() => {
|
||||
getShowings();
|
||||
|
@ -54,6 +38,20 @@ onMounted(() => {
|
|||
|
||||
const formatDate = function (date_string: string) {
|
||||
let parsed_date = new Date(Date.parse(date_string));
|
||||
const months = [
|
||||
"January",
|
||||
"February",
|
||||
"March",
|
||||
"April",
|
||||
"May",
|
||||
"June",
|
||||
"July",
|
||||
"August",
|
||||
"September",
|
||||
"October",
|
||||
"November",
|
||||
"December",
|
||||
];
|
||||
let month = months[parsed_date.getMonth()];
|
||||
|
||||
return `${month} ${parsed_date.getDate()}, ${parsed_date.getFullYear()}`;
|
||||
|
|
|
@ -27,7 +27,9 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
const props = defineProps(["movie"]);
|
||||
import type { Movie } from "~/types/movie";
|
||||
|
||||
const props = defineProps<{ movie: Movie }>();
|
||||
const emits = defineEmits(["closeModal"]);
|
||||
|
||||
const schedule = function (e: Event) {
|
||||
|
|
|
@ -34,10 +34,11 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import type { MovieList } from "~/types/movielist";
|
||||
import type { Movie } from "~/types/movie";
|
||||
|
||||
const props = defineProps(["movie"]);
|
||||
const props = defineProps<{ movie: Movie }>();
|
||||
const list_id = ref(0);
|
||||
const lists = defineModel<MovieList[]>("lists", { default: [] });
|
||||
const lists = ref<MovieList[]>(new Array<MovieList>());
|
||||
const emit = defineEmits<{
|
||||
(e: "close-modal"): void;
|
||||
}>();
|
||||
|
|
|
@ -35,8 +35,9 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import ScheduleMovie from "~/components/forms/ScheduleMovie.vue";
|
||||
import type { Movie } from "~/types/movie";
|
||||
|
||||
const props = defineProps(["movie", "updating"]);
|
||||
defineProps<{ movie: Movie; updating: boolean }>();
|
||||
const emits = defineEmits(["close-modal", "update-movie"]);
|
||||
const logged_in = ref(false);
|
||||
|
||||
|
|
2780
src/package-lock.json
generated
2780
src/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -21,5 +21,8 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"lazysizes": "^5.3.2"
|
||||
},
|
||||
"overrides": {
|
||||
"rollup": "4.44.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ import type { Movie } from "~/types/movie";
|
|||
import Modal from "~/components/common/ui/Modal.vue";
|
||||
import { logout } from "~/composables/logout";
|
||||
|
||||
const modal_movie = defineModel<Movie>("#movie-modal");
|
||||
const modal_movie = ref<Movie | null>(null);
|
||||
|
||||
const movie_modal = ref<InstanceType<typeof Modal> | null>(null);
|
||||
const current_view = ref("search");
|
||||
|
@ -72,7 +72,7 @@ const showModal = function (movie: Movie) {
|
|||
};
|
||||
const toggleDisplay = function (element_id: string) {
|
||||
if (element_id === current_view.value) return;
|
||||
let tabs = ["search", "showings", "lists"];
|
||||
const tabs = ["search", "showings", "lists"];
|
||||
|
||||
tabs.forEach((value) => {
|
||||
if (value === element_id) {
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
@update-movie="updateMovie(modal_movie)"
|
||||
></ShowMovie>
|
||||
</Modal>
|
||||
<h2 class="text-xl font-bold pb-5">{{ list.name }}</h2>
|
||||
<h2 class="text-xl font-bold pb-5">{{ list?.name }}</h2>
|
||||
<div
|
||||
v-if="movies.length > 1 && !loading"
|
||||
class="grid grid-cols-2 rounded movie-card neon-border p-5"
|
||||
|
@ -91,13 +91,11 @@ import MoviePoster from "~/components/MoviePoster.vue";
|
|||
import ScrollToTop from "~/components/common/navigation/ScrollToTop.vue";
|
||||
|
||||
const list_id = ref(0);
|
||||
const list = defineModel<MovieList>("movie_list", { default: [] });
|
||||
const list = ref<MovieList | null>(null);
|
||||
const loading = ref(true);
|
||||
const modal_movie: Ref<Movie | null> = ref(null);
|
||||
const movies = defineModel<Movie[] | []>("movies", {
|
||||
default: [],
|
||||
});
|
||||
const filtered_movies = defineModel<Movie[]>("filtered_movies");
|
||||
const movies = ref<Movie[]>(new Array<Movie>());
|
||||
const filtered_movies = ref<Movie[]>(new Array<Movie>());
|
||||
const movie_query = ref("");
|
||||
const logged_in = ref(false);
|
||||
const hide_scheduled = ref(false);
|
||||
|
@ -119,7 +117,7 @@ const getList = async function (list_id: number) {
|
|||
})
|
||||
.then((data) => {
|
||||
list.value = data;
|
||||
movies.value = data?.movies || [];
|
||||
movies.value = data?.movies || new Array<Movie>();
|
||||
filtered_movies.value = movies.value;
|
||||
loading.value = false;
|
||||
})
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
import type { MovieList } from "~/types/movielist";
|
||||
import { useCookie } from "#app";
|
||||
|
||||
const lists = defineModel<MovieList[]>("movie_list", { default: [] });
|
||||
const lists = ref<MovieList[]>(new Array<MovieList>());
|
||||
const loading = ref(true);
|
||||
|
||||
const updateLists = async function () {
|
||||
|
@ -47,7 +47,7 @@ const updateLists = async function () {
|
|||
headers: headers,
|
||||
})
|
||||
.then((data) => {
|
||||
lists.value = data || [];
|
||||
lists.value = data || new Array<MovieList>();
|
||||
loading.value = false;
|
||||
})
|
||||
.catch((err) => {
|
||||
|
|
|
@ -74,33 +74,22 @@ import type { Schedule } from "~/types/schedule";
|
|||
import { $fetch } from "ofetch";
|
||||
import { useCookie } from "#app";
|
||||
|
||||
const schedule = defineModel<Schedule>("schedule");
|
||||
const past_showings = defineModel<Showing[]>("past_showings", {
|
||||
default: [],
|
||||
});
|
||||
const schedule = ref<Schedule>();
|
||||
const past_showings = ref<Showing[]>(new Array<Showing>());
|
||||
const loading = ref(true);
|
||||
const loadingPrevious = ref(false);
|
||||
const got_previous = ref(false);
|
||||
const months = [
|
||||
"January",
|
||||
"February",
|
||||
"March",
|
||||
"April",
|
||||
"May",
|
||||
"June",
|
||||
"July",
|
||||
"August",
|
||||
"September",
|
||||
"October",
|
||||
"November",
|
||||
"December",
|
||||
];
|
||||
|
||||
const formatDate = function (date_string: string) {
|
||||
let date = new Date(date_string);
|
||||
let month = months[date.getMonth()];
|
||||
//let month = months[date.getMonth()];
|
||||
|
||||
return `${month} ${date.getDate()}, ${date.getFullYear()}`;
|
||||
//return `${month} ${date.getDate()}, ${date.getFullYear()}`;
|
||||
return new Intl.DateTimeFormat("en-US", {
|
||||
month: "long",
|
||||
day: "numeric",
|
||||
year: "numeric",
|
||||
}).format(date);
|
||||
};
|
||||
|
||||
const getSchedule = async function (previous = false) {
|
||||
|
|
|
@ -4,7 +4,7 @@ import type { UserProfile } from "~/types/userProfile";
|
|||
|
||||
const config = useRuntimeConfig();
|
||||
|
||||
const profile = defineModel<UserProfile>("profile");
|
||||
const profile = ref<UserProfile | null>(null);
|
||||
const loading = ref(true);
|
||||
|
||||
const getProfile = async function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue