mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-16 09:22:33 +00:00
Clean up v2.
This commit is contained in:
6
resources/assets/v2/src/boot/bootstrap.js
vendored
6
resources/assets/v2/src/boot/bootstrap.js
vendored
@@ -48,6 +48,10 @@ window.bootstrap = bootstrap;
|
|||||||
|
|
||||||
// always grab the preference "marker" from Firefly III.
|
// always grab the preference "marker" from Firefly III.
|
||||||
getFreshVariable('lastActivity').then((serverValue) => {
|
getFreshVariable('lastActivity').then((serverValue) => {
|
||||||
|
if(null === serverValue) {
|
||||||
|
console.log('Server value is null in getFreshVariable.');
|
||||||
|
throw new Error('401 in getFreshVariable.');
|
||||||
|
}
|
||||||
const localValue = store.get('lastActivity');
|
const localValue = store.get('lastActivity');
|
||||||
store.set('cacheValid', localValue === serverValue);
|
store.set('cacheValid', localValue === serverValue);
|
||||||
store.set('lastActivity', serverValue);
|
store.set('lastActivity', serverValue);
|
||||||
@@ -78,6 +82,8 @@ getFreshVariable('lastActivity').then((serverValue) => {
|
|||||||
window.bootstrapped = true;
|
window.bootstrapped = true;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
}).catch((error) => {
|
||||||
|
console.error('Error while bootstrapping: ' + error);
|
||||||
});
|
});
|
||||||
window.axios = axios;
|
window.axios = axios;
|
||||||
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
|
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
|
||||||
|
@@ -30,3 +30,4 @@
|
|||||||
border:0;
|
border:0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.skip-links {display: none;}
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*!
|
/*!
|
||||||
* adminlte-filteres.scss
|
* adminlte-filtered.scss
|
||||||
* Copyright (c) 2024 james@firefly-iii.org.
|
* Copyright (c) 2024 james@firefly-iii.org.
|
||||||
*
|
*
|
||||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
// copied from:
|
// copied from:
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* AdminLTE v4.0.0-alpha2
|
* AdminLTE v4.0.0-rc3
|
||||||
* Author: Colorlib
|
* Author: Colorlib
|
||||||
* Website: AdminLTE.io <https://adminlte.io>
|
* Website: AdminLTE.io <https://adminlte.io>
|
||||||
* License: Open source - MIT <https://opensource.org/licenses/MIT>
|
* License: Open source - MIT <https://opensource.org/licenses/MIT>
|
||||||
@@ -84,7 +84,6 @@
|
|||||||
// Bootstrap Utilities
|
// Bootstrap Utilities
|
||||||
@import "bootstrap/scss/utilities/api";
|
@import "bootstrap/scss/utilities/api";
|
||||||
|
|
||||||
|
|
||||||
// AdminLTE Configuration
|
// AdminLTE Configuration
|
||||||
// ---------------------------------------------------
|
// ---------------------------------------------------
|
||||||
@import "admin-lte/src/scss/variables";
|
@import "admin-lte/src/scss/variables";
|
||||||
@@ -97,9 +96,12 @@
|
|||||||
@import "admin-lte/src/scss/parts/components";
|
@import "admin-lte/src/scss/parts/components";
|
||||||
@import "admin-lte/src/scss/parts/extra-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";
|
// Part: Pages
|
||||||
|
//
|
||||||
|
|
||||||
|
@import "admin-lte/src/scss/pages/login_and_register";
|
||||||
@import "admin-lte/src/scss/parts/miscellaneous";
|
@import "admin-lte/src/scss/parts/miscellaneous";
|
||||||
|
|
||||||
|
// AdminLTE Accessibility Styles - WCAG 2.1 AA Compliance
|
||||||
|
@import "admin-lte/src/scss/accessibility";
|
||||||
|
@@ -26,6 +26,9 @@ $danger: #CD5029 !default;
|
|||||||
$primary: #1E6581 !default;
|
$primary: #1E6581 !default;
|
||||||
$success: #64B624 !default;
|
$success: #64B624 !default;
|
||||||
|
|
||||||
|
|
||||||
|
.skip-links {display: none;}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Remove bottom margin from unstyled lists
|
Remove bottom margin from unstyled lists
|
||||||
*/
|
*/
|
||||||
|
@@ -26,13 +26,17 @@ export function getFreshVariable(name, defaultValue = null) {
|
|||||||
return getter.getByName(name).then((response) => {
|
return getter.getByName(name).then((response) => {
|
||||||
// console.log('Get from API');
|
// console.log('Get from API');
|
||||||
return Promise.resolve(parseResponse(name, response));
|
return Promise.resolve(parseResponse(name, response));
|
||||||
}).catch(() => {
|
}).catch((response) => {
|
||||||
// preference does not exist (yet).
|
if(response.status === 404) {
|
||||||
// POST it and then return it anyway.
|
// preference does not exist (yet).
|
||||||
let poster = (new Post);
|
// POST it and then return it anyway.
|
||||||
poster.post(name, defaultValue).then((response) => {
|
let poster = (new Post);
|
||||||
return Promise.resolve(parseResponse(name, response));
|
poster.post(name, defaultValue).then((response) => {
|
||||||
});
|
return Promise.resolve(parseResponse(name, response));
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
return Promise.resolve(null);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -21,5 +21,9 @@
|
|||||||
|
|
||||||
export function showInternalsButton() {
|
export function showInternalsButton() {
|
||||||
// console.log('showInternalsButton');
|
// console.log('showInternalsButton');
|
||||||
document.querySelector('.toggle-page-internals').classList.remove('d-none');
|
let obj = document.querySelector('.toggle-page-internals');
|
||||||
|
if (obj === null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
obj.classList.remove('d-none');
|
||||||
}
|
}
|
||||||
|
@@ -83,7 +83,8 @@ export default defineConfig(({command, mode, isSsrBuild, isPreview}) => {
|
|||||||
|
|
||||||
server: {
|
server: {
|
||||||
cors: true,
|
cors: true,
|
||||||
origin: 'https://192.168.96.154:5173',
|
// make sure this IP matches the IP of the dev machine.
|
||||||
|
origin: 'https://192.168.96.162:5173',
|
||||||
watch: {
|
watch: {
|
||||||
usePolling: true,
|
usePolling: true,
|
||||||
},
|
},
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
<div class="col-xl-3 col-lg-6 col-md-12 col-sm-12">
|
<div class="col-xl-3 col-lg-6 col-md-12 col-sm-12">
|
||||||
<div class="small-box text-bg-primary">
|
<div class="small-box text-bg-primary">
|
||||||
<div class="inner balance-box">
|
<div class="inner balance-box">
|
||||||
<h3 class="hover-expand">
|
<h4 class="hover-expand">
|
||||||
<template x-if="0 === balanceBox.amounts.length">
|
<template x-if="0 === balanceBox.amounts.length">
|
||||||
<span> </span>
|
<span> </span>
|
||||||
</template>
|
</template>
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
:class="{ 'invisible': (balanceBox.amounts.length == index+1) }">, </span>
|
:class="{ 'invisible': (balanceBox.amounts.length == index+1) }">, </span>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</h3>
|
</h4>
|
||||||
<template x-if="loading">
|
<template x-if="loading">
|
||||||
<p class="d-none d-xs-block">
|
<p class="d-none d-xs-block">
|
||||||
<em class="fa-solid fa-spinner fa-spin"></em>
|
<em class="fa-solid fa-spinner fa-spin"></em>
|
||||||
@@ -53,17 +53,17 @@
|
|||||||
<div class="small-box text-bg-success">
|
<div class="small-box text-bg-success">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<template x-if="0 === billBox.unpaid.length">
|
<template x-if="0 === billBox.unpaid.length">
|
||||||
<h3> </h3>
|
<h4> </h4>
|
||||||
</template>
|
</template>
|
||||||
<template x-if="billBox.unpaid.length > 0">
|
<template x-if="billBox.unpaid.length > 0">
|
||||||
<h3 class="hover-expand">
|
<h4 class="hover-expand">
|
||||||
<template x-for="(amount, index) in billBox.unpaid" :key="index">
|
<template x-for="(amount, index) in billBox.unpaid" :key="index">
|
||||||
<span>
|
<span>
|
||||||
<span x-text="amount"></span><span
|
<span x-text="amount"></span><span
|
||||||
:class="{ 'invisible': (billBox.unpaid.length == index+1) }">, </span>
|
:class="{ 'invisible': (billBox.unpaid.length == index+1) }">, </span>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</h3>
|
</h4>
|
||||||
</template>
|
</template>
|
||||||
<template x-if="loading">
|
<template x-if="loading">
|
||||||
<p class="d-none d-sm-block">
|
<p class="d-none d-sm-block">
|
||||||
@@ -104,7 +104,7 @@
|
|||||||
<!--begin::Small Box Widget 3-->
|
<!--begin::Small Box Widget 3-->
|
||||||
<div class="small-box text-bg-warning">
|
<div class="small-box text-bg-warning">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<h3 class="hover-expand">
|
<h4 class="hover-expand">
|
||||||
<template x-if="0 === leftBox.left.length">
|
<template x-if="0 === leftBox.left.length">
|
||||||
<span> </span>
|
<span> </span>
|
||||||
</template>
|
</template>
|
||||||
@@ -114,7 +114,7 @@
|
|||||||
:class="{ 'invisible': (leftBox.left.length == index+1) }">, </span>
|
:class="{ 'invisible': (leftBox.left.length == index+1) }">, </span>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</h3>
|
</h4>
|
||||||
|
|
||||||
<template x-if="loading">
|
<template x-if="loading">
|
||||||
<p class="d-none d-sm-block">
|
<p class="d-none d-sm-block">
|
||||||
@@ -153,14 +153,14 @@
|
|||||||
<!--begin::Small Box Widget 4-->
|
<!--begin::Small Box Widget 4-->
|
||||||
<div class="small-box text-bg-danger">
|
<div class="small-box text-bg-danger">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<h3 class="hover-expand">
|
<h4 class="hover-expand">
|
||||||
<template x-for="(amount, index) in netBox.net" :key="index">
|
<template x-for="(amount, index) in netBox.net" :key="index">
|
||||||
<span>
|
<span>
|
||||||
<span x-text="amount"></span><span
|
<span x-text="amount"></span><span
|
||||||
:class="{ 'invisible': (netBox.net.length == index+1) }">, </span>
|
:class="{ 'invisible': (netBox.net.length == index+1) }">, </span>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</h3>
|
</h4>
|
||||||
|
|
||||||
<template x-if="loading">
|
<template x-if="loading">
|
||||||
<p class="d-none d-sm-block">
|
<p class="d-none d-sm-block">
|
||||||
|
Reference in New Issue
Block a user