mirror of
https://github.com/plausible/analytics.git
synced 2024-11-27 09:16:25 +03:00
51c1138d0d
* Add zxcvbn dependency * Change password length range requirement from 6-64 to 12-128 * Reimplement register form in LV * Implement server-side check for password strength * Add rudimentary strength meter * Make password input with strength a separate component and improve it * Fix existing tests to provide strong enough password * Apply formatting * Replace existing registration form with new one * Hide built-in label in `.input` component when none provided * Crop password to first 32 chars for analysis by zxcvbn * Add tests for new form components * Integrate hCaptcha into LV * Fix existing AuthController tests * Add tests for Live.RegisterForm * Hide strength meter when password input is empty * Randomize client IP in headers during tests to avoid hitting rate limit * Apply auxilliary formatting fixes to AuthController * Integrate registration from invitation into LV registration logic * Fix existing password set and reset forms * Make `password_length_hint` component more customizable * Optimize `Auth.User.set_password/2` * Remove unnecessary attribute from registration form * Move password set and reset forms to LV * Add tests for SetPasswordForm LV component * Add tests for password checks in `Auth.User` * Document code a bit * Implement simpler approach to hCaptcha integration * Update CHANGELOG.md * Improve consistency of color scheme * Introduce debounce across all text inputs in registration and password forms * Fix email input background in register form * Ensure only single error is rendered for empty password confirmation case * Remove `/password` form entirely in favor of preferred password reset * Remove unnecessary `router` option from `live_render` calls * Make expensive assigns in LV with `assign_new` (h/t @aerosol) * Accept passwords longer than 32 bytes uniformly as very strong * Avoid displaying blank error side by side with weak password error * Make register actions handle errors gracefully * Render only a single piece of feedback to reduce noise * Make register and password reset forms pw manager friendly (h/t @cnkk) * Move registration forms to live routes * Delete no longer used deadviews * Adjust registration form in accordance to changes in #3290 * Reintroduce dogfood page path for invitation form from #3290 * Use alternative approach to submitting plausible metrics from LV form * Rename metrics events and extend tests to account for them
61 lines
1.8 KiB
JavaScript
61 lines
1.8 KiB
JavaScript
const colors = require('tailwindcss/colors')
|
|
const plugin = require('tailwindcss/plugin')
|
|
|
|
module.exports = {
|
|
content: [
|
|
'./js/**/*.js',
|
|
'../lib/plausible_web/templates/**/*.html.eex',
|
|
'../lib/plausible_web/templates/**/*.html.heex',
|
|
'../lib/plausible_web/live/**/*.ex',
|
|
'../lib/plausible_web/components/**/*.ex',
|
|
],
|
|
safelist: [
|
|
// PlausibleWeb.StatsView.stats_container_class/1 uses this class
|
|
// it's not used anywhere else in the templates or scripts
|
|
"max-w-screen-xl"
|
|
],
|
|
darkMode: 'class',
|
|
theme: {
|
|
container: {
|
|
center: true,
|
|
padding: '1rem',
|
|
},
|
|
extend: {
|
|
colors: {
|
|
yellow: colors.amber, // We started usign `yellow` in v2 but it was renamed to `amber` in v3 https://tailwindcss.com/docs/upgrade-guide#removed-color-aliases
|
|
gray: colors.slate,
|
|
'gray-950': 'rgb(13, 18, 30)',
|
|
'gray-850': 'rgb(26, 32, 44)',
|
|
'gray-825': 'rgb(37, 47, 63)'
|
|
},
|
|
spacing: {
|
|
'44': '11rem'
|
|
},
|
|
width: {
|
|
'content': 'fit-content'
|
|
},
|
|
opacity: {
|
|
'15': '0.15',
|
|
},
|
|
zIndex: {
|
|
'9': 9,
|
|
},
|
|
maxWidth: {
|
|
'2xs': '15rem',
|
|
'3xs': '12rem',
|
|
},
|
|
transitionProperty: {
|
|
'padding': 'padding',
|
|
}
|
|
},
|
|
},
|
|
plugins: [
|
|
require('@tailwindcss/forms'),
|
|
require('@tailwindcss/aspect-ratio'),
|
|
plugin(({addVariant}) => addVariant("phx-no-feedback", [".phx-no-feedback&", ".phx-no-feedback &"])),
|
|
plugin(({addVariant}) => addVariant("phx-click-loading", [".phx-click-loading&", ".phx-click-loading &"])),
|
|
plugin(({addVariant}) => addVariant("phx-submit-loading", [".phx-submit-loading&", ".phx-submit-loading &"])),
|
|
plugin(({addVariant}) => addVariant("phx-change-loading", [".phx-change-loading&", ".phx-change-loading &"])),
|
|
]
|
|
}
|