Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/midi player #254

Merged
merged 22 commits into from
Sep 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
title: ""
labels: bug
assignees: ''

assignees: ""
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
Expand All @@ -24,15 +24,17 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
5 changes: 2 additions & 3 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
title: ""
labels: enhancement
assignees: ''

assignees: ""
---

**Is your feature request related to a problem? Please describe.**
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
enabled. Please enable it to continue.</strong
>
</noscript>
<div id="app"/>
<div id="app" />
<script type="module" src="/src/main.js"></script>
</body>
</html>
108 changes: 108 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@
"howler": "^2.2.1",
"ipfs-search-client": "^1.0.1",
"masonry-layout": "^4.2.2",
"midi-player-js": "^2.0.16",
"mime": "^3.0.0",
"moment": "^2.29.4",
"pretty-bytes": "^6.0.0",
"regenerator-runtime": "^0.13.9",
"soundfont-player": "^0.12.0",
"ts-node": "^10.8.0",
"url": "^0.11.0",
"vue": "^3.2.13",
Expand Down
2 changes: 0 additions & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
<script setup>
//TODO: make AppHeader generic also for homeview
import AppHeader from "@/components/pageLayout/AppHeader.vue";
import { useRoute } from "vue-router";
import PlayList from "./components/pageLayout/PlayList.vue";
import AudioDetail from "@/components/detailViewComponents/AudioDetail.vue";

const route = useRoute();
import { audioDetailPopup } from "@/composables/audioControls";
import { useFooter } from "@/composables/footer.ts";
const { adjustFooterPadding } = useFooter();
Expand Down
2 changes: 1 addition & 1 deletion src/components/detailViewComponents/VideoDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const videoPlayer = ref();
const loading = ref(true);
const error = ref(false);

const setError = (e) => {
const setError = () => {
error.value = true;
loading.value = false;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<script setup>
import VIframe from "@/components/shared/VIframe.vue";
import mime from "mime";
import getResourceURL from "@/helpers/resourceURL";
import Retriever from "@/helpers/FetchDoggy";
import { reactive, ref, computed } from "vue";
Expand Down
4 changes: 0 additions & 4 deletions src/components/pageLayout/AppFooter.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
<script setup>
import { useRoute } from "vue-router";
const route = useRoute();
import { audioPlayer, playlistVisible } from "@/composables/audioControls";

import { useDisplay } from "vuetify";
const { smAndUp } = useDisplay();
import { mdiMastodon, mdiTwitter, mdiGithub, mdiHandCoin, mdiEmail } from "@mdi/js";
Expand Down
8 changes: 5 additions & 3 deletions src/components/pageLayout/AppHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ import { useTheme } from "vuetify";
import Hyperlink from "@/components/shared/HyperLink.vue";
const theme = useTheme();

const whiteLogo = computed(() => theme.current.value.dark || route.name === "Search");
const whiteLogo = computed(
() => theme.current.value.dark || route.name === "Search" || playlistVisible.value
);

import {
togglePlaylist,
Expand Down Expand Up @@ -59,15 +61,15 @@ const links = [
v-if="route.name !== 'Home' || audioDetailPopup"
class="px-4"
height="56"
:color="route.name !== 'Detail' ? 'ipfsPrimary-lighten-1' : 'toolbar-light'"
:color="route.name !== 'Detail' || playlistVisible ? 'ipfsPrimary-lighten-1' : 'toolbar-light'"
>
<v-container fluid class="px-0 align-start">
<v-row>
<v-col cols="12" xl="8" offset-xl="2" class="d-flex justify-space-between align-center">
<div class="ml-2">
<hyperlink to="/" class="d-flex align-center" @click="playlistVisible = false">
<v-img
v-if="mdAndUp || route.name === 'Detail' || audioDetailPopup"
v-if="mdAndUp || (route.name === 'Detail' && !playlistVisible) || audioDetailPopup"
alt="ipfs-search.com logo"
contain
:src="`/assets/logo-${whiteLogo ? 'white' : 'black'}.svg`"
Expand Down
11 changes: 6 additions & 5 deletions src/components/pageLayout/AudioPlayer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import { picsum } from "@/helpers/picsum";
import {
audioPlayer,
formatTime,
playAudioFile,
pauseAudio,
resumeAudio,
cleanUpAudioPlayer,
previousPlaylistEntry,
playlistSkipPrevious,
Expand Down Expand Up @@ -72,7 +72,6 @@ import { fileTitle, fileAuthor } from "@/helpers/fileHelper";
<v-img
aspect-ratio="1"
bac
gradient="to bottom, rgba(255,255,255,.1), rgba(255,255,255,.5)"
:src="picsum({ width: 75, height: 75, seed: audioPlayer.file?.hash })"
>
</v-img>
Expand All @@ -81,6 +80,8 @@ import { fileTitle, fileAuthor } from "@/helpers/fileHelper";
color="white"
style="
opacity: 0.6;
stroke: black;
stroke-width: 0.3px;
position: absolute;
top: 50%;
left: 50%;
Expand All @@ -106,8 +107,8 @@ import { fileTitle, fileAuthor } from "@/helpers/fileHelper";
:class="smAndUp ? 'flex-row ml-auto' : 'flex-column'"
>
<v-card-title :style="{ fontSize: mdAndUp ? '20px' : '16px' }"
>{{ formatTime(audioPlayer.time).join(" : ") }} /
{{ formatTime(audioPlayer.duration).join(" : ") }}</v-card-title
>{{ formatTime(audioPlayer.time)?.join(" : ") }} /
{{ formatTime(audioPlayer.duration)?.join(" : ") }}</v-card-title
>
<div class="d-inline-flex flex-row">
<v-btn
Expand Down Expand Up @@ -147,7 +148,7 @@ import { fileTitle, fileAuthor } from "@/helpers/fileHelper";
:size="mdAndUp ? 'large' : 'default'"
:icon="mdiPlay"
title="Play"
@click="playAudioFile"
@click="resumeAudio"
/>
<v-btn
class="bg-ipfsPrimary-lighten-1 ml-2"
Expand Down
Loading