update modal headers

This commit is contained in:
Gamebrary 2020-10-13 17:09:37 -07:00
parent 8db3c82631
commit b36aa08424
4 changed files with 88 additions and 31 deletions

View file

@ -4,42 +4,49 @@
scrollable scrollable
size="lg" size="lg"
footer-class="p-2 justify-content-center" footer-class="p-2 justify-content-center"
header-class="align-items-center py-2" header-class="align-items-center pb-0 border-0"
@show="load" @show="load"
@hidden="reset" @hidden="reset"
> >
<!-- header-bg-variant="dark"
body-bg-variant="dark"
footer-bg-variant="dark" -->
<template v-slot:modal-header="{ close }"> <template v-slot:modal-header="{ close }">
<h5 class="mb-0">{{ game.name }}</h5> <modal-header
:title="game.name"
:subtitle="gameModalData.list.name"
header-class="border-0"
>
<b-button-toolbar key-nav aria-label="Toolbar with button groups">
<b-button-group class="mr-2">
<b-button
size="sm"
variant="light"
:disabled="prevDisabled"
@click="previousGame"
>
<icon name="triangle-left" />
</b-button>
<b-button-toolbar key-nav aria-label="Toolbar with button groups"> <b-button
<b-button-group class="mx-2"> size="sm"
<b-button variant="light"
size="sm" :disabled="nextDisabled"
variant="light" @click="nextGame"
:disabled="prevDisabled" >
@click="previousGame" <icon name="triangle-right" />
> </b-button>
<icon name="triangle-left" /> </b-button-group>
</b-button>
<b-button <b-button
size="sm"
variant="light" variant="light"
:disabled="nextDisabled" size="sm"
@click="nextGame" @click="close"
> >
<icon name="triangle-right" /> <icon name="x" />
</b-button> </b-button>
</b-button-group> </b-button-toolbar>
</modal-header>
<b-button
variant="light"
size="sm"
@click="close"
>
<icon name="x" />
</b-button>
</b-button-toolbar>
</template> </template>
<b-container v-if="game.name" class="m-0 p-0"> <b-container v-if="game.name" class="m-0 p-0">
@ -100,8 +107,17 @@
class="mt-2" class="mt-2"
/> />
<div v-if="loading" class="my-2 d-flex justify-content-md-start justify-content-center"> <div
<b-skeleton type="button" width="45px" v-for="n in 4" :key="n" class="mr-1" /> v-if="loading"
class="my-2 d-flex justify-content-md-start justify-content-center"
>
<b-skeleton
v-for="n in 4"
:key="n"
type="button"
width="45px"
class="mr-1"
/>
</div> </div>
<div v-else class="my-2"> <div v-else class="my-2">

View file

@ -1,3 +1,5 @@
<!-- TODO: translate -->
<template lang="html"> <template lang="html">
<b-button <b-button
v-b-modal.notes v-b-modal.notes
@ -9,7 +11,6 @@
<b-modal <b-modal
id="notes" id="notes"
title="Game notes"
:header-bg-variant="nightMode ? 'dark' : null" :header-bg-variant="nightMode ? 'dark' : null"
:header-text-variant="nightMode ? 'white' : null" :header-text-variant="nightMode ? 'white' : null"
:body-bg-variant="nightMode ? 'dark' : null" :body-bg-variant="nightMode ? 'dark' : null"
@ -18,6 +19,20 @@
:footer-text-variant="nightMode ? 'white' : null" :footer-text-variant="nightMode ? 'white' : null"
@show="show" @show="show"
> >
<template v-slot:modal-header="{ close }">
<modal-header
title="Game notes"
>
<b-button
variant="light"
size="sm"
@click="close"
>
<icon name="x" />
</b-button>
</modal-header>
</template>
<b-form-textarea <b-form-textarea
v-model.trim="localNote" v-model.trim="localNote"
placeholder="Type note here" placeholder="Type note here"

View file

@ -9,7 +9,6 @@
<b-modal <b-modal
id="progress" id="progress"
title="Set game progress"
:header-bg-variant="nightMode ? 'dark' : null" :header-bg-variant="nightMode ? 'dark' : null"
:header-text-variant="nightMode ? 'white' : null" :header-text-variant="nightMode ? 'white' : null"
:body-bg-variant="nightMode ? 'dark' : null" :body-bg-variant="nightMode ? 'dark' : null"
@ -18,6 +17,20 @@
:footer-text-variant="nightMode ? 'white' : null" :footer-text-variant="nightMode ? 'white' : null"
@show="show" @show="show"
> >
<template v-slot:modal-header="{ close }">
<modal-header
title="Set game progress"
>
<b-button
variant="light"
size="sm"
@click="close"
>
<icon name="x" />
</b-button>
</modal-header>
</template>
<b-input-group :prepend="`${localProgress}%`" class="mb-4" size="lg"> <b-input-group :prepend="`${localProgress}%`" class="mb-4" size="lg">
<b-form-input <b-form-input
size="lg" size="lg"

View file

@ -19,10 +19,23 @@
<b-modal <b-modal
id="screenshots" id="screenshots"
:title="game.name"
size="xl" size="xl"
hide-footer hide-footer
> >
<template v-slot:modal-header="{ close }">
<modal-header
:title="game.name"
>
<b-button
variant="light"
size="sm"
@click="close"
>
<icon name="x" />
</b-button>
</modal-header>
</template>
<b-carousel <b-carousel
ref="screenshots" ref="screenshots"
v-model="activeImage" v-model="activeImage"