feat(frontend): add API client, layout, and routing

- Create Axios-based API client with sources, jobs, and dashboard endpoints
- Add responsive Layout component with navigation sidebar
- Set up React Router with Dashboard, Backups, and Settings routes
- Configure TanStack Query provider with default options
- Use lucide-react for navigation icons
This commit is contained in:
2026-05-11 21:47:20 +02:00
parent 7676438466
commit d3b92593d5
14073 changed files with 2182272 additions and 0 deletions
+52
View File
@@ -0,0 +1,52 @@
"use strict";
const parsers = require("../parsers");
module.exports.parse = function parse(v) {
const parts = parsers.splitValue(v);
if (!parts.length || parts.length > 2) {
return;
}
const validKeywordsX = ["left", "center", "right"];
const validKeywordsY = ["top", "center", "bottom"];
if (parts.length === 1) {
const dim = parsers.parseMeasurement(parts[0]);
if (dim) {
return dim;
}
const validKeywords = new Set([...validKeywordsX, ...validKeywordsY]);
return parsers.parseKeyword(v, [...validKeywords]);
}
const [partX, partY] = parts;
const posX = parsers.parseMeasurement(partX) || parsers.parseKeyword(partX, validKeywordsX);
if (posX) {
const posY = parsers.parseMeasurement(partY) || parsers.parseKeyword(partY, validKeywordsY);
if (posY) {
return `${posX} ${posY}`;
}
}
};
module.exports.isValid = function isValid(v) {
if (v === "") {
return true;
}
return typeof module.exports.parse(v) === "string";
};
module.exports.definition = {
set(v) {
v = parsers.prepareValue(v, this._global);
if (parsers.hasVarFunc(v)) {
this._setProperty("background", "");
this._setProperty("background-position", v);
} else {
this._setProperty("background-position", module.exports.parse(v));
}
},
get() {
return this.getPropertyValue("background-position");
},
enumerable: true,
configurable: true
};