Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Styling adjustments #59

Merged
merged 11 commits into from
Mar 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion frontend/src/assets/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@
font-weight: normal;
}

a,
a:visited {
color: $bcbox-link-text;
text-decoration: underline;
&:hover {
color: $bcbox-link-text-hover;
text-decoration: none;
}
}

.truncate {
max-width: 1px;
white-space: nowrap;
Expand Down Expand Up @@ -62,7 +72,7 @@ td .wrap-block{ width: inherit; }
padding-bottom: 0;

.svg-inline--fa {
color: $bcbox-icon-primary;
color: $bcbox-primary;
font-size: 1.8rem;
padding-right: .75rem;
padding-top: .15rem;
Expand Down
81 changes: 81 additions & 0 deletions frontend/src/assets/primevue.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,35 @@
background-color: transparent !important;
}

&.p-datatable-striped .p-datatable-tbody > tr {
&:nth-child(even) {
background-color: $bcbox-table-stripe-background;
}
}

tbody {
tr {
&.p-highlight {
background: $bcbox-highlight-background !important;
}

&:focus {
outline: none !important;
}
}
}

.p-checkbox {
.p-checkbox-box.p-highlight {
background-color: $bcbox-primary;
border-color: $bcbox-primary !important;

&:hover {
background-color: darken($bcbox-primary, 20%) !important;
}
}
}

.p-column-title {
font-weight: bold;
}
Expand All @@ -29,3 +58,55 @@
margin-left: 1rem;
}
}

// Primary color overrides for buttons and action items (checkboxes etc)
// Note this could be eventually replaced by a custom themeing (which has JUST been introduced in Primevue)
// once it is more settled implementation-wise
Comment on lines +62 to +64
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't adopt the PrimeVue open-source theme customization yet, just came out and has all these notes about changes. This is easy enough at this point

.p-button {
&:not(
.p-button-secondary,
.p-button-success,
.p-button-info,
.p-button-warning,
.p-button-help,
.p-button-danger
) {
color: $bcbox-primary !important;

&:not(.p-button-outlined, .p-button-text) {
background-color: $bcbox-primary;
border-color: $bcbox-primary;
color: $bcbox-outline-on-primary !important;
}
}
}

.p-checkbox,
.p-radiobutton {
&.p-checkbox-checked,
&.p-radiobutton-checked {
.p-checkbox-box,
.p-radiobutton-box {
background-color: $bcbox-primary;
border-color: $bcbox-primary !important;

&:hover {
background-color: darken($bcbox-primary, 20%) !important;
}
}
}
}

.p-inputswitch.p-inputswitch-checked {
.p-inputswitch-slider {
background-color: $bcbox-primary;
}

&:not(.p-disabled) {
&:hover {
.p-inputswitch-slider {
background-color: darken($bcbox-primary, 10%) !important;
}
}
}
}
9 changes: 8 additions & 1 deletion frontend/src/assets/variables.scss
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
// General font/etc colors
$bcbox-icon-primary: #036;
$bcbox-primary: #036;
$bcbox-link-text: #1a5a96;
$bcbox-link-text-hover: #00f;
$bcbox-outline-on-primary: #fff;

// Panel/row/etc backgrounds
$bcbox-highlight-background: #d9e1e8;
$bcbox-table-stripe-background: #f2f2f2;
4 changes: 0 additions & 4 deletions frontend/src/components/bucket/BucketList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,6 @@ h1 {
font-weight: bold;
}

h3 {
font-weight: bold;
}

