fix: resolve ESLint errors and cleanup unused code
- Remove unused imports (trans, postsIndex, BreadcrumbItemType, workspaceSettings) - Remove unused variables (pageDescription, selectedLabels, _progress, props) - Fix duplicate key: rename preferences import to preferencesRoute - Remove @unovis ambient declarations (packages now installed) - Fix import order in Wayfinder-generated routes
This commit is contained in:
parent
6721c623ef
commit
c149eda2b0
22 changed files with 15 additions and 55 deletions
|
|
@ -15,7 +15,7 @@
|
|||
|
|
||||
*/
|
||||
|
||||
'name' => env('APP_NAME', 'Laravel'),
|
||||
'name' => env('APP_NAME', 'TryPost.it'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
@ -54,7 +54,7 @@
|
|||
|
|
||||
*/
|
||||
|
||||
'url' => env('APP_URL', 'http://localhost'),
|
||||
'url' => env('APP_URL', 'https://trypost.it'),
|
||||
|
||||
'email_asset_url' => env('EMAIL_ASSET_URL', 'https://app.trypost.it'),
|
||||
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -46,7 +46,6 @@ import { accounts, calendar } from '@/routes/app';
|
|||
import { index as hashtags } from '@/routes/app/hashtags';
|
||||
import { index as labels } from '@/routes/app/labels';
|
||||
import { edit as editProfile } from '@/routes/app/profile';
|
||||
import { settings as workspaceSettings } from '@/routes/app/workspace';
|
||||
import { create as createWorkspaceRoute, switchMethod } from '@/routes/app/workspaces';
|
||||
import type { NavItem } from '@/types';
|
||||
|
||||
|
|
|
|||
|
|
@ -3,12 +3,12 @@ import { usePage } from '@inertiajs/vue3';
|
|||
import { IconChevronRight } from '@tabler/icons-vue';
|
||||
import { computed } from 'vue';
|
||||
|
||||
import NotificationBell from '@/components/NotificationBell.vue';
|
||||
import {
|
||||
DropdownMenu,
|
||||
DropdownMenuContent,
|
||||
DropdownMenuTrigger,
|
||||
} from '@/components/ui/dropdown-menu';
|
||||
import NotificationBell from '@/components/NotificationBell.vue';
|
||||
import {
|
||||
SidebarMenu,
|
||||
SidebarMenuButton,
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
import { usePage } from '@inertiajs/vue3';
|
||||
import { computed, onMounted, watch } from 'vue';
|
||||
import { toast } from 'vue-sonner';
|
||||
|
||||
import { Toaster } from '@/components/ui/sonner';
|
||||
|
||||
const page = usePage();
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import {
|
|||
import { loadLanguageAsync } from 'laravel-vue-i18n';
|
||||
import { computed } from 'vue';
|
||||
|
||||
import { updateLanguage } from '@/actions/App/Http/Controllers/App/Settings/ProfileController';
|
||||
import {
|
||||
DropdownMenuGroup,
|
||||
DropdownMenuItem,
|
||||
|
|
@ -26,7 +27,6 @@ import { useAppearance } from '@/composables/useAppearance';
|
|||
import dayjs from '@/dayjs';
|
||||
import { logout } from '@/routes';
|
||||
import { edit } from '@/routes/app/profile';
|
||||
import { updateLanguage } from '@/actions/App/Http/Controllers/App/Settings/ProfileController';
|
||||
import type { User } from '@/types';
|
||||
|
||||
interface Language {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<script setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
|
||||
import {
|
||||
CommandDialog,
|
||||
CommandEmpty,
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ export function useMediaManager(options: UseMediaManagerOptions) {
|
|||
model: 'postPlatform',
|
||||
modelId: postPlatformId,
|
||||
collection: 'default',
|
||||
onProgress: (_progress) => {},
|
||||
onProgress: () => {},
|
||||
});
|
||||
} else {
|
||||
// Regular upload for small files
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ import { useActiveUrl } from '@/composables/useActiveUrl';
|
|||
import { toUrl } from '@/lib/utils';
|
||||
import { index as apiKeys } from '@/routes/app/api-keys';
|
||||
import { index as billing } from '@/routes/app/billing';
|
||||
import { edit as editProfile } from '@/routes/app/profile';
|
||||
import { preferences as notificationPreferences } from '@/routes/app/notifications';
|
||||
import { edit as editProfile } from '@/routes/app/profile';
|
||||
import { edit as editPassword } from '@/routes/app/user-password';
|
||||
import { settings as workspaceSettings } from '@/routes/app/workspace';
|
||||
import { type NavItem, type SharedData } from '@/types';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<script setup lang="ts">
|
||||
import { Head } from '@inertiajs/vue3';
|
||||
import { trans } from 'laravel-vue-i18n';
|
||||
import { IconCreditCard, IconFileText, IconBuilding, IconExternalLink, IconSparkles } from '@tabler/icons-vue';
|
||||
import { trans } from 'laravel-vue-i18n';
|
||||
|
||||
import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert';
|
||||
import { Badge } from '@/components/ui/badge';
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
import { Head, router } from '@inertiajs/vue3';
|
||||
import { useEcho } from '@laravel/echo-vue';
|
||||
import { IconLoader2, IconCircleCheck, IconCircleX } from '@tabler/icons-vue';
|
||||
import { trans } from 'laravel-vue-i18n';
|
||||
import { ref, onMounted } from 'vue';
|
||||
|
||||
import { Button } from '@/components/ui/button';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
<script setup lang="ts">
|
||||
import { Head, InfiniteScroll, router } from '@inertiajs/vue3';
|
||||
import { IconHash, IconPencil, IconSearch, IconTrash } from '@tabler/icons-vue';
|
||||
|
||||
import { trans } from 'laravel-vue-i18n';
|
||||
import { computed, ref, watch } from 'vue';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
<script setup lang="ts">
|
||||
import { Head, useForm } from '@inertiajs/vue3';
|
||||
import { IconBuilding, IconRocket, IconSparkles, IconBuildingStore, IconUser } from '@tabler/icons-vue';
|
||||
import { trans } from 'laravel-vue-i18n';
|
||||
|
||||
import { storeRole } from '@/actions/App/Http/Controllers/App/OnboardingController';
|
||||
import { Button } from '@/components/ui/button';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
<script setup lang="ts">
|
||||
import { Head, Link, router } from '@inertiajs/vue3';
|
||||
import { IconChevronLeft, IconChevronRight, IconPlus } from '@tabler/icons-vue';
|
||||
import { trans } from 'laravel-vue-i18n';
|
||||
import { computed, onMounted, onUnmounted, ref } from 'vue';
|
||||
|
||||
import DatePicker from '@/components/DatePicker.vue';
|
||||
|
|
@ -10,10 +9,8 @@ import { Tabs, TabsList, TabsTrigger } from '@/components/ui/tabs';
|
|||
import date from '@/date';
|
||||
import dayjs from '@/dayjs';
|
||||
import AppLayout from '@/layouts/AppLayout.vue';
|
||||
import { index as postsIndex } from '@/actions/App/Http/Controllers/App/PostController';
|
||||
import { calendar } from '@/routes/app';
|
||||
import { store as storePost, edit as editPost } from '@/routes/app/posts';
|
||||
import { type BreadcrumbItemType } from '@/types';
|
||||
|
||||
interface PostPlatform {
|
||||
id: string;
|
||||
|
|
|
|||
|
|
@ -667,10 +667,6 @@ const toggleLabel = (labelId: string) => {
|
|||
}
|
||||
};
|
||||
|
||||
const selectedLabels = computed(() => {
|
||||
return props.labels.filter(l => selectedLabelIds.value.includes(l.id));
|
||||
});
|
||||
|
||||
const appendHashtags = (hashtag: WorkspaceHashtag) => {
|
||||
if (isReadOnly.value || !activePlatform.value) return;
|
||||
|
||||
|
|
|
|||
|
|
@ -106,13 +106,6 @@ const pageTitle = computed(() => {
|
|||
return trans('posts.all_posts');
|
||||
});
|
||||
|
||||
const pageDescription = computed(() => {
|
||||
if (props.currentStatus === 'draft') return trans('posts.descriptions.draft');
|
||||
if (props.currentStatus === 'scheduled') return trans('posts.descriptions.scheduled');
|
||||
if (props.currentStatus === 'published') return trans('posts.descriptions.published');
|
||||
return trans('posts.manage_posts');
|
||||
});
|
||||
|
||||
const breadcrumbs = computed<BreadcrumbItemType[]>(() => {
|
||||
const items: BreadcrumbItemType[] = [
|
||||
{ title: trans('posts.title'), href: postsIndex.url() },
|
||||
|
|
|
|||
|
|
@ -27,9 +27,9 @@ import {
|
|||
TableRow,
|
||||
} from '@/components/ui/table';
|
||||
import date from '@/date';
|
||||
import { copyToClipboard } from '@/lib/utils';
|
||||
import AppLayout from '@/layouts/AppLayout.vue';
|
||||
import SettingsLayout from '@/layouts/settings/Layout.vue';
|
||||
import { copyToClipboard } from '@/lib/utils';
|
||||
import { index as apiKeysIndex } from '@/routes/app/api-keys';
|
||||
import { type BreadcrumbItem } from '@/types';
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import { Label } from '@/components/ui/label';
|
|||
import { Switch } from '@/components/ui/switch';
|
||||
import AppLayout from '@/layouts/AppLayout.vue';
|
||||
import SettingsLayout from '@/layouts/settings/Layout.vue';
|
||||
import { preferences } from '@/routes/app/notifications';
|
||||
import { preferences as preferencesRoute } from '@/routes/app/notifications';
|
||||
import { type BreadcrumbItem } from '@/types';
|
||||
|
||||
interface Preferences {
|
||||
|
|
@ -25,8 +25,8 @@ interface Props {
|
|||
const props = defineProps<Props>();
|
||||
|
||||
const breadcrumbItems = computed<BreadcrumbItem[]>(() => [
|
||||
{ title: trans('settings.title'), href: preferences().url },
|
||||
{ title: trans('settings.nav.notifications'), href: preferences().url },
|
||||
{ title: trans('settings.title'), href: preferencesRoute().url },
|
||||
{ title: trans('settings.nav.notifications'), href: preferencesRoute().url },
|
||||
]);
|
||||
|
||||
const postPublished = ref(props.preferences.post_published);
|
||||
|
|
@ -37,7 +37,7 @@ const processing = ref(false);
|
|||
const submit = () => {
|
||||
processing.value = true;
|
||||
|
||||
router.put(preferences().url, {
|
||||
router.put(preferencesRoute().url, {
|
||||
post_published: postPublished.value,
|
||||
post_failed: postFailed.value,
|
||||
account_disconnected: accountDisconnected.value,
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ interface Props {
|
|||
currentWorkspaceId: string | null;
|
||||
}
|
||||
|
||||
const props = defineProps<Props>();
|
||||
defineProps<Props>();
|
||||
|
||||
const switchToWorkspace = (workspace: Workspace) => {
|
||||
router.post(switchMethod.url(workspace.id), {}, {
|
||||
|
|
|
|||
21
resources/js/types/globals.d.ts
vendored
21
resources/js/types/globals.d.ts
vendored
|
|
@ -1,26 +1,5 @@
|
|||
import { AppPageProps } from '@/types/index';
|
||||
|
||||
declare module '@unovis/vue' {
|
||||
export const VisXYContainer: any;
|
||||
export const VisLine: any;
|
||||
export const VisAxis: any;
|
||||
export const VisArea: any;
|
||||
export const VisStackedBar: any;
|
||||
export const VisBulletLegend: any;
|
||||
export const VisTooltip: any;
|
||||
export const VisCrosshair: any;
|
||||
}
|
||||
|
||||
declare module '@unovis/ts' {
|
||||
export class Line<T = any> {}
|
||||
export class Area<T = any> {}
|
||||
export class StackedBar<T = any> {}
|
||||
export class Axis<T = any> {}
|
||||
export class Crosshair<T = any> {}
|
||||
export class Tooltip<T = any> {}
|
||||
export class BulletLegend<T = any> {}
|
||||
}
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
dataLayer: Record<string, unknown>[];
|
||||
|
|
|
|||
Loading…
Reference in a new issue