Skip to content

Commit 7d35b43

Browse files
authored
Merge pull request #879 from gobitfly/BEDS-202/Notification-Table-RP-Tab
Beds 202/notification table RocketPool tab
2 parents a3df52c + 155f484 commit 7d35b43

File tree

15 files changed

+450
-87
lines changed

15 files changed

+450
-87
lines changed

frontend/.vscode/settings.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,25 @@
11
{
22
"conventionalCommits.scopes": [
3+
"BcLink",
4+
"BcTablePager",
35
"DashboardChartSummaryChartFilter",
46
"DashboardGroupManagementModal",
57
"DashboardValidatorManagmentModal",
8+
"NotificationsClientsTable",
9+
"NotificationsNetworkTable",
610
"NotificationsOverview",
711
"checkout",
812
"ci",
913
"customFetch",
14+
"dialog",
1015
"eslint",
1116
"feature-flags",
1217
"git",
1318
"i18n",
1419
"mainHeader",
1520
"notifications",
1621
"qrCode",
22+
"useWindowSize",
1723
"vscode"
1824
],
1925
"editor.codeActionsOnSave": {

frontend/assets/css/prime.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -634,11 +634,11 @@ div.p-accordion {
634634
* TODO: remove the .p-overflow-hidden and .p-overlay-mask class when PrimeVue is updated.
635635
* This is quick-fix for shifting display issues.
636636
**/
637-
.p-overflow-hidden {
637+
div.p-overflow-hidden {
638638
overflow: hidden !important; /* Block scroll */
639639
border-right: solid 5px transparent !important;
640640
}
641641

642-
.p-overlay-mask {
643-
background: var(--container-background);
644-
}
642+
div.p-dialog-mask.p-overlay-mask {
643+
background: rgba(0, 0, 0, 0.5);
644+
}

frontend/components/bc/BcLink.vue

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
1-
<script setup lang="ts"></script>
1+
<script setup lang="ts">
2+
// import type { RouteLocationRaw } from 'vue-router'
3+
import type { NuxtLinkProps } from '#app'
4+
5+
defineProps<{
6+
to: NuxtLinkProps['to'],
7+
}>()
8+
</script>
29

310
<template>
4-
<NuxtLink :no-prefetch="true">
11+
<NuxtLink
12+
:to
13+
:no-prefetch="true"
14+
>
515
<template #default>
616
<slot />
717
</template>

frontend/components/bc/table/TablePager.vue

Lines changed: 65 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -181,29 +181,27 @@ watch(
181181
@change="(event) => setPageSize(event.value)"
182182
/>
183183
</div>
184-
<div class="very-last">
185-
<div
186-
v-if="!stepperOnly"
187-
class="left-info"
188-
>
189-
<slot name="bc-table-footer-left">
190-
<span v-if="props.paging?.total_count">
191-
{{
192-
$t("table.showing", {
193-
from: data.from,
194-
to: data.to,
195-
total: props.paging?.total_count,
196-
})
197-
}}
198-
</span>
199-
</slot>
200-
</div>
201-
<div
202-
v-if="$slots['bc-table-footer-right']"
203-
class="right-info"
204-
>
205-
<slot name="bc-table-footer-right" />
206-
</div>
184+
<div
185+
v-if="!stepperOnly"
186+
class="left-info"
187+
>
188+
<slot name="bc-table-footer-left">
189+
<span v-if="props.paging?.total_count">
190+
{{
191+
$t("table.showing", {
192+
from: data.from,
193+
to: data.to,
194+
total: props.paging?.total_count,
195+
})
196+
}}
197+
</span>
198+
</slot>
199+
</div>
200+
<div
201+
v-if="$slots['bc-table-footer-right']"
202+
class="right-info"
203+
>
204+
<slot name="bc-table-footer-right" />
207205
</div>
208206
</div>
209207
</template>
@@ -212,30 +210,44 @@ watch(
212210
@use "~/assets/css/main.scss";
213211
214212
.bc-pageinator {
215-
position: relative;
216-
height: 78px;
217-
display: flex;
218-
flex-direction: column;
219-
justify-content: center;
220-
align-items: center;
213+
margin-block-start: 20px;
214+
display: grid;
215+
gap: 10px;
216+
justify-items: center;
221217
font-weight: var(--standard_text_medium_font_weight);
222-
margin: var(--padding) var(--padding-large);
223218
224-
.very-last {
225-
position: absolute;
226-
display: flex;
227-
flex-direction: row;
228-
flex-wrap: wrap;
229-
width: 100%;
230-
pointer-events: none;
219+
@media screen and (min-width: 768px) {
220+
grid-template-rows: auto 1fr;
221+
grid-template-columns: 1fr 1fr;
222+
223+
.pager {
224+
grid-column: span 2
225+
}
226+
.left-info {
227+
margin-inline-start: 16px;
228+
justify-self: start;
229+
}
230+
.right-info{
231+
justify-self: end;
232+
margin-inline-end: 16px;
233+
}
234+
}
235+
@media screen and (min-width: 1024px) {
236+
grid-template-rows: 1fr ;
237+
grid-template-columns: 1fr auto 1fr;
238+
.pager {
239+
grid-column: 2/3;
240+
grid-row: 1/2
241+
}
231242
.left-info {
232-
margin-right: auto;
233-
pointer-events: all;
243+
grid-column: 1/2;
244+
grid-row: 1/2
234245
}
235246
.right-info {
236-
margin-left: auto;
237-
pointer-events: all;
247+
grid-column: 3/4;
248+
grid-row: 1/2
238249
}
250+
239251
}
240252
241253
.pager {
@@ -299,13 +311,18 @@ watch(
299311
}
300312
}
301313
302-
@media screen and (max-width: 1399px) {
303-
gap: var(--padding);
304-
height: unset;
305-
.very-last {
306-
@media (max-width: 600px) {
307-
position: relative;
308-
}
314+
.left-info {
315+
display: none;
316+
@media screen and (min-width: 640px) {
317+
display: block;
318+
}
319+
}
320+
.right-info {
321+
font-weight: 400;
322+
font-size: 12px;
323+
@media screen and (min-width: 640px) {
324+
font-weight: inherit;
325+
font-size: inherit;
309326
}
310327
}
311328
}

frontend/components/dashboard/GroupManagementModal.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const {
2626
} = useDashboardKey()
2727
2828
const {
29-
isMobile, width,
29+
width,
3030
} = useWindowSize()
3131
3232
const visible = defineModel<boolean>()
@@ -199,6 +199,9 @@ const selectedSort = computed(() =>
199199
? `${sortField.value}:${getSortOrder(sortOrder.value)}`
200200
: undefined,
201201
)
202+
const isMobile = computed(() => {
203+
return (width.value ?? 0) <= 800
204+
})
202205
</script>
203206

204207
<template>

frontend/components/notifications/NotificationsClientsTable.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const clientLink = computed(() => {
4343
<ClientOnly fallback-tag="span">
4444
<BcTable
4545
:data="clientsNotifications"
46-
data-key="notification_id"
46+
data-key="client_name"
4747
:cursor
4848
:page-size
4949
:selected-sort="query?.sort"

frontend/components/notifications/NotificationsNetworkTable.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const {
2222
<template>
2323
<div>
2424
<BcTableControl
25-
:title="$t('notifications.dashboards.title')"
25+
:title="$t('notifications.network.title')"
2626
:search-placeholder="$t('notifications.dashboards.search_placeholder')"
2727
@set-search="setSearch"
2828
>

0 commit comments

Comments
 (0)