Skip to content

Commit ae5b6e8

Browse files
feat: dark mode
1 parent 76d3042 commit ae5b6e8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+569
-427
lines changed

components.d.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/* eslint-disable */
2+
// @ts-nocheck
3+
// Generated by unplugin-vue-components
4+
// Read more: https://github.com/vuejs/core/pull/3399
5+
// biome-ignore lint: disable
6+
export {};
7+
8+
/* prettier-ignore */
9+
declare module 'vue' {
10+
export interface GlobalComponents {
11+
RouterLink: typeof import('vue-router')['RouterLink']
12+
RouterView: typeof import('vue-router')['RouterView']
13+
}
14+
}

frontend/src/App.vue

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
<template>
2-
<div class="w-screen h-screen antialiased">
3-
<div class="bg-black text-white text-sm text-center py-2 sm:hidden">
2+
<div
3+
class="w-screen h-screen antialiased"
4+
dark
5+
>
6+
<div
7+
class="bg-surface-black text-ink-white text-sm text-center py-2 sm:hidden"
8+
>
49
Drive works best on desktop.
510
</div>
611
<div
@@ -13,7 +18,7 @@
1318
/>
1419
<div
1520
id="dropzone"
16-
class="flex flex-col h-screen flex-grow overflow-hidden"
21+
class="flex flex-col h-screen flex-grow overflow-hidden bg-surface-white"
1722
>
1823
<router-view
1924
:key="$route.fullPath"

