From cafd28ac0b8111542bd3df5af52bdaef20a502b2 Mon Sep 17 00:00:00 2001 From: xavier-GitHub76 <82046143+xavier-GitHub76@users.noreply.github.com> Date: Tue, 14 Nov 2023 14:54:38 +0100 Subject: [PATCH 1/3] features : Applications sorted by name (Update Navigation.tsx) Before : Applications were sorted by id (so by date of creation). Now : Applications are sorted by name --- ui/src/layout/Navigation.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/src/layout/Navigation.tsx b/ui/src/layout/Navigation.tsx index 8eea338c..d1a64048 100644 --- a/ui/src/layout/Navigation.tsx +++ b/ui/src/layout/Navigation.tsx @@ -54,7 +54,7 @@ class Navigation extends Component< public render() { const {classes, loggedIn, appStore, navOpen, setNavOpen} = this.props; const {showRequestNotification} = this.state; - const apps = appStore.getItems(); + const apps = appStore.getItems().slice().sort((a,b) => a.name.localeCompare(b.name)); const userApps = apps.length === 0 From cda9f3832e5d1a6d54be6d5fb26d95fc84cc8f23 Mon Sep 17 00:00:00 2001 From: xavier-GitHub76 <82046143+xavier-GitHub76@users.noreply.github.com> Date: Fri, 17 Nov 2023 22:52:54 +0100 Subject: [PATCH 2/3] Feature : Remove application logo --- ui/src/application/Applications.tsx | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/ui/src/application/Applications.tsx b/ui/src/application/Applications.tsx index 561e997a..f21919ff 100644 --- a/ui/src/application/Applications.tsx +++ b/ui/src/application/Applications.tsx @@ -1,4 +1,4 @@ -import Grid from '@material-ui/core/Grid'; +aimport Grid from '@material-ui/core/Grid'; import IconButton from '@material-ui/core/IconButton'; import Paper from '@material-ui/core/Paper'; import Table from '@material-ui/core/Table'; @@ -9,6 +9,7 @@ import TableRow from '@material-ui/core/TableRow'; import Delete from '@material-ui/icons/Delete'; import Edit from '@material-ui/icons/Edit'; import CloudUpload from '@material-ui/icons/CloudUpload'; +import HighlightOffIcon from '@material-ui/icons/HighlightOff'; import React, {ChangeEvent, Component, SFC} from 'react'; import ConfirmDialog from '../common/ConfirmDialog'; import DefaultPage from '../common/DefaultPage'; @@ -84,6 +85,7 @@ class Applications extends Component> { value={app.token} lastUsed={app.lastUsed} fUpload={() => this.uploadImage(app.id)} + fDeleteImage={() => this.deleteImage(app.id)} fDelete={() => (this.deleteId = app.id)} fEdit={() => (this.updateId = app.id)} noDelete={app.internal} @@ -146,6 +148,14 @@ class Applications extends Component> { alert('Uploaded file must be of type png, jpeg or gif.'); } }; + + private deleteImage = (id: number) => { + console.log("delete for " + id) + //this.uploadId = id; + //if (this.upload) { + //this.upload.click(); + //} + }; } interface IRowProps { @@ -156,6 +166,7 @@ interface IRowProps { defaultPriority: number; lastUsed: string | null; fUpload: VoidFunction; + fDeleteImage: VoidFunction; image: string; fDelete: VoidFunction; fEdit: VoidFunction; @@ -171,6 +182,7 @@ const Row: SFC = observer( lastUsed, fDelete, fUpload, + fDeleteImage, image, fEdit, }) => ( @@ -181,6 +193,9 @@ const Row: SFC = observer( + + + {name} From 2953b8d2f4ee457b9758dbbe1ddf4c19f746dafa Mon Sep 17 00:00:00 2001 From: xavier-GitHub76 <82046143+xavier-GitHub76@users.noreply.github.com> Date: Fri, 17 Nov 2023 22:54:29 +0100 Subject: [PATCH 3/3] Update Applications.tsx --- ui/src/application/Applications.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/src/application/Applications.tsx b/ui/src/application/Applications.tsx index f21919ff..5bb79011 100644 --- a/ui/src/application/Applications.tsx +++ b/ui/src/application/Applications.tsx @@ -1,4 +1,4 @@ -aimport Grid from '@material-ui/core/Grid'; +import Grid from '@material-ui/core/Grid'; import IconButton from '@material-ui/core/IconButton'; import Paper from '@material-ui/core/Paper'; import Table from '@material-ui/core/Table';