Skip to content

Commit 3985500

Browse files
authored
Merge pull request #29 from boris91/chore/header-controls-keys-naming
(chore) Header controls, Keys naming updated
2 parents 355ad96 + 9027807 commit 3985500

10 files changed

Lines changed: 21 additions & 21 deletions

File tree

ui-client/packages/core/src/components/date-picker/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { Popover, PopoverContent, PopoverTrigger } from '../popover'
1010

1111
/**
1212
* DatePicker - Single date selection component
13-
* Built on react-day-picker with mining-os dark theme styling
13+
* Built on react-day-picker with app dark theme styling
1414
*
1515
* @example
1616
* ```tsx
@@ -109,7 +109,7 @@ DatePicker.displayName = 'DatePicker'
109109

110110
/**
111111
* DateRangePicker - Date range selection component with presets
112-
* Inspired by mining-os PresetDateRangePicker with modal interface
112+
* Inspired by app PresetDateRangePicker with modal interface
113113
*
114114
* @example
115115
* ```tsx
@@ -184,7 +184,7 @@ export type DateRangePickerProps = {
184184
modalClassName?: string
185185
} & Omit<DayPickerProps, 'mode' | 'selected'>
186186

187-
// Default preset items (matching mining-os)
187+
// Default preset items (matching app)
188188
const getDefaultPresets = (): PresetItem[] => {
189189
const today = new Date()
190190
const addDays = (date: Date, days: number): Date => {

ui-client/packages/core/src/components/date-picker/styles.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
@use '../../styles/mixins' as *;
22
/**
3-
* Date Picker Component Styles (mining-os theme)
3+
* Date Picker Component Styles (app theme)
44
*
5-
* Based on mining-os PresetDateRangePicker:
5+
* Based on app PresetDateRangePicker:
66
* - Dark theme with black backgrounds
77
* - Orange primary color (#F7931A)
88
* - Transparent white borders and text

ui-client/packages/core/src/components/form/styles.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@use '../../styles/mixins' as *;
22
/**
3-
* Form Component Styles (mining-os theme)
3+
* Form Component Styles (app theme)
44
*/
55

66
.mdk-form {

ui-client/packages/core/src/components/popover/styles.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
@use '../../styles/mixins' as *;
22
/**
3-
* Popover Component Styles (mining-os theme)
3+
* Popover Component Styles (app theme)
44
*
5-
* Based on mining-os popover usage:
5+
* Based on app popover usage:
66
* - Dark background (SIMPLE_BLACK #000000)
77
* - Smooth animations
88
* - Responsive width constraints

ui-client/packages/core/src/components/tag-input/styles.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@use '../../styles/mixins' as *;
22

33
/**
4-
* TagInput Component Styles (mining-os theme)
4+
* TagInput Component Styles (app theme)
55
*
66
* - Input with inline tags and remove buttons
77
* - Dropdown below input with options

ui-client/packages/core/src/components/textarea/styles.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@use '../../styles/mixins' as *;
22
/**
3-
* TextArea Component Styles (mining-os theme)
3+
* TextArea Component Styles (app theme)
44
*
55
* - Default: Dark gray bg, no border
66
* - Hover: Light gray border

ui-client/packages/core/src/components/tooltip/styles.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Tooltip Component Styles (mining-os theme)
2+
* Tooltip Component Styles (app theme)
33
*/
44

55
.mdk-tooltip__content {

ui-client/packages/core/src/styles/_colors.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@
183183
--mdk-table-text-primary: #ffffff80;
184184
--mdk-table-text-secondary: #ffffffb3;
185185

186-
/* mdk button tokens (mining-os baseline) */
186+
/* mdk button tokens (app baseline) */
187187
--mdk-radius: 0px;
188188
--mdk-font-size: 14px;
189189
--mdk-line-height: 22px;

ui-client/packages/foundation/src/constants/header-controls.constants.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,27 @@ import { WEBAPP_SHORT_NAME } from '.'
22

33
export type HeaderPreferences = {
44
poolMiners: boolean
5-
mosMiners: boolean
5+
miners: boolean
66
poolHashrate: boolean
7-
mosHashrate: boolean
7+
hashrate: boolean
88
consumption: boolean
99
efficiency: boolean
1010
}
1111

1212
export const DEFAULT_HEADER_PREFERENCES: HeaderPreferences = {
1313
poolMiners: true,
14-
mosMiners: true,
14+
miners: true,
1515
poolHashrate: true,
16-
mosHashrate: true,
16+
hashrate: true,
1717
consumption: true,
1818
efficiency: true,
1919
}
2020

2121
export const HEADER_ITEMS = [
2222
{ key: 'poolMiners' as keyof HeaderPreferences, label: 'Pool Miners' },
23-
{ key: 'mosMiners' as keyof HeaderPreferences, label: `${WEBAPP_SHORT_NAME} Miners` },
23+
{ key: 'miners' as keyof HeaderPreferences, label: `${WEBAPP_SHORT_NAME} Miners` },
2424
{ key: 'poolHashrate' as keyof HeaderPreferences, label: 'Pool Hashrate' },
25-
{ key: 'mosHashrate' as keyof HeaderPreferences, label: `${WEBAPP_SHORT_NAME} Hashrate` },
25+
{ key: 'hashrate' as keyof HeaderPreferences, label: `${WEBAPP_SHORT_NAME} Hashrate` },
2626
{ key: 'consumption' as keyof HeaderPreferences, label: 'Consumption' },
2727
{ key: 'efficiency' as keyof HeaderPreferences, label: 'Efficiency' },
2828
] as const

ui-client/packages/foundation/src/hooks/specs/use-header-controls.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,16 @@ describe('useHeaderControls', () => {
3131
it('loads preferences from localStorage on mount', () => {
3232
const stored = {
3333
poolMiners: false,
34-
mosMiners: true,
34+
miners: true,
3535
poolHashrate: true,
36-
mosHashrate: false,
36+
hashrate: false,
3737
consumption: true,
3838
efficiency: false,
3939
}
4040
localStorage.setItem('headerControlsPreferences', JSON.stringify(stored))
4141
const { result } = renderHook(() => useHeaderControls())
4242
expect(result.current.preferences.poolMiners).toBe(false)
43-
expect(result.current.preferences.mosMiners).toBe(true)
43+
expect(result.current.preferences.miners).toBe(true)
4444
})
4545

4646
it('handleToggle updates a preference and saves to localStorage', () => {

0 commit comments

Comments
 (0)