lint
This commit is contained in:
parent
9acd534706
commit
0532676fa4
4 changed files with 13 additions and 11 deletions
|
|
@ -18,4 +18,4 @@ fi
|
||||||
|
|
||||||
cd unwind-ui
|
cd unwind-ui
|
||||||
npm run lint ||:
|
npm run lint ||:
|
||||||
npx prettier $prettier_opts 'src/**/*.{js,ts,vue}'
|
npx prettier $prettier_opts 'vite.config.ts' 'src/**/*.{js,ts,vue}'
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,9 @@
|
||||||
<div class="select is-small">
|
<div class="select is-small">
|
||||||
<select v-model="filter_group" @change="search">
|
<select v-model="filter_group" @change="search">
|
||||||
<option selected value="">Me ({{ login_user.name }})</option>
|
<option selected value="">Me ({{ login_user.name }})</option>
|
||||||
<option v-for="g in login_user.groups" :value="g.id">{{g.id}}</option>
|
<option v-for="g in login_user.groups" :key="g.id" :value="g.id">
|
||||||
|
{{ g.id }}
|
||||||
|
</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="icon is-small is-left">
|
<div class="icon is-small is-left">
|
||||||
|
|
@ -34,7 +36,7 @@
|
||||||
<span class="select">
|
<span class="select">
|
||||||
<select v-model="media_type" @change="search">
|
<select v-model="media_type" @change="search">
|
||||||
<option value="">(any type)</option>
|
<option value="">(any type)</option>
|
||||||
<option v-for="t in media_types" :value="t">{{ t }}</option>
|
<option v-for="t in media_types" :key="t" :value="t">{{ t }}</option>
|
||||||
</select>
|
</select>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
|
|
@ -163,9 +165,9 @@ const debounced_get = debounce_async(100, get)
|
||||||
|
|
||||||
type ULID = string
|
type ULID = string
|
||||||
type User = {
|
type User = {
|
||||||
id: ULID,
|
id: ULID
|
||||||
name: string,
|
name: string
|
||||||
groups: Array<{id: ULID}>,
|
groups: Array<{ id: ULID }>
|
||||||
}
|
}
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
|
|
@ -179,7 +181,7 @@ export default defineComponent({
|
||||||
media_types,
|
media_types,
|
||||||
media_type: "",
|
media_type: "",
|
||||||
active: false,
|
active: false,
|
||||||
filter_group: '',
|
filter_group: "",
|
||||||
}),
|
}),
|
||||||
mounted() {
|
mounted() {
|
||||||
const { query, type } = view_params()
|
const { query, type } = view_params()
|
||||||
|
|
@ -209,7 +211,7 @@ export default defineComponent({
|
||||||
|
|
||||||
const per_page = 100
|
const per_page = 100
|
||||||
const media_type = this.media_type === "" ? null : this.media_type
|
const media_type = this.media_type === "" ? null : this.media_type
|
||||||
const user_id = this.filter_group === '' && this.credentials.user_id || null
|
const user_id = (this.filter_group === "" && this.credentials.user_id) || null
|
||||||
const group_id = user_id === null && this.filter_group ? this.filter_group : null
|
const group_id = user_id === null && this.filter_group ? this.filter_group : null
|
||||||
const more = await debounced_get(
|
const more = await debounced_get(
|
||||||
"movies",
|
"movies",
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="item in items" :data-unwind-id="item.id">
|
<tr v-for="item in items" :key="item.id" :data-unwind-id="item.id">
|
||||||
<td v-if="item.original_title">
|
<td v-if="item.original_title">
|
||||||
<a :href="`https://www.imdb.com/title/${item.imdb_id}/`">
|
<a :href="`https://www.imdb.com/title/${item.imdb_id}/`">
|
||||||
<span>{{ item.original_title }}</span>
|
<span>{{ item.original_title }}</span>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { defineConfig } from 'vite'
|
import { defineConfig } from "vite"
|
||||||
import vue from '@vitejs/plugin-vue'
|
import vue from "@vitejs/plugin-vue"
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue