Finish the redesign's edges: auth page, modals, dead code, docs
The sign-in page becomes a plain centred column with the brand mark and a segmented login/register switch, modals lose their last inner boxes, the red-days list collapses every year but the current one, and the retired components' CSS, an unused list component and 23 unreferenced translation keys are removed. ARCHITECTURE.md documents the Almanacka styling conventions and the per-year balance rule. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XBRLomdLK9jF7wU7a8AA6H
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { describe, it, expect } from 'vitest'
|
||||
import { getColorForType, getInkForType, getLabelForType, getTypeKey, getTypeModifier } from './leaveTypes'
|
||||
import { getColorForType, getInkForType, getLabelForType, getTypeKey } from './leaveTypes'
|
||||
import { translate } from '@/i18n'
|
||||
|
||||
describe('getColorForType', () => {
|
||||
@@ -44,18 +44,6 @@ describe('getTypeKey', () => {
|
||||
})
|
||||
})
|
||||
|
||||
describe('getTypeModifier', () => {
|
||||
it('returns a type-* modifier suffix for each known type', () => {
|
||||
expect(getTypeModifier('vacation')).toBe('type-vacation')
|
||||
expect(getTypeModifier('sjukpenning')).toBe('type-sjukpenning')
|
||||
expect(getTypeModifier('lagsta')).toBe('type-lagsta')
|
||||
})
|
||||
|
||||
it('returns type-unknown for an unknown type', () => {
|
||||
expect(getTypeModifier('something-else')).toBe('type-unknown')
|
||||
})
|
||||
})
|
||||
|
||||
describe('getLabelForType', () => {
|
||||
const t = (key: Parameters<typeof translate>[1]) => translate('sv', key)
|
||||
|
||||
|
||||
@@ -36,15 +36,6 @@ export function getTypeKey(type: string): LeaveTypeKey {
|
||||
return isKnownType(type) ? type : 'unknown'
|
||||
}
|
||||
|
||||
/**
|
||||
* The older `type-*` prefixed modifier, still used by the dashboard's year
|
||||
* timeline (`year-timeline__band--type-lagsta`); the calendar has moved to
|
||||
* `getTypeKey`.
|
||||
*/
|
||||
export function getTypeModifier(type: string): string {
|
||||
return `type-${getTypeKey(type)}`
|
||||
}
|
||||
|
||||
/**
|
||||
* Localized label for a leave-day type. Takes `t` rather than importing
|
||||
* `useTranslation` itself — this is a plain utility function (not a
|
||||
|
||||
Reference in New Issue
Block a user