From 41a3b2905338ed7786b9100eaa3b7940c5e861d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20LAGACHE?= Date: Tue, 23 Jun 2026 16:06:10 +0200 Subject: [PATCH] refactor(channel): reorganize into components/schemas, nest notifications+storages under components --- .../(admin)/notifications/channels/page.tsx | 4 +-- .../(admin)/storages/channels/page.tsx | 4 +-- .../channel-add-edit-modal.tsx | 4 +-- .../channel/{ => components}/channel-card.tsx | 6 ++-- .../channel-delete-button.tsx | 6 ++-- .../{ => components}/channel-edit-button.tsx | 8 ++--- .../channel/{ => components}/channel-form.tsx | 14 ++++----- .../{ => components}/channel-test-button.tsx | 2 +- .../{ => components}/channels-helpers.tsx | 30 +++++++++---------- .../channels-notification-helper.tsx | 2 +- .../{ => components}/channels-section.tsx | 6 ++-- .../channels-storage-helper.tsx | 2 +- .../notifications/channel.action.ts | 2 +- .../notifications/discord.form.tsx | 0 .../notifications/discord.schema.ts | 0 .../{ => components}/notifications/discord.ts | 0 .../notifications/gotify.form.tsx | 0 .../notifications/gotify.schema.ts | 0 .../{ => components}/notifications/gotify.ts | 0 .../{ => components}/notifications/index.ts | 16 +++++----- .../notifications/nextcloud.form.tsx | 0 .../notifications/nextcloud.schema.ts | 0 .../notifications/nextcloud.ts | 0 .../notifications/ntfy.form.tsx | 0 .../notifications/ntfy.schema.ts | 0 .../{ => components}/notifications/ntfy.ts | 0 .../notifications/pushover.form.tsx | 2 +- .../notifications/pushover.schema.ts | 0 .../notifications/pushover.ts | 0 .../notifications/slack.form.tsx | 0 .../notifications/slack.schema.ts | 0 .../{ => components}/notifications/slack.ts | 0 .../notifications/smtp.form.tsx | 0 .../notifications/smtp.schema.ts | 0 .../{ => components}/notifications/smtp.ts | 0 .../notifications/teams.form.tsx | 0 .../notifications/teams.schema.ts | 0 .../{ => components}/notifications/teams.ts | 0 .../notifications/telegram.form.tsx | 0 .../notifications/telegram.schema.ts | 0 .../notifications/telegram.ts | 0 .../notifications/webhook.form.tsx | 0 .../notifications/webhook.schema.ts | 0 .../{ => components}/notifications/webhook.ts | 0 .../storages/az-blob.form.tsx | 0 .../storages/az-blob.schema.ts | 0 .../{ => components}/storages/az-blob.ts | 0 .../storages/channel.action.ts | 2 +- .../google-drive-refresh.action.ts | 0 .../google-drive/google-drive.form.tsx | 2 +- .../google-drive/google-drive.schema.ts | 0 .../storages/google-drive/helpers.ts | 2 +- .../storages/google-drive/index.ts | 4 +-- .../storages/google-drive/types.ts | 0 .../{ => components}/storages/index.ts | 6 ++-- .../{ => components}/storages/local.schema.ts | 0 .../{ => components}/storages/local.ts | 0 .../{ => components}/storages/s3.form.tsx | 0 .../{ => components}/storages/s3.schema.ts | 0 .../channel/{ => components}/storages/s3.ts | 0 .../{ => schemas}/channel-form.schema.ts | 28 ++++++++--------- src/features/database/backup-actions-form.tsx | 2 +- .../database/channels-policy-form.tsx | 2 +- .../database/channels-policy-modal.tsx | 2 +- .../notification-log-columns.tsx | 2 +- .../onboarding/hooks/use-add-notifier.ts | 2 +- .../onboarding/hooks/use-add-storage.ts | 2 +- .../onboarding/hooks/use-remove-notifier.ts | 2 +- .../onboarding/hooks/use-remove-storage.ts | 2 +- .../onboarding/steps/step-defaults.tsx | 2 +- .../onboarding/steps/step-notifier.tsx | 6 ++-- .../onboarding/steps/step-storage.tsx | 6 ++-- .../channels-organization-form.tsx | 2 +- .../organization-notifiers-tab.tsx | 4 +-- .../organization-storages-tab.tsx | 4 +-- .../settings/notification-section.tsx | 2 +- src/features/settings/storage-section.tsx | 2 +- src/features/storages/storages.dispatch.ts | 2 +- 78 files changed, 99 insertions(+), 99 deletions(-) rename src/features/channel/{ => components}/channel-add-edit-modal.tsx (98%) rename src/features/channel/{ => components}/channel-card.tsx (94%) rename src/features/channel/{ => components}/channel-delete-button.tsx (93%) rename src/features/channel/{ => components}/channel-edit-button.tsx (91%) rename src/features/channel/{ => components}/channel-form.tsx (95%) rename src/features/channel/{ => components}/channel-test-button.tsx (97%) rename src/features/channel/{ => components}/channels-helpers.tsx (73%) rename src/features/channel/{ => components}/channels-notification-helper.tsx (99%) rename src/features/channel/{ => components}/channels-section.tsx (89%) rename src/features/channel/{ => components}/channels-storage-helper.tsx (98%) rename src/features/channel/{ => components}/notifications/channel.action.ts (99%) rename src/features/channel/{ => components}/notifications/discord.form.tsx (100%) rename src/features/channel/{ => components}/notifications/discord.schema.ts (100%) rename src/features/channel/{ => components}/notifications/discord.ts (100%) rename src/features/channel/{ => components}/notifications/gotify.form.tsx (100%) rename src/features/channel/{ => components}/notifications/gotify.schema.ts (100%) rename src/features/channel/{ => components}/notifications/gotify.ts (100%) rename src/features/channel/{ => components}/notifications/index.ts (64%) rename src/features/channel/{ => components}/notifications/nextcloud.form.tsx (100%) rename src/features/channel/{ => components}/notifications/nextcloud.schema.ts (100%) rename src/features/channel/{ => components}/notifications/nextcloud.ts (100%) rename src/features/channel/{ => components}/notifications/ntfy.form.tsx (100%) rename src/features/channel/{ => components}/notifications/ntfy.schema.ts (100%) rename src/features/channel/{ => components}/notifications/ntfy.ts (100%) rename src/features/channel/{ => components}/notifications/pushover.form.tsx (97%) rename src/features/channel/{ => components}/notifications/pushover.schema.ts (100%) rename src/features/channel/{ => components}/notifications/pushover.ts (100%) rename src/features/channel/{ => components}/notifications/slack.form.tsx (100%) rename src/features/channel/{ => components}/notifications/slack.schema.ts (100%) rename src/features/channel/{ => components}/notifications/slack.ts (100%) rename src/features/channel/{ => components}/notifications/smtp.form.tsx (100%) rename src/features/channel/{ => components}/notifications/smtp.schema.ts (100%) rename src/features/channel/{ => components}/notifications/smtp.ts (100%) rename src/features/channel/{ => components}/notifications/teams.form.tsx (100%) rename src/features/channel/{ => components}/notifications/teams.schema.ts (100%) rename src/features/channel/{ => components}/notifications/teams.ts (100%) rename src/features/channel/{ => components}/notifications/telegram.form.tsx (100%) rename src/features/channel/{ => components}/notifications/telegram.schema.ts (100%) rename src/features/channel/{ => components}/notifications/telegram.ts (100%) rename src/features/channel/{ => components}/notifications/webhook.form.tsx (100%) rename src/features/channel/{ => components}/notifications/webhook.schema.ts (100%) rename src/features/channel/{ => components}/notifications/webhook.ts (100%) rename src/features/channel/{ => components}/storages/az-blob.form.tsx (100%) rename src/features/channel/{ => components}/storages/az-blob.schema.ts (100%) rename src/features/channel/{ => components}/storages/az-blob.ts (100%) rename src/features/channel/{ => components}/storages/channel.action.ts (99%) rename src/features/channel/{ => components}/storages/google-drive/google-drive-refresh.action.ts (100%) rename src/features/channel/{ => components}/storages/google-drive/google-drive.form.tsx (98%) rename src/features/channel/{ => components}/storages/google-drive/google-drive.schema.ts (100%) rename src/features/channel/{ => components}/storages/google-drive/helpers.ts (97%) rename src/features/channel/{ => components}/storages/google-drive/index.ts (97%) rename src/features/channel/{ => components}/storages/google-drive/types.ts (100%) rename src/features/channel/{ => components}/storages/index.ts (93%) rename src/features/channel/{ => components}/storages/local.schema.ts (100%) rename src/features/channel/{ => components}/storages/local.ts (100%) rename src/features/channel/{ => components}/storages/s3.form.tsx (100%) rename src/features/channel/{ => components}/storages/s3.schema.ts (100%) rename src/features/channel/{ => components}/storages/s3.ts (100%) rename src/features/channel/{ => schemas}/channel-form.schema.ts (64%) diff --git a/app/(customer)/dashboard/(admin)/notifications/channels/page.tsx b/app/(customer)/dashboard/(admin)/notifications/channels/page.tsx index 7be60b51..29048238 100644 --- a/app/(customer)/dashboard/(admin)/notifications/channels/page.tsx +++ b/app/(customer)/dashboard/(admin)/notifications/channels/page.tsx @@ -4,8 +4,8 @@ import {Metadata} from "next"; import {db} from "@/db"; import {notificationChannel, NotificationChannelWith} from "@/db/schema/09_notification-channel"; import {desc, isNull} from "drizzle-orm"; -import {ChannelsSection} from "@/features/channel/channels-section"; -import {ChannelAddEditModal} from "@/features/channel/channel-add-edit-modal"; +import {ChannelsSection} from "@/features/channel/components/channels-section"; +import {ChannelAddEditModal} from "@/features/channel/components/channel-add-edit-modal"; import * as drizzleDb from "@/db"; export const metadata: Metadata = { diff --git a/app/(customer)/dashboard/(admin)/storages/channels/page.tsx b/app/(customer)/dashboard/(admin)/storages/channels/page.tsx index 1ffc0d8e..7809778e 100644 --- a/app/(customer)/dashboard/(admin)/storages/channels/page.tsx +++ b/app/(customer)/dashboard/(admin)/storages/channels/page.tsx @@ -1,12 +1,12 @@ import {PageParams} from "@/types/next"; import {Page, PageActions, PageContent, PageHeader, PageTitle} from "@/features/layout/page"; import {Metadata} from "next"; -import {ChannelsSection} from "@/features/channel/channels-section"; +import {ChannelsSection} from "@/features/channel/components/channels-section"; import {db} from "@/db"; import {desc, eq, isNull} from "drizzle-orm"; import * as drizzleDb from "@/db"; import {StorageChannelWith} from "@/db/schema/12_storage-channel"; -import {ChannelAddEditModal} from "@/features/channel/channel-add-edit-modal"; +import {ChannelAddEditModal} from "@/features/channel/components/channel-add-edit-modal"; export const metadata: Metadata = { title: "Storage Channels", diff --git a/src/features/channel/channel-add-edit-modal.tsx b/src/features/channel/components/channel-add-edit-modal.tsx similarity index 98% rename from src/features/channel/channel-add-edit-modal.tsx rename to src/features/channel/components/channel-add-edit-modal.tsx index c031ca2a..7ffeb228 100644 --- a/src/features/channel/channel-add-edit-modal.tsx +++ b/src/features/channel/components/channel-add-edit-modal.tsx @@ -12,8 +12,8 @@ import {useIsMobile} from "@/hooks/use-mobile"; import {useEffect, useState} from "react"; import {Tabs, TabsContent, TabsList, TabsTrigger} from "@/components/ui/tabs"; import {StorageChannelWith} from "@/db/schema/12_storage-channel"; -import {ChannelForm} from "@/features/channel/channel-form"; -import {ChannelKind, getChannelTextBasedOnKind} from "@/features/channel/channels-helpers"; +import {ChannelForm} from "@/features/channel/components/channel-form"; +import {ChannelKind, getChannelTextBasedOnKind} from "@/features/channel/components/channels-helpers"; import { ChannelOrganisationForm } from "@/features/organizations/channels-organization-form"; diff --git a/src/features/channel/channel-card.tsx b/src/features/channel/components/channel-card.tsx similarity index 94% rename from src/features/channel/channel-card.tsx rename to src/features/channel/components/channel-card.tsx index 819bf904..a1ded7b8 100644 --- a/src/features/channel/channel-card.tsx +++ b/src/features/channel/components/channel-card.tsx @@ -9,11 +9,11 @@ import {useIsMobile} from "@/hooks/use-mobile"; import {StorageChannelWith} from "@/db/schema/12_storage-channel"; import { EditChannelButton -} from "@/features/channel/channel-edit-button"; -import {ChannelKind, getChannelIcon} from "@/features/channel/channels-helpers"; +} from "@/features/channel/components/channel-edit-button"; +import {ChannelKind, getChannelIcon} from "@/features/channel/components/channels-helpers"; import { DeleteChannelButton -} from "@/features/channel/channel-delete-button"; +} from "@/features/channel/components/channel-delete-button"; export type ChannelCardProps = { data: NotificationChannelWith | StorageChannelWith; diff --git a/src/features/channel/channel-delete-button.tsx b/src/features/channel/components/channel-delete-button.tsx similarity index 93% rename from src/features/channel/channel-delete-button.tsx rename to src/features/channel/components/channel-delete-button.tsx index bb6b883a..bac951ba 100644 --- a/src/features/channel/channel-delete-button.tsx +++ b/src/features/channel/components/channel-delete-button.tsx @@ -5,12 +5,12 @@ import {useRouter} from "next/navigation"; import {Trash2} from "lucide-react"; import { removeNotificationChannelAction, -} from "@/features/channel/notifications/channel.action"; +} from "@/features/channel/components/notifications/channel.action"; import {toast} from "sonner"; -import {ChannelKind, getChannelTextBasedOnKind} from "@/features/channel/channels-helpers"; +import {ChannelKind, getChannelTextBasedOnKind} from "@/features/channel/components/channels-helpers"; import { removeStorageChannelAction -} from "@/features/channel/storages/channel.action"; +} from "@/features/channel/components/storages/channel.action"; export type DeleteChannelButtonProps = { channelId: string; diff --git a/src/features/channel/channel-edit-button.tsx b/src/features/channel/components/channel-edit-button.tsx similarity index 91% rename from src/features/channel/channel-edit-button.tsx rename to src/features/channel/components/channel-edit-button.tsx index 351043f6..37ece12d 100644 --- a/src/features/channel/channel-edit-button.tsx +++ b/src/features/channel/components/channel-edit-button.tsx @@ -7,14 +7,14 @@ import {toast} from "sonner"; import {useState} from "react"; import {OrganizationWithMembers} from "@/db/schema/03_organization"; import {StorageChannelWith} from "@/db/schema/12_storage-channel"; -import {ChannelKind} from "@/features/channel/channels-helpers"; +import {ChannelKind} from "@/features/channel/components/channels-helpers"; import { updateNotificationChannelAction -} from "@/features/channel/notifications/channel.action"; -import {ChannelAddEditModal} from "@/features/channel/channel-add-edit-modal"; +} from "@/features/channel/components/notifications/channel.action"; +import {ChannelAddEditModal} from "@/features/channel/components/channel-add-edit-modal"; import { updateStorageChannelAction -} from "@/features/channel/storages/channel.action"; +} from "@/features/channel/components/storages/channel.action"; export type EditChannelButtonProps = { channel: NotificationChannelWith | StorageChannelWith; diff --git a/src/features/channel/channel-form.tsx b/src/features/channel/components/channel-form.tsx similarity index 95% rename from src/features/channel/channel-form.tsx rename to src/features/channel/components/channel-form.tsx index b47ab76e..979130b7 100644 --- a/src/features/channel/channel-form.tsx +++ b/src/features/channel/components/channel-form.tsx @@ -8,7 +8,7 @@ import {Input} from "@/components/ui/input"; import { addStorageChannelAction, updateStorageChannelAction -} from "@/features/channel/storages/channel.action"; +} from "@/features/channel/components/storages/channel.action"; import {toast} from "sonner"; import {OrganizationWithMembers} from "@/db/schema/03_organization"; import {Button} from "@/components/ui/button"; @@ -20,19 +20,19 @@ import {ArrowLeft} from "lucide-react"; import {StorageChannelWith} from "@/db/schema/12_storage-channel"; import { NotificationChannelFormSchema, NotificationChannelFormType, StorageChannelFormSchema, StorageChannelFormType -} from "@/features/channel/channel-form.schema"; +} from "@/features/channel/schemas/channel-form.schema"; import { ChannelKind, renderChannelForm -} from "@/features/channel/channels-helpers"; -import {storageProviders} from "@/features/channel/channels-storage-helper"; -import {notificationProviders} from "@/features/channel/channels-notification-helper"; +} from "@/features/channel/components/channels-helpers"; +import {storageProviders} from "@/features/channel/components/channels-storage-helper"; +import {notificationProviders} from "@/features/channel/components/channels-notification-helper"; import { ChannelTestButton -} from "@/features/channel/channel-test-button"; +} from "@/features/channel/components/channel-test-button"; import { addNotificationChannelAction, updateNotificationChannelAction -} from "@/features/channel/notifications/channel.action"; +} from "@/features/channel/components/notifications/channel.action"; type NotifierFormProps = { diff --git a/src/features/channel/channel-test-button.tsx b/src/features/channel/components/channel-test-button.tsx similarity index 97% rename from src/features/channel/channel-test-button.tsx rename to src/features/channel/components/channel-test-button.tsx index fc57d8b2..6470c617 100644 --- a/src/features/channel/channel-test-button.tsx +++ b/src/features/channel/components/channel-test-button.tsx @@ -11,7 +11,7 @@ import {EventPayload} from "@/features/notifications/notifications.types"; import {useIsMobile} from "@/hooks/use-mobile"; import {cn} from "@/lib/utils"; import {StorageChannel} from "@/db/schema/12_storage-channel"; -import {ChannelKind} from "@/features/channel/channels-helpers"; +import {ChannelKind} from "@/features/channel/components/channels-helpers"; import type {StorageInput} from "@/features/storages/storages.types"; import {dispatchStorage} from "@/features/storages/storages.dispatch"; diff --git a/src/features/channel/channels-helpers.tsx b/src/features/channel/components/channels-helpers.tsx similarity index 73% rename from src/features/channel/channels-helpers.tsx rename to src/features/channel/components/channels-helpers.tsx index 5d1f6b6b..bfee94ca 100644 --- a/src/features/channel/channels-helpers.tsx +++ b/src/features/channel/components/channels-helpers.tsx @@ -1,49 +1,49 @@ import {UseFormReturn} from "react-hook-form"; import { NotifierSmtpForm -} from "@/features/channel/notifications/smtp.form"; +} from "@/features/channel/components/notifications/smtp.form"; import { NotifierSlackForm -} from "@/features/channel/notifications/slack.form"; +} from "@/features/channel/components/notifications/slack.form"; import { NotifierDiscordForm -} from "@/features/channel/notifications/discord.form"; +} from "@/features/channel/components/notifications/discord.form"; import { NotifierTelegramForm -} from "@/features/channel/notifications/telegram.form"; +} from "@/features/channel/components/notifications/telegram.form"; import { NotifierGotifyForm -} from "@/features/channel/notifications/gotify.form"; +} from "@/features/channel/components/notifications/gotify.form"; import { NotifierNtfyForm -} from "@/features/channel/notifications/ntfy.form"; +} from "@/features/channel/components/notifications/ntfy.form"; import { NotifierWebhookForm -} from "@/features/channel/notifications/webhook.form"; +} from "@/features/channel/components/notifications/webhook.form"; import { NotifierNextcloudForm -} from "@/features/channel/notifications/nextcloud.form"; +} from "@/features/channel/components/notifications/nextcloud.form"; import { NotifierPushoverForm -} from "@/features/channel/notifications/pushover.form"; +} from "@/features/channel/components/notifications/pushover.form"; import { notificationProviders, -} from "@/features/channel/channels-notification-helper"; +} from "@/features/channel/components/channels-notification-helper"; import { NotifierTeamsForm -} from "@/features/channel/notifications/teams.form"; -import {storageProviders} from "@/features/channel/channels-storage-helper"; +} from "@/features/channel/components/notifications/teams.form"; +import {storageProviders} from "@/features/channel/components/channels-storage-helper"; import {ForwardRefExoticComponent, JSX, RefAttributes, SVGProps} from "react"; import {LucideProps} from "lucide-react"; import { StorageS3Form -} from "@/features/channel/storages/s3.form"; +} from "@/features/channel/components/storages/s3.form"; import { StorageGoogleDriveForm -} from "@/features/channel/storages/google-drive/google-drive.form"; +} from "@/features/channel/components/storages/google-drive/google-drive.form"; import { StorageBlobForm -} from "@/features/channel/storages/az-blob.form"; +} from "@/features/channel/components/storages/az-blob.form"; export type ChannelKind = "notification" | "storage"; diff --git a/src/features/channel/channels-notification-helper.tsx b/src/features/channel/components/channels-notification-helper.tsx similarity index 99% rename from src/features/channel/channels-notification-helper.tsx rename to src/features/channel/components/channels-notification-helper.tsx index d903a604..29181582 100644 --- a/src/features/channel/channels-notification-helper.tsx +++ b/src/features/channel/components/channels-notification-helper.tsx @@ -1,6 +1,6 @@ import {Mail} from "lucide-react"; import type { SVGProps } from 'react'; -import {ProviderIconTypes} from "@/features/channel/channels-helpers"; +import {ProviderIconTypes} from "@/features/channel/components/channels-helpers"; diff --git a/src/features/channel/channels-section.tsx b/src/features/channel/components/channels-section.tsx similarity index 89% rename from src/features/channel/channels-section.tsx rename to src/features/channel/components/channels-section.tsx index fdb00c2a..74e4b695 100644 --- a/src/features/channel/channels-section.tsx +++ b/src/features/channel/components/channels-section.tsx @@ -5,12 +5,12 @@ import { useState } from "react"; import { EmptyStatePlaceholder } from "@/components/common/empty-state-placeholder"; import { OrganizationWithMembers } from "@/db/schema/03_organization"; import { StorageChannelWith } from "@/db/schema/12_storage-channel"; -import { ChannelCard } from "@/features/channel/channel-card"; -import { ChannelAddEditModal } from "@/features/channel/channel-add-edit-modal"; +import { ChannelCard } from "@/features/channel/components/channel-card"; +import { ChannelAddEditModal } from "@/features/channel/components/channel-add-edit-modal"; import { ChannelKind, getChannelTextBasedOnKind, -} from "@/features/channel/channels-helpers"; +} from "@/features/channel/components/channels-helpers"; type ChannelsSectionProps = { channels: NotificationChannelWith[] | StorageChannelWith[]; diff --git a/src/features/channel/channels-storage-helper.tsx b/src/features/channel/components/channels-storage-helper.tsx similarity index 98% rename from src/features/channel/channels-storage-helper.tsx rename to src/features/channel/components/channels-storage-helper.tsx index 0c151f24..9f1a71ec 100644 --- a/src/features/channel/channels-storage-helper.tsx +++ b/src/features/channel/components/channels-storage-helper.tsx @@ -1,6 +1,6 @@ import {Server} from "lucide-react"; import type {SVGProps} from "react"; -import {ProviderIconTypes} from "@/features/channel/channels-helpers"; +import {ProviderIconTypes} from "@/features/channel/components/channels-helpers"; export const storageProviders: ProviderIconTypes[] = [ {value: "local", label: "Local", icon: Server}, diff --git a/src/features/channel/notifications/channel.action.ts b/src/features/channel/components/notifications/channel.action.ts similarity index 99% rename from src/features/channel/notifications/channel.action.ts rename to src/features/channel/components/notifications/channel.action.ts index 5d32a7f5..dd921462 100644 --- a/src/features/channel/notifications/channel.action.ts +++ b/src/features/channel/components/notifications/channel.action.ts @@ -10,7 +10,7 @@ import {and, eq} from "drizzle-orm"; import {withUpdatedAt} from "@/db/utils"; import { NotificationChannelFormSchema -} from "@/features/channel/channel-form.schema"; +} from "@/features/channel/schemas/channel-form.schema"; export const addNotificationChannelAction = userAction.schema( diff --git a/src/features/channel/notifications/discord.form.tsx b/src/features/channel/components/notifications/discord.form.tsx similarity index 100% rename from src/features/channel/notifications/discord.form.tsx rename to src/features/channel/components/notifications/discord.form.tsx diff --git a/src/features/channel/notifications/discord.schema.ts b/src/features/channel/components/notifications/discord.schema.ts similarity index 100% rename from src/features/channel/notifications/discord.schema.ts rename to src/features/channel/components/notifications/discord.schema.ts diff --git a/src/features/channel/notifications/discord.ts b/src/features/channel/components/notifications/discord.ts similarity index 100% rename from src/features/channel/notifications/discord.ts rename to src/features/channel/components/notifications/discord.ts diff --git a/src/features/channel/notifications/gotify.form.tsx b/src/features/channel/components/notifications/gotify.form.tsx similarity index 100% rename from src/features/channel/notifications/gotify.form.tsx rename to src/features/channel/components/notifications/gotify.form.tsx diff --git a/src/features/channel/notifications/gotify.schema.ts b/src/features/channel/components/notifications/gotify.schema.ts similarity index 100% rename from src/features/channel/notifications/gotify.schema.ts rename to src/features/channel/components/notifications/gotify.schema.ts diff --git a/src/features/channel/notifications/gotify.ts b/src/features/channel/components/notifications/gotify.ts similarity index 100% rename from src/features/channel/notifications/gotify.ts rename to src/features/channel/components/notifications/gotify.ts diff --git a/src/features/channel/notifications/index.ts b/src/features/channel/components/notifications/index.ts similarity index 64% rename from src/features/channel/notifications/index.ts rename to src/features/channel/components/notifications/index.ts index 08e67961..32e21a3a 100644 --- a/src/features/channel/notifications/index.ts +++ b/src/features/channel/components/notifications/index.ts @@ -2,14 +2,14 @@ import type {ProviderKind, EventPayload, DispatchResult} from '@/features/notifications/notifications.types'; import {sendSlack} from './slack'; import {sendSmtp} from './smtp'; -import {sendDiscord} from "@/features/channel/notifications/discord"; -import {sendTelegram} from "@/features/channel/notifications/telegram"; -import {sendGotify} from "@/features/channel/notifications/gotify"; -import {sendNtfy} from "@/features/channel/notifications/ntfy"; -import {sendWebhook} from "@/features/channel/notifications/webhook"; -import {sendNextcloud} from "@/features/channel/notifications/nextcloud"; -import {sendPushover} from "@/features/channel/notifications/pushover"; -import {sendTeams} from "@/features/channel/notifications/teams" +import {sendDiscord} from "@/features/channel/components/notifications/discord"; +import {sendTelegram} from "@/features/channel/components/notifications/telegram"; +import {sendGotify} from "@/features/channel/components/notifications/gotify"; +import {sendNtfy} from "@/features/channel/components/notifications/ntfy"; +import {sendWebhook} from "@/features/channel/components/notifications/webhook"; +import {sendNextcloud} from "@/features/channel/components/notifications/nextcloud"; +import {sendPushover} from "@/features/channel/components/notifications/pushover"; +import {sendTeams} from "@/features/channel/components/notifications/teams" const handlers: Record< ProviderKind, diff --git a/src/features/channel/notifications/nextcloud.form.tsx b/src/features/channel/components/notifications/nextcloud.form.tsx similarity index 100% rename from src/features/channel/notifications/nextcloud.form.tsx rename to src/features/channel/components/notifications/nextcloud.form.tsx diff --git a/src/features/channel/notifications/nextcloud.schema.ts b/src/features/channel/components/notifications/nextcloud.schema.ts similarity index 100% rename from src/features/channel/notifications/nextcloud.schema.ts rename to src/features/channel/components/notifications/nextcloud.schema.ts diff --git a/src/features/channel/notifications/nextcloud.ts b/src/features/channel/components/notifications/nextcloud.ts similarity index 100% rename from src/features/channel/notifications/nextcloud.ts rename to src/features/channel/components/notifications/nextcloud.ts diff --git a/src/features/channel/notifications/ntfy.form.tsx b/src/features/channel/components/notifications/ntfy.form.tsx similarity index 100% rename from src/features/channel/notifications/ntfy.form.tsx rename to src/features/channel/components/notifications/ntfy.form.tsx diff --git a/src/features/channel/notifications/ntfy.schema.ts b/src/features/channel/components/notifications/ntfy.schema.ts similarity index 100% rename from src/features/channel/notifications/ntfy.schema.ts rename to src/features/channel/components/notifications/ntfy.schema.ts diff --git a/src/features/channel/notifications/ntfy.ts b/src/features/channel/components/notifications/ntfy.ts similarity index 100% rename from src/features/channel/notifications/ntfy.ts rename to src/features/channel/components/notifications/ntfy.ts diff --git a/src/features/channel/notifications/pushover.form.tsx b/src/features/channel/components/notifications/pushover.form.tsx similarity index 97% rename from src/features/channel/notifications/pushover.form.tsx rename to src/features/channel/components/notifications/pushover.form.tsx index 36327652..49416330 100644 --- a/src/features/channel/notifications/pushover.form.tsx +++ b/src/features/channel/components/notifications/pushover.form.tsx @@ -4,7 +4,7 @@ import {Input} from "@/components/ui/input"; import {Separator} from "@/components/ui/separator"; import {PasswordInput} from "@/components/ui/password-input"; import {Select, SelectContent, SelectItem, SelectTrigger, SelectValue} from "@/components/ui/select"; -import {PUSHOVER_PRIORITIES} from "@/features/channel/notifications/pushover.schema"; +import {PUSHOVER_PRIORITIES} from "@/features/channel/components/notifications/pushover.schema"; type NotifierPushoverFormProps = { form: UseFormReturn; diff --git a/src/features/channel/notifications/pushover.schema.ts b/src/features/channel/components/notifications/pushover.schema.ts similarity index 100% rename from src/features/channel/notifications/pushover.schema.ts rename to src/features/channel/components/notifications/pushover.schema.ts diff --git a/src/features/channel/notifications/pushover.ts b/src/features/channel/components/notifications/pushover.ts similarity index 100% rename from src/features/channel/notifications/pushover.ts rename to src/features/channel/components/notifications/pushover.ts diff --git a/src/features/channel/notifications/slack.form.tsx b/src/features/channel/components/notifications/slack.form.tsx similarity index 100% rename from src/features/channel/notifications/slack.form.tsx rename to src/features/channel/components/notifications/slack.form.tsx diff --git a/src/features/channel/notifications/slack.schema.ts b/src/features/channel/components/notifications/slack.schema.ts similarity index 100% rename from src/features/channel/notifications/slack.schema.ts rename to src/features/channel/components/notifications/slack.schema.ts diff --git a/src/features/channel/notifications/slack.ts b/src/features/channel/components/notifications/slack.ts similarity index 100% rename from src/features/channel/notifications/slack.ts rename to src/features/channel/components/notifications/slack.ts diff --git a/src/features/channel/notifications/smtp.form.tsx b/src/features/channel/components/notifications/smtp.form.tsx similarity index 100% rename from src/features/channel/notifications/smtp.form.tsx rename to src/features/channel/components/notifications/smtp.form.tsx diff --git a/src/features/channel/notifications/smtp.schema.ts b/src/features/channel/components/notifications/smtp.schema.ts similarity index 100% rename from src/features/channel/notifications/smtp.schema.ts rename to src/features/channel/components/notifications/smtp.schema.ts diff --git a/src/features/channel/notifications/smtp.ts b/src/features/channel/components/notifications/smtp.ts similarity index 100% rename from src/features/channel/notifications/smtp.ts rename to src/features/channel/components/notifications/smtp.ts diff --git a/src/features/channel/notifications/teams.form.tsx b/src/features/channel/components/notifications/teams.form.tsx similarity index 100% rename from src/features/channel/notifications/teams.form.tsx rename to src/features/channel/components/notifications/teams.form.tsx diff --git a/src/features/channel/notifications/teams.schema.ts b/src/features/channel/components/notifications/teams.schema.ts similarity index 100% rename from src/features/channel/notifications/teams.schema.ts rename to src/features/channel/components/notifications/teams.schema.ts diff --git a/src/features/channel/notifications/teams.ts b/src/features/channel/components/notifications/teams.ts similarity index 100% rename from src/features/channel/notifications/teams.ts rename to src/features/channel/components/notifications/teams.ts diff --git a/src/features/channel/notifications/telegram.form.tsx b/src/features/channel/components/notifications/telegram.form.tsx similarity index 100% rename from src/features/channel/notifications/telegram.form.tsx rename to src/features/channel/components/notifications/telegram.form.tsx diff --git a/src/features/channel/notifications/telegram.schema.ts b/src/features/channel/components/notifications/telegram.schema.ts similarity index 100% rename from src/features/channel/notifications/telegram.schema.ts rename to src/features/channel/components/notifications/telegram.schema.ts diff --git a/src/features/channel/notifications/telegram.ts b/src/features/channel/components/notifications/telegram.ts similarity index 100% rename from src/features/channel/notifications/telegram.ts rename to src/features/channel/components/notifications/telegram.ts diff --git a/src/features/channel/notifications/webhook.form.tsx b/src/features/channel/components/notifications/webhook.form.tsx similarity index 100% rename from src/features/channel/notifications/webhook.form.tsx rename to src/features/channel/components/notifications/webhook.form.tsx diff --git a/src/features/channel/notifications/webhook.schema.ts b/src/features/channel/components/notifications/webhook.schema.ts similarity index 100% rename from src/features/channel/notifications/webhook.schema.ts rename to src/features/channel/components/notifications/webhook.schema.ts diff --git a/src/features/channel/notifications/webhook.ts b/src/features/channel/components/notifications/webhook.ts similarity index 100% rename from src/features/channel/notifications/webhook.ts rename to src/features/channel/components/notifications/webhook.ts diff --git a/src/features/channel/storages/az-blob.form.tsx b/src/features/channel/components/storages/az-blob.form.tsx similarity index 100% rename from src/features/channel/storages/az-blob.form.tsx rename to src/features/channel/components/storages/az-blob.form.tsx diff --git a/src/features/channel/storages/az-blob.schema.ts b/src/features/channel/components/storages/az-blob.schema.ts similarity index 100% rename from src/features/channel/storages/az-blob.schema.ts rename to src/features/channel/components/storages/az-blob.schema.ts diff --git a/src/features/channel/storages/az-blob.ts b/src/features/channel/components/storages/az-blob.ts similarity index 100% rename from src/features/channel/storages/az-blob.ts rename to src/features/channel/components/storages/az-blob.ts diff --git a/src/features/channel/storages/channel.action.ts b/src/features/channel/components/storages/channel.action.ts similarity index 99% rename from src/features/channel/storages/channel.action.ts rename to src/features/channel/components/storages/channel.action.ts index 508d6fea..8e8022d0 100644 --- a/src/features/channel/storages/channel.action.ts +++ b/src/features/channel/components/storages/channel.action.ts @@ -9,7 +9,7 @@ import {and, eq} from "drizzle-orm"; import {withUpdatedAt} from "@/db/utils"; import { StorageChannelFormSchema -} from "@/features/channel/channel-form.schema"; +} from "@/features/channel/schemas/channel-form.schema"; import {StorageChannel} from "@/db/schema/12_storage-channel"; diff --git a/src/features/channel/storages/google-drive/google-drive-refresh.action.ts b/src/features/channel/components/storages/google-drive/google-drive-refresh.action.ts similarity index 100% rename from src/features/channel/storages/google-drive/google-drive-refresh.action.ts rename to src/features/channel/components/storages/google-drive/google-drive-refresh.action.ts diff --git a/src/features/channel/storages/google-drive/google-drive.form.tsx b/src/features/channel/components/storages/google-drive/google-drive.form.tsx similarity index 98% rename from src/features/channel/storages/google-drive/google-drive.form.tsx rename to src/features/channel/components/storages/google-drive/google-drive.form.tsx index e2606eff..fbbf95fd 100644 --- a/src/features/channel/storages/google-drive/google-drive.form.tsx +++ b/src/features/channel/components/storages/google-drive/google-drive.form.tsx @@ -8,7 +8,7 @@ import {Button} from "@/components/ui/button"; import {PasswordInput} from "@/components/ui/password-input"; import { googleDriveRefreshTokenAction -} from "@/features/channel/storages/google-drive/google-drive-refresh.action"; +} from "@/features/channel/components/storages/google-drive/google-drive-refresh.action"; import {toast} from "sonner"; type StorageGoogleDriveFormProps = { diff --git a/src/features/channel/storages/google-drive/google-drive.schema.ts b/src/features/channel/components/storages/google-drive/google-drive.schema.ts similarity index 100% rename from src/features/channel/storages/google-drive/google-drive.schema.ts rename to src/features/channel/components/storages/google-drive/google-drive.schema.ts diff --git a/src/features/channel/storages/google-drive/helpers.ts b/src/features/channel/components/storages/google-drive/helpers.ts similarity index 97% rename from src/features/channel/storages/google-drive/helpers.ts rename to src/features/channel/components/storages/google-drive/helpers.ts index e6178406..e11c93f1 100644 --- a/src/features/channel/storages/google-drive/helpers.ts +++ b/src/features/channel/components/storages/google-drive/helpers.ts @@ -1,5 +1,5 @@ import {drive_v3, google} from "googleapis"; -import {GoogleDriveConfig} from "@/features/channel/storages/google-drive/types"; +import {GoogleDriveConfig} from "@/features/channel/components/storages/google-drive/types"; import Drive = drive_v3.Drive; import {getServerUrl} from "@/utils/get-server-url"; diff --git a/src/features/channel/storages/google-drive/index.ts b/src/features/channel/components/storages/google-drive/index.ts similarity index 97% rename from src/features/channel/storages/google-drive/index.ts rename to src/features/channel/components/storages/google-drive/index.ts index 7f7fa353..a0da8ace 100644 --- a/src/features/channel/storages/google-drive/index.ts +++ b/src/features/channel/components/storages/google-drive/index.ts @@ -7,12 +7,12 @@ import { StorageResult, StorageUploadInput } from '@/features/storages/storages.types'; -import {GoogleDriveConfig} from "@/features/channel/storages/google-drive/types"; +import {GoogleDriveConfig} from "@/features/channel/components/storages/google-drive/types"; import { ensureFolderPath, findFileByName, getGoogleDriveClient, resolveFilePath -} from "@/features/channel/storages/google-drive/helpers"; +} from "@/features/channel/components/storages/google-drive/helpers"; import {Readable} from "node:stream"; import {generateFileUrl} from "@/features/storages/storages.helpers"; diff --git a/src/features/channel/storages/google-drive/types.ts b/src/features/channel/components/storages/google-drive/types.ts similarity index 100% rename from src/features/channel/storages/google-drive/types.ts rename to src/features/channel/components/storages/google-drive/types.ts diff --git a/src/features/channel/storages/index.ts b/src/features/channel/components/storages/index.ts similarity index 93% rename from src/features/channel/storages/index.ts rename to src/features/channel/components/storages/index.ts index 851b6bf2..7431d266 100644 --- a/src/features/channel/storages/index.ts +++ b/src/features/channel/components/storages/index.ts @@ -5,15 +5,15 @@ import { } from '@/features/storages/storages.types'; import {uploadLocal, getLocal, deleteLocal, pingLocal, copyLocal} from './local'; -import {copyS3, deleteS3, getS3, pingS3, uploadS3} from "@/features/channel/storages/s3"; -import {copyBlob, deleteBlob, getBlob, pingBlob, uploadBlob} from "@/features/channel/storages/az-blob"; +import {copyS3, deleteS3, getS3, pingS3, uploadS3} from "@/features/channel/components/storages/s3"; +import {copyBlob, deleteBlob, getBlob, pingBlob, uploadBlob} from "@/features/channel/components/storages/az-blob"; import { copyGoogleDrive, deleteGoogleDrive, getGoogleDrive, pingGoogleDrive, uploadGoogleDrive -} from "@/features/channel/storages/google-drive"; +} from "@/features/channel/components/storages/google-drive"; type ProviderHandler = { upload: (config: any, input: StorageInput & { action: 'upload' }) => Promise; diff --git a/src/features/channel/storages/local.schema.ts b/src/features/channel/components/storages/local.schema.ts similarity index 100% rename from src/features/channel/storages/local.schema.ts rename to src/features/channel/components/storages/local.schema.ts diff --git a/src/features/channel/storages/local.ts b/src/features/channel/components/storages/local.ts similarity index 100% rename from src/features/channel/storages/local.ts rename to src/features/channel/components/storages/local.ts diff --git a/src/features/channel/storages/s3.form.tsx b/src/features/channel/components/storages/s3.form.tsx similarity index 100% rename from src/features/channel/storages/s3.form.tsx rename to src/features/channel/components/storages/s3.form.tsx diff --git a/src/features/channel/storages/s3.schema.ts b/src/features/channel/components/storages/s3.schema.ts similarity index 100% rename from src/features/channel/storages/s3.schema.ts rename to src/features/channel/components/storages/s3.schema.ts diff --git a/src/features/channel/storages/s3.ts b/src/features/channel/components/storages/s3.ts similarity index 100% rename from src/features/channel/storages/s3.ts rename to src/features/channel/components/storages/s3.ts diff --git a/src/features/channel/channel-form.schema.ts b/src/features/channel/schemas/channel-form.schema.ts similarity index 64% rename from src/features/channel/channel-form.schema.ts rename to src/features/channel/schemas/channel-form.schema.ts index 1fe5d6fe..648687d4 100644 --- a/src/features/channel/channel-form.schema.ts +++ b/src/features/channel/schemas/channel-form.schema.ts @@ -1,18 +1,18 @@ import {z} from "zod"; -import {SlackChannelConfigSchema} from "@/features/channel/notifications/slack.schema"; -import {SmtpChannelConfigSchema} from "@/features/channel/notifications/smtp.schema"; -import {DiscordChannelConfigSchema} from "@/features/channel/notifications/discord.schema"; -import {TelegramChannelConfigSchema} from "@/features/channel/notifications/telegram.schema"; -import {GotifyChannelConfigSchema} from "@/features/channel/notifications/gotify.schema"; -import {NtfyChannelConfigSchema} from "@/features/channel/notifications/ntfy.schema"; -import {WebhookChannelConfigSchema} from "@/features/channel/notifications/webhook.schema"; -import {NextcloudChannelConfigSchema} from "@/features/channel/notifications/nextcloud.schema"; -import {PushoverChannelConfigSchema} from "@/features/channel/notifications/pushover.schema"; -import {S3ChannelConfigSchema} from "@/features/channel/storages/s3.schema"; -import {GoogleDriveChannelConfigSchema} from "@/features/channel/storages/google-drive/google-drive.schema"; -import {LocalChannelConfigSchema} from "@/features/channel/storages/local.schema"; -import {TeamsChannelConfigSchema} from "@/features/channel/notifications/teams.schema"; -import {BlobChannelConfigSchema} from "@/features/channel/storages/az-blob.schema"; +import {SlackChannelConfigSchema} from "@/features/channel/components/notifications/slack.schema"; +import {SmtpChannelConfigSchema} from "@/features/channel/components/notifications/smtp.schema"; +import {DiscordChannelConfigSchema} from "@/features/channel/components/notifications/discord.schema"; +import {TelegramChannelConfigSchema} from "@/features/channel/components/notifications/telegram.schema"; +import {GotifyChannelConfigSchema} from "@/features/channel/components/notifications/gotify.schema"; +import {NtfyChannelConfigSchema} from "@/features/channel/components/notifications/ntfy.schema"; +import {WebhookChannelConfigSchema} from "@/features/channel/components/notifications/webhook.schema"; +import {NextcloudChannelConfigSchema} from "@/features/channel/components/notifications/nextcloud.schema"; +import {PushoverChannelConfigSchema} from "@/features/channel/components/notifications/pushover.schema"; +import {S3ChannelConfigSchema} from "@/features/channel/components/storages/s3.schema"; +import {GoogleDriveChannelConfigSchema} from "@/features/channel/components/storages/google-drive/google-drive.schema"; +import {LocalChannelConfigSchema} from "@/features/channel/components/storages/local.schema"; +import {TeamsChannelConfigSchema} from "@/features/channel/components/notifications/teams.schema"; +import {BlobChannelConfigSchema} from "@/features/channel/components/storages/az-blob.schema"; const BaseChannelFormSchema = z.object({ diff --git a/src/features/database/backup-actions-form.tsx b/src/features/database/backup-actions-form.tsx index a9df46da..1b202df3 100644 --- a/src/features/database/backup-actions-form.tsx +++ b/src/features/database/backup-actions-form.tsx @@ -12,7 +12,7 @@ import { } from "@/components/ui/form"; import { TooltipProvider } from "@/components/ui/tooltip"; import { ButtonWithLoading } from "@/components/common/button-with-loading"; -import { getChannelIcon } from "@/features/channel/channels-helpers"; +import { getChannelIcon } from "@/features/channel/components/channels-helpers"; import { getStatusColor, getStatusIcon, diff --git a/src/features/database/channels-policy-form.tsx b/src/features/database/channels-policy-form.tsx index eb2c6f8d..ff7d3097 100644 --- a/src/features/database/channels-policy-form.tsx +++ b/src/features/database/channels-policy-form.tsx @@ -12,7 +12,7 @@ import { MultiSelect } from "@/components/common/multi-select"; import { Switch } from "@/components/ui/switch"; import { Card } from "@/components/ui/card"; import { useIsMobile } from "@/hooks/use-mobile"; -import { ChannelKind, getChannelIcon, getChannelTextBasedOnKind } from "@/features/channel/channels-helpers"; +import { ChannelKind, getChannelIcon, getChannelTextBasedOnKind } from "@/features/channel/components/channels-helpers"; import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage, useZodForm } from "@/components/ui/form"; import { EVENT_KIND_BACKUP_ONLY_OPTIONS, diff --git a/src/features/database/channels-policy-modal.tsx b/src/features/database/channels-policy-modal.tsx index 9490f5a7..737be210 100644 --- a/src/features/database/channels-policy-modal.tsx +++ b/src/features/database/channels-policy-modal.tsx @@ -19,7 +19,7 @@ import Link from "next/link"; import { DatabaseWith } from "@/db/schema/07_database"; import { NotificationChannel } from "@/db/schema/09_notification-channel"; import { StorageChannel } from "@/db/schema/12_storage-channel"; -import { ChannelKind, getChannelTextBasedOnKind } from "@/features/channel/channels-helpers"; +import { ChannelKind, getChannelTextBasedOnKind } from "@/features/channel/components/channels-helpers"; import { ChannelPoliciesForm } from "@/features/database/channels-policy-form"; import { PolicyType } from "@/features/database/channels-policy.schema"; import { diff --git a/src/features/notifications/notification-log-columns.tsx b/src/features/notifications/notification-log-columns.tsx index e72fc8e5..0bd764ae 100644 --- a/src/features/notifications/notification-log-columns.tsx +++ b/src/features/notifications/notification-log-columns.tsx @@ -6,7 +6,7 @@ import {humanReadableDate} from "@/utils/date-formatting"; import {CheckCircle2, XCircle} from "lucide-react"; import {Badge} from "@/components/ui/badge"; import {NotificationLogModal} from "@/features/notifications/notification-log-modal"; -import {getChannelIcon} from "@/features/channel/channels-helpers"; +import {getChannelIcon} from "@/features/channel/components/channels-helpers"; export function notificationLogsColumns(): ColumnDef[] { diff --git a/src/features/onboarding/hooks/use-add-notifier.ts b/src/features/onboarding/hooks/use-add-notifier.ts index 80083fea..1748ab79 100644 --- a/src/features/onboarding/hooks/use-add-notifier.ts +++ b/src/features/onboarding/hooks/use-add-notifier.ts @@ -3,7 +3,7 @@ import { useMutation } from "@tanstack/react-query"; import { useOnboarding } from "@onboardjs/react"; import { toast } from "sonner"; -import { addNotificationChannelAction } from "@/features/channel/notifications/channel.action"; +import { addNotificationChannelAction } from "@/features/channel/components/notifications/channel.action"; import type { OnboardingChannel } from "@/features/onboarding/types"; type NotifierInput = { diff --git a/src/features/onboarding/hooks/use-add-storage.ts b/src/features/onboarding/hooks/use-add-storage.ts index bfde5e21..406c1832 100644 --- a/src/features/onboarding/hooks/use-add-storage.ts +++ b/src/features/onboarding/hooks/use-add-storage.ts @@ -3,7 +3,7 @@ import { useMutation } from "@tanstack/react-query"; import { useOnboarding } from "@onboardjs/react"; import { toast } from "sonner"; -import { addStorageChannelAction } from "@/features/channel/storages/channel.action"; +import { addStorageChannelAction } from "@/features/channel/components/storages/channel.action"; import type { OnboardingChannel } from "@/features/onboarding/types"; type StorageInput = { diff --git a/src/features/onboarding/hooks/use-remove-notifier.ts b/src/features/onboarding/hooks/use-remove-notifier.ts index 76b22621..fb8c974f 100644 --- a/src/features/onboarding/hooks/use-remove-notifier.ts +++ b/src/features/onboarding/hooks/use-remove-notifier.ts @@ -3,7 +3,7 @@ import { useMutation } from "@tanstack/react-query"; import { useOnboarding } from "@onboardjs/react"; import { toast } from "sonner"; -import { removeNotificationChannelAction } from "@/features/channel/notifications/channel.action"; +import { removeNotificationChannelAction } from "@/features/channel/components/notifications/channel.action"; import type { OnboardingChannel } from "@/features/onboarding/types"; export const useRemoveNotifier = () => { diff --git a/src/features/onboarding/hooks/use-remove-storage.ts b/src/features/onboarding/hooks/use-remove-storage.ts index 5261bfa1..6b377037 100644 --- a/src/features/onboarding/hooks/use-remove-storage.ts +++ b/src/features/onboarding/hooks/use-remove-storage.ts @@ -3,7 +3,7 @@ import { useMutation } from "@tanstack/react-query"; import { useOnboarding } from "@onboardjs/react"; import { toast } from "sonner"; -import { removeStorageChannelAction } from "@/features/channel/storages/channel.action"; +import { removeStorageChannelAction } from "@/features/channel/components/storages/channel.action"; import type { OnboardingChannel } from "@/features/onboarding/types"; export const useRemoveStorage = () => { diff --git a/src/features/onboarding/steps/step-defaults.tsx b/src/features/onboarding/steps/step-defaults.tsx index 721d5abd..225ab59a 100644 --- a/src/features/onboarding/steps/step-defaults.tsx +++ b/src/features/onboarding/steps/step-defaults.tsx @@ -17,7 +17,7 @@ import type { OnboardingChannel, OnboardingDefaultsData, } from "@/features/onboarding/types"; -import { getChannelIcon } from "@/features/channel/channels-helpers"; +import { getChannelIcon } from "@/features/channel/components/channels-helpers"; import { updateNotificationSettingsAction } from "@/features/settings/notification.action"; import { updateStorageSettingsAction } from "@/features/settings/storage.action"; import { updateAvatarModeAction } from "@/features/settings/avatar.action"; diff --git a/src/features/onboarding/steps/step-notifier.tsx b/src/features/onboarding/steps/step-notifier.tsx index 4f0f77cf..2ac5e399 100644 --- a/src/features/onboarding/steps/step-notifier.tsx +++ b/src/features/onboarding/steps/step-notifier.tsx @@ -14,9 +14,9 @@ import { FormControl, FormMessage, } from "@/components/ui/form"; -import { notificationProviders } from "@/features/channel/channels-notification-helper"; -import { renderChannelForm } from "@/features/channel/channels-helpers"; -import { NotificationChannelFormSchema } from "@/features/channel/channel-form.schema"; +import { notificationProviders } from "@/features/channel/components/channels-notification-helper"; +import { renderChannelForm } from "@/features/channel/components/channels-helpers"; +import { NotificationChannelFormSchema } from "@/features/channel/schemas/channel-form.schema"; import { useAddNotifier } from "@/features/onboarding/hooks/use-add-notifier"; import { useRemoveNotifier } from "@/features/onboarding/hooks/use-remove-notifier"; import type { OnboardingChannel } from "@/features/onboarding/types"; diff --git a/src/features/onboarding/steps/step-storage.tsx b/src/features/onboarding/steps/step-storage.tsx index 21523149..b347613a 100644 --- a/src/features/onboarding/steps/step-storage.tsx +++ b/src/features/onboarding/steps/step-storage.tsx @@ -14,9 +14,9 @@ import { FormControl, FormMessage, } from "@/components/ui/form"; -import { storageProviders } from "@/features/channel/channels-storage-helper"; -import { renderChannelForm } from "@/features/channel/channels-helpers"; -import { StorageChannelFormSchema } from "@/features/channel/channel-form.schema"; +import { storageProviders } from "@/features/channel/components/channels-storage-helper"; +import { renderChannelForm } from "@/features/channel/components/channels-helpers"; +import { StorageChannelFormSchema } from "@/features/channel/schemas/channel-form.schema"; import { useAddStorage } from "@/features/onboarding/hooks/use-add-storage"; import { useRemoveStorage } from "@/features/onboarding/hooks/use-remove-storage"; import type { OnboardingChannel } from "@/features/onboarding/types"; diff --git a/src/features/organizations/channels-organization-form.tsx b/src/features/organizations/channels-organization-form.tsx index 8d764782..ca4463d5 100644 --- a/src/features/organizations/channels-organization-form.tsx +++ b/src/features/organizations/channels-organization-form.tsx @@ -16,7 +16,7 @@ import { import { updateNotificationChannelsOrganizationAction, updateStorageChannelsOrganizationAction } from "@/features/organizations/channels-organization.action"; -import {ChannelKind} from "@/features/channel/channels-helpers"; +import {ChannelKind} from "@/features/channel/components/channels-helpers"; type ChannelOrganisationFormProps = { diff --git a/src/features/organizations/organization-notifiers-tab.tsx b/src/features/organizations/organization-notifiers-tab.tsx index 1bb48f52..f856595a 100644 --- a/src/features/organizations/organization-notifiers-tab.tsx +++ b/src/features/organizations/organization-notifiers-tab.tsx @@ -4,8 +4,8 @@ import {CardsWithPagination} from "@/components/common/cards-with-pagination"; import {EmptyStatePlaceholder} from "@/components/common/empty-state-placeholder"; import {useState} from "react"; import {cn} from "@/lib/utils"; -import {ChannelAddEditModal} from "@/features/channel/channel-add-edit-modal"; -import {ChannelCard} from "@/features/channel/channel-card"; +import {ChannelAddEditModal} from "@/features/channel/components/channel-add-edit-modal"; +import {ChannelCard} from "@/features/channel/components/channel-card"; export type OrganizationNotifiersTabProps = { organization: OrganizationWithMembers; diff --git a/src/features/organizations/organization-storages-tab.tsx b/src/features/organizations/organization-storages-tab.tsx index 35794f91..820046e8 100644 --- a/src/features/organizations/organization-storages-tab.tsx +++ b/src/features/organizations/organization-storages-tab.tsx @@ -3,8 +3,8 @@ import {CardsWithPagination} from "@/components/common/cards-with-pagination"; import {EmptyStatePlaceholder} from "@/components/common/empty-state-placeholder"; import {useState} from "react"; import {cn} from "@/lib/utils"; -import {ChannelAddEditModal} from "@/features/channel/channel-add-edit-modal"; -import {ChannelCard} from "@/features/channel/channel-card"; +import {ChannelAddEditModal} from "@/features/channel/components/channel-add-edit-modal"; +import {ChannelCard} from "@/features/channel/components/channel-card"; import {StorageChannel} from "@/db/schema/12_storage-channel"; export type OrganizationNotifiersTabProps = { diff --git a/src/features/settings/notification-section.tsx b/src/features/settings/notification-section.tsx index d4a14650..8dd37474 100644 --- a/src/features/settings/notification-section.tsx +++ b/src/features/settings/notification-section.tsx @@ -13,7 +13,7 @@ import { } from "@/components/ui/form"; import {Select, SelectContent, SelectItem, SelectTrigger, SelectValue} from "@/components/ui/select"; import {useMutation} from "@tanstack/react-query"; -import {getChannelIcon} from "@/features/channel/channels-helpers"; +import {getChannelIcon} from "@/features/channel/components/channels-helpers"; import {NotificationChannelWith} from "@/db/schema/09_notification-channel"; import { DefaultNotificationSchema, DefaultNotificationType diff --git a/src/features/settings/storage-section.tsx b/src/features/settings/storage-section.tsx index a0e97009..32f8fc24 100644 --- a/src/features/settings/storage-section.tsx +++ b/src/features/settings/storage-section.tsx @@ -20,7 +20,7 @@ import { DefaultStorageSchema, DefaultStorageType } from "@/features/settings/storage.schema"; -import {getChannelIcon} from "@/features/channel/channels-helpers"; +import {getChannelIcon} from "@/features/channel/components/channels-helpers"; import { updateStorageSettingsAction } from "@/features/settings/storage.action"; diff --git a/src/features/storages/storages.dispatch.ts b/src/features/storages/storages.dispatch.ts index a64d98eb..2a9a6f44 100644 --- a/src/features/storages/storages.dispatch.ts +++ b/src/features/storages/storages.dispatch.ts @@ -10,7 +10,7 @@ import {dispatchViaProvider} from "@/features/channel/storages"; import {StorageChannel} from "@/db/schema/12_storage-channel"; import { StorageChannelFormType -} from "@/features/channel/channel-form.schema"; +} from "@/features/channel/schemas/channel-form.schema"; import { logger } from "@/lib/logger"; const log = logger.child({ module: "features/storages/dispatch" });