Skip to content

Commit 68aa7cf

Browse files
authored
Merge pull request #286 from os2display/release/2.5.0
Release/2.5.0
2 parents 54e72e5 + cb05d47 commit 68aa7cf

Some content is hidden

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

50 files changed

+1715
-925
lines changed

.eslintrc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"plugins": ["react", "prettier", "only-warn"],
2+
"plugins": ["react", "prettier"],
33
"extends": [
44
"airbnb",
55
"prettier",
@@ -18,7 +18,9 @@
1818
"allowImportExportEverywhere": true
1919
},
2020
"rules": {
21+
"react/react-in-jsx-scope": "off",
2122
"react/require-default-props": "off",
23+
"react/prop-types": "off",
2224
"react/jsx-filename-extension": [
2325
"warn",
2426
{

CHANGELOG.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,27 @@
1-
21
# Changelog
32

43
All notable changes to this project will be documented in this file.
54

65
## [Unreleased]
76

7+
## [2.5.0] - 2025-05-09
8+
9+
- [#285](https://github.com/os2display/display-admin-client/pull/285)
10+
- Rewrite screen playlists get to use promises
11+
- Fix save screen and go to list
12+
- Disable eslint for proptypes
13+
- Disable eslint for react in scope
14+
- [#284](https://github.com/os2display/display-admin-client/pull/284)
15+
- Fixed spacer calculations for previews.
16+
- Added border to preview container
17+
- [#283](https://github.com/os2display/display-admin-client/pull/283)
18+
- Fixed preview issues.
19+
- [#275](https://github.com/os2display/display-admin-client/pull/275)
20+
- Added enhanced preview.
21+
- [#276](https://github.com/os2display/display-admin-client/pull/276)
22+
- Added Colibo feed type form.
23+
- Fixed feed type selector when unsupported type.
24+
825
## [2.4.0] - 2025-03-31
926

1027
- [#281](https://github.com/os2display/display-admin-client/pull/281)

README.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,10 @@ setting are required than what is default.
3232
cp public/example-access-config.json public/access-config.json
3333
```
3434

35-
### Up the containers
35+
### Up the containers and install npm packages
3636

3737
```shell
3838
docker compose up --detach
39-
```
40-
41-
### Install npm packages
42-
43-
```shell
4439
docker compose run --rm node yarn install
4540
```
4641

e2e/feed-sources.spec.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ test.describe("fest", () => {
219219

220220
test("It loads create datakilde page", async ({ page }) => {
221221
page.getByText("Opret ny datakilde").click();
222-
await expect(page.locator("#save_feed-source")).toBeVisible();
222+
await expect(page.locator("#save")).toBeVisible();
223223
});
224224

225225
test("It display error toast on save error", async ({ page }) => {
@@ -238,7 +238,7 @@ test.describe("fest", () => {
238238
await expect(
239239
page.locator(".Toastify").locator(".Toastify__toast--error")
240240
).not.toBeVisible();
241-
await page.locator("#save_feed-source").click();
241+
await page.locator("#save").click();
242242
await expect(
243243
page.locator(".Toastify").locator(".Toastify__toast--error")
244244
).toBeVisible();
@@ -253,9 +253,9 @@ test.describe("fest", () => {
253253
});
254254
test("Cancel create datakilde", async ({ page }) => {
255255
page.getByText("Opret ny datakilde").click();
256-
await expect(page.locator("#cancel_feed-source")).toBeVisible();
257-
await page.locator("#cancel_feed-source").click();
258-
await expect(page.locator("#cancel_feed-source")).not.toBeVisible();
256+
await expect(page.locator("#cancel")).toBeVisible();
257+
await page.locator("#cancel").click();
258+
await expect(page.locator("#cancel")).not.toBeVisible();
259259
});
260260
});
261261

e2e/playlist.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ test.describe("Playlist create tests", () => {
5959
await expect(
6060
page.locator(".Toastify").locator(".Toastify__toast--success")
6161
).not.toBeVisible();
62-
await page.locator("#save_playlist").click();
62+
await page.locator("#save_slide_and_close").click();
6363
await expect(
6464
page
6565
.locator(".Toastify")

infrastructure/itkdev/etc/confd/templates/config.tmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"api": "{{ getenv "API_PATH" "/" }}",
33
"touchButtonRegions": "{{ getenv "APP_TOUCH_BUTTON_REGIONS" "false"}}",
4+
"previewClient": "{{ getenv "APP_PREVIEW_CLIENT" "null"}}",
45
"showScreenStatus": "{{ getenv "APP_SHOW_SCREEN_STATUS" "true"}}",
56
"rejseplanenApiKey": "{{ getenv "APP_REJSEPLANEN_API_KEY" "null"}}",
67
"loginMethods": [

infrastructure/os2display/etc/confd/templates/config.tmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"api": "{{ getenv "API_PATH" "/" }}",
33
"touchButtonRegions": "{{ getenv "APP_TOUCH_BUTTON_REGIONS" "false"}}",
4+
"previewClient": "{{ getenv "APP_PREVIEW_CLIENT" "null"}}",
45
"showScreenStatus": "{{ getenv "APP_SHOW_SCREEN_STATUS" "false"}}",
56
"rejseplanenApiKey": "{{ getenv "APP_REJSEPLANEN_API_KEY" "null"}}",
67
"loginMethods": [

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@
8989
"eslint-plugin-import": "^2.23.4",
9090
"eslint-plugin-jsdoc": "^35.4.3",
9191
"eslint-plugin-jsx-a11y": "^6.4.1",
92-
"eslint-plugin-only-warn": "^1.0.2",
9392
"eslint-plugin-prettier": "3.4.0",
9493
"eslint-plugin-react": "^7.24.0",
9594
"eslint-plugin-react-hooks": "^4.2.0",

public/example_config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"api": "/",
33
"touchButtonRegions": false,
4+
"previewClient": null,
45
"showScreenStatus": false,
56
"rejseplanenApiKey": null,
67
"loginMethods": [

src/app.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ function App() {
220220
<Col lg={9} xl={10}>
221221
<Topbar />
222222
{accessConfig && (
223-
<main className="col p-3">
223+
<main>
224224
<Routes>
225225
<Route path="campaign">
226226
<Route

src/app.scss

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,22 @@ body,
6262
}
6363
}
6464

65+
.preview-overlay {
66+
background: white;
67+
z-index: 1021;
68+
position: fixed;
69+
top: 0;
70+
right: 0;
71+
bottom: 0;
72+
left: 0;
73+
overflow: hidden;
74+
75+
button {
76+
position: fixed;
77+
z-index: 20;
78+
}
79+
}
80+
6581
.table {
6682
td {
6783
vertical-align: middle;
@@ -81,3 +97,35 @@ body,
8197
margin-right: 1rem;
8298
}
8399
}
100+
101+
.preview-actions {
102+
display: flex;
103+
justify-content: space-between;
104+
align-items: center;
105+
}
106+
107+
.preview-button-container {
108+
display: none;
109+
position: fixed;
110+
border: 3px solid #f8f9fa;
111+
background: white;
112+
right: 0;
113+
top: 50%;
114+
flex-direction: column;
115+
116+
@media (max-width: 800px) {
117+
display: flex;
118+
z-index: 2;
119+
}
120+
.preview-button {
121+
justify-content: center;
122+
align-content: center;
123+
align-items: center;
124+
}
125+
}
126+
127+
.preview-close-button {
128+
top: 0;
129+
right: 0;
130+
margin: 2em;
131+
}

src/components/activation-code/activation-code-activate.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ function ActivationCodeActivate() {
6767
};
6868

6969
return (
70-
<>
70+
<div className="p-3">
7171
<LoadingComponent
7272
isLoading={isSaving}
7373
loadingMessage={t("loading-messages.saving-activation-code")}
@@ -99,7 +99,7 @@ function ActivationCodeActivate() {
9999
</Button>
100100
</ContentFooter>
101101
</Form>
102-
</>
102+
</div>
103103
);
104104
}
105105

src/components/activation-code/activation-code-form.jsx

Lines changed: 39 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import { React } from "react";
22
import { useNavigate } from "react-router-dom";
3-
import { Button } from "react-bootstrap";
3+
import { Button, Col, Row } from "react-bootstrap";
44
import { useTranslation } from "react-i18next";
55
import PropTypes from "prop-types";
66
import Form from "react-bootstrap/Form";
77
import LoadingComponent from "../util/loading-component/loading-component";
88
import ContentBody from "../util/content-body/content-body";
9-
import ContentFooter from "../util/content-footer/content-footer";
109
import FormInput from "../util/forms/form-input";
1110
import RadioButtons from "../util/forms/radio-buttons";
11+
import StickyFooter from "../util/sticky-footer";
1212

1313
/**
1414
* The user form component.
@@ -48,44 +48,48 @@ function ActivationCodeForm({
4848
<>
4949
<LoadingComponent isLoading={isLoading} loadingMessage={loadingMessage} />
5050
<Form>
51-
<h1 id="h1UserDisplayName">{headerText}</h1>
52-
<ContentBody>
53-
<div className="mb-2">
54-
<FormInput
55-
title="display-name"
56-
type="text"
57-
label={t("display-name-label")}
58-
placeholder={t("display-name-placeholder")}
59-
value={activationCode.displayName}
60-
onChange={handleInput}
61-
name="displayName"
62-
required
63-
/>
64-
</div>
65-
<div className="mb-2">
66-
<RadioButtons
67-
radioGroupName="role"
68-
handleChange={handleInput}
69-
options={roles}
70-
label={t("role-label")}
71-
selected={activationCode.role}
72-
/>
73-
<div>
74-
<small>{t("role-external-user-helptext")}</small>
75-
</div>
76-
<div>
77-
<small>{t("role-external-user-admin-helptext")}</small>
78-
</div>
79-
</div>
80-
</ContentBody>
81-
<ContentFooter>
51+
<Row className="m-3">
52+
<h1>{headerText}</h1>
53+
<Col>
54+
<ContentBody>
55+
<div className="mb-2">
56+
<FormInput
57+
title="display-name"
58+
type="text"
59+
label={t("display-name-label")}
60+
placeholder={t("display-name-placeholder")}
61+
value={activationCode.displayName}
62+
onChange={handleInput}
63+
name="displayName"
64+
required
65+
/>
66+
</div>
67+
<div className="mb-2">
68+
<RadioButtons
69+
radioGroupName="role"
70+
handleChange={handleInput}
71+
options={roles}
72+
label={t("role-label")}
73+
selected={activationCode.role}
74+
/>
75+
<div>
76+
<small>{t("role-external-user-helptext")}</small>
77+
</div>
78+
<div>
79+
<small>{t("role-external-user-admin-helptext")}</small>
80+
</div>
81+
</div>
82+
</ContentBody>
83+
</Col>
84+
</Row>
85+
86+
<StickyFooter>
8287
<Button
8388
variant="secondary"
8489
type="button"
8590
id="cancel_user"
8691
onClick={() => navigate("/activation/list/")}
8792
className="margin-right-button"
88-
size="lg"
8993
>
9094
{t("cancel-button")}
9195
</Button>
@@ -94,12 +98,10 @@ function ActivationCodeForm({
9498
type="button"
9599
onClick={handleSubmit}
96100
id="save_user"
97-
size="lg"
98-
className="col"
99101
>
100102
{t("save-button")}
101103
</Button>
102-
</ContentFooter>
104+
</StickyFooter>
103105
</Form>
104106
</>
105107
);

src/components/activation-code/activation-code-list.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ function ActivationCodeList() {
185185
}, [listData]);
186186

187187
return (
188-
<>
188+
<div className="p-3">
189189
<ContentHeader
190190
title={t("header")}
191191
newBtnTitle={t("create-activation-codes")}
@@ -208,7 +208,7 @@ function ActivationCodeList() {
208208
)}
209209
</>
210210
</ContentBody>
211-
</>
211+
</div>
212212
);
213213
}
214214

0 commit comments

Comments
 (0)