lint: remove remaining unused imports and variables (20 fixes)
Co-Authored-By: Justin Edmund <justin@jedmund.com>
This commit is contained in:
parent
2df4819fef
commit
f3bd552eca
4 changed files with 3 additions and 44 deletions
|
|
@ -1,11 +1,6 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import type { Editor } from '@tiptap/core'
|
import type { Editor } from '@tiptap/core'
|
||||||
import type { Media } from '@prisma/client'
|
import type { Media } from '@prisma/client'
|
||||||
import Image from 'lucide-svelte/icons/image'
|
|
||||||
import Video from 'lucide-svelte/icons/video'
|
|
||||||
import AudioLines from 'lucide-svelte/icons/audio-lines'
|
|
||||||
import Grid3x3 from 'lucide-svelte/icons/grid-3x3'
|
|
||||||
import MapPin from 'lucide-svelte/icons/map-pin'
|
|
||||||
import MediaIcon from '$icons/media.svg?component'
|
import MediaIcon from '$icons/media.svg?component'
|
||||||
import Upload from 'lucide-svelte/icons/upload'
|
import Upload from 'lucide-svelte/icons/upload'
|
||||||
import Link from 'lucide-svelte/icons/link'
|
import Link from 'lucide-svelte/icons/link'
|
||||||
|
|
@ -38,7 +33,6 @@
|
||||||
|
|
||||||
let selectedAction = $state<ActionType>(defaultAction())
|
let selectedAction = $state<ActionType>(defaultAction())
|
||||||
let embedUrl = $state('')
|
let embedUrl = $state('')
|
||||||
let searchQuery = $state('')
|
|
||||||
let isUploading = $state(false)
|
let isUploading = $state(false)
|
||||||
let fileInput: HTMLInputElement
|
let fileInput: HTMLInputElement
|
||||||
let isOpen = $state(true)
|
let isOpen = $state(true)
|
||||||
|
|
@ -291,12 +285,6 @@
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleLocationSearch() {
|
|
||||||
// This would integrate with a geocoding API
|
|
||||||
// For now, just show a message
|
|
||||||
alert('Location search coming soon! For now, paste a Google Maps link.')
|
|
||||||
}
|
|
||||||
|
|
||||||
function handleLocationInsert() {
|
function handleLocationInsert() {
|
||||||
const lat = parseFloat(locationLat)
|
const lat = parseFloat(locationLat)
|
||||||
const lng = parseFloat(locationLng)
|
const lng = parseFloat(locationLng)
|
||||||
|
|
@ -336,23 +324,6 @@
|
||||||
isOpen = false
|
isOpen = false
|
||||||
onClose()
|
onClose()
|
||||||
}
|
}
|
||||||
|
|
||||||
function getContentTitle() {
|
|
||||||
switch (contentType) {
|
|
||||||
case 'image':
|
|
||||||
return 'Insert Image'
|
|
||||||
case 'video':
|
|
||||||
return 'Insert Video'
|
|
||||||
case 'audio':
|
|
||||||
return 'Insert Audio'
|
|
||||||
case 'gallery':
|
|
||||||
return 'Create Gallery'
|
|
||||||
case 'location':
|
|
||||||
return 'Add Location'
|
|
||||||
default:
|
|
||||||
return 'Insert Content'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Pane
|
<Pane
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,4 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Album from '$components/Album.svelte'
|
|
||||||
import Game from '$components/Game.svelte'
|
|
||||||
import MentionList from '$components/MentionList.svelte'
|
import MentionList from '$components/MentionList.svelte'
|
||||||
import Page from '$components/Page.svelte'
|
import Page from '$components/Page.svelte'
|
||||||
import RecentAlbums from '$components/RecentAlbums.svelte'
|
import RecentAlbums from '$components/RecentAlbums.svelte'
|
||||||
|
|
@ -13,8 +11,6 @@
|
||||||
let { data } = $props<{ data: PageData }>()
|
let { data } = $props<{ data: PageData }>()
|
||||||
|
|
||||||
let albums = $derived(data.albums)
|
let albums = $derived(data.albums)
|
||||||
let games = $derived(data.games)
|
|
||||||
let error = $derived(data.error)
|
|
||||||
|
|
||||||
const pageUrl = $derived($page.url.href)
|
const pageUrl = $derived($page.url.href)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,7 @@ import redis from '../redis-client'
|
||||||
|
|
||||||
import type {
|
import type {
|
||||||
AuthTokensResponse,
|
AuthTokensResponse,
|
||||||
GetUserPlayedTimeResponse,
|
GetUserPlayedTimeResponse
|
||||||
RecentlyPlayedGamesResponse
|
|
||||||
} from 'psn-api'
|
} from 'psn-api'
|
||||||
import type { RequestHandler } from './$types'
|
import type { RequestHandler } from './$types'
|
||||||
|
|
||||||
|
|
@ -13,7 +12,6 @@ const require = Module.createRequire(import.meta.url)
|
||||||
const {
|
const {
|
||||||
exchangeNpssoForCode,
|
exchangeNpssoForCode,
|
||||||
exchangeCodeForAccessToken,
|
exchangeCodeForAccessToken,
|
||||||
getRecentlyPlayedGames,
|
|
||||||
getUserPlayedTime
|
getUserPlayedTime
|
||||||
} = require('psn-api')
|
} = require('psn-api')
|
||||||
|
|
||||||
|
|
@ -21,7 +19,7 @@ const CACHE_TTL = 60 * 60 // 1 hour
|
||||||
const PSN_NPSSO_TOKEN = process.env.PSN_NPSSO_TOKEN
|
const PSN_NPSSO_TOKEN = process.env.PSN_NPSSO_TOKEN
|
||||||
const PSN_ID = '1275018559140296533'
|
const PSN_ID = '1275018559140296533'
|
||||||
|
|
||||||
export const GET: RequestHandler = async ({ url }) => {
|
export const GET: RequestHandler = async () => {
|
||||||
// Check if data is in cache
|
// Check if data is in cache
|
||||||
const cachedData = await redis.get(`psn:${PSN_ID}`)
|
const cachedData = await redis.get(`psn:${PSN_ID}`)
|
||||||
if (cachedData) {
|
if (cachedData) {
|
||||||
|
|
@ -45,7 +43,7 @@ async function authorize(npsso: string): Promise<AuthTokensResponse> {
|
||||||
return authorization
|
return authorization
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getSerializedGames(psnId: string): Promise<SerializableGameInfo[]> {
|
async function getSerializedGames(_psnId: string): Promise<SerializableGameInfo[]> {
|
||||||
// Authorize with PSN and get games sorted by last played time
|
// Authorize with PSN and get games sorted by last played time
|
||||||
const authorization = await authorize(PSN_NPSSO_TOKEN || '')
|
const authorization = await authorize(PSN_NPSSO_TOKEN || '')
|
||||||
const response = await getUserPlayedTime(authorization, PSN_ID, {
|
const response = await getUserPlayedTime(authorization, PSN_ID, {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
import { generateMetaTags } from '$lib/utils/metadata'
|
import { generateMetaTags } from '$lib/utils/metadata'
|
||||||
import { page } from '$app/stores'
|
import { page } from '$app/stores'
|
||||||
import { goto } from '$app/navigation'
|
import { goto } from '$app/navigation'
|
||||||
import { onMount } from 'svelte'
|
|
||||||
import { spring } from 'svelte/motion'
|
import { spring } from 'svelte/motion'
|
||||||
import { getCurrentMousePosition } from '$lib/stores/mouse'
|
import { getCurrentMousePosition } from '$lib/stores/mouse'
|
||||||
import type { PageData } from './$types'
|
import type { PageData } from './$types'
|
||||||
|
|
@ -46,7 +45,6 @@
|
||||||
let defaultRightX = 0
|
let defaultRightX = 0
|
||||||
|
|
||||||
const pageUrl = $derived($page.url.href)
|
const pageUrl = $derived($page.url.href)
|
||||||
const fromAlbum = $derived($page.url.searchParams.get('from'))
|
|
||||||
|
|
||||||
// Generate metadata
|
// Generate metadata
|
||||||
const metaTags = $derived(
|
const metaTags = $derived(
|
||||||
|
|
@ -218,10 +216,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Track last known mouse position for scroll updates
|
|
||||||
let lastMouseX = 0
|
|
||||||
let lastMouseY = 0
|
|
||||||
|
|
||||||
// Store last mouse client position for scroll updates
|
// Store last mouse client position for scroll updates
|
||||||
let lastClientX = 0
|
let lastClientX = 0
|
||||||
let lastClientY = 0
|
let lastClientY = 0
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue