Skip to content

Commit

Permalink
Small fixes and improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
isKONSTANTIN committed Aug 17, 2024
1 parent 63059b6 commit 788ed63
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 34 deletions.
4 changes: 4 additions & 0 deletions assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,8 @@ body {

.min-w-64 {
min-width: 16rem;
}

.modal {
@apply z-40;
}
2 changes: 1 addition & 1 deletion components/modal/transaction/create/internal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
</div>

<div class="modal-action flex justify-between items-center">
<nuxt-link to="/bulk" class="btn btn-sm disabled">
<nuxt-link to="/bulk" class="btn btn-sm invisible lg:visible">
{{ $t('modals.newTransaction.buttons.bulkMode') }}
</nuxt-link>

Expand Down
10 changes: 5 additions & 5 deletions components/modal/user/sessions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<modal-base :title="$t('modals.sessions.title')" :opened="opened" :name="'sessions-modal'"
:modal-class="'modal-top sm:modal-middle'"
:modal-box-class="'sm:w-fit sm:max-w-5xl'">
<div class="overflow-x-auto">
<div class="alert alert-warning">
<svg xmlns="http://www.w3.org/2000/svg" class="stroke-current shrink-0 h-6 w-6" fill="none" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" /></svg>
<span>{{ $t("modals.sessions.warning") }}</span>
</div>
<div class="alert alert-warning">
<svg xmlns="http://www.w3.org/2000/svg" class="stroke-current shrink-0 h-6 w-6" fill="none" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" /></svg>
<span>{{ $t("modals.sessions.warning") }}</span>
</div>

<div class="overflow-x-auto">
<table class="table table-xs mt-4">
<thead>
<tr>
Expand Down
4 changes: 2 additions & 2 deletions components/nav/user/user.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@
</a>
</li>

<li @click="handleClick(); callAi()" class="lg:hidden">
<a v-if="aiAvailable" class="lg:hidden" >
<li v-if="aiAvailable" @click="handleClick(); callAi()" class="lg:hidden">
<a class="lg:hidden" >
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
<path stroke-linecap="round" stroke-linejoin="round" d="M12 18v-5.25m0 0a6.01 6.01 0 0 0 1.5-.189m-1.5.189a6.01 6.01 0 0 1-1.5-.189m3.75 7.478a12.06 12.06 0 0 1-4.5 0m3.75 2.383a14.406 14.406 0 0 1-3 0M14.25 18v-.192c0-.983.658-1.823 1.508-2.316a7.5 7.5 0 1 0-7.517 0c.85.493 1.509 1.333 1.509 2.316V18" />
</svg>
Expand Down
37 changes: 22 additions & 15 deletions components/select/account.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ const props = defineProps({
currencyFilter: {
type: Number
},
overrideHidden: {
type: Boolean,
default: false
}
})
Expand All @@ -45,21 +50,23 @@ const options = computed(() => {
const resultArray = [];
folders.value.forEach((t) => {
const options = getFolderAccounts(t).map((a) => {
if (props.excludeAccount && props.excludeAccount === a.accountId)
return null;
return {
label: a.name,
value: a.accountId
}
});
resultArray.push({
label: t.name,
options: options.filter(a => a !== null)
});
const options = getFolderAccounts(t)
.map((a) => {
if (props.excludeAccount && props.excludeAccount === a.accountId || !props.overrideHidden && a.hidden)
return null;
return {
label: a.name,
value: a.accountId
}
})
.filter(a => a !== null);
if (options.length > 0)
resultArray.push({
label: t.name,
options: options
});
});
return resultArray;
Expand Down
16 changes: 8 additions & 8 deletions components/transactions/filter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,33 @@
:close-on-select="false"
:categories-tree="categoriesTree"
:can-be-without-parent="false"
>

</select-transaction-category>
/>

<select-account class="flex-1 h-10 min-w-48"
mode="tags"
v-model="filterAccounts"
:searchable="true"
:placeholder='$t("transactionsPage.placeholders.filters.accounts")'
:close-on-select="false">
</select-account>
:close-on-select="false"
:override-hidden="true"
/>

<select-currency class="flex-1 h-10 min-w-48"
mode="tags"
v-model="filterCurrencies"
:searchable="true"
:placeholder='$t("transactionsPage.placeholders.filters.currencies")'
:close-on-select="false">
</select-currency>
:close-on-select="false"
/>

<Datepicker class="flex-1 min-w-64 dp-h-10"
v-model="filterTime"
:max-range="calendarMaxRange"
:enable-time-picker="false"
:placeholder='$t("transactionsPage.placeholders.filters.time")'
:locale="locale"
range />
range
/>

<input type="text"
class="input input-bordered flex-1 h-10 text-sm font-bold min-w-48"
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pages/login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ const singIn = async () => {
const {data, error} = await useApi('auth/login', {
method: "POST",
query: {login: login.value, password: password.value}
query: {login: login.value, password: password.value, description: navigator.userAgent.slice(0, configs.maxSessionDescriptionLength)}
})
if (error.value !== null) {
Expand Down

0 comments on commit 788ed63

Please sign in to comment.