mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +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.
|
||||
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');
|
||||
store.set('cacheValid', localValue === serverValue);
|
||||
store.set('lastActivity', serverValue);
|
||||
@@ -78,6 +82,8 @@ getFreshVariable('lastActivity').then((serverValue) => {
|
||||
window.bootstrapped = true;
|
||||
});
|
||||
});
|
||||
}).catch((error) => {
|
||||
console.error('Error while bootstrapping: ' + error);
|
||||
});
|
||||
window.axios = axios;
|
||||
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
|
||||
|
@@ -30,3 +30,4 @@
|
||||
border:0;
|
||||
}
|
||||
|
||||
.skip-links {display: none;}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*!
|
||||
* adminlte-filteres.scss
|
||||
* adminlte-filtered.scss
|
||||
* Copyright (c) 2024 james@firefly-iii.org.
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
@@ -23,7 +23,7 @@
|
||||
// copied from:
|
||||
|
||||
/*!
|
||||
* AdminLTE v4.0.0-alpha2
|
||||
* AdminLTE v4.0.0-rc3
|
||||
* Author: Colorlib
|
||||
* Website: AdminLTE.io <https://adminlte.io>
|
||||
* License: Open source - MIT <https://opensource.org/licenses/MIT>
|
||||
@@ -84,7 +84,6 @@
|
||||
// Bootstrap Utilities
|
||||
@import "bootstrap/scss/utilities/api";
|
||||
|
||||
|
||||
// AdminLTE Configuration
|
||||
// ---------------------------------------------------
|
||||
@import "admin-lte/src/scss/variables";
|
||||
@@ -97,9 +96,12 @@
|
||||
@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";
|
||||
//
|
||||
// Part: Pages
|
||||
//
|
||||
|
||||
@import "admin-lte/src/scss/pages/login_and_register";
|
||||
@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;
|
||||
$success: #64B624 !default;
|
||||
|
||||
|
||||
.skip-links {display: none;}
|
||||
|
||||
/*
|
||||
Remove bottom margin from unstyled lists
|
||||
*/
|
||||
|
@@ -26,13 +26,17 @@ export function getFreshVariable(name, defaultValue = null) {
|
||||
return getter.getByName(name).then((response) => {
|
||||
// console.log('Get from API');
|
||||
return Promise.resolve(parseResponse(name, response));
|
||||
}).catch(() => {
|
||||
// preference does not exist (yet).
|
||||
// POST it and then return it anyway.
|
||||
let poster = (new Post);
|
||||
poster.post(name, defaultValue).then((response) => {
|
||||
return Promise.resolve(parseResponse(name, response));
|
||||
});
|
||||
}).catch((response) => {
|
||||
if(response.status === 404) {
|
||||
// preference does not exist (yet).
|
||||
// POST it and then return it anyway.
|
||||
let poster = (new Post);
|
||||
poster.post(name, defaultValue).then((response) => {
|
||||
return Promise.resolve(parseResponse(name, response));
|
||||
});
|
||||
return;
|
||||
}
|
||||
return Promise.resolve(null);
|
||||
});
|
||||
}
|
||||
|
||||
|
@@ -21,5 +21,9 @@
|
||||
|
||||
export function 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: {
|
||||
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: {
|
||||
usePolling: true,
|
||||
},
|
||||
|
Reference in New Issue
Block a user