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

fix cluttered ui #2005

Merged
merged 17 commits into from
Jan 28, 2025
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
5 changes: 0 additions & 5 deletions frontend/src/components/Mining/Buttons/EnrichButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -214,11 +214,6 @@ async function enrichPerson(
updateEmptyFieldsOnly: boolean,
contacts: Partial<Contact>,
) {
showNotification(
'success',
t('notification.summary'),
t('notification.enrichment_started_one', { toEnrich: 1 }),
);
totalTasks.value = 1;
await $api<EnrichContactResponse>('/enrich/person/', {
method: 'POST',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
icon="pi pi-times"
:label="$screenStore.size.md ? t('remove') : undefined"
severity="danger"
outlined
:disabled="isRemoveDisabled"
:loading="isRemovingContacts"
@click="showWarning()"
Expand Down
11 changes: 0 additions & 11 deletions frontend/src/components/Mining/MiningStepper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,6 @@
<StepPanel v-slot="{ active }" :value="3">
<CleanPanel v-if="active" />
</StepPanel>
<StepPanel v-slot="{ active }" :value="4">
<EnrichPanel v-if="active" />
</StepPanel>
</StepPanels>
</Stepper>
</Panel>
Expand All @@ -85,9 +82,6 @@ const MinePanel = defineAsyncComponent(
const CleanPanel = defineAsyncComponent(
() => import('./StepperPanels/CleanPanel.vue'),
);
const EnrichPanel = defineAsyncComponent(
() => import('./StepperPanels/EnrichPanel.vue'),
);

const StepWithPopover = defineAsyncComponent(
() => import('./StepperPanels/StepWithPopover.vue'),
Expand Down Expand Up @@ -118,9 +112,6 @@ const spinnerText = computed(() => {
if (!$leadminerStore.cleaningFinished) {
return t('cleaning');
}
if ($leadminerStore.activeEnrichment) {
return t('enriching');
}
return undefined;
});

Expand All @@ -143,15 +134,13 @@ onNuxtReady(() => {
"source": "Source",
"mining": "Mining",
"cleaning": "Cleaning",
"enriching": "Enriching",
"retrieving_mailboxes": "Retrieving mailboxes..."
},
"fr": {
"mine_contacts": "Extraire, nettoyer et enrichir vos contacts",
"source": "Source",
"mining": "Extraction",
"cleaning": "Nettoyage",
"enriching": "Enrichissement",
"retrieving_mailboxes": "Récupération des boîtes aux lettres..."
}
}
Expand Down
18 changes: 1 addition & 17 deletions frontend/src/components/Mining/StepperPanels/CleanPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<div class="flex flex-col gap-2 pt-6 justify-end md:flex-row">
<Button
v-if="activeTask"
class="w-full md:w-max border-solid border-2 border-black"
class="w-full md:w-max"
severity="contrast"
icon="pi pi-stop"
icon-pos="right"
Expand All @@ -33,21 +33,6 @@
:label="t('start_new_mining')"
@click="startNewMining"
/>
<Button
v-tooltip="t('enrich_button_tooltip')"
class="w-full md:w-max border-solid border-2 border-black"
severity="contrast"
:label="t('enrich_contacts', $contactsStore.selectedContactsCount)"
:disabled="
$contactsStore.selectedContactsCount === 0 ||
!$leadminerStore.cleaningFinished
"
@click="$stepper.next()"
>
<template #icon>
<span class="p-button-icon p-button-icon-right">💎</span>
</template>
</Button>
</div>
</div>
</template>
Expand All @@ -63,7 +48,6 @@
const $toast = useToast();
const $stepper = useMiningStepper();
const $leadminerStore = useLeadminerStore();
const $contactsStore = useContactsStore();
const activeTask = computed(() => $leadminerStore.miningTask !== undefined);
const taskStartedAt = computed(() => $leadminerStore.miningStartedAt);
const contactsToVerify = computed(() => $leadminerStore.createdContacts);
Expand Down Expand Up @@ -95,7 +79,7 @@
onMounted(() => {
if (verificationFinished.value) {
cleaningDoneNotification();
console.info('Cleaning finished, showing notification.');

Check warning on line 82 in frontend/src/components/Mining/StepperPanels/CleanPanel.vue

View workflow job for this annotation

GitHub Actions / frontend

Unexpected console statement
} else {
watch(verificationFinished, (finished) => {
console.log(finished);
Expand Down
164 changes: 0 additions & 164 deletions frontend/src/components/Mining/StepperPanels/EnrichPanel.vue

This file was deleted.

4 changes: 0 additions & 4 deletions frontend/src/components/Mining/StepperPanels/MinePanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,12 @@
"
:loading="$leadminerStore.isLoadingStartMining"
severity="contrast"
class="border-solid border-2 border-black"
:label="t('start_mining_now')"
@click="startMining"
/>
<Button
v-else
:loading="$leadminerStore?.isLoadingStartMining"
class="border-solid border-2 border-black"
severity="contrast"
icon="pi pi-stop"
icon-pos="right"
Expand Down Expand Up @@ -104,14 +102,12 @@
"
:loading="$leadminerStore.isLoadingStartMining"
severity="contrast"
class="border-solid border-2 border-black"
:label="t('start_mining_now')"
@click="startMining"
/>
<Button
v-else
:loading="$leadminerStore?.isLoadingStartMining"
class="border-solid border-2 border-black"
severity="contrast"
icon="pi pi-stop"
icon-pos="right"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
id="extract-source"
:disabled="!sourceModel"
severity="contrast"
class="font-semibold flex-shrink-0 border-solid border-2 border-black"
class="font-semibold flex-shrink-0"
:label="t('extract_contacts')"
@click="extractContacts()"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
<div :class="`${isActive ? 'p-step-active' : 'p-disabled'}`">
<button class="p-step-header">
<span class="p-step-number">{{ stepNumber }}</span>
<span class="p-step-title hidden md:block"> {{ title }} </span>
<span class="p-step-title hidden md:block">
{{ title }}
<template v-if="isPastStep">✅</template>
</span>
</button>
</div>
<span class="p-stepper-separator" />
Expand Down
8 changes: 0 additions & 8 deletions frontend/src/components/ProgressCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@
<ProgressBar
v-tooltip.bottom="{ value: props.progressTooltip, escape: false }"
:value="progressValue"
:pt="{
value: {
class: [progressColor],
},
}"
/>
</div>
</template>
Expand All @@ -66,9 +61,6 @@ const props = defineProps({
const progressStartedAt = computed(() => props.started);
const progressValue = computed(() => Math.round(props.progress * 100));
const progressPercentage = computed(() => Math.floor(progressValue.value));
const progressColor = computed(() =>
progressPercentage.value < 100 ? 'bg-amber-400' : 'bg-green-600',
);

const finishedTime = ref(0);

Expand Down
10 changes: 5 additions & 5 deletions frontend/src/pages/dashboard.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<template>
<div class="flex flex-col grow">
<mining-stepper v-model:collapsed="$stepper.collapsed" />
<MiningTable />
<div v-show="showTable">
<MiningTable />
</div>
</div>
</template>
<script setup lang="ts">
const MiningTable = defineAsyncComponent(
() => import('../components/Mining/Table/MiningTable.vue'),
);

const $stepper = useMiningStepper();
const $contactsStore = useContactsStore();
const showTable = computed(() => Boolean($contactsStore.contactsList));
$stepper.open();
</script>
6 changes: 3 additions & 3 deletions supabase/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ file_size_limit = "50MiB"
enabled = true
# The base URL of your website. Used as an allow-list for redirects and for constructing URLs used
# in emails.
site_url = "http://127.0.0.1:8082"
site_url = "http://localhost:8082"
# A list of *exact* URLs that auth providers are permitted to redirect to post authentication.
additional_redirect_urls = ["https://127.0.0.1:3000"]
# How long tokens are valid for, in seconds. Defaults to 3600 (1 hour), maximum 604,800 (1 week).
Expand Down Expand Up @@ -97,8 +97,8 @@ max_frequency = "1s"
[auth.external.google]
enabled = true
# Default google credentials for local development only.
client_id = "576299956482-5jdo6vnoi78t84hmv6g6j28egeg63b3f.apps.googleusercontent.com"
secret = "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"
client_id = "21825381029-993l33883t26n48fv11mmm049j6qn6lh.apps.googleusercontent.com"
secret = "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"
# Overrides the default auth redirectUrl.
redirect_uri = ""
# Overrides the default auth provider URL. Used to support self-hosted gitlab, single-tenant Azure,
Expand Down
Loading