Skip to content

Commit 7d68aad

Browse files
committedFeb 5, 2025
Add dark mode to SignIn
1 parent 70268f5 commit 7d68aad

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed
 

‎src/components/SignIn.vue

+9-9
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@
22
<div v-if="!plugin">No Auth Plugin</div>
33
<div v-else class="min-h-full flex flex-col justify-center py-12 sm:px-6 lg:px-8">
44
<div class="sm:mx-auto sm:w-full sm:max-w-md">
5-
<h2 class="mt-6 text-center text-3xl font-extrabold text-gray-900">
5+
<h2 class="mt-6 text-center text-3xl font-extrabold text-gray-900 dark:text-gray-50">
66
{{ title }}
77
</h2>
8-
<p v-if="Object.keys(authProviderFormTabs).length > 1" class="mt-4 text-center text-sm text-gray-600">
8+
<p v-if="Object.keys(authProviderFormTabs).length > 1" class="mt-4 text-center text-sm text-gray-600 dark:text-gray-300">
99
<span class="relative z-0 inline-flex shadow-sm rounded-md">
1010
<a v-for="(tab,name) in authProviderFormTabs" v-href="{ provider:tab }" @click="selectedProvider = tab"
1111
:class="[tab === '' || tab === firstFormLayout.name ? 'rounded-l-md' : tab === lastFormLayout.name ? 'rounded-r-md -ml-px' : '-ml-px',
12-
selectedProvider === tab ? 'z-10 outline-none ring-1 ring-indigo-500 border-indigo-500' : '', 'cursor-pointer relative inline-flex items-center px-4 py-1 border border-gray-300 bg-white text-sm font-medium text-gray-700 hover:bg-gray-50']">
12+
selectedProvider === tab ? 'z-10 outline-none ring-1 ring-indigo-500 border-indigo-500' : '', 'cursor-pointer relative inline-flex items-center px-4 py-1 border border-gray-300 dark:border-gray-600 bg-white dark:bg-black text-sm font-medium text-gray-700 dark:text-gray-200 hover:bg-gray-50 dark:hover:bg-gray-900']">
1313
{{name}}
1414
</a>
1515
</span>
1616
</p>
1717
</div>
1818
<div class="mt-8 sm:mx-auto sm:w-full sm:max-w-md">
1919
<ErrorSummary v-if="errorSummary" class="mb-3" :errorSummary="errorSummary" />
20-
<div class="bg-white py-8 px-4 shadow sm:rounded-lg sm:px-10">
20+
<div class="bg-white dark:bg-black py-8 px-4 shadow sm:rounded-lg sm:px-10">
2121
<form v-if="formLayout.length" @submit.prevent="submit">
2222
<AutoFormFields :modelValue="modelValue" :formLayout="formLayout" :api="api" :hideSummary="true"
2323
divide-class="" space-class="space-y-6" />
@@ -29,20 +29,20 @@
2929
<div v-if="oauthProviders.length" class="mt-6">
3030
<div class="relative">
3131
<div class="absolute inset-0 flex items-center">
32-
<div class="w-full border-t border-gray-300"></div>
32+
<div class="w-full border-t border-gray-300 dark:border-gray-600"></div>
3333
</div>
3434
<div class="relative flex justify-center text-sm">
35-
<span class="px-2 bg-white text-gray-500">
35+
<span class="px-2 bg-white text-gray-500 dark:text-gray-400">
3636
Or continue with
3737
</span>
3838
</div>
3939
</div>
4040
<div class="mt-6 grid grid-cols-3 gap-3">
4141
<div v-for="provider in oauthProviders">
4242
<a :href="baseUrl + provider.navItem.href + '?continue=' + baseUri" :title="getLabel(provider)"
43-
class="w-full inline-flex justify-center py-2 px-4 border border-gray-300 rounded-md shadow-sm bg-white text-sm font-medium text-gray-500 hover:bg-gray-50">
44-
<Icon v-if="provider.icon" :image="provider.icon" class="h-5 w-5 text-gray-700" />
45-
<svg v-else class="h-5 w-5 text-gray-700" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
43+
class="w-full inline-flex justify-center py-2 px-4 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm bg-white dark:bg-black text-sm font-medium text-gray-500 dark:text-gray-400 hover:bg-gray-50 dark:hover:bg-gray-900">
44+
<Icon v-if="provider.icon" :image="provider.icon" class="h-5 w-5 text-gray-700 dark:text-gray-200" />
45+
<svg v-else class="h-5 w-5 text-gray-700 dark:text-gray-200" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
4646
<path d="M16 8a5 5 0 1 0 5 5a5 5 0 0 0-5-5z" fill="currentColor"/>
4747
<path d="M16 2a14 14 0 1 0 14 14A14.016 14.016 0 0 0 16 2zm7.992 22.926A5.002 5.002 0 0 0 19 20h-6a5.002 5.002 0 0 0-4.992 4.926a12 12 0 1 1 15.985 0z" fill="currentColor"/>
4848
</svg>

0 commit comments

Comments
 (0)