fix: suppress unused variable errors after hiding persona/extension UI
vue-tsc flagged variables as unused since their template references are inside HTML comments. Prefix with underscores and comment out the related functions/imports so the production build passes cleanly. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -293,7 +293,8 @@ import { ref, computed, watch, nextTick, onMounted, onUnmounted } from 'vue'
|
|||||||
import { useRouter, useRoute } from 'vue-router'
|
import { useRouter, useRoute } from 'vue-router'
|
||||||
import { useAuth } from '../composables/useAuth'
|
import { useAuth } from '../composables/useAuth'
|
||||||
import { useAccounts } from '../composables/useAccounts'
|
import { useAccounts } from '../composables/useAccounts'
|
||||||
import { accountManager } from '../lib/accounts'
|
// Hidden in production — re-enable with persona/extension login
|
||||||
|
// import { accountManager } from '../lib/accounts'
|
||||||
import { useContentDiscovery } from '../composables/useContentDiscovery'
|
import { useContentDiscovery } from '../composables/useContentDiscovery'
|
||||||
import { useContentSourceStore } from '../stores/contentSource'
|
import { useContentSourceStore } from '../stores/contentSource'
|
||||||
import { useContentStore } from '../stores/content'
|
import { useContentStore } from '../stores/content'
|
||||||
@@ -301,7 +302,7 @@ import { indeeHubFilms } from '../data/indeeHubFilms'
|
|||||||
import { topDocFilms } from '../data/topDocFilms'
|
import { topDocFilms } from '../data/topDocFilms'
|
||||||
import type { Content } from '../types/content'
|
import type { Content } from '../types/content'
|
||||||
|
|
||||||
type Persona = { name: string; nsec: string; pubkey: string }
|
// type Persona = { name: string; nsec: string; pubkey: string }
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
showNav?: boolean
|
showNav?: boolean
|
||||||
@@ -325,15 +326,16 @@ const emit = defineEmits<Emits>()
|
|||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const { user, isAuthenticated, isFilmmaker: isFilmmakerComputed, loginWithNostr: appLoginWithNostr, logout: appLogout } = useAuth()
|
const { user, isAuthenticated, isFilmmaker: isFilmmakerComputed, loginWithNostr: _appLoginWithNostr, logout: appLogout } = useAuth()
|
||||||
const {
|
const {
|
||||||
isLoggedIn: nostrLoggedIn,
|
isLoggedIn: nostrLoggedIn,
|
||||||
activePubkey: nostrActivePubkey,
|
activePubkey: nostrActivePubkey,
|
||||||
activeName: nostrActiveName,
|
activeName: nostrActiveName,
|
||||||
testPersonas,
|
// Hidden in production for now (see template comment)
|
||||||
tastemakerPersonas,
|
testPersonas: _testPersonas,
|
||||||
loginWithExtension,
|
tastemakerPersonas: _tastemakerPersonas,
|
||||||
loginWithPersona,
|
loginWithExtension: _loginWithExtension,
|
||||||
|
loginWithPersona: _loginWithPersona,
|
||||||
logout: nostrLogout,
|
logout: nostrLogout,
|
||||||
} = useAccounts()
|
} = useAccounts()
|
||||||
|
|
||||||
@@ -547,44 +549,39 @@ function toggleDropdown() {
|
|||||||
algosMenuOpen.value = false
|
algosMenuOpen.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
function togglePersonaMenu() {
|
// Hidden in production for now — uncomment to re-enable persona/extension login
|
||||||
personaMenuOpen.value = !personaMenuOpen.value
|
// function togglePersonaMenu() {
|
||||||
dropdownOpen.value = false
|
// personaMenuOpen.value = !personaMenuOpen.value
|
||||||
algosMenuOpen.value = false
|
// dropdownOpen.value = false
|
||||||
}
|
// algosMenuOpen.value = false
|
||||||
|
// }
|
||||||
|
|
||||||
function navigateTo(path: string) {
|
function navigateTo(path: string) {
|
||||||
dropdownOpen.value = false
|
dropdownOpen.value = false
|
||||||
router.push(path)
|
router.push(path)
|
||||||
}
|
}
|
||||||
|
|
||||||
async function handlePersonaLogin(persona: Persona) {
|
// async function handlePersonaLogin(persona: Persona) {
|
||||||
personaMenuOpen.value = false
|
// personaMenuOpen.value = false
|
||||||
// Set up Nostr account (for commenting/reactions)
|
// await _loginWithPersona(persona)
|
||||||
await loginWithPersona(persona)
|
// try {
|
||||||
// Also populate auth store (for subscription/My List access)
|
// await appLoginWithNostr(persona.pubkey, 'persona', {})
|
||||||
try {
|
// } catch (err) {
|
||||||
await appLoginWithNostr(persona.pubkey, 'persona', {})
|
// console.warn('[PersonaLogin] Backend auth failed:', (err as Error).message)
|
||||||
} catch (err) {
|
// }
|
||||||
// Backend auth failed — persona still works for commenting/reactions
|
// }
|
||||||
// via accountManager, just won't have full API access
|
|
||||||
console.warn('[PersonaLogin] Backend auth failed:', (err as Error).message)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function handleExtensionLogin() {
|
// async function handleExtensionLogin() {
|
||||||
// Set up Nostr account (for commenting/reactions)
|
// await _loginWithExtension()
|
||||||
await loginWithExtension()
|
// try {
|
||||||
// Also populate auth store (for subscription/My List access)
|
// const pubkey = accountManager.active?.pubkey
|
||||||
try {
|
// if (pubkey) {
|
||||||
const pubkey = accountManager.active?.pubkey
|
// await appLoginWithNostr(pubkey, 'extension', {})
|
||||||
if (pubkey) {
|
// }
|
||||||
await appLoginWithNostr(pubkey, 'extension', {})
|
// } catch {
|
||||||
}
|
// // non-critical
|
||||||
} catch {
|
// }
|
||||||
// Auth store mock login — non-critical if it fails
|
// }
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function handleLogout() {
|
async function handleLogout() {
|
||||||
nostrLogout()
|
nostrLogout()
|
||||||
|
|||||||
Reference in New Issue
Block a user