Skip to content

Commit

Permalink
visual css adjustments after review
Browse files Browse the repository at this point in the history
  • Loading branch information
TimCsaky committed Nov 22, 2023
1 parent 33c32f9 commit 6a2a723
Show file tree
Hide file tree
Showing 15 changed files with 56 additions and 36 deletions.
2 changes: 1 addition & 1 deletion app/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ appRouter.get('/config', (_req: Request, res: Response, next: (err: unknown) =>
...config.get('frontend'),
gitRev: state.gitRev,
idpList: state.idpList,
version: process.env.npm_package_version
version: appVersion
});
} catch (err) {
next(err);
Expand Down
24 changes: 22 additions & 2 deletions frontend/src/assets/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ body {
"Droid Sans",
"Helvetica Neue",
sans-serif;
line-height: 1.6;
font-weight: normal;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
Expand Down Expand Up @@ -66,7 +67,6 @@ h5 {
}

p {
line-height: 1.5rem;
margin-top: 0;
}

Expand Down Expand Up @@ -114,7 +114,7 @@ a:visited {
margin: 1rem 5rem 1rem 5rem;
}
@media screen and (min-width: 1600px) {
margin: 1rem 10% 1rem 10%;
margin: 1rem 15% 1rem 15%;
}
}

Expand Down Expand Up @@ -159,6 +159,7 @@ a:visited {
}

.p-button {
border-width: 2px;
&:not(.p-button-secondary, .p-button-success, .p-button-info, .p-button-warning, .p-button-help, .p-button-danger) {
color: $bcbox-primary;
&:not(.p-button-outlined, .p-button-text) {
Expand Down Expand Up @@ -233,9 +234,20 @@ a:visited {
justify-content: right;
}

.header-center .p-column-header-content {
justify-content: center;
}
.content-center {
text-align: center !important;
}
.header-right .p-column-header-content {
justify-content: right;
}
.action-buttons {
text-align: right;
// width: 150px;
}

.action-buttons .p-button {
padding: 0;
margin-left: 1rem;
Expand All @@ -257,6 +269,7 @@ a:visited {

/* modals */
.bcbox-info-dialog {
width: 800px;
.p-dialog-header {
padding-bottom: 0;

Expand Down Expand Up @@ -291,6 +304,13 @@ a:visited {
justify-content: left;
}

.p-disabled .p-tabview-nav-link {
color: gray;
}
.p-tabview-nav:not(.p-disabled) .p-tabview-nav-link {
border-color: $bcbox-link-text;
}

/* side panel */

.side-panel {
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/components/bucket/BucketTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ watch(getBuckets, () => {
v-if="!getIsLoading"
class="flex justify-content-center"
>
<h4>There are no buckets associated with your account.</h4>
<h3>There are no buckets associated with your account.</h3>
</div>
</template>
<template #loadingicon>
Expand Down Expand Up @@ -299,9 +299,9 @@ watch(getBuckets, () => {
</Column>
<Column
header="Actions"
header-class="text-right"
body-class="action-buttons"
style="width: 250px"
header-class="header-right flex justify-content-end"
body-class="content-right action-buttons justify-content-end"
>
<template #body="{ node }">
<span v-if="!node.data.dummy">
Expand Down Expand Up @@ -355,7 +355,7 @@ watch(getBuckets, () => {
v-model:visible="permissionsVisible"
:draggable="false"
:modal="true"
class="bcbox-info-dialog permissions-modal"
class="bcbox-info-dialog"
>
<!-- eslint-enable vue/no-v-model-argument -->
<template #header>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/object/ObjectFileDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ watch([props, getObjects], async () => {
v-model:visible="permissionsVisible"
:draggable="false"
:modal="true"
class="bcbox-info-dialog permissions-modal"
class="bcbox-info-dialog"
>
<!-- eslint-enable vue/no-v-model-argument -->
<template #header>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/object/ObjectMetadata.vue
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ watch([props, tsGetMetadata, vsGetMetadata], () => {
v-model:visible="editing"
:draggable="false"
:modal="true"
class="bcbox-info-dialog permissions-modal"
class="bcbox-info-dialog"
>
<!-- eslint-enable vue/no-v-model-argument -->
<template #header>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/object/ObjectMetadataTagForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,13 @@ onBeforeMount(() => {
</span>

<Button
class="mt-5"
class="mt-5 mr-2"
label="Save"
type="submit"
icon="pi pi-check"
/>
<Button
class="p-button-text mt-2"
class="p-button-outlined mt-2"
label="Cancel"
icon="pi pi-times"
@click="onCancel"
Expand Down
11 changes: 6 additions & 5 deletions frontend/src/components/object/ObjectTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ const filters = ref({
v-if="!useAppStore().getIsLoading"
class="flex justify-content-center"
>
<h4>There are no objects associated with your account in this bucket.</h4>
<h3>There are no objects associated with your account in this bucket.</h3>
</div>
</template>
<template #loading>
Expand All @@ -171,6 +171,7 @@ const filters = ref({
field="name"
:sortable="true"
header="Name"
header-style="min-width: 25%"
body-class="truncate"
>
<template #body="{ data }">
Expand Down Expand Up @@ -219,9 +220,9 @@ const filters = ref({
</Column>
<Column
header="Actions"
style="width: 250px"
header-class="header-right flex justify-content-end"
body-class="content-right action-buttons justify-content-end"
header-style="min-width: 270px"
header-class="header-right"
body-class="action-buttons"
>
<template #body="{ data }">
<ShareObjectButton :id="data.id" />
Expand Down Expand Up @@ -277,7 +278,7 @@ const filters = ref({
v-model:visible="permissionsVisible"
:draggable="false"
:modal="true"
class="bcbox-info-dialog permissions-modal"
class="bcbox-info-dialog"
>
<!-- eslint-enable vue/no-v-model-argument -->
<template #header>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/object/ObjectTag.vue
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ watch([props, tsGetTagging, vsGetTagging], () => {
v-model:visible="editing"
:draggable="false"
:modal="true"
class="bcbox-info-dialog permissions-modal"
class="bcbox-info-dialog"
>
<!-- eslint-enable vue/no-v-model-argument -->
<template #header>
Expand Down
7 changes: 3 additions & 4 deletions frontend/src/components/object/ObjectUploadBasic.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,9 @@ const confirm = useConfirm();
const toast = useToast();
const confirmUpdate = () => {
let confirmMessage = 'Please confirm that you want to upload a new version.';
let confirmMessage = 'Please confirm that you want to upload a new version.';
if (versionStore.findS3VersionByObjectId(props.objectId) === null) {
confirmMessage = 'This is a non-versioned bucket. ' +
'Uploading a new version will overwrite the current version.';
confirmMessage = 'This is a non-versioned bucket. ' + 'Uploading a new version will overwrite the current version.';
}
confirm.require({
message: confirmMessage,
Expand Down Expand Up @@ -139,7 +138,7 @@ const closeModal = () => {
v-model:visible="editing"
:draggable="false"
:modal="true"
class="bcbox-info-dialog permissions-modal"
class="bcbox-info-dialog"
>
<!-- eslint-enable vue/no-v-model-argument -->
<template #header>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/object/ObjectUploadFile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ const closeModal = () => {
v-model:visible="editing"
:draggable="false"
:modal="true"
class="bcbox-info-dialog permissions-modal"
class="bcbox-info-dialog"
>
<!-- eslint-enable vue/no-v-model-argument -->
<template #header>
Expand Down
11 changes: 6 additions & 5 deletions frontend/src/components/object/ObjectVersion.vue
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ watch(getVersions, async () => {
<Column
field="updatedAt"
header="Creation date"
header-style="width: 33%"
>
<template #body="{ data }">
<div>
Expand All @@ -143,7 +142,6 @@ watch(getVersions, async () => {
<Column
field="createdBy"
header="Created by"
header-style="width: 33%"
>
<template #body="{ data }">
<div>
Expand All @@ -153,10 +151,13 @@ watch(getVersions, async () => {
</Column>
<Column
header="Actions"
header-class="header-right flex justify-content-end"
header-class="header-right"
body-class="action-buttons"
>
<!-- header-class="header-right flex justify-content-end"
body-class="content-right action-buttons justify-content-end"
header-style="width: 8em"
>
-->
<template #body="{ data }">
<DownloadObjectButton
v-if="
Expand Down Expand Up @@ -186,8 +187,8 @@ watch(getVersions, async () => {
class="action-link"
>
<Button
class="p-button-lg p-button-rounded p-button-text"
v-tooltip.bottom="'Version details'"
class="p-button-lg p-button-rounded p-button-text"
>
<font-awesome-icon icon="fa-solid fa-circle-info" />
</Button>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/object/share/ShareLinkContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const copyLinkToClipboard = () => {
:value="props.shareLink"
/>
<Button
class="p-button-outlined p-button-secondary"
class="p-button-outlined p-button-primary"
@click="copyLinkToClipboard"
>
<font-awesome-icon
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/object/share/ShareObjectButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ onMounted(() => {

<Button
v-tooltip.bottom="'Share object'"
class="p-button-lg p-button-text"
class="p-button-lg p-button-text primary"
aria-label="Share object"
@click="displayShareDialog = true"
>
Expand Down
12 changes: 6 additions & 6 deletions frontend/src/views/HomeView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const { getConfig } = storeToRefs(useConfigStore());

<template>
<div class="grid">
<div class="text-center col-12 lg:col-10 lg:col-offset-1">
<div class="text-center">
<Message
v-if="getConfig?.notificationBanner"
severity="warn"
Expand Down Expand Up @@ -57,7 +57,7 @@ const { getConfig } = storeToRefs(useConfigStore());

<img
src="@/assets/images/home_1.png"
class="border-1 drop-shadow w-6 sm:col-10 my-6 flex align-items-center"
class="border-1 drop-shadow w-8 sm:col-10 mt-5 mb-8 flex align-items-center"
alt="Screenshot of BCBox's file list interface:
a list of example files and possible actions including Upload, Download and Delete."
/>
Expand Down Expand Up @@ -87,7 +87,7 @@ const { getConfig } = storeToRefs(useConfigStore());
</div>

<div class="grid mb-4 text-left">
<div class="col-6">
<div class="col-6 pr-5">
<h3 class="mb-3">Manage access and share</h3>
<p class="text-xl">
You can assign custom permissions to other users through IDIR or BCeID authentication.
Expand All @@ -98,7 +98,7 @@ const { getConfig } = storeToRefs(useConfigStore());
information without the consent of your Ministry Privacy Officer.
</p>
</div>
<div class="col-6 pl-5">
<div class="col-6">
<img
src="@/assets/images/home_3.png"
class="border-1 drop-shadow"
Expand All @@ -124,12 +124,12 @@ const { getConfig } = storeToRefs(useConfigStore());

<router-link :to="{ name: RouteNames.LIST_BUCKETS }">
<Button>
{{ getIsAuthenticated ? 'Go to My Buckets' : 'Log in to BCBox' }}
{{ getIsAuthenticated ? 'Go to My Buckets' : 'Log in to get started' }}
</Button>
</router-link>

<h2 class="mt-8 mb-4">Terms of Use</h2>
<div class="text-left">
<div class="text-left text-xl">
<ul>
<li>
It is your responsibility to comply with the
Expand Down
1 change: 0 additions & 1 deletion frontend/tests/unit/components/layout/Footer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ describe('Footer.vue', () => {
}
});

console.log('a', wrapper);
const links = wrapper.findAll('a');
expect(links).toHaveLength(7);
});
Expand Down

0 comments on commit 6a2a723

Please sign in to comment.