feat: cloud native file browser, settings Claude auth, deploy hardening
- Add native Cloud file browser with FileBrowser API integration
- Add cloud store, filebrowser-client, useAudioPlayer, useFileType composables
- Add Cloud components: FileGrid, FileCard, FileCardGrid, CloudToolbar
- Add Claude authentication section to Settings with OAuth status check
- Harden deploy script to preserve /aiui/ and claude-login.html
- Add nginx proxies for btcpay, homeassistant, filebrowser (HTTPS block)
- Add app configs for filebrowser, searxng, penpot in package.rs
- Update goal progress tracking with app aliases
- Improve mobile back button composable with ResizeObserver
- Update various views with cloud integration and UI refinements
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 23:05:01 +00:00
|
|
|
import { ref, computed } from 'vue'
|
|
|
|
|
|
|
|
|
|
const audio = ref<HTMLAudioElement | null>(null)
|
|
|
|
|
const currentSrc = ref<string | null>(null)
|
|
|
|
|
const currentName = ref('')
|
|
|
|
|
const playing = ref(false)
|
|
|
|
|
const currentTime = ref(0)
|
|
|
|
|
const duration = ref(0)
|
2026-03-05 08:24:56 +00:00
|
|
|
const error = ref<string | null>(null)
|
2026-03-21 01:32:28 +00:00
|
|
|
let initialized = false
|
|
|
|
|
|
|
|
|
|
/** Create the Audio element and attach listeners once */
|
|
|
|
|
function init() {
|
|
|
|
|
if (initialized) return
|
|
|
|
|
initialized = true
|
|
|
|
|
audio.value = new Audio()
|
|
|
|
|
audio.value.addEventListener('timeupdate', () => {
|
|
|
|
|
currentTime.value = audio.value?.currentTime ?? 0
|
|
|
|
|
})
|
|
|
|
|
audio.value.addEventListener('loadedmetadata', () => {
|
|
|
|
|
duration.value = audio.value?.duration ?? 0
|
|
|
|
|
error.value = null
|
|
|
|
|
})
|
|
|
|
|
audio.value.addEventListener('ended', () => {
|
|
|
|
|
playing.value = false
|
|
|
|
|
})
|
|
|
|
|
audio.value.addEventListener('pause', () => {
|
|
|
|
|
playing.value = false
|
|
|
|
|
})
|
|
|
|
|
audio.value.addEventListener('play', () => {
|
|
|
|
|
playing.value = true
|
|
|
|
|
error.value = null
|
|
|
|
|
})
|
|
|
|
|
audio.value.addEventListener('error', () => {
|
|
|
|
|
playing.value = false
|
|
|
|
|
error.value = 'Could not play audio. File Browser may not be running.'
|
|
|
|
|
})
|
|
|
|
|
}
|
feat: cloud native file browser, settings Claude auth, deploy hardening
- Add native Cloud file browser with FileBrowser API integration
- Add cloud store, filebrowser-client, useAudioPlayer, useFileType composables
- Add Cloud components: FileGrid, FileCard, FileCardGrid, CloudToolbar
- Add Claude authentication section to Settings with OAuth status check
- Harden deploy script to preserve /aiui/ and claude-login.html
- Add nginx proxies for btcpay, homeassistant, filebrowser (HTTPS block)
- Add app configs for filebrowser, searxng, penpot in package.rs
- Update goal progress tracking with app aliases
- Improve mobile back button composable with ResizeObserver
- Update various views with cloud integration and UI refinements
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 23:05:01 +00:00
|
|
|
|
|
|
|
|
function play(src: string, name: string) {
|
2026-03-21 01:32:28 +00:00
|
|
|
init()
|
2026-03-05 08:24:56 +00:00
|
|
|
error.value = null
|
feat: cloud native file browser, settings Claude auth, deploy hardening
- Add native Cloud file browser with FileBrowser API integration
- Add cloud store, filebrowser-client, useAudioPlayer, useFileType composables
- Add Cloud components: FileGrid, FileCard, FileCardGrid, CloudToolbar
- Add Claude authentication section to Settings with OAuth status check
- Harden deploy script to preserve /aiui/ and claude-login.html
- Add nginx proxies for btcpay, homeassistant, filebrowser (HTTPS block)
- Add app configs for filebrowser, searxng, penpot in package.rs
- Update goal progress tracking with app aliases
- Improve mobile back button composable with ResizeObserver
- Update various views with cloud integration and UI refinements
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 23:05:01 +00:00
|
|
|
|
|
|
|
|
if (currentSrc.value === src && playing.value) {
|
2026-03-21 01:32:28 +00:00
|
|
|
audio.value!.pause()
|
feat: cloud native file browser, settings Claude auth, deploy hardening
- Add native Cloud file browser with FileBrowser API integration
- Add cloud store, filebrowser-client, useAudioPlayer, useFileType composables
- Add Cloud components: FileGrid, FileCard, FileCardGrid, CloudToolbar
- Add Claude authentication section to Settings with OAuth status check
- Harden deploy script to preserve /aiui/ and claude-login.html
- Add nginx proxies for btcpay, homeassistant, filebrowser (HTTPS block)
- Add app configs for filebrowser, searxng, penpot in package.rs
- Update goal progress tracking with app aliases
- Improve mobile back button composable with ResizeObserver
- Update various views with cloud integration and UI refinements
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 23:05:01 +00:00
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (currentSrc.value !== src) {
|
2026-03-21 01:32:28 +00:00
|
|
|
audio.value!.src = src
|
feat: cloud native file browser, settings Claude auth, deploy hardening
- Add native Cloud file browser with FileBrowser API integration
- Add cloud store, filebrowser-client, useAudioPlayer, useFileType composables
- Add Cloud components: FileGrid, FileCard, FileCardGrid, CloudToolbar
- Add Claude authentication section to Settings with OAuth status check
- Harden deploy script to preserve /aiui/ and claude-login.html
- Add nginx proxies for btcpay, homeassistant, filebrowser (HTTPS block)
- Add app configs for filebrowser, searxng, penpot in package.rs
- Update goal progress tracking with app aliases
- Improve mobile back button composable with ResizeObserver
- Update various views with cloud integration and UI refinements
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 23:05:01 +00:00
|
|
|
currentSrc.value = src
|
|
|
|
|
currentName.value = name
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-21 01:32:28 +00:00
|
|
|
audio.value!.play()
|
feat: cloud native file browser, settings Claude auth, deploy hardening
- Add native Cloud file browser with FileBrowser API integration
- Add cloud store, filebrowser-client, useAudioPlayer, useFileType composables
- Add Cloud components: FileGrid, FileCard, FileCardGrid, CloudToolbar
- Add Claude authentication section to Settings with OAuth status check
- Harden deploy script to preserve /aiui/ and claude-login.html
- Add nginx proxies for btcpay, homeassistant, filebrowser (HTTPS block)
- Add app configs for filebrowser, searxng, penpot in package.rs
- Update goal progress tracking with app aliases
- Improve mobile back button composable with ResizeObserver
- Update various views with cloud integration and UI refinements
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 23:05:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function pause() {
|
|
|
|
|
audio.value?.pause()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function seek(time: number) {
|
|
|
|
|
if (audio.value) {
|
|
|
|
|
audio.value.currentTime = time
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function stop() {
|
|
|
|
|
if (audio.value) {
|
|
|
|
|
audio.value.pause()
|
|
|
|
|
audio.value.currentTime = 0
|
|
|
|
|
}
|
|
|
|
|
playing.value = false
|
|
|
|
|
currentSrc.value = null
|
|
|
|
|
currentName.value = ''
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const progress = computed(() => {
|
|
|
|
|
if (duration.value === 0) return 0
|
|
|
|
|
return (currentTime.value / duration.value) * 100
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
export function useAudioPlayer() {
|
|
|
|
|
return {
|
|
|
|
|
play,
|
|
|
|
|
pause,
|
|
|
|
|
seek,
|
|
|
|
|
stop,
|
|
|
|
|
playing,
|
|
|
|
|
currentName,
|
|
|
|
|
currentTime,
|
|
|
|
|
duration,
|
|
|
|
|
progress,
|
|
|
|
|
currentSrc,
|
2026-03-05 08:24:56 +00:00
|
|
|
error,
|
feat: cloud native file browser, settings Claude auth, deploy hardening
- Add native Cloud file browser with FileBrowser API integration
- Add cloud store, filebrowser-client, useAudioPlayer, useFileType composables
- Add Cloud components: FileGrid, FileCard, FileCardGrid, CloudToolbar
- Add Claude authentication section to Settings with OAuth status check
- Harden deploy script to preserve /aiui/ and claude-login.html
- Add nginx proxies for btcpay, homeassistant, filebrowser (HTTPS block)
- Add app configs for filebrowser, searxng, penpot in package.rs
- Update goal progress tracking with app aliases
- Improve mobile back button composable with ResizeObserver
- Update various views with cloud integration and UI refinements
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 23:05:01 +00:00
|
|
|
}
|
|
|
|
|
}
|