frontend/src/components/ActivityTree.vue

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
v-if="group.length && Object.keys(groupedActivityLog).length > 1"
88
class="px-5 pb-2 gap-x-2"
99
>
10-
<span class="text-base text-gray-600 font-medium leading-6">
10+
<span class="text-base text-ink-gray-5 font-medium leading-6">
1111
{{ __(i) }}
1212
</span>
1313
<div
@@ -21,8 +21,10 @@
2121
:label="activity.full_name"
2222
/>
2323
<div class="flex flex-col items-start justify-center">
24-
<span class="text-sm text-gray-900">{{ __(activity.message) }}</span>
25-
<span class="text-xs text-gray-600 mb-3">{{
24+
<span class="text-sm text-ink-gray-9">{{
25+
__(activity.message)
26+
}}</span>
27+
<span class="text-xs text-ink-gray-5 mb-3">{{
2628
activity.creation
2729
}}</span>
2830

@@ -35,7 +37,7 @@
3537
:strike-through="true"
3638
/>
3739

38-
<ArrowRight class="text-gray-500 h-4" />
40+
<ArrowRight class="text-ink-gray-4 h-4" />
3941
<ActivityTreeItem
4042
:activity="activity"
4143
:entity="entity"
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
<template>
2+
<div
3+
:title="title ? title : entity.title"
4+
class="border max-w-[220px] rounded-[7px] px-1 py-1 flex items-center justify-center gap-x-1 overflow-clip"
5+
>
6+
<svg
7+
v-if="!strikeThrough && entity.is_group"
8+
class="h-3.5 mr-0.5"
9+
:draggable="false"
10+
:style="{ fill: entity.color }"
11+
width="16"
12+
height="16"
13+
viewBox="0 0 16 16"
14+
fill="none"
15+
xmlns="http://www.w3.org/2000/svg"
16+
>
17+
<g clip-path="url(#clip0_1942_59507)">
18+
<path
19+
d="M7.83412 2.88462H1.5C1.22386 2.88462 1 3.10847 1 3.38462V12.5C1 13.6046 1.89543 14.5 3 14.5H13C14.1046 14.5 15 13.6046 15 12.5V2C15 1.72386 14.7761 1.5 14.5 1.5H9.94008C9.88623 1.5 9.83382 1.51739 9.79065 1.54957L8.13298 2.78547C8.04664 2.84984 7.94182 2.88462 7.83412 2.88462Z"
20+
/>
21+
</g>
22+
<defs>
23+
<clipPath id="clip0_1942_59507">
24+
<rect
25+
width="16"
26+
height="16"
27+
fill="white"
28+
/>
29+
</clipPath>
30+
</defs>
31+
</svg>
32+
<img
33+
v-else-if="!strikeThrough"
34+
loading="lazy"
35+
class="h-full"
36+
:src="getIconUrl(entity.file_type)"
37+
:draggable="false"
38+
/>
39+
<span
40+
class="text-sm line-clamp-1 text-ink-gray-6"
41+
:class="strikeThrough ? 'line-through ' : ' '"
42+
>{{ title ? title : entity.title }}</span
43+
>
44+
</div>
45+
</template>
46+
<script setup>
47+
import { getIconUrl } from "../utils/getIconUrl"
48+
49+
defineProps({
50+
title: {
51+
type: String,
52+
default: "File",
53+
required: false,
54+
},
55+
activity: {
56+
type: Object,
57+
required: true,
58+
},
59+
entity: {
60+
type: Object,
61+
required: true,
62+
},
63+
strikeThrough: {
64+
type: Boolean,
65+
default: false,
66+
required: false,
67+
},
68+
})
69+
</script>

frontend/src/components/ActivityTreeShare.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
class="border max-w-[220px] rounded-[7px] px-1 py-1 gap-x-1 flex items-center justify-center overflow-clip text-sm"
55
:class="
66
activity.action_type === 'share_remove'
7-
? 'strike-div text-gray-500'
8-
: 'text-gray-700'
7+
? 'strike-div text-ink-gray-4'
8+
: 'text-ink-gray-7'
99
"
1010
>
1111
<Avatar
@@ -24,7 +24,7 @@
2424
: activity.new_value
2525
}}</span>
2626
<span>∙</span>
27-
<span class="text-gray-600">
27+
<span class="text-ink-gray-5">
2828
{{
2929
activity.meta_value === "1"
3030
? "View"
@@ -40,8 +40,8 @@
4040
class="border max-w-[220px] rounded-[7px] px-1 py-1 gap-x-1 flex items-center justify-center overflow-clip text-sm"
4141
:class="
4242
activity.action_type === 'share_remove'
43-
? 'strike-div text-gray-400'
44-
: 'text-gray-800'
43+
? 'strike-div text-ink-gray-3'
44+
: 'text-ink-gray-8'
4545
"
4646
>
4747
<GeneralAccess
@@ -56,7 +56,7 @@
5656
activity.document_field === "everyone" ? "Organization" : "Public"
5757
}}</span>
5858
<span>∙</span>
59-
<span class="text-gray-600">{{
59+
<span class="text-ink-gray-5">{{
6060
activity.meta_value === "1"
6161
? "View"
6262
: activity.meta_value === "2"

frontend/src/components/AppSwitcher.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<template #target="{ togglePopover }">
77
<button
88
:class="[
9-
active ? 'bg-gray-100' : 'text-gray-800',
10-
'group w-full flex h-7 items-center justify-between rounded px-2 text-base hover:bg-gray-100',
9+
active ? 'bg-surface-gray-2' : 'text-ink-gray-8',
10+
'group w-full flex h-7 items-center justify-between rounded px-2 text-base hover:bg-surface-gray-2',
1111
]"
1212
@click.prevent="togglePopover()"
1313
>
@@ -20,22 +20,22 @@
2020
</template>
2121
<template #body>
2222
<div
23-
class="grid grid-cols-3 justify-between mx-3 p-2 rounded-lg border border-gray-100 bg-white shadow-xl"
23+
class="grid grid-cols-3 justify-between mx-3 p-2 rounded-lg border border-gray-100 bg-surface-white shadow-xl"
2424
>
2525
<div
2626
v-for="app in apps.data"
2727
:key="app.name"
2828
>
2929
<a
3030
:href="app.route"
31-
class="flex flex-col gap-1.5 rounded justify-center items-center py-2 px-1 hover:bg-gray-100"
31+
class="flex flex-col gap-1.5 rounded justify-center items-center py-2 px-1 hover:bg-surface-gray-2"
3232
>
3333
<img
3434
class="size-8"
3535
:src="app.logo"
3636
/>
3737
<div
38-
class="text-sm text-gray-700"
38+
class="text-sm text-ink-gray-7"
3939
@click="app.onClick"
4040
>
4141
{{ app.title }}

frontend/src/components/BottomBar.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<template>
2-
<div class="border-r bg-gray-50 transition-all">
2+
<div class="border-r bg-surface-menu-bar transition-all">
33
<div
44
ondragstart="return false;"
55
ondrop="return false;"
6-
class="grid grid-cols-6 h-14 items-center border-y border-gray-300 standalone:pb-4 px-1"
6+
class="grid grid-cols-6 h-14 items-center border-y border-outline-gray-2 standalone:pb-4 px-1"
77
>
88
<router-link
99
v-for="item in sidebarItems"
@@ -15,15 +15,15 @@
1515
class="flex flex-col items-center justify-center py-3 transition active:scale-95 rounded"
1616
:class="[
1717
item.highlight()
18-
? 'bg-white shadow-sm border-[0.5px] border-gray-300'
19-
: ' hover:bg-gray-100',
18+
? 'bg-surface-white shadow-sm border-[0.5px] border-outline-gray-2'
19+
: ' hover:bg-surface-gray-2',
2020
]"
2121
:href="href"
2222
@click="navigate && $emit('toggleMobileSidebar')"
2323
>
2424
<component
2525
:is="item.icon"
26-
class="stroke-1.5 self-center w-auto h-5.5 text-gray-800"
26+
class="stroke-1.5 self-center w-auto h-5.5 text-ink-gray-8"
2727
/>
2828
</a>
2929
</router-link>

frontend/src/components/CTADeleteDialog.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
:options="{ title: 'Are you sure?', size: 'sm' }"
55
>
66
<template #body-content>
7-
<p class="text-gray-600">
7+
<p class="text-ink-gray-5">
88
{{ current.message }}
99
</p>
1010
<div class="flex mt-5">

frontend/src/components/ContextMenu.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"
2121
>
2222
<div v-if="item.divider">
23-
<hr class="my-1 bg-gray-300" />
23+
<hr class="my-1 bg-surface-gray-4" />
2424
</div>
2525
<button
2626
v-else
@@ -33,7 +33,7 @@
3333
/>
3434
<span
3535
class="whitespace-nowrap"
36-
:class="item.danger ? 'text-red-600' : 'text-ink-gray-7'"
36+
:class="item.danger ? 'text-ink-red-4' : 'text-ink-gray-7'"
3737
>
3838
{{ item.label }}
3939
</span>

frontend/src/components/DeleteDialog.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
:options="{ title: 'Delete Forever?', size: 'sm' }"
55
>
66
<template #body-content>
7-
<p class="text-gray-600">
7+
<p class="text-ink-gray-5">
88
{{ entities.length === 1 ? `This item` : `${entities.length} items` }}
99
will be deleted forever. This is an irreversible process.
1010
</p>

0 commit comments

Comments
 (0)