mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-18 13:12:16 +01:00
fix layout bug in time view with small time entries, fixes ST-414
This commit is contained in:
committed by
Constantin Graf
parent
b391f47d1b
commit
3b41d90b07
@@ -101,13 +101,16 @@ const showFreeUpgradeBanner = computed(
|
|||||||
<MainContainer class="flex items-center justify-between">
|
<MainContainer class="flex items-center justify-between">
|
||||||
<div class="flex items-center space-x-1.5">
|
<div class="flex items-center space-x-1.5">
|
||||||
<XCircleIcon class="w-4 text-white/50"></XCircleIcon>
|
<XCircleIcon class="w-4 text-white/50"></XCircleIcon>
|
||||||
<span class="font-medium">
|
<div class="flex items-center flex-col md:flex-row">
|
||||||
Your are currently using the Free Plan.
|
<span class="font-medium">
|
||||||
</span>
|
You are currently using the Free Plan.
|
||||||
<span
|
</span>
|
||||||
>To unlock all premium features & support the development of
|
<span
|
||||||
solidtime, please upgrade your plan.</span
|
>To unlock all premium features & support the
|
||||||
>
|
development of solidtime, please upgrade your
|
||||||
|
plan.</span
|
||||||
|
>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-center space-x-2">
|
<div class="flex items-center space-x-2">
|
||||||
<Link
|
<Link
|
||||||
|
|||||||
@@ -79,23 +79,24 @@ const page = usePage<{
|
|||||||
'!flex bg-default-background w-full z-[9999999999]':
|
'!flex bg-default-background w-full z-[9999999999]':
|
||||||
showSidebarMenu,
|
showSidebarMenu,
|
||||||
}"
|
}"
|
||||||
class="flex-shrink-0 h-screen hidden fixed w-[230px] 2xl:w-[250px] px-2.5 2xl:px-4 py-4 sm:flex flex-col justify-between overflow-y-scroll"
|
class="flex-shrink-0 h-screen hidden fixed w-[230px] 2xl:w-[250px] px-2.5 2xl:px-4 py-4 lg:flex flex-col justify-between">
|
||||||
style="
|
|
||||||
scrollbar-width: thin;
|
|
||||||
scrollbar-color: var(--color-bg-primary) transparent;
|
|
||||||
">
|
|
||||||
<div>
|
<div>
|
||||||
<div
|
<div
|
||||||
class="border-b border-default-background-separator pb-2 flex justify-between">
|
class="border-b border-default-background-separator pb-2 flex justify-between">
|
||||||
<OrganizationSwitcher class="w-full"></OrganizationSwitcher>
|
<OrganizationSwitcher class="w-full"></OrganizationSwitcher>
|
||||||
<XMarkIcon
|
<XMarkIcon
|
||||||
@click="showSidebarMenu = false"
|
@click="showSidebarMenu = false"
|
||||||
class="w-8 sm:hidden"></XMarkIcon>
|
class="w-8 lg:hidden"></XMarkIcon>
|
||||||
</div>
|
</div>
|
||||||
<div class="border-b border-default-background-separator">
|
<div class="border-b border-default-background-separator">
|
||||||
<CurrentSidebarTimer></CurrentSidebarTimer>
|
<CurrentSidebarTimer></CurrentSidebarTimer>
|
||||||
</div>
|
</div>
|
||||||
<nav class="pt-2">
|
<nav
|
||||||
|
class="pt-2 overflow-y-scroll"
|
||||||
|
style="
|
||||||
|
scrollbar-width: thin;
|
||||||
|
scrollbar-color: var(--color-bg-primary) transparent;
|
||||||
|
">
|
||||||
<ul>
|
<ul>
|
||||||
<NavigationSidebarItem
|
<NavigationSidebarItem
|
||||||
title="Dashboard"
|
title="Dashboard"
|
||||||
@@ -205,9 +206,9 @@ const page = usePage<{
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-1 sm:ml-[230px] 2xl:ml-[250px]">
|
<div class="flex-1 lg:ml-[230px] 2xl:ml-[250px] min-w-0">
|
||||||
<div
|
<div
|
||||||
class="sm:hidden w-full px-3 py-1 border-b border-b-default-background-separator text-muted flex justify-between items-center">
|
class="lg:hidden w-full px-3 py-1 border-b border-b-default-background-separator text-muted flex justify-between items-center">
|
||||||
<Bars3Icon
|
<Bars3Icon
|
||||||
@click="showSidebarMenu = !showSidebarMenu"
|
@click="showSidebarMenu = !showSidebarMenu"
|
||||||
class="w-7 text-muted"></Bars3Icon>
|
class="w-7 text-muted"></Bars3Icon>
|
||||||
|
|||||||
@@ -106,13 +106,13 @@ async function createClient(
|
|||||||
v-model:show="showManualTimeEntryModal"></TimeEntryCreateModal>
|
v-model:show="showManualTimeEntryModal"></TimeEntryCreateModal>
|
||||||
<AppLayout title="Dashboard" data-testid="time_view">
|
<AppLayout title="Dashboard" data-testid="time_view">
|
||||||
<MainContainer
|
<MainContainer
|
||||||
class="pt-5 sm:pt-8 pb-4 sm:pb-6 border-b border-default-background-separator">
|
class="pt-5 lg:pt-8 pb-4 lg:pb-6 border-b border-default-background-separator">
|
||||||
<div
|
<div
|
||||||
class="sm:flex items-end sm:divide-x divide-default-background-separator divide-y sm:divide-y-0 space-y-2 sm:space-y-0 sm:space-x-2">
|
class="lg:flex items-end lg:divide-x divide-default-background-separator divide-y lg:divide-y-0 space-y-2 lg:space-y-0 lg:space-x-2">
|
||||||
<div class="flex-1">
|
<div class="flex-1">
|
||||||
<TimeTracker></TimeTracker>
|
<TimeTracker></TimeTracker>
|
||||||
</div>
|
</div>
|
||||||
<div class="pb-2 pt-2 sm:pt-0 sm:pl-4 flex justify-center">
|
<div class="pb-2 pt-2 lg:pt-0 lg:pl-4 flex justify-center">
|
||||||
<SecondaryButton
|
<SecondaryButton
|
||||||
class="w-full text-center flex justify-center"
|
class="w-full text-center flex justify-center"
|
||||||
@click="showManualTimeEntryModal = true"
|
@click="showManualTimeEntryModal = true"
|
||||||
|
|||||||
@@ -73,39 +73,41 @@ const expanded = ref(false);
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
class="border-b border-default-background-separator transition"
|
class="border-b border-default-background-separator min-w-0 transition"
|
||||||
data-testid="time_entry_row">
|
data-testid="time_entry_row">
|
||||||
<MainContainer>
|
<MainContainer class="min-w-0">
|
||||||
<div class="sm:flex py-1.5 items-center justify-between group">
|
<div
|
||||||
|
class="sm:flex py-1.5 items-center min-w-0 justify-between group">
|
||||||
<div class="flex space-x-3 items-center min-w-0">
|
<div class="flex space-x-3 items-center min-w-0">
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
class="h-4 w-4 rounded bg-card-background border-input-border text-accent-500/80 focus:ring-accent-500/80" />
|
class="h-4 w-4 rounded bg-card-background border-input-border text-accent-500/80 focus:ring-accent-500/80" />
|
||||||
<div class="flex items-center">
|
<div class="flex items-center min-w-0">
|
||||||
<GroupedItemsCountButton
|
<GroupedItemsCountButton
|
||||||
:expanded="expanded"
|
:expanded="expanded"
|
||||||
@click="expanded = !expanded">
|
@click="expanded = !expanded">
|
||||||
{{ timeEntry?.timeEntries?.length }}
|
{{ timeEntry?.timeEntries?.length }}
|
||||||
</GroupedItemsCountButton>
|
</GroupedItemsCountButton>
|
||||||
<TimeEntryDescriptionInput
|
<TimeEntryDescriptionInput
|
||||||
|
class="min-w-0"
|
||||||
@changed="updateTimeEntryDescription"
|
@changed="updateTimeEntryDescription"
|
||||||
:modelValue="
|
:modelValue="
|
||||||
timeEntry.description
|
timeEntry.description
|
||||||
"></TimeEntryDescriptionInput>
|
"></TimeEntryDescriptionInput>
|
||||||
|
<TimeTrackerProjectTaskDropdown
|
||||||
|
:clients
|
||||||
|
:createProject
|
||||||
|
:createClient
|
||||||
|
:projects="projects"
|
||||||
|
:tasks="tasks"
|
||||||
|
:showBadgeBorder="false"
|
||||||
|
@changed="updateProjectAndTask"
|
||||||
|
:project="timeEntry.project_id"
|
||||||
|
:currency="currency"
|
||||||
|
:task="
|
||||||
|
timeEntry.task_id
|
||||||
|
"></TimeTrackerProjectTaskDropdown>
|
||||||
</div>
|
</div>
|
||||||
<TimeTrackerProjectTaskDropdown
|
|
||||||
:clients
|
|
||||||
:createProject
|
|
||||||
:createClient
|
|
||||||
:projects="projects"
|
|
||||||
:tasks="tasks"
|
|
||||||
:showBadgeBorder="false"
|
|
||||||
@changed="updateProjectAndTask"
|
|
||||||
:project="timeEntry.project_id"
|
|
||||||
:currency="currency"
|
|
||||||
:task="
|
|
||||||
timeEntry.task_id
|
|
||||||
"></TimeTrackerProjectTaskDropdown>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-center font-medium lg:space-x-2">
|
<div class="flex items-center font-medium lg:space-x-2">
|
||||||
<TimeEntryRowTagDropdown
|
<TimeEntryRowTagDropdown
|
||||||
|
|||||||
@@ -24,11 +24,12 @@ const displaysPlaceholder = computed(() => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div
|
||||||
<div class="relative text-sm font-medium">
|
class="relative min-w-0 flex-1 text-ellipsis whitespace-nowrap overflow-hidden">
|
||||||
|
<div class="relative text-sm font-medium min-w-0">
|
||||||
<div
|
<div
|
||||||
:class="[
|
:class="[
|
||||||
'opacity-0 py-2 text-base whitespace-pre pl-3 pr-1',
|
'opacity-0 py-2 text-base whitespace-pre min-w-0 pl-3 pr-1',
|
||||||
{ 'min-w-[150px]': displaysPlaceholder },
|
{ 'min-w-[150px]': displaysPlaceholder },
|
||||||
]">
|
]">
|
||||||
{{ liveDataValue }}
|
{{ liveDataValue }}
|
||||||
@@ -40,7 +41,7 @@ const displaysPlaceholder = computed(() => {
|
|||||||
@input="onInput"
|
@input="onInput"
|
||||||
@keydown.enter="onChange"
|
@keydown.enter="onChange"
|
||||||
placeholder="Add a description"
|
placeholder="Add a description"
|
||||||
class="absolute px-0 h-full pl-3 pr-1 left-0 top-0 w-full text-sm lg:text-base text-white font-medium bg-transparent focus-visible:ring-0 rounded-lg border-0" />
|
class="absolute px-0 h-full min-w-0 pl-3 pr-1 left-0 top-0 w-full text-sm lg:text-base text-white font-medium bg-transparent focus-visible:ring-0 rounded-lg border-0" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -61,18 +61,17 @@ function updateProjectAndTask(projectId: string, taskId: string) {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
class="border-b border-default-background-separator transition"
|
class="border-b border-default-background-separator transition min-w-0"
|
||||||
data-testid="time_entry_row">
|
data-testid="time_entry_row">
|
||||||
<MainContainer>
|
<MainContainer class="min-w-0">
|
||||||
<div
|
<div
|
||||||
class="sm:flex py-1 lg:py-1.5 items-center justify-between group">
|
class="sm:flex py-1 lg:py-1.5 min-w-0 items-center justify-between group">
|
||||||
<div class="flex space-x-1 items-center min-w-0">
|
<div class="flex space-x-1 items-center min-w-0">
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
class="h-4 w-4 rounded bg-card-background border-input-border text-accent-500/80 focus:ring-accent-500/80" />
|
class="h-4 w-4 rounded bg-card-background border-input-border text-accent-500/80 focus:ring-accent-500/80" />
|
||||||
<div class="w-7 h-7" v-if="indent === true"></div>
|
<div class="w-7 h-7" v-if="indent === true"></div>
|
||||||
<TimeEntryDescriptionInput
|
<TimeEntryDescriptionInput
|
||||||
class="flex-1 max-w-[220px] md:max-w-[400px] text-ellipsis overflow-ellipsis"
|
|
||||||
@changed="updateTimeEntryDescription"
|
@changed="updateTimeEntryDescription"
|
||||||
:modelValue="
|
:modelValue="
|
||||||
timeEntry.description
|
timeEntry.description
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ function updateTimeEntryDescription() {
|
|||||||
class="flex items-center relative @container"
|
class="flex items-center relative @container"
|
||||||
data-testid="dashboard_timer">
|
data-testid="dashboard_timer">
|
||||||
<div
|
<div
|
||||||
class="flex flex-col sm:flex-row w-full justify-between rounded-lg bg-card-background border-card-border border transition shadow-card">
|
class="flex flex-col lg:flex-row w-full justify-between rounded-lg bg-card-background border-card-border border transition shadow-card">
|
||||||
<div class="flex flex-1 items-center pr-6">
|
<div class="flex flex-1 items-center pr-6">
|
||||||
<input
|
<input
|
||||||
placeholder="What are you working on?"
|
placeholder="What are you working on?"
|
||||||
|
|||||||
Reference in New Issue
Block a user