Skip to content

Commit

Permalink
fix: tables alignments and font weight
Browse files Browse the repository at this point in the history
Signed-off-by: nabil salah <[email protected]>
  • Loading branch information
Nabil-Salah committed Aug 21, 2024
1 parent eea8f80 commit 3589a9d
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 20 deletions.
4 changes: 2 additions & 2 deletions frontend/src/components/CreateFlist.vue
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@
</div>

<v-btn
class="pr-5 rounded-pill background-green mb-8 mt-5"
class="pr-5 rounded-pill background-green mb-8 mt-5 text-white"
size="large"
width="50%"
@click="create"
Expand Down Expand Up @@ -250,6 +250,6 @@ const create = async () => {

<style>
.mn-height {
min-height: calc(100% - 6%);
min-height: calc(100% - 7%);
}
</style>
2 changes: 1 addition & 1 deletion frontend/src/components/Footer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
</template>
<style>
.v-footer {
height: 100px !important;
height: 7% !important;
}
</style>
30 changes: 20 additions & 10 deletions frontend/src/components/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@
</div> -->
</div>

<v-main class="d-flex justify-center mt-0 mn-height">
<v-main class="d-flex justify-center mt-0 mn-height"
style="--v-layout-left: 150px;">
<v-navigation-drawer
elevation="2"
app
class="position-absolute mx-height"
style="top: 30%; left: 0; height: fit-content"
style="top: 30%; left: 0; height: 63%; width: fit-content;"
>
<v-list>
<v-list-item nav>
<v-list-item-title class="text-h6"> Users</v-list-item-title>
<v-list-item-title class=" text-h6 " > Users</v-list-item-title>
</v-list-item>
<v-divider></v-divider>
<v-list-item density="compact"
Expand All @@ -29,8 +29,10 @@
@click="username = userName"
>
<template v-slot:prepend >
<v-icon icon="mdi-account" color="#1aa18f"></v-icon>
<v-list-item-title>
<v-icon icon="mdi-account" color="#1aa18f" style="font-size: 15px;"></v-icon>
<v-list-item-title style="padding: 2px 4px;
font-size: 12px;
font-weight: 300;">
{{ userName }}
</v-list-item-title>
</template>
Expand All @@ -50,13 +52,19 @@
:items="filteredFlist"
:headers="tableHeader"
dense

class="thick-border "
items-per-page="25"
>
<template #item.name="{ value }">
<v-icon icon="mdi-text-box" class="mr-1" color="grey"/>
<span class="file-name">{{ value }}</span>
</template>
</template>
<template #item.preview = "">
<v-btn @click="" class="elevation-0">
<v-icon icon="mdi-eye-outline" color="grey"></v-icon>
</v-btn>
</template>
<template #item.size="{value}">
{{filesize(value, {standard: "jedec", precision: 3})}}
</template>
Expand Down Expand Up @@ -95,6 +103,7 @@ import { toast } from "vue3-toastify";
import "vue3-toastify/dist/index.css";
import { api } from "../client.ts";
import {filesize} from "filesize";
import { title } from "process";
const baseURL = import.meta.env.VITE_API_URL;
Expand All @@ -104,7 +113,8 @@ const copyLink = (url: string) => {
};
const tableHeader = [
{ title: "Name", key: "name" },
{ title: "File Name", key: "name" },
{ title: "Preview", key:"preview"},
{ title: "Size", key: "size" },
{ title: "Last Modified", key: "last_modified" },
{ title: "Download", key: "path_uri", sortable: false },
Expand Down Expand Up @@ -156,7 +166,7 @@ watch(username, () => {
filteredFlistFn();
});
</script>
<style lang="css">
<style lang="css" scoped>
.mx-height {
max-height: 600px;
}
Expand All @@ -166,6 +176,6 @@ watch(username, () => {
}
.mn-height {
min-height: calc(100% - 7%);
min-height: calc(100% - 37%);
}
</style>
2 changes: 1 addition & 1 deletion frontend/src/components/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
>
</v-text-field>
<v-btn
class="pr-5 rounded-pill background-green"
class="pr-5 rounded-pill background-green text-white"
size="large"
width="50%"
@click="login"
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/components/Navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
v-bind="props"
style="font-size: 20px"
>
<v-icon icon="mdi-menu-down" end></v-icon>
<v-icon icon="mdi-account"></v-icon>
<!-- <v-icon icon="mdi-menu-down" end></v-icon> -->
</v-btn>
</template>
<v-list>
Expand Down
28 changes: 28 additions & 0 deletions frontend/src/components/PreviewFlist.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<template>

</template>

<script setup lang="ts">
import { onMounted, ref, watch } from "vue";
import Navbar from "./Navbar.vue";
import Footer from "./Footer.vue";
import image from "../assets/home.png";
import { useClipboard } from "@vueuse/core";
import { toast } from "vue3-toastify";
import "vue3-toastify/dist/index.css";
import { api } from "../client.ts";
import {filesize} from "filesize";
onMounted(async () => {
try {
//flists.value = (await api.get<FlistsResponseInterface>("/v1/api/fl")).data;
} catch (error: any) {
console.error("Failed to fetch flists", error);
toast.error(error.response?.data);
}
});
</script>
12 changes: 7 additions & 5 deletions frontend/src/components/UserFlist.vue
Original file line number Diff line number Diff line change
Expand Up @@ -132,17 +132,19 @@ onMounted(async () => {
.thick-border .v-data-table__wrapper {
border: 3px solid #000;
}
.v-data-table td {
.v-data-table-footer__items-per-page {
display: none !important;
}
.v-data-table td{
padding: 4px 8px;
font-size: 12px;
font-weight: bold;
font-weight: 500;
}
.file-name {
font-weight: bold;
font-weight: 500;
}
.mn-height {
min-height: calc(100% - 6%);
min-height: calc(100% - 7%);
}
</style>

0 comments on commit 3589a9d

Please sign in to comment.