Skip to content

Commit 410ae8b

Browse files
authored
Merge pull request #229 from bcgov/icons
add material design icons
2 parents da79352 + b783a97 commit 410ae8b

26 files changed

+146
-130
lines changed

frontend/package-lock.json

Lines changed: 11 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"axios": "^1.6.8",
3535
"date-fns": "^3.6.0",
3636
"filesize": "^10.1.0",
37+
"material-icons": "^1.13.14",
3738
"oidc-client-ts": "^3.0.1",
3839
"pinia": "^2.1.7",
3940
"pinia-plugin-persistedstate": "^3.2.1",

frontend/src/assets/main.scss

Lines changed: 42 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ div:focus-visible {
107107
max-width: 1px;
108108
white-space: nowrap;
109109

110-
> div {
110+
> div, > span {
111111
overflow: hidden;
112112
text-overflow: ellipsis;
113113
}
@@ -128,6 +128,7 @@ div:focus-visible {
128128
/* layout */
129129
.layout-main {
130130
margin: 1rem;
131+
min-height: 600px; // ensure adequte space below main content on short screens
131132
@media screen and (min-width: 992px) {
132133
margin: 1rem 5rem 1rem 5rem;
133134
}
@@ -164,9 +165,20 @@ div:focus-visible {
164165
}
165166
}
166167

167-
/* buttons */
168+
/* icons and buttons */
169+
170+
.material-icons-round,
171+
.material-icons-outlined {
172+
color: $bcbox-icon-default;
173+
&:hover {
174+
color: $bcbox-primary;
175+
text-decoration: none;
176+
}
177+
&.icon-medium { font-size: 200%; }
178+
&.icon-large { font-size: 250%; }
179+
}
180+
168181
.p-button:hover {
169-
text-decoration: underline;
170182
opacity: 0.8;
171183
}
172184
.p-button .p-button-icon:before {
@@ -178,17 +190,40 @@ div:focus-visible {
178190
border-width: 2px;
179191
&:not(.p-button-secondary, .p-button-success, .p-button-info, .p-button-warning, .p-button-help, .p-button-danger) {
180192
color: $bcbox-primary;
193+
194+
&:not(.p-button-text) span[class^="material-icons-"] {
195+
color: $bcbox-primary;
196+
}
197+
181198
&:not(.p-button-outlined, .p-button-text) {
182199
background-color: $bcbox-primary;
183200
border-color: $bcbox-primary;
184201
color: $bcbox-outline-on-primary;
202+
203+
span[class^="material-icons-"] {
204+
color: white;
205+
}
185206
}
186207
}
187208
}
188209

189210
.p-button-outlined {
190211
border-width: 2px;
212+
&.p-disabled, &.p-disabled span {
213+
color: var(--text-color) !important;
214+
}
215+
}
216+
217+
// 'permanently delete' button
218+
.deleted-object-list {
219+
.btn-delete {
220+
&, & span { color: red !important; }
221+
&.p-disabled, &.p-disabled span {
222+
color: var(--text-color) !important;
223+
}
224+
}
191225
}
226+
192227
.p-confirm-dialog-reject {
193228
border: 2px solid $bcbox-primary;
194229
}
@@ -271,7 +306,7 @@ div:focus-visible {
271306

272307
.action-buttons .p-button {
273308
padding: 0;
274-
margin-left: 1rem;
309+
margin-left: .8rem;
275310
font-size: 1.25rem;
276311
}
277312
}
@@ -294,8 +329,8 @@ div:focus-visible {
294329
.p-dialog-header {
295330
padding-bottom: 0;
296331

297-
.svg-inline--fa {
298-
color: $bcbox-primary;
332+
.svg-inline--fa,
333+
span[class^="material-icons-"] {
299334
font-size: 1.8rem;
300335
padding-right: 0.75rem;
301336
border: 0;
@@ -310,7 +345,7 @@ div:focus-visible {
310345
.bcbox-info-dialog-subhead {
311346
font-weight: normal;
312347
margin-bottom: 1.5rem;
313-
padding-left: 3.1rem;
348+
padding-left: 2.6rem;
314349
@extend .wrap-block;
315350
}
316351
}

frontend/src/assets/variables.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ $bcbox-outline-on-primary: #fff;
1414
$bcbox-success: #2e8540;
1515
$bcbox-error: #d8292f;
1616
$bcbox-noaction: #606060;
17+
$bcbox-icon-default: #5f6368;
1718

1819
// highlighted sections, table rows
1920
$bcbox-highlight-background: #d9e1e8;

frontend/src/components/bucket/BucketChildConfig.vue

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ const onCancel = () => {
7070
aria-label="Add subfolder"
7171
@click="showDialog(true)"
7272
>
73-
<font-awesome-icon icon="fa-solid fa-folder-plus" />
73+
<span class="material-icons-outlined">create_new_folder</span>
7474
</Button>
7575

7676
<Dialog
@@ -84,10 +84,7 @@ const onCancel = () => {
8484
@after-hide="onDialogHide"
8585
>
8686
<template #header>
87-
<font-awesome-icon
88-
icon="fas fa-cog"
89-
fixed-width
90-
/>
87+
<span class="material-icons-outlined">create_new_folder</span>
9188
<span
9289
id="subfolder_label"
9390
class="p-dialog-title"

frontend/src/components/bucket/BucketList.vue

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,17 @@ onMounted(async () => {
6969
<div class="flex-none align-items-right">
7070
<Button
7171
v-if="usePermissionStore().isUserElevatedRights()"
72-
label="Add a new storage location source"
73-
class="p-button-outlined my-4"
74-
data-test="connect-bucket"
72+
v-tooltip.bottom="'Add a new storage location source'"
73+
label="Connect Storage"
74+
class="my-4 p-button-primary"
75+
data-test="connect-storage"
7576
aria-label="Add a new storage location source"
76-
icon="pi pi-plus"
7777
@click="showBucketConfig()"
7878
@keyup.enter="showBucketConfig()"
79-
/>
79+
>
80+
<span class="material-icons-outlined mr-2 primary">create_new_folder</span>
81+
Connect Storage
82+
</Button>
8083

8184
<!-- Bucket config dialog -->
8285
<Dialog
@@ -90,10 +93,7 @@ onMounted(async () => {
9093
@update:visible="closeBucketConfig"
9194
>
9295
<template #header>
93-
<font-awesome-icon
94-
icon="fas fa-cog"
95-
fixed-width
96-
/>
96+
<span class="material-icons-outlined">settings</span>
9797
<span
9898
id="config_dialog_label"
9999
class="p-dialog-title"

frontend/src/components/bucket/BucketSidebar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ watch(props, () => {
8282
aria-describedby="side-panel_desc"
8383
>
8484
<div class="flex panel-header align-items-start">
85-
<font-awesome-icon icon="fa-solid fa-circle-info" />
85+
<span class="material-icons-outlined">info</span>
8686
<h1 class="mt-0 ml-3 flex-grow-1">Folder details</h1>
8787
<Button
8888
aria-label="Close"

frontend/src/components/bucket/BucketTable.vue

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,8 @@ watch(getBuckets, () => {
296296
header="Actions"
297297
header-class="text-right"
298298
body-class="action-buttons"
299-
style="width: 300px"
300-
>
299+
header-style="width: 320px"
300+
>
301301
<template #body="{ node }">
302302
<span v-if="!node.data.dummy">
303303
<ShareButton
@@ -315,7 +315,7 @@ watch(getBuckets, () => {
315315
aria-label="Configure folder"
316316
@click="showBucketConfig(node.data)"
317317
>
318-
<font-awesome-icon icon="fas fa-cog" />
318+
<span class="material-icons-outlined">settings</span>
319319
</Button>
320320
<Button
321321
v-if="permissionStore.isBucketActionAllowed(node.data.bucketId, getUserId, Permissions.MANAGE)"
@@ -325,7 +325,7 @@ watch(getBuckets, () => {
325325
aria-label="Folder permissions"
326326
@click="showPermissions(node.data.bucketId, node.data.bucketName)"
327327
>
328-
<font-awesome-icon icon="fa-solid fa-users" />
328+
<span class="material-icons-outlined">supervisor_account</span>
329329
</Button>
330330
<SyncButton
331331
v-if="permissionStore.isBucketActionAllowed(node.data.bucketId, getUserId, Permissions.READ)"
@@ -339,17 +339,17 @@ watch(getBuckets, () => {
339339
aria-label="Folder details"
340340
@click="showSidebarInfo(node.data.bucketId)"
341341
>
342-
<font-awesome-icon icon="fa-solid fa-circle-info" />
343-
</Button>
342+
<span class="material-icons-outlined">info</span>
343+
</Button>
344344
<Button
345345
v-if="permissionStore.isBucketActionAllowed(node.data.bucketId, getUserId, Permissions.DELETE)"
346346
v-tooltip.bottom="'Delete folder'"
347347
class="p-button-lg p-button-text p-button-danger"
348348
aria-label="Delete folder"
349349
@click="confirmDeleteBucket(node.data.bucketId)"
350350
>
351-
<font-awesome-icon icon="fa-solid fa-trash" />
352-
</Button>
351+
<span class="material-icons-outlined">delete</span>
352+
</Button>
353353
</span>
354354
</template>
355355
</Column>
@@ -368,10 +368,7 @@ watch(getBuckets, () => {
368368
>
369369
<!-- eslint-enable vue/no-v-model-argument -->
370370
<template #header>
371-
<font-awesome-icon
372-
icon="fas fa-users"
373-
fixed-width
374-
/>
371+
<span class="material-icons-outlined">supervisor_account</span>
375372
<span
376373
id="permissions_label"
377374
class="p-dialog-title"

frontend/src/components/common/BulkPermissionResults.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const exportCSV = () => {
4747
class="p-button p-button-text"
4848
@click="exportCSV()"
4949
>
50-
<font-awesome-icon icon="fas fa-download" />
50+
<span class="material-icons-outlined">file_download</span>
5151
</Button>
5252
</div>
5353
<Column

frontend/src/components/common/ShareButton.vue

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import { storeToRefs } from 'pinia';
33
import { computed, ref } from 'vue';
44
5-
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
65
import { Invite, Share } from '@/components/common';
76
import { Button, Dialog, TabView, TabPanel } from '@/lib/primevue';
87
@@ -79,10 +78,7 @@ const showDialog = (x: boolean) => {
7978
@after-hide="onDialogHide"
8079
>
8180
<template #header>
82-
<font-awesome-icon
83-
icon="fa-solid fa-share-alt"
84-
fixed-width
85-
/>
81+
<span class="material-icons-outlined">ios_share</span>
8682
<span
8783
id="share_dialog_label"
8884
class="p-dialog-title"
@@ -151,8 +147,8 @@ const showDialog = (x: boolean) => {
151147
:aria-label="`Share ${props.labelText.toLocaleLowerCase()}`"
152148
@click="showDialog(true)"
153149
>
154-
<font-awesome-icon icon="fa-solid fa-share-alt" />
155-
</Button>
150+
<span class="material-icons-outlined">ios_share</span>
151+
</Button>
156152
</template>
157153

158154
<style scoped lang="scss">

0 commit comments

Comments
 (0)