Skip to content

Commit fdfd487

Browse files
committed
Merge branch 'master' into 3884-add-lending-to-events
2 parents de7e9cb + d096f37 commit fdfd487

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+1453
-322
lines changed

.drone.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,6 @@ steps:
160160

161161
- name: build
162162
image: node:20-alpine
163-
environment:
164-
NODE_OPTIONS: --max-old-space-size=4096
165163
when:
166164
event: [push]
167165
branch:
@@ -361,4 +359,4 @@ image_pull_secrets:
361359

362360
---
363361
kind: signature
364-
hmac: d484b5559ac6b6f659f7665d5db9e33a7b4a859e576764f066c6e5c217c86322
362+
hmac: c7e50bfcec2b7a481bc69e26c282ffc48c24c4665cb22816b17d87e2ebc07ce9

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2014-2025 Abakus Webkom
3+
Copyright (c) 2014-2026 Abakus Webkom
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

lego-webapp/components/Banner/Banner.module.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,6 @@ div.christmas {
187187

188188
.countdownTime {
189189
font-size: 1.2rem;
190-
color: inherit;
191190
}
192191

193192
@keyframes pulseBefore {

lego-webapp/components/CommandPalette/commands.tsx

Lines changed: 48 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Icon } from '@webkom/lego-bricks';
1+
import { Flex, Icon } from '@webkom/lego-bricks';
22
import {
33
Home,
44
CircleUser,
@@ -19,11 +19,13 @@ import {
1919
LogOut,
2020
} from 'lucide-react';
2121
import { navigate } from 'vike/client/router';
22+
import Tag from '~/components/Tags/Tag';
2223
import { logout } from '~/redux/actions/UserActions';
2324

2425
type Command = {
2526
id: string;
26-
label: string;
27+
renderLabel: string | React.ReactNode;
28+
searchText: string;
2729
action: () => void;
2830
icon?: React.ReactNode;
2931
};
@@ -43,91 +45,110 @@ const createCommands = (
4345
items: [
4446
{
4547
id: 'home',
46-
label: 'Hjem',
48+
renderLabel: 'Hjem',
49+
searchText: 'Hjem',
4750
action: () => navigate('/'),
4851
icon: <Icon iconNode={<Home />} size={15} />,
4952
},
5053
{
5154
id: 'profile',
52-
label: 'Profil',
55+
renderLabel: 'Profil',
56+
searchText: 'Profil',
5357
action: () => navigate('/users/me'),
5458
icon: <Icon iconNode={<CircleUser />} size={15} />,
5559
},
5660
{
5761
id: 'events',
58-
label: 'Arrangementer',
62+
renderLabel: 'Arrangementer',
63+
searchText: 'Arrangementer',
5964
action: () => navigate('/events'),
6065
icon: <Icon iconNode={<CalendarRange />} size={15} />,
6166
},
6267
{
6368
id: 'meetings',
64-
label: 'Møter',
69+
renderLabel: 'Møter',
70+
searchText: 'Møter',
6571
action: () => navigate('/meetings'),
6672
icon: <Icon iconNode={<Users />} size={15} />,
6773
},
6874
{
6975
id: 'lending',
70-
label: 'Utlån',
76+
renderLabel: (
77+
<Flex alignItems="center" gap={10}>
78+
Utlån <Tag tag="Nytt!!" color="pink" />
79+
</Flex>
80+
),
81+
searchText: 'Utlån',
7182
action: () => navigate('/lending'),
7283
icon: <Icon iconNode={<ShoppingCart />} size={15} />,
7384
},
7485
{
7586
id: 'interestGroups',
76-
label: 'Interessegrupper',
87+
renderLabel: 'Interessegrupper',
88+
searchText: 'Interessegrupper',
7789
action: () => navigate('/interest-groups'),
7890
icon: <Icon iconNode={<Banana />} size={15} />,
7991
},
8092
{
8193
id: 'joblistings',
82-
label: 'Jobbannonser',
94+
renderLabel: 'Jobbannonser',
95+
searchText: 'Jobbannonser',
8396
action: () => navigate('/joblistings'),
8497
icon: <Icon iconNode={<Newspaper />} size={15} />,
8598
},
8699
{
87100
id: 'companies',
88-
label: 'Bedrifter',
101+
renderLabel: 'Bedrifter',
102+
searchText: 'Bedrifter',
89103
action: () => navigate('/companies'),
90104
icon: <Icon iconNode={<Briefcase />} size={15} />,
91105
},
92106
{
93107
id: 'articles',
94-
label: 'Artikler',
108+
renderLabel: 'Artikler',
109+
searchText: 'Artikler',
95110
action: () => navigate('/articles'),
96111
icon: <Icon iconNode={<BookOpen />} size={15} />,
97112
},
98113
{
99114
id: 'gallery',
100-
label: 'Album',
115+
renderLabel: 'Album',
116+
searchText: 'Album',
101117
action: () => navigate('/photos'),
102118
icon: <Icon iconNode={<BookImage />} size={15} />,
103119
},
104120
{
105121
id: 'quotes',
106-
label: 'Overhørt',
122+
renderLabel: 'Overhørt',
123+
searchText: 'Overhørt',
107124
action: () => navigate('/quotes'),
108125
icon: <Icon iconNode={<Quote />} size={15} />,
109126
},
110127
{
111128
id: 'trophies',
112-
label: 'Trofeer',
129+
renderLabel: 'Trofeer',
130+
searchText: 'Trofeer',
113131
action: () => navigate('/achievements'),
114132
icon: <Icon iconNode={<Trophy />} size={15} />,
115133
},
116134
{
117135
id: 'theFund',
118-
label: 'Fondet',
136+
renderLabel: 'Fondet',
137+
searchText: 'Fondet',
119138
action: () => window.open('https://fondet.abakus.no/', '_blank'),
120139
icon: <Icon iconNode={<Landmark />} size={15} />,
121140
},
122141
{
123142
id: 'developerBlog',
124-
label: 'Utviklerbloggen',
143+
renderLabel: 'Utviklerbloggen',
144+
searchText: 'Utviklerbloggen',
125145
action: () => window.open('https://webkom.dev/', '_blank'),
126146
icon: <Icon iconNode={<MessageSquareQuote />} size={15} />,
127147
},
128148
{
129149
id: 'settings',
130-
label: 'Innstillinger',
150+
renderLabel: 'Innstillinger',
151+
searchText: 'Innstillinger',
131152
action: () => navigate('/users/me/settings/profile'),
132153
icon: <Icon iconNode={<Settings />} size={15} />,
133154
},
@@ -138,25 +159,29 @@ const createCommands = (
138159
items: [
139160
{
140161
id: 'createMeetingNotice',
141-
label: 'Lag møteinnkalling',
162+
renderLabel: 'Lag møteinnkalling',
163+
searchText: 'Lag møteinnkalling',
142164
action: () => navigate('/meetings/new'),
143165
icon: <Icon iconNode={<Terminal />} size={15} />,
144166
},
145167
{
146168
id: 'createReceipt',
147-
label: 'Lag kvittering',
169+
renderLabel: 'Lag kvittering',
170+
searchText: 'Lag kvittering',
148171
action: () => window.open('https://kvittering.abakus.no/', '_blank'),
149172
icon: <Icon iconNode={<Terminal />} size={15} />,
150173
},
151174
{
152175
id: 'createQuote',
153-
label: 'Lag sitat',
176+
renderLabel: 'Lag sitat',
177+
searchText: 'Lag sitat',
154178
action: () => navigate('/quotes/new'),
155179
icon: <Icon iconNode={<Terminal />} size={15} />,
156180
},
157181
{
158182
id: 'createAlbum',
159-
label: 'Lag album',
183+
renderLabel: 'Lag album',
184+
searchText: 'Lag album',
160185
action: () => navigate('/photos/new'),
161186
icon: <Icon iconNode={<Terminal />} size={15} />,
162187
},
@@ -167,7 +192,8 @@ const createCommands = (
167192
items: [
168193
{
169194
id: 'logout',
170-
label: 'Logg ut',
195+
renderLabel: 'Logg ut',
196+
searchText: 'Logg ut',
171197
icon: <Icon iconNode={<LogOut />} size={15} />,
172198
action: () => {
173199
dispatch(logout());

lego-webapp/components/CommandPalette/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ const CommandPalette = () => {
135135
</Header>
136136
<Collection items={section.items}>
137137
{(item) => (
138-
<CommandItem id={item.id} textValue={item.label}>
138+
<CommandItem id={item.id} textValue={item.searchText}>
139139
{({ isFocused }) => (
140140
<div className={styles.itemRow}>
141141
<div
@@ -146,7 +146,7 @@ const CommandPalette = () => {
146146
}
147147
>
148148
{item.icon && <span>{item.icon}</span>}
149-
<span>{item.label}</span>
149+
<span>{item.renderLabel}</span>
150150
</div>
151151
{isFocused && (
152152
<Icon

lego-webapp/components/Countdown/Countdown.module.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
display: flex;
1717
flex-direction: column;
1818
align-items: center;
19-
color: var(--color-event-black);
19+
color: inherit;
2020
}
2121

2222
.value {
@@ -25,7 +25,7 @@
2525

2626
.label {
2727
font-size: var(--font-size-sm);
28-
color: var(--color-event-black);
28+
color: inherit;
2929
}
3030

3131
.value,

lego-webapp/components/Feed/activity.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const AggregatedActivityItem = <Verb extends FeedActivityVerb>({
4141
</Linkify>
4242
</CardContent>
4343
<CardFooter variant="border">
44-
{aggregatedActivity.activities.map((activity, i) => (
44+
{aggregatedActivity.activities.map((activity) => (
4545
<div key={activity.activityId}>
4646
<ActivityFooter
4747
aggregatedActivity={aggregatedActivity}

lego-webapp/components/Form/SelectInput.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ type Props<Option, IsMulti extends boolean = false> = {
1515
fetching?: boolean;
1616
className?: string;
1717
selectStyle?: StylesConfig<Option, IsMulti>;
18-
onChange?: (event: ChangeEvent | string | Option[] | Option) => void;
18+
onChange?: (
19+
event: ChangeEvent | string | readonly Option[] | Option | null,
20+
) => void;
1921
onSearch?: (search: string) => void;
2022
isValidNewOption?: (arg0: string) => boolean;
2123
value?: Option | Option[] | null;
@@ -122,7 +124,7 @@ const SelectInput = <
122124
options={options}
123125
isOptionDisabled={isOptionDisabled}
124126
isLoading={fetching}
125-
styles={selectStyle ?? selectStyles}
127+
styles={selectStyle ?? (selectStyles as StylesConfig<Option, IsMulti>)}
126128
theme={selectTheme}
127129
onInputChange={(value) => {
128130
onSearch?.(value);
@@ -154,7 +156,7 @@ const SelectInput = <
154156
return value;
155157
}}
156158
menuPortalTarget={import.meta.env.SSR ? null : document.body}
157-
styles={selectStyle ?? selectStyles}
159+
styles={selectStyle ?? (selectStyles as StylesConfig<Option, IsMulti>)}
158160
theme={selectTheme}
159161
blurInputOnSelect={false}
160162
loadingMessage={() => LOADING_MESSAGE}

0 commit comments

Comments
 (0)