commit 466d9b72cde265dc60c42210308dbb62e7747f1d
parent edbb25367e6f1a2044aaaaa2258ecece597786d6
Author: Sebastian <sebasjm@gmail.com>
Date: Wed, 17 Mar 2021 10:16:16 -0300
remove some icons
Diffstat:
9 files changed, 45 insertions(+), 35 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
@@ -5,10 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Future work]
- - change the admin title to "instances" if we are listing the instances and "settings: $ID" on updating instances (#6790)
- - update title with: Taler Backoffice: $PAGE_TITLE (#6790)
- notifications should tale place between title and content, and not disapear (#6788)
- - if there is enough space for tables in mobile, make the scrollables (#6789)
- complete product list information (#6792)
- complete order list information (#6793)
- gettext templates should be generated from the source code (#6791)
@@ -37,12 +34,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- create default instance if it is not already
- - /o => /orders
- /orders/$ORDER_ID
-
-main action => refund
-exchange errors
-existing refund
+ - product: main action => refund
+ * exchange errors
+ * existing refund
new refund, amount, < allow
diff --git a/packages/frontend/src/components/menu/SideBar.tsx b/packages/frontend/src/components/menu/SideBar.tsx
@@ -43,7 +43,7 @@ export function Sidebar({ mobile, instance, onLogout, admin }: Props): VNode {
</div>}
<div class="aside-tools">
<div class="aside-tools-label">
- <div><b>Taler</b> Merchant Office</div>
+ <div><b>Taler</b> Backoffice</div>
<div class="is-size-7 has-text-right " style={{ lineHeight: 0, marginTop: -10 }}>{process.env.__VERSION__} ({config.version})</div>
</div>
</div>
diff --git a/packages/frontend/src/components/menu/index.tsx b/packages/frontend/src/components/menu/index.tsx
@@ -72,7 +72,7 @@ function WithTitle({title,children}:{title:string, children:ComponentChildren}):
return <Match>{({ path }: any) => {
const titleWithSubtitle = title ? title : (!admin ? getInstanceTitle(path, instance) : getAdminTitle(path))
- return (<WithTitle title="">
+ return (<WithTitle title={titleWithSubtitle}>
<div class={mobileOpen ? "has-aside-mobile-expanded" : ""} onClick={() => setMobileOpen(false)}>
<NavigationBar onMobileMenu={() => setMobileOpen(!mobileOpen)} title={titleWithSubtitle} />
{onLogout && <Sidebar onLogout={onLogout} admin={admin} instance={instance} mobile={mobileOpen} />}
diff --git a/packages/frontend/src/paths/admin/list/Table.tsx b/packages/frontend/src/paths/admin/list/Table.tsx
@@ -60,7 +60,7 @@ export function CardTable({ instances, onCreate, onUpdate, onDelete, selected }:
<button class={rowSelection.length > 0 ? "button is-danger" : "is-hidden"}
type="button" onClick={(): void => actionQueueHandler(buildActions(instances, rowSelection, 'DELETE'))} >
- <span class="icon"><i class="mdi mdi-trash-can" /></span>
+ Delete
</button>
</div>
<div class="card-header-icon" aria-label="more options">
@@ -97,6 +97,7 @@ function toggleSelected<T>(id: T): (prev: T[]) => T[] {
function Table({ rowSelection, rowSelectionHandler, instances, onUpdate, onDelete }: TableProps): VNode {
const { changeBackend, url } = useBackendContext()
return (
+ <div class="table-container">
<table class="table is-fullwidth is-striped is-hoverable is-fullwidth">
<thead>
<tr>
@@ -122,16 +123,13 @@ function Table({ rowSelection, rowSelectionHandler, instances, onUpdate, onDelet
</td>
<td><a href={`/instances/${i.id}`} {...{ native: true }} onClick={() => changeBackend(`${url}/instances/${i.id}`)} >{i.id}</a></td>
<td >{i.name}</td>
- <td class="is-actions-cell">
+ <td class="is-actions-cell right-sticky">
<div class="buttons is-right">
- <button class="button is-small is-success jb-modal" type="button" onClick={(): void => navigator.clipboard.writeText(i.id) as any}>
- <span class="icon"><i class="mdi mdi-content-copy" /></span>
- </button>
<button class="button is-small is-success jb-modal" type="button" onClick={(): void => onUpdate(i.id)}>
- <span class="icon"><i class="mdi mdi-pen" /></span>
+ Edit
</button>
<button class="button is-small is-danger jb-modal" type="button" onClick={(): void => onDelete(i)}>
- <span class="icon"><i class="mdi mdi-trash-can" /></span>
+ Delete
</button>
</div>
</td>
@@ -139,7 +137,9 @@ function Table({ rowSelection, rowSelectionHandler, instances, onUpdate, onDelet
})}
</tbody>
- </table>)
+ </table>
+ </div>
+ )
}
function EmptyTable(): VNode {
diff --git a/packages/frontend/src/paths/instance/orders/list/Table.tsx b/packages/frontend/src/paths/instance/orders/list/Table.tsx
@@ -63,7 +63,7 @@ export function CardTable({ instances, onCreate, onUpdate, onDelete, selected }:
type="button"
onClick={(): void => actionQueueHandler(buildActions(instances, rowSelection, 'DELETE'))}
>
- <span class="icon"><i class="mdi mdi-trash-can" /></span>
+ Delete
</button>
</div>
<div class="card-header-icon" aria-label="more options">
@@ -131,7 +131,7 @@ function Table({ rowSelection, rowSelectionHandler, instances, onUpdate, onDelet
<td class="is-actions-cell right-sticky">
<div class="buttons is-right">
<button class="button is-small is-danger jb-modal" type="button" onClick={(): void => onDelete(i)}>
- <span class="icon"><i class="mdi mdi-trash-can" /></span>
+ Delete
</button>
</div>
</td>
diff --git a/packages/frontend/src/paths/instance/products/list/Table.tsx b/packages/frontend/src/paths/instance/products/list/Table.tsx
@@ -62,7 +62,7 @@ export function CardTable({ instances, onCreate, onUpdate, onDelete, selected }:
<button class={rowSelection.length > 0 ? "button is-danger" : "is-hidden"}
type="button" onClick={(): void => actionQueueHandler(buildActions(instances, rowSelection, 'DELETE'))} >
- <span class="icon"><i class="mdi mdi-trash-can" /></span>
+ Delete
</button>
</div>
<div class="card-header-icon" aria-label="more options">
@@ -98,6 +98,7 @@ function toggleSelected<T>(id: T): (prev: T[]) => T[] {
function Table({ rowSelection, rowSelectionHandler, instances, onUpdate, onDelete }: TableProps): VNode {
return (
+ <div class="table-container">
<table class="table is-fullwidth is-striped is-hoverable is-fullwidth">
<thead>
<tr>
@@ -121,10 +122,10 @@ function Table({ rowSelection, rowSelectionHandler, instances, onUpdate, onDelet
</label>
</td>
<td onClick={(): void => onUpdate(i.id)} style={{ cursor: 'pointer' }} >{i.id}</td>
- <td class="is-actions-cell">
+ <td class="is-actions-cell right-sticky">
<div class="buttons is-right">
<button class="button is-small is-danger jb-modal" type="button" onClick={(): void => onDelete(i)}>
- <span class="icon"><i class="mdi mdi-trash-can" /></span>
+ Delete
</button>
</div>
</td>
@@ -132,7 +133,8 @@ function Table({ rowSelection, rowSelectionHandler, instances, onUpdate, onDelet
})}
</tbody>
- </table>)
+ </table>
+ </div>)
}
function EmptyTable(): VNode {
diff --git a/packages/frontend/src/paths/instance/tips/list/Table.tsx b/packages/frontend/src/paths/instance/tips/list/Table.tsx
@@ -62,7 +62,7 @@ export function CardTable({ instances, onCreate, onUpdate, onDelete, selected }:
<button class={rowSelection.length > 0 ? "button is-danger" : "is-hidden"}
type="button" onClick={(): void => actionQueueHandler(buildActions(instances, rowSelection, 'DELETE'))} >
- <span class="icon"><i class="mdi mdi-trash-can" /></span>
+ Delete
</button>
</div>
<div class="card-header-icon" aria-label="more options">
@@ -98,6 +98,7 @@ function toggleSelected<T>(id: T): (prev: T[]) => T[] {
function Table({ rowSelection, rowSelectionHandler, instances, onUpdate, onDelete }: TableProps): VNode {
return (
+ <div class="table-container">
<table class="table is-fullwidth is-striped is-hoverable is-fullwidth">
<thead>
<tr>
@@ -125,10 +126,10 @@ function Table({ rowSelection, rowSelectionHandler, instances, onUpdate, onDelet
<td onClick={(): void => onUpdate(i.id)} style={{cursor: 'pointer'}} >{i.committed_amount}</td>
<td onClick={(): void => onUpdate(i.id)} style={{cursor: 'pointer'}} >{i.exchange_initial_amount}</td>
<td onClick={(): void => onUpdate(i.id)} style={{cursor: 'pointer'}} >{i.merchant_initial_amount}</td>
- <td class="is-actions-cell">
+ <td class="is-actions-cell right-sticky">
<div class="buttons is-right">
<button class="button is-small is-danger jb-modal" type="button" onClick={(): void => onDelete(i)}>
- <span class="icon"><i class="mdi mdi-trash-can" /></span>
+ Delete
</button>
</div>
</td>
@@ -136,7 +137,7 @@ function Table({ rowSelection, rowSelectionHandler, instances, onUpdate, onDelet
})}
</tbody>
- </table>)
+ </table></div>)
}
function EmptyTable(): VNode {
diff --git a/packages/frontend/src/paths/instance/transfers/list/Table.tsx b/packages/frontend/src/paths/instance/transfers/list/Table.tsx
@@ -62,7 +62,7 @@ export function CardTable({ instances, onCreate, onUpdate, onDelete, selected }:
<button class={rowSelection.length > 0 ? "button is-danger" : "is-hidden"}
type="button" onClick={(): void => actionQueueHandler(buildActions(instances, rowSelection, 'DELETE'))} >
- <span class="icon"><i class="mdi mdi-trash-can" /></span>
+ Delete
</button>
</div>
<div class="card-header-icon" aria-label="more options">
@@ -98,6 +98,7 @@ function toggleSelected<T>(id: T): (prev: T[]) => T[] {
function Table({ rowSelection, rowSelectionHandler, instances, onUpdate, onDelete }: TableProps): VNode {
return (
+ <div class="table-container">
<table class="table is-fullwidth is-striped is-hoverable is-fullwidth">
<thead>
<tr>
@@ -123,10 +124,10 @@ function Table({ rowSelection, rowSelectionHandler, instances, onUpdate, onDelet
</td>
<td onClick={(): void => onUpdate(i.id)} style={{cursor: 'pointer'}} >{i.credit_amount}</td>
<td onClick={(): void => onUpdate(i.id)} style={{cursor: 'pointer'}} >{i.exchange_url}</td>
- <td class="is-actions-cell">
+ <td class="is-actions-cell right-sticky">
<div class="buttons is-right">
<button class="button is-small is-danger jb-modal" type="button" onClick={(): void => onDelete(i)}>
- <span class="icon"><i class="mdi mdi-trash-can" /></span>
+ Delete
</button>
</div>
</td>
@@ -134,7 +135,8 @@ function Table({ rowSelection, rowSelectionHandler, instances, onUpdate, onDelet
})}
</tbody>
- </table>)
+ </table>
+ </div>)
}
function EmptyTable(): VNode {
diff --git a/packages/frontend/src/scss/main.scss b/packages/frontend/src/scss/main.scss
@@ -90,4 +90,16 @@ input[type=checkbox]:indeterminate + .check {
.right-sticky {
position: sticky;
right: 0px;
-}
-\ No newline at end of file
+ background-color: $white;
+}
+
+.table.is-striped tbody tr:not(.is-selected):nth-child(even) .right-sticky {
+ background-color: #fafafa;
+}
+
+tr:hover .right-sticky {
+ background-color: hsl(0, 0%, 80%);
+}
+.table.is-striped tbody tr:nth-child(even):hover .right-sticky {
+ background-color: hsl(0, 0%, 95%);
+}