mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-11 09:29:34 +00:00
New endpoint, fixed logo, better account overview.
This commit is contained in:
4
resources/assets/v2/boot/bootstrap.js
vendored
4
resources/assets/v2/boot/bootstrap.js
vendored
@@ -36,12 +36,16 @@ import {getVariable} from "../store/get-variable.js";
|
||||
import {getViewRange} from "../support/get-viewrange.js";
|
||||
import {loadTranslations} from "../support/load-translations.js";
|
||||
|
||||
import adminlte from 'admin-lte';
|
||||
|
||||
|
||||
store.addPlugin(observePlugin);
|
||||
|
||||
window.bootstrapped = false;
|
||||
window.store = store;
|
||||
|
||||
|
||||
|
||||
// always grab the preference "marker" from Firefly III.
|
||||
getFreshVariable('lastActivity').then((serverValue) => {
|
||||
const localValue = store.get('lastActivity');
|
||||
|
||||
@@ -51,9 +51,17 @@ let index = function () {
|
||||
enabled: true
|
||||
},
|
||||
},
|
||||
|
||||
sortingColumn: '',
|
||||
sortDirection: '',
|
||||
accounts: [],
|
||||
|
||||
sort(column) {
|
||||
this.sortingColumn = column;
|
||||
this.sortDirection = this.sortDirection === 'asc' ? 'desc' : 'asc';
|
||||
this.loadAccounts();
|
||||
return false;
|
||||
},
|
||||
|
||||
formatMoney(amount, currencyCode) {
|
||||
return formatMoney(amount, currencyCode);
|
||||
},
|
||||
@@ -69,14 +77,29 @@ let index = function () {
|
||||
},
|
||||
|
||||
loadAccounts() {
|
||||
this.notifications.wait.show = true;
|
||||
this.notifications.wait.text = i18next.t('firefly.wait_loading_data')
|
||||
this.accounts = [];
|
||||
// sort instructions
|
||||
// &sorting[0][column]=description&sorting[0][direction]=asc
|
||||
const sorting = [{column: this.sortingColumn, direction: this.sortDirection}];
|
||||
// one page only.
|
||||
(new Get()).index({type: type, page: this.page}).then(response => {
|
||||
(new Get()).index({sorting: sorting, type: type, page: this.page}).then(response => {
|
||||
for (let i = 0; i < response.data.data.length; i++) {
|
||||
if (response.data.data.hasOwnProperty(i)) {
|
||||
let current = response.data.data[i];
|
||||
let account = {
|
||||
id: parseInt(current.id),
|
||||
active: current.attributes.active,
|
||||
name: current.attributes.name,
|
||||
type: current.attributes.type,
|
||||
// role: current.attributes.account_role,
|
||||
iban: null === current.attributes.iban ? '' : current.attributes.iban.match(/.{1,4}/g).join(' '),
|
||||
account_number: null === current.attributes.account_number ? '' : current.attributes.account_number,
|
||||
current_balance: current.attributes.current_balance,
|
||||
currency_code: current.attributes.currency_code,
|
||||
native_current_balance: current.attributes.native_current_balance,
|
||||
native_currency_code: current.attributes.native_currency_code,
|
||||
};
|
||||
this.accounts.push(account);
|
||||
}
|
||||
|
||||
105
resources/assets/v2/sass/adminlte-filtered.scss
Normal file
105
resources/assets/v2/sass/adminlte-filtered.scss
Normal file
@@ -0,0 +1,105 @@
|
||||
/*!
|
||||
* adminlte-filteres.scss
|
||||
* Copyright (c) 2024 james@firefly-iii.org.
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see https://www.gnu.org/licenses/.
|
||||
*/
|
||||
|
||||
|
||||
// less adminlte code because the CSS is massive otherwise.
|
||||
// copied from:
|
||||
|
||||
/*!
|
||||
* AdminLTE v4.0.0-alpha2
|
||||
* Author: Colorlib
|
||||
* Website: AdminLTE.io <https://adminlte.io>
|
||||
* License: Open source - MIT <https://opensource.org/licenses/MIT>
|
||||
*/
|
||||
|
||||
// Bootstrap Configuration
|
||||
// ---------------------------------------------------
|
||||
@import "bootstrap/scss/functions";
|
||||
|
||||
// AdminLTE Configuration
|
||||
// ---------------------------------------------------
|
||||
@import "admin-lte/src/scss/bootstrap-variables"; // little modified are here
|
||||
|
||||
// Bootstrap Configuration
|
||||
// ---------------------------------------------------
|
||||
@import "bootstrap/scss/variables";
|
||||
@import "bootstrap/scss/variables-dark";
|
||||
@import "bootstrap/scss/maps";
|
||||
@import "bootstrap/scss/mixins";
|
||||
@import "bootstrap/scss/utilities";
|
||||
|
||||
// Bootstrap Layout & components
|
||||
@import "bootstrap/scss/root";
|
||||
@import "bootstrap/scss/reboot";
|
||||
@import "bootstrap/scss/type";
|
||||
@import "bootstrap/scss/images";
|
||||
@import "bootstrap/scss/containers";
|
||||
@import "bootstrap/scss/grid";
|
||||
@import "bootstrap/scss/tables";
|
||||
@import "bootstrap/scss/forms";
|
||||
@import "bootstrap/scss/buttons";
|
||||
@import "bootstrap/scss/transitions";
|
||||
@import "bootstrap/scss/dropdown";
|
||||
@import "bootstrap/scss/button-group";
|
||||
@import "bootstrap/scss/nav";
|
||||
@import "bootstrap/scss/navbar";
|
||||
@import "bootstrap/scss/card";
|
||||
//@import "bootstrap/scss/accordion";
|
||||
@import "bootstrap/scss/breadcrumb";
|
||||
@import "bootstrap/scss/pagination";
|
||||
@import "bootstrap/scss/badge";
|
||||
@import "bootstrap/scss/alert";
|
||||
@import "bootstrap/scss/progress";
|
||||
@import "bootstrap/scss/list-group";
|
||||
@import "bootstrap/scss/close";
|
||||
//@import "bootstrap/scss/toasts";
|
||||
@import "bootstrap/scss/modal";
|
||||
@import "bootstrap/scss/tooltip";
|
||||
@import "bootstrap/scss/popover";
|
||||
//@import "bootstrap/scss/carousel";
|
||||
@import "bootstrap/scss/spinners";
|
||||
@import "bootstrap/scss/offcanvas";
|
||||
@import "bootstrap/scss/placeholders";
|
||||
|
||||
// Bootstrap Helpers
|
||||
@import "bootstrap/scss/helpers";
|
||||
|
||||
// Bootstrap Utilities
|
||||
@import "bootstrap/scss/utilities/api";
|
||||
|
||||
|
||||
// AdminLTE Configuration
|
||||
// ---------------------------------------------------
|
||||
@import "admin-lte/src/scss/variables";
|
||||
@import "admin-lte/src/scss/variables-dark";
|
||||
@import "admin-lte/src/scss/mixins";
|
||||
|
||||
// AdiminLTE Parts
|
||||
// ---------------------------------------------------
|
||||
@import "admin-lte/src/scss/parts/core";
|
||||
@import "admin-lte/src/scss/parts/components";
|
||||
@import "admin-lte/src/scss/parts/extra-components";
|
||||
|
||||
// @import "admin-lte/src/scss/parts/pages";
|
||||
@import "admin-lte/src/scss/pages/login_and_register";
|
||||
|
||||
@import "admin-lte/src/scss/parts/miscellaneous";
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ $success: #64B624 !default;
|
||||
// @import "bootstrap/scss/bootstrap";
|
||||
|
||||
// admin LTE
|
||||
@import "admin-lte/src/scss/adminlte";
|
||||
@import "adminlte-filtered";
|
||||
|
||||
|
||||
// @import "~bootstrap-sass/assets/stylesheets/bootstrap";
|
||||
|
||||
Reference in New Issue
Block a user