mirror of
https://github.com/mickael-kerjean/filestash
synced 2025-12-06 08:22:24 +01:00
chore (cleanup): cleanup before release
This commit is contained in:
parent
40f575037c
commit
b8b2a86374
5 changed files with 48 additions and 11 deletions
12
.gitignore
vendored
12
.gitignore
vendored
|
|
@ -1,4 +1,5 @@
|
|||
node_modules/
|
||||
.sass-cache
|
||||
dist/
|
||||
*_generated.go
|
||||
test/
|
||||
|
|
@ -18,7 +19,14 @@ package-lock.json
|
|||
*_test.go
|
||||
cover.*
|
||||
www
|
||||
*.test.js
|
||||
__snapshots__
|
||||
.gitignore
|
||||
|
||||
|
||||
# frontend
|
||||
public/**/*.test.js
|
||||
public/**/__snapshots__
|
||||
public/jest.setup.js
|
||||
public/package.json
|
||||
public/README.org
|
||||
|
||||
filestash-enterprise
|
||||
|
|
@ -6,7 +6,7 @@ class Icon extends window.HTMLElement {
|
|||
attributeChangedCallback() {
|
||||
const alt = this.getAttribute("name");
|
||||
const img = this._mapOfIcon(alt);
|
||||
requestAnimationFrame(() => {
|
||||
window.requestAnimationFrame(() => {
|
||||
this.innerHTML = this.render({ alt, img });
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ function processError(xhr, err) {
|
|||
if (window.navigator.onLine === false) {
|
||||
return new AjaxError("Connection Lost", err, "NO_INTERNET");
|
||||
}
|
||||
switch (xhr?.status) {
|
||||
switch (parseInt(xhr?.status)) {
|
||||
case 500:
|
||||
return new AjaxError(
|
||||
message || "Oups something went wrong with our servers",
|
||||
|
|
@ -72,12 +72,6 @@ function processError(xhr, err) {
|
|||
err, "BAD_GATEWAY"
|
||||
);
|
||||
case 409:
|
||||
if (response.error_summary) { // dropbox way to say doesn't exist
|
||||
return new AjaxError(
|
||||
"Doesn't exist",
|
||||
err, "UNKNOWN_PATH"
|
||||
);
|
||||
}
|
||||
return new AjaxError(
|
||||
message || "Oups you just ran into a conflict",
|
||||
err, "CONFLICT"
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ export function currentRoute(r, notFoundRoute) {
|
|||
return r[routeKey];
|
||||
}
|
||||
}
|
||||
return r[notFoundRoute];
|
||||
return r[notFoundRoute] || null;
|
||||
}
|
||||
|
||||
function _getHref($node, $root) {
|
||||
|
|
|
|||
35
public/tsconfig.json
Normal file
35
public/tsconfig.json
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"allowJs": true,
|
||||
"checkJs": true,
|
||||
"noEmit": true,
|
||||
"noImplicitReturns": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noUncheckedIndexedAccess": true,
|
||||
"noImplicitReturns": true,
|
||||
"noImplicitThis": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"noUncheckedIndexedAccess": true,
|
||||
"strictNullChecks": true,
|
||||
"strictPropertyInitialization": true,
|
||||
"strictBindCallApply": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strict": false,
|
||||
"allowUnreachableCode": false,
|
||||
"allowUnusedLabels": false,
|
||||
"lib": [
|
||||
"dom",
|
||||
"dom.iterable",
|
||||
"es2022"
|
||||
],
|
||||
"module": "es2022",
|
||||
"target": "es2022",
|
||||
"typeRoots": []
|
||||
},
|
||||
"input": ["pages/ctrl_boot.d.ts", "pages/*.js"],
|
||||
"exclude": [
|
||||
"**/*.test.js", "worker/sw_cache.js",
|
||||
"coverage", "jest.setup.js"
|
||||
]
|
||||
}
|
||||
Loading…
Reference in a new issue