button {
text-indent: 10px;
}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/bucket/BucketPermission.vue
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ onMounted( async () => {
<template #body="{ data }">
<Button
class="p-button-lg p-button-text"
style="color: red"
severity="danger"
@click="removeBucketUser(data.userId)"
>
<font-awesome-icon icon="fa-solid fa-user-xmark" />
Expand Down
10 changes: 9 additions & 1 deletion frontend/src/components/bucket/BucketTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ const checkUserManageBucket = (bucket: Bucket) => {
</template>
<Column header-style="width: 1%">
<template #body>
<font-awesome-icon icon="fa-solid fa-box-open" />
<span class="row-head">
<font-awesome-icon icon="fa-solid fa-box-open" />
</span>
</template>
</Column>
<Column
Expand Down Expand Up @@ -149,3 +151,9 @@ const checkUserManageBucket = (bucket: Bucket) => {
</Dialog>
</div>
</template>

<style scoped lang="scss">
.row-head {
color: $bcbox-primary;
}
</style>
17 changes: 14 additions & 3 deletions frontend/src/components/form/GridRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,24 @@ const props = withDefaults(defineProps<Props>(), {
<template>
<div class="col-12">
<div class="grid">
<div v-if="props.value && props.label" class="col-fixed">{{ label }}:</div>
<div v-if="props.value && props.link" class="col wrap-block w-9">
<div
v-if="props.value && props.label"
class="col-fixed"
>
{{ label }}:
</div>
<div
v-if="props.value && props.link"
class="col wrap-block w-9"
>
<router-link :to="props.link">
{{ props.value }}
</router-link>
</div>
<div v-if="props.value && !props.link" class="col wrap-block w-9">
<div
v-if="props.value && !props.link"
class="col wrap-block w-9"
>
{{ props.value }}
</div>
</div>
Expand Down
12 changes: 10 additions & 2 deletions frontend/src/components/layout/LoginButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,24 @@ function logout() {
<template>
<Button
v-if="!getIsAuthenticated"
primary
severity="secondary"
outlined
@click="login()"
>
Log in
</Button>
<Button
v-else
primary
severity="secondary"
outlined
@click="logout()"
>
Log out
</Button>
</template>

<style scoped>
button {
color: white !important;
}
</style>
1 change: 0 additions & 1 deletion frontend/src/components/layout/Navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ const { getIsAuthenticated } = storeToRefs(useAuthStore());
}
}
& ~ li {
border-left: 1px solid #9b9b9b;
margin-left: -0.6rem;
}
}
Expand Down
29 changes: 16 additions & 13 deletions frontend/src/components/layout/ProgressLoader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,30 @@ import { storeToRefs } from 'pinia';
import { ProgressBar } from '@/lib/primevue';
import { useAppStore } from '@/store';


// Store
const appStore = useAppStore();
const { getLoadingMode, getLoadingValue } = storeToRefs(appStore);
</script>

<template>
<ProgressBar
:mode="getLoadingMode"
:show-value="false"
:value="getLoadingValue"
/>
<div class="app-loader">
<ProgressBar
:mode="getLoadingMode"
:show-value="false"
:value="getLoadingValue"
/>
</div>
</template>

<style lang="scss" scoped>
.p-progressbar {
left: 0;
height: 0.1rem;
pointer-events: none;
position: sticky;
top: 0;
z-index: 1031
.app-loader {
position: fixed;
width: 100%;
z-index: 999;

.p-progressbar {
height: 0.15rem;
pointer-events: none;
}
}
</style>
8 changes: 7 additions & 1 deletion frontend/src/components/object/ObjectFileDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ watch( [props, getObjects], () => {
<template>
<div v-if="obj">
<div class="flex justify-content-start">
<div class="flex col align-items-center pl-0">
<div class="flex col align-items-center pl-0 heading">
<font-awesome-icon
icon="fa-solid fa-circle-info"
style="font-size: 2rem"
Expand Down Expand Up @@ -170,3 +170,9 @@ watch( [props, getObjects], () => {
<ObjectPermission :object-id="permissionsObjectId" />
</Dialog>
</template>

<style scoped lang="scss">
.heading svg {
color: $bcbox-primary;
}
</style>
11 changes: 8 additions & 3 deletions frontend/src/components/object/ObjectMetadata.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,22 @@ watch(props, () => {
<template>
<div class="grid details-grid grid-nogutter mb-2">
<div class="col-12">
<h2 class="font-bold">Metadata</h2>
<h2 class="font-bold">
Metadata
</h2>
</div>
<div>
<DataTable
v-if="objectMetadata"
:value="objectMetadata.metadata"
responsive-layout="scroll"
>
<Column field="key" header="Key">
<Column
field="key"
header="Key"
>
<template #body="{ data }">
<div >
<div>
{{ data.key }}:
</div>
</template>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/object/ObjectPermission.vue
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ onMounted(() => {
<template #body="{ data }">
<Button
class="p-button-lg p-button-text"
style="color: red"
severity="danger"
@click="removeObjectUser(data.userId)"
>
<font-awesome-icon icon="fa-solid fa-user-xmark" />
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/components/object/ObjectProperties.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ watch( props, () => {

<template>
<div class="grid details-grid grid-nogutter mb-2">
<div class="col-12">
<h2 class="font-bold">
Properties
</h2>
<div class="col-12">
<h2 class="font-bold">
Properties
</h2>
</div>

<GridRow
Expand Down
5 changes: 4 additions & 1 deletion frontend/src/components/object/ObjectSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ watch( props, () => {

<template>
<div class="flex justify-content-start">
<div class="flex col align-items-center">
<div class="flex col align-items-center heading">
<font-awesome-icon
icon="fa-solid fa-circle-info"
style="font-size: 2rem"
Expand Down Expand Up @@ -98,4 +98,7 @@ button {
margin-top: 15px;
text-indent: 10px;
}
.heading svg{
color: $bcbox-primary;
}
</style>
5 changes: 4 additions & 1 deletion frontend/src/views/DeveloperView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ const { getConfig } = storeToRefs(useConfigStore());
:to-copy="getAccessToken"
/>
</div>
{{ getAccessToken }}

<div class="wrap-block">
{{ getAccessToken }}
</div>

<div class="flex mt-3">
<h3>Profile</h3>
Expand Down
7 changes: 1 addition & 6 deletions frontend/src/views/HomeView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,15 @@ const { getConfig } = storeToRefs(useConfigStore());
</Message>

<h3 v-if="!getIsAuthenticated">
Please login to continue.
Please log in to continue.
</h3>
<h3 v-else>
Welcome to BCBox.
</h3>
<img src="@/assets/images/bcboxy.png" />
</template>

<style lang="scss" scoped>
h1 {
font-weight: bold;
}

h3 {
font-weight: bold;
}
</style>
Loading