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