generated from MinBZK/python-project-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f655982
commit 555c9b8
Showing
20 changed files
with
7,434 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
#!/usr/bin/env bash | ||
|
||
. ${NVM_DIR}/nvm.sh && nvm install | ||
npm install | ||
|
||
pipx install poetry | ||
poetry install | ||
poetry run playwright install --with-deps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
npx lint-staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
()v22.6.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Ignore artifacts: | ||
amt/site/static/js | ||
|
||
webpack.config.js | ||
webpack.config.prod.js | ||
tsconfig.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import Sortable from "sortablejs"; | ||
import "htmx.org"; | ||
|
||
window.onload = function () { | ||
// TODO (robbert): we need (better) event handling and displaying of server errors | ||
document.body.addEventListener("htmx:sendError", function () { | ||
document.getElementById("errorContainer")!.innerHTML = | ||
"<h1>Placeholder: Error while connecting to server</h1"; | ||
}); | ||
|
||
const columns = document.getElementsByClassName( | ||
"progress_cards_container", | ||
) as HTMLCollectionOf<HTMLDivElement>; | ||
for (let i = 0; i < columns.length; i++) { | ||
new Sortable(columns[i], { | ||
//NOSONAR | ||
group: "shared", // set both lists to same group | ||
animation: 150, | ||
onEnd: function (evt) { | ||
if (evt.oldIndex !== evt.newIndex || evt.from !== evt.to) { | ||
let previousSiblingId = evt.item.previousElementSibling | ||
? evt.item.previousElementSibling.getAttribute("data-id") | ||
: "-1"; | ||
let nextSiblingId = evt.item.nextElementSibling | ||
? evt.item.nextElementSibling.getAttribute("data-id") | ||
: "-1"; | ||
let targetId = "#" + evt.item.getAttribute("data-target-id"); | ||
let toStatusId = evt.to.getAttribute("data-id"); | ||
let form = document.getElementById("cardMovedForm"); | ||
|
||
(document.getElementsByName("taskId")[0] as HTMLInputElement).value = | ||
evt.item.getAttribute("data-id") ?? ""; | ||
( | ||
document.getElementsByName("statusId")[0] as HTMLInputElement | ||
).value = toStatusId ?? ""; | ||
( | ||
document.getElementsByName( | ||
"previousSiblingId", | ||
)[0] as HTMLInputElement | ||
).value = previousSiblingId ?? ""; | ||
( | ||
document.getElementsByName("nextSiblingId")[0] as HTMLInputElement | ||
).value = nextSiblingId ?? ""; | ||
form!.setAttribute("hx-target", targetId); | ||
|
||
// @ts-expect-error" | ||
htmx.trigger("#cardMovedForm", "cardmoved"); | ||
} | ||
}, | ||
}); | ||
} | ||
}; | ||
|
||
// @ts-expect-error" | ||
function setCookie( | ||
cookieName: string, | ||
cookieValue: string, | ||
expirationDays: number, | ||
) { | ||
const date = new Date(); | ||
date.setTime(date.getTime() + expirationDays * 24 * 60 * 60 * 1000); // Set expiration time | ||
const expires = "expires=" + date.toUTCString(); | ||
document.cookie = | ||
cookieName + "=" + cookieValue + ";" + expires + ";path=/;SameSite=Strict"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import globals from "globals"; | ||
import pluginJs from "@eslint/js"; | ||
import tseslint from "typescript-eslint"; | ||
import eslintConfigPrettier from "eslint-config-prettier"; | ||
|
||
export default [ | ||
{ files: ["**/*.ts"] }, | ||
{ languageOptions: { globals: globals.browser } }, | ||
pluginJs.configs.recommended, | ||
...tseslint.configs.strict, | ||
...tseslint.configs.stylistic, | ||
eslintConfigPrettier, | ||
]; |
Oops, something went wrong.