-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #81 from bkeepers/ionic
Use Ionic framework
- Loading branch information
Showing
156 changed files
with
5,117 additions
and
7,999 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
APP_API_URL="http://localhost:3100" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
# https://www.theaudiodb.com/api_guide.php | ||
THEAUDIODB_API_KEY=2 | ||
|
||
|
||
# Host to use for API requests | ||
# APP_API_URL=http://localhost:3100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
const { readGitignoreFiles } = require('eslint-gitignore') | ||
|
||
module.exports = { | ||
extends: [ | ||
'standard', | ||
'plugin:vue/vue3-recommended' | ||
], | ||
rules: { | ||
'vue/multi-word-component-names': 0 | ||
} | ||
'vue/multi-word-component-names': 0, | ||
// https://ionicframework.com/docs/vue/troubleshooting#slot-attributes-are-deprecated | ||
'vue/no-deprecated-slot-attribute': 'off' | ||
}, | ||
ignorePatterns: readGitignoreFiles({ cwd: __dirname }) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
web: bin/rails s | ||
vite: bin/vite dev | ||
web: yarn run dev | ||
api: bin/rails s | ||
worker: bundle exec good_job start |
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import api from '~/api' | ||
import api from '@/client' | ||
|
||
const RE = /\{\s*([\w_-]*)\s*:\s*([^}]*)/i | ||
|
||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import './application.scss' | ||
|
||
import { createApp } from 'vue' | ||
import { IonicVue } from '@ionic/vue' | ||
import App from './views/App.vue' | ||
import VueAxios from 'vue-axios' | ||
import client from './client' | ||
import store from './store' | ||
import router from './router' | ||
import telemetry from './telemetry' | ||
|
||
const app = createApp(App) | ||
.use(IonicVue) | ||
.use(VueAxios, client) | ||
.use(store) | ||
.use(router) | ||
|
||
router.isReady().then(() => { | ||
telemetry() | ||
app.mount('[data-behavior=vue]') | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* Core CSS required for Ionic components to work properly */ | ||
@import '@ionic/vue/css/core.css'; | ||
|
||
/* Basic CSS for apps built with Ionic */ | ||
@import '@ionic/vue/css/normalize.css'; | ||
@import '@ionic/vue/css/structure.css'; | ||
@import '@ionic/vue/css/typography.css'; | ||
|
||
/* Optional CSS utils that can be commented out */ | ||
@import '@ionic/vue/css/padding.css'; | ||
@import '@ionic/vue/css/float-elements.css'; | ||
@import '@ionic/vue/css/text-alignment.css'; | ||
@import '@ionic/vue/css/text-transformation.css'; | ||
@import '@ionic/vue/css/flex-utils.css'; | ||
@import '@ionic/vue/css/display.css'; | ||
|
||
/* Theme variables */ | ||
@import '@/stylesheets/variables.css'; | ||
|
||
@import "tailwindcss/components"; | ||
@import "tailwindcss/utilities"; | ||
@import "@/stylesheets/text-shadow"; | ||
|
||
@layer utilities { | ||
.grid-scroll-x { | ||
@apply grid grid-flow-col overflow-x-auto; | ||
-webkit-overflow-scrolling: touch; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import axios from 'axios' | ||
|
||
export default axios.create({ | ||
baseURL: import.meta.env.APP_API_URL || 'https://chordbook.app', | ||
headers: { | ||
'Content-Type': 'application/json', | ||
'X-Requested-With': 'XMLHttpRequest' | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<template> | ||
<ion-item | ||
button | ||
:router-link="{ name: 'album', params: { id: album.id } }" | ||
class="rounded" | ||
:detail="false" | ||
lines="none" | ||
> | ||
<ion-label> | ||
<div class="rounded aspect-square shadow-md bg-slate-100 dark:bg-slate-900 mb-2"> | ||
<ion-img :src="album.thumbnail" /> | ||
</div> | ||
<h2 class="text-sm"> | ||
{{ album.title }} | ||
</h2> | ||
<p>{{ album.artist.name }}</p> | ||
</ion-label> | ||
</ion-item> | ||
</template> | ||
|
||
<script> | ||
import { IonItem, IonLabel, IonImg } from '@ionic/vue' | ||
export default { | ||
components: { IonItem, IonLabel, IonImg }, | ||
props: { | ||
album: { | ||
type: Object, | ||
required: true | ||
} | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<template> | ||
<ion-item | ||
button | ||
:router-link="{ name: 'artist', params: { id: artist.id } }" | ||
> | ||
<ion-avatar | ||
slot="start" | ||
class="bg-slate-100 flex place-content-center items-center" | ||
> | ||
<ion-img | ||
v-if="artist.thumbnail" | ||
:src="artist.thumbnail" | ||
/> | ||
<ion-icon | ||
v-else | ||
:icon="people" | ||
class="text-slate-300" | ||
/> | ||
</ion-avatar> | ||
<ion-label> | ||
<h2>{{ artist.name }}</h2> | ||
</ion-label> | ||
</ion-item> | ||
</template> | ||
|
||
<script> | ||
import { IonItem, IonAvatar, IonLabel, IonIcon, IonImg } from '@ionic/vue' | ||
import { people } from 'ionicons/icons' | ||
export default { | ||
components: { IonItem, IonAvatar, IonLabel, IonIcon, IonImg }, | ||
props: { | ||
artist: { | ||
type: Object, | ||
required: true | ||
} | ||
}, | ||
data () { | ||
return { people } | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<template> | ||
<ion-list> | ||
<ion-item | ||
v-for="result in results" | ||
:key="result.type + result.id" | ||
button | ||
:router-link="{ name: result.type.toLowerCase(), params: { id: result.id } }" | ||
> | ||
<ion-avatar slot="start"> | ||
<ion-img :src="result.thumbnail" /> <!-- class="rounded" --> | ||
</ion-avatar> | ||
<ion-label> | ||
<p class="uppercase"> | ||
{{ result.type }} | ||
</p> | ||
<h2>{{ result.title }}</h2> | ||
<p>{{ result.subtitle }}</p> | ||
</ion-label> | ||
</ion-item> | ||
</ion-list> | ||
</template> | ||
|
||
<script> | ||
import { IonList, IonItem, IonAvatar, IonLabel, IonImg } from '@ionic/vue' | ||
export default { | ||
components: { IonList, IonItem, IonAvatar, IonLabel, IonImg }, | ||
props: { | ||
params: { | ||
type: Object, | ||
required: true | ||
} | ||
}, | ||
data () { | ||
return { | ||
results: [] | ||
} | ||
}, | ||
watch: { | ||
params: { immediate: true, deep: true, handler: 'update' } | ||
}, | ||
methods: { | ||
async update () { | ||
if (!this.params.q) { | ||
this.results = [] | ||
return | ||
} | ||
this.results = (await this.$http.get('/api/search', { params: this.params })).data | ||
} | ||
} | ||
} | ||
</script> |
Oops, something went wrong.