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

release: v7.6.0 #300

Merged
merged 8 commits into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions assets/scss/_utilities.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
gap: .5rem !important
}

.gap-10 {
gap: 1.25rem !important
}

.gap-12 {
gap: 1.5rem !important
}
Expand Down
3 changes: 2 additions & 1 deletion assets/scss/components/_index.scss
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
@import "./dialog.scss";
// FIXME: Removing this causes SASS error.
@import "~vuetify/src/styles/styles.sass";
32 changes: 0 additions & 32 deletions assets/scss/components/dialog.scss

This file was deleted.

8 changes: 4 additions & 4 deletions components/calculator/inner-container.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<template>
<div class="vh-calculator-inner-container">
<slot />
<div>
<slot v-if="$slots.default" />
</div>
</template>

<style>
.vh-calculator-inner-container {
<style lang="scss" scoped="">
div {
max-width: 512px
}
</style>
42 changes: 20 additions & 22 deletions components/calculator/result-form-row.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<template>
<form-row
:label="label"
:is-highlighted="isHighlighted"
:label="props.label"
:is-highlighted="props.isHighlighted"
direction="horizontal">
<v-text-field
:value="value"
:aria-label="label"
:value="props.value"
:aria-label="props.label"
dense=""
class="tabular-nums"
hide-details=""
Expand All @@ -15,32 +15,30 @@
<v-divider
class="my-2 me-3"
vertical="" />
<copy-button :value-to-copy="value" />
<copy-button :value-to-copy="props.value" />
</template>
</v-text-field>
</form-row>
</template>

<script>
export default {
props: {
label: {
type: String,
default: null
},
value: {
type: String,
default: null
},
isHighlighted: {
type: Boolean,
default: false
}
<script setup="">
const props = defineProps({
label: {
type: String,
default: null
},
value: {
type: String,
default: null
},
isHighlighted: {
type: Boolean,
default: false
}
};
});
</script>

<style scoped="">
<style lang="scss" scoped="">
:deep(.v-input__append-inner) {
padding-inline-start: .75rem !important;
margin-block: auto !important
Expand Down
35 changes: 14 additions & 21 deletions components/calculator/result-list.vue
Original file line number Diff line number Diff line change
@@ -1,27 +1,20 @@
<template>
<div class="vh-result-list d-flex flex-column">
<calculator-result-form-row
v-for="_item in items"
:key="_item.key"
:value="_item.value"
:label="_item.key"
:is-highlighted="_item.isHighlighted ?? false" />
<div class="d-flex flex-column gap-10">
<template v-for="_item in props.items">
<calculator-result-form-row
:key="_item.key"
:value="_item.value"
:label="_item.key"
:is-highlighted="_item.isHighlighted ?? false" />
</template>
</div>
</template>

<script>
export default {
props: {
items: {
type: Array,
required: true
}
<script setup="">
const props = defineProps({
items: {
type: Array,
required: true
}
};
});
</script>

<style scoped="">
.vh-result-list {
gap: 1.125rem
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,22 @@
width="100%"
type="image" />
</template>
<template v-else-if="exchangeRate !== null">
<span class="grey--text text--lighten-1">
{{ moneyFormat(exchangeRate.rate, "TRY") }}
</span>
</template>
<template v-else>
<div class="grey--text text--lighten-1">
<template v-if="exchangeRate">
{{ moneyFormat(exchangeRate.rate, "TRY") }}
</template>
<template v-else>
<v-icon
color="red"
size="20">
{{ errorIcon }}
</v-icon>
</template>
</div>
Hata 😊
</template>
</div>
</template>

<script>
import { mdiAlertCircle } from "@mdi/js";
import { moneyFormat } from "@/utils/formatter.js";

export default {
data: () => ({
errorIcon: mdiAlertCircle,
isLoading: true,
exchangeRate: null
}),
Expand All @@ -47,18 +39,16 @@ export default {
},
methods: {
moneyFormat,
_load() {
async _load() {
const vm = this;
vm.$store.dispatch("exchange-rates/loadExchangeRateFromApi", vm.currencyCode)
.then(exchangeRate => {
vm.exchangeRate = exchangeRate;
})
.catch(() => {
vm.exchangeRate = null;
})
.finally(() => {
vm.isLoading = false;
});
vm.exchangeRate = null;
try {
vm.exchangeRate = await vm.$store.dispatch("exchange-rates/loadExchangeRateFromApi", vm.currencyCode);
} catch (error) {
vm.exchangeRate = null;
} finally {
vm.isLoading = false;
}
}
},
mounted() {
Expand Down
33 changes: 6 additions & 27 deletions components/calculator/share-dialog-url.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,9 @@
elevation="0"
block=""
rounded="">
<template v-if="isCustomIcon(_item)">
<!-- eslint-disable vue/no-v-html -->
<div v-html="loadCustomIconAsHtml(_item)" />
</template>
<template v-else>
<v-icon size="28">
{{ _item.icon }}
</v-icon>
</template>
<vh-icon
:icon="_item.icon"
:size="28" />
</v-btn>
</v-col>
</template>
Expand Down Expand Up @@ -84,7 +78,6 @@ import {
createXShareUrl,
createWhatsAppShareUrl
} from "@/utils/create-social-media-share-url.js";
import { isCustomIcon, loadCustomIconAsHtml } from "@/utils/custom-icon.js";

export default {
data: () => ({
Expand All @@ -107,12 +100,6 @@ export default {
});
} catch {
}
},
isCustomIcon(item) {
return isCustomIcon(item.icon);
},
loadCustomIconAsHtml(item) {
return loadCustomIconAsHtml(item.icon);
}
},
computed: {
Expand All @@ -135,7 +122,7 @@ export default {
const vm = this;
return [
{
url: createFacebookShareUrl(vm.url, document.title),
url: createFacebookShareUrl(vm.url),
title: "Facebook'ta paylaş",
color: "#1877f2",
icon: mdiFacebook
Expand All @@ -147,7 +134,7 @@ export default {
icon: "x.svg"
},
{
url: createWhatsAppShareUrl(vm.url, document.title),
url: createWhatsAppShareUrl(vm.url),
title: "WhatsApp ile gönder",
color: "#25d366",
icon: mdiWhatsapp
Expand All @@ -170,15 +157,7 @@ export default {
};
</script>

<style scoped="">
/* Custom icons for social media sharing */
:deep(svg) {
vertical-align: middle;
width: 1.75rem;
height: 1.75rem
}

/* Copy button for URL sharing */
<style lang="scss" scoped="">
:deep(.v-input__append-inner) {
padding-inline-start: .75rem !important;
margin-block: auto !important
Expand Down
Loading