A self-hosted media server and file management system
Vue ffmpegfile-serverjellyfinlaravelmediamedia-playermedia-servermediabrowsermediaservermusicmusic-librarymusic-playermusicplayerself-hostedvuejs
fix(attempt): login does not autofill in edge
aminnausin8b1113dcc2a7
diff --git a/resources/js/components/cedar-ui/form/FormInput.vue b/resources/js/components/cedar-ui/form/FormInput.vueindex e1848636..63141397 100644--- a/resources/js/components/cedar-ui/form/FormInput.vue+++ b/resources/js/components/cedar-ui/form/FormInput.vue@@ -1,7 +1,7 @@<script setup lang="ts">-import type { FormField } from '@aminnausin/cedar-ui';+import type { FormField } from '@/types/types';-import { InputShell } from '../input';+import { InputShell } from '@/components/cedar-ui/input';import { cn } from '@aminnausin/cedar-ui';defineProps<{ field: FormField }>();diff --git a/resources/js/components/cedar-ui/form/FormInputLabel.vue b/resources/js/components/cedar-ui/form/FormInputLabel.vueindex a829e3d8..03368589 100644--- a/resources/js/components/cedar-ui/form/FormInputLabel.vue+++ b/resources/js/components/cedar-ui/form/FormInputLabel.vue@@ -1,5 +1,5 @@<script setup lang="ts">-import type { FormField } from '@aminnausin/cedar-ui';+import type { FormField } from '@/types/types';const props = defineProps<{field: FormField;@@ -12,11 +12,7 @@ const props = defineProps<{<labelv-if="field.text":for="field.name"- :class="[- `block leading-none font-medium text-gray-700 dark:text-neutral-200`,- textSize ? textSize : 'text-sm',- `${props.class ?? ''}`,- ]"+ :class="[`block leading-none font-medium text-gray-700 dark:text-neutral-200`, textSize ? textSize : 'text-sm', `${props.class ?? ''}`]">{{ field.text }}<p v-if="field.subtext" class="p text-sm/6 text-gray-500 dark:text-gray-400">{{ field.subtext }}</p>diff --git a/resources/js/components/forms/EditFolder.vue b/resources/js/components/forms/EditFolder.vueindex 3ff1d9d3..143ed69e 100644--- a/resources/js/components/forms/EditFolder.vue+++ b/resources/js/components/forms/EditFolder.vue@@ -1,7 +1,8 @@<script setup lang="ts">import type { FolderResource, FolderTagResource, TagResource } from '@/types/resources';-import type { FormField, SelectItem } from '@/types/types';import type { SeriesUpdateRequest } from '@/types/requests';+import type { SelectItem } from '@/types/types';+import type { FormField } from '@aminnausin/cedar-ui';import { handleStorageURL, toCalendarFormattedDate } from '@/service/util';import { FormInput, FormLabel, FormErrorList } from '@/components/cedar-ui/form';diff --git a/resources/js/components/forms/EditLyrics.vue b/resources/js/components/forms/EditLyrics.vueindex 46cc2027..0f6cc255 100644--- a/resources/js/components/forms/EditLyrics.vue+++ b/resources/js/components/forms/EditLyrics.vue@@ -1,7 +1,7 @@<script setup lang="ts">import type { LyricsUpdateRequest } from '@/types/requests';import type { VideoResource } from '@/types/resources';-import type { FormField } from '@/types/types';+import type { FormField } from '@aminnausin/cedar-ui';import { generateLyricsSearchQuery, updateLyrics } from '@/service/lyricsService';import { computed, onMounted, reactive, watch } from 'vue';diff --git a/resources/js/components/forms/EditVideo.vue b/resources/js/components/forms/EditVideo.vueindex fdda2160..4944e1fd 100755--- a/resources/js/components/forms/EditVideo.vue+++ b/resources/js/components/forms/EditVideo.vue@@ -1,7 +1,8 @@<script setup lang="ts">import type { TagResource, VideoResource, VideoTagResource } from '@/types/resources';-import type { FormField, SelectItem } from '@/types/types';import type { MetadataUpdateRequest } from '@/types/requests';+import type { SelectItem } from '@/types/types';+import type { FormField } from '@aminnausin/cedar-ui';import { FormInput, FormLabel, FormErrorList } from '@/components/cedar-ui/form';import { computed, reactive, ref, watch } from 'vue';diff --git a/resources/js/components/forms/LoginForm.vue b/resources/js/components/forms/LoginForm.vueindex e57602c6..b2079344 100644--- a/resources/js/components/forms/LoginForm.vue+++ b/resources/js/components/forms/LoginForm.vue@@ -21,8 +21,8 @@ const router = useRouter();const route = useRoute();const fields = ref<FormField[]>([- { name: 'email', text: 'Email', type: 'text', required: true, autocomplete: 'username email', placeholder: 'Email' },- { name: 'password', text: 'Password', type: 'password', required: true, autocomplete: 'password', placeholder: 'Password' },+ { name: 'email', text: 'Email', type: 'email', required: true, autocomplete: 'email', placeholder: 'Email' },+ { name: 'password', text: 'Password', type: 'password', required: true, autocomplete: 'current-password', placeholder: 'Password' },]);const form = useForm({@@ -49,12 +49,12 @@ const handleLogin = async () => {<template><BaseForm @submit.prevent="handleLogin"><FormItem v-for="(field, index) in fields" :key="index">- <span v-if="field.name === 'password'" class="flex flex-wrap">+ <div v-if="field.name === 'password'" class="flex flex-wrap"><FormLabel :for="field.name" :text="field.text" :subtext="field.subtext" class="me-auto" /><RouterLink to="/recovery" class="focus:ring-primary-muted text-foreground-1 hover:text-foreground-0 rounded-md underline focus:ring-2 focus:outline-hidden">Forgot password?</RouterLink>- </span>+ </div><FormLabel v-else :for="field.name" :text="field.text" :subtext="field.subtext" /><FormInput v-model="form.fields[field.name]" :field="field" class="mt-0!" /><FormErrorList :errors="form.errors" :field-name="field.name" />diff --git a/resources/js/types/types.ts b/resources/js/types/types.tsindex f7f1b94f..e2344d94 100644--- a/resources/js/types/types.ts+++ b/resources/js/types/types.ts@@ -1,4 +1,5 @@import type { NullConnector, PusherConnector, SocketIoConnector } from 'laravel-echo/dist/connector';+import type { FormField as CedarFormField, FieldType } from '@aminnausin/cedar-ui';import type { Component, DefineComponent } from 'vue';import type {@@ -143,24 +144,11 @@ export declare type Broadcaster = {export declare type SortDir = 1 | -1;-export declare type FieldType = 'text' | 'textArea' | 'number' | 'date' | 'url' | 'multi' | 'select' | 'password';+// export declare type FieldType = 'text' | 'textArea' | 'number' | 'date' | 'url' | 'multi' | 'select' | 'password' | 'email';-export interface FormField {- name: string;- text?: string;- subtext?: string;- type: FieldType;- required?: boolean;- value?: any;- placeholder?: string;- default?: any;- min?: number;- max?: number;- class?: string;- disabled?: boolean;- autocomplete?: string;- ariaAutocomplete?: 'list' | 'none' | 'inline' | 'both';-}+export type FormField = Omit<CedarFormField, 'type'> & {+ type: FieldType | 'email';+};export interface SelectItem {id: number;