Skip to content

Commit

Permalink
replace file input with button, change button colors
Browse files Browse the repository at this point in the history
  • Loading branch information
halamix2 committed Aug 5, 2024
1 parent 836958a commit bdf7572
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 43 deletions.
8 changes: 0 additions & 8 deletions src/components/CanvasItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,3 @@ onMounted(() => {
</canvas>
</div>
</template>

<!-- <style scoped>
#mainCanvas {
max-width: 75vw;
max-height: 70vh;
border: 1px solid black;
}
</style> -->
25 changes: 21 additions & 4 deletions src/components/InputItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ var onNewBackground = function () {
a.href = data
a.click()
console.info(`Zapis do pliku ${getFullTitle(inputTitle.value, inputSubtitle.value)}.png`)
},
chooseBackground = function () {
if (inputBackground.value) {
inputBackground.value.click()
}
}
watch(inputRunner, () => {
Expand All @@ -109,9 +114,10 @@ watch(inputMoney, () => {
</script>

<template>
<div>
<div class="align-center">
<div>
<v-file-input
class="d-none"
ref="inputBackground"
@change="onNewBackground"
label="Tło"
Expand All @@ -122,6 +128,7 @@ watch(inputMoney, () => {
prepend-inner-icon="photo_camera"
prepend-icon=""
/>
<v-btn class="bg-secondary" @click.prevent="chooseBackground"> Dodaj zdjęcie </v-btn>
</div>
<div>
<!-- TODO clearable is broken -->
Expand Down Expand Up @@ -203,9 +210,19 @@ watch(inputMoney, () => {
required
prepend-inner-icon="paid"
/>
<!-- TODO update from the internet -->
<v-btn @click.prevent="updateMoney">Aktualizuj</v-btn>
</div>
<v-btn variant="tonal" prepend-icon="download" @click.prevent="savePNG">Zapisz PNG</v-btn>
<v-container fluid>
<v-row>
<v-col v-if="enableMoney">
<v-btn class="bg-secondary" @click.prevent="updateMoney">Aktualizuj kwotę</v-btn>
</v-col>
<v-col v-if="!enableMoney"> </v-col>
<v-col>
<v-btn class="bg-primary" variant="tonal" prepend-icon="download" @click.prevent="savePNG"
>Pobierz .PNG</v-btn
>
</v-col>
</v-row>
</v-container>
</div>
</template>
10 changes: 0 additions & 10 deletions src/views/PhotoView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -267,13 +267,3 @@ onMounted(() => {
</v-row>
</v-container>
</template>

<!-- <style>
@media (min-width: 1024px) {
.about {
min-height: 100vh;
display: flex;
align-items: center;
}
}
</style> -->
10 changes: 0 additions & 10 deletions src/views/RunnerView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -252,13 +252,3 @@ onMounted(() => {
</v-row>
</v-container>
</template>

<!-- <style>
@media (min-width: 1024px) {
.about {
min-height: 100vh;
display: flex;
align-items: center;
}
}
</style> -->
10 changes: 0 additions & 10 deletions src/views/YoutubeView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -225,13 +225,3 @@ onMounted(() => {
</v-row>
</v-container>
</template>

<!-- <style>
@media (min-width: 1024px) {
.about {
min-height: 100vh;
display: flex;
align-items: center;
}
}
</style> -->
11 changes: 10 additions & 1 deletion src/vuetifyInstance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,20 @@ import { createVuetify } from 'vuetify'
import { aliases, md } from 'vuetify/iconsets/md'
import { mdi } from 'vuetify/iconsets/mdi'
import { en, pl } from 'vuetify/locale'
import colors from 'vuetify/util/colors'

export const defaultVuetify = function () {
return createVuetify({
theme: {
defaultTheme: 'dark'
defaultTheme: 'dark',
themes: {
dark: {
colors: {
primary: colors.deepPurple.base,
secondary: colors.deepPurple.lighten4
}
}
}
},
locale: {
locale: 'pl',
Expand Down

0 comments on commit bdf7572

Please sign in to comment.