more cleanup, better search
This commit is contained in:
@@ -4,7 +4,7 @@ WORKDIR /srv
|
||||
|
||||
COPY ./package.json ./package-lock.json /srv/
|
||||
RUN npm install
|
||||
COPY tsconfig.json tsconfig.app.json tsconfig.node.json vite.config.ts /srv/
|
||||
COPY tsconfig.json tsconfig.app.json tsconfig.node.json vite.config.ts .env.development .env.production /srv/
|
||||
|
||||
COPY src /srv/src
|
||||
COPY public /srv/public
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
version: "3.7"
|
||||
services:
|
||||
gate:
|
||||
image: registry.gitlab.com/standa-fifik/battle-caster:latest
|
||||
image: registry.gitlab.com/standa-fifik/battle-caster:0.2.4
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -96,7 +96,7 @@ function openPopover() {
|
||||
}
|
||||
|
||||
function onDragover(event: DragEvent) {
|
||||
const data = event.dataTransfer?.getData('application/json');
|
||||
// const data = event.dataTransfer?.getData('application/json');
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
:class="{
|
||||
'a-parallel__song--playing': song.isPlaying
|
||||
}"
|
||||
v-for="(song, idx) in node.sounds()"
|
||||
v-for="(song) in node.sounds()"
|
||||
:key="song.options.vFile.name"
|
||||
@click="playTrack(song)"
|
||||
>
|
||||
|
||||
@@ -76,8 +76,12 @@ watch(search, async (value) => {
|
||||
searchAbort.abort();
|
||||
}
|
||||
searchAbort = new AbortController();
|
||||
let numberOfResults = 0;
|
||||
for await (let result of fs.search(value, searchAbort.signal)) {
|
||||
searchResults.value.push(result);
|
||||
if (numberOfResults++ > 100) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ export class ParallelGroupNode extends SoundGroupNode<ParallelGroupNodeOptions,
|
||||
}
|
||||
|
||||
play() {
|
||||
this.soundNodes.forEach((sound, i) => {
|
||||
this.soundNodes.forEach((sound) => {
|
||||
if (this.enabledTracks.has(sound.id)) {
|
||||
sound.play();
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@ export class MediaElementSoundNode extends SoundNode<MediaElementSoundNodeOption
|
||||
this.mediaElement.addEventListener('ended', ()=> {
|
||||
this._isPlaying = false;
|
||||
});
|
||||
this.mediaElement.addEventListener('playing', (event) => {
|
||||
this.mediaElement.addEventListener('playing', () => {
|
||||
this._isPlaying = true;
|
||||
});
|
||||
this.mediaElement.addEventListener('pause', () => {
|
||||
|
||||
@@ -58,7 +58,7 @@ export class MountedFs implements Fs {
|
||||
}
|
||||
|
||||
async *search(query: string, cancelToken?: AbortSignal) {
|
||||
query = query.toLocaleLowerCase();
|
||||
const queries: string[] = query.toLocaleLowerCase().split(' ');
|
||||
for (const fs of this.filesystems.values()) {
|
||||
const dirQueue = [fs.root];
|
||||
while (dirQueue.length > 0) {
|
||||
@@ -71,7 +71,7 @@ export class MountedFs implements Fs {
|
||||
}
|
||||
if (child.type === 'directory') {
|
||||
dirQueue.push(child);
|
||||
} else if (child.name.toLocaleLowerCase().includes(query)) {
|
||||
} else if (queries.every((query) => [child.source, ...child.path].join('/').toLocaleLowerCase().includes(query))) {
|
||||
yield child;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ export class WebRtcChannelSummon extends MessageEmitter implements JsonChannelSu
|
||||
}
|
||||
this.peer.ontrack = (event) => {
|
||||
event.streams.forEach((stream) => {
|
||||
stream.getTracks().forEach((track) => {
|
||||
stream.getTracks().forEach(() => {
|
||||
if (event.track.kind === 'audio') {
|
||||
const audioElement = document.createElement('audio');
|
||||
audioElement.srcObject = stream; // Attach the received stream
|
||||
|
||||
@@ -107,7 +107,7 @@ const dynamicStyle = computed(() => {
|
||||
});
|
||||
|
||||
|
||||
function onVideoLoaded(event: Event) {
|
||||
function onVideoLoaded() {
|
||||
mediaDimensions.value = {
|
||||
width: video.value!.videoWidth,
|
||||
height: video.value!.videoHeight,
|
||||
|
||||
@@ -15,9 +15,6 @@ export default defineConfig({
|
||||
},
|
||||
},
|
||||
},
|
||||
define: {
|
||||
'import.meta.env.CHROMECAST_APP_ID': JSON.stringify(process.env.VITE_CHROMECAST_APP_ID)
|
||||
},
|
||||
plugins: [
|
||||
vue({
|
||||
template: {
|
||||
|
||||
Reference in New Issue
Block a user