Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update prettier #65

Merged
merged 2 commits into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions assets/js/challenges.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ Alpine.data("Challenge", () => ({
this.$dispatch("load-challenge", this.getNextId());
});
},
{ once: true }
{ once: true },
);
modal.hide();
},
Expand Down Expand Up @@ -163,7 +163,7 @@ Alpine.data("Challenge", () => ({
async submitChallenge() {
this.response = await CTFd.pages.challenge.submitChallenge(
this.id,
this.submission
this.submission,
);

await this.renderSubmissionResponse();
Expand Down Expand Up @@ -267,7 +267,7 @@ Alpine.data("ChallengeBoard", () => ({
// Remove location hash
history.replaceState(null, null, " ");
},
{ once: true }
{ once: true },
);
modal.show();
history.replaceState(null, null, `#${challenge.data.name}-${challengeId}`);
Expand Down
6 changes: 3 additions & 3 deletions assets/js/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Alpine.data("SetupForm", () => ({
!confirm(
`This image file is larger than ${
limit / 1000
}KB which may result in increased load times. Are you sure you'd like to use this file?`
}KB which may result in increased load times. Are you sure you'd like to use this file?`,
)
) {
e.target.value = "";
Expand Down Expand Up @@ -90,7 +90,7 @@ Alpine.data("SetupForm", () => ({
let time_picker = document.querySelector(`#${datetime}-time`);
let unix_time = dayjs(
`${date_picker.value} ${time_picker.value}`,
"YYYY-MM-DD HH:mm"
"YYYY-MM-DD HH:mm",
).unix();

if (isNaN(unix_time)) {
Expand Down Expand Up @@ -123,7 +123,7 @@ Alpine.data("SetupForm", () => ({
}
window.open(
"https://www.majorleaguecyber.org/events/new?" + ret.join("&"),
"_blank"
"_blank",
);
},

Expand Down
4 changes: 2 additions & 2 deletions assets/js/teams/private.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@ Alpine.data("TeamGraphs", () => ({
CTFd.team.id,
CTFd.team.name,
this.solves.data,
this.awards.data
)
this.awards.data,
),
);
},
}));
Expand Down
4 changes: 2 additions & 2 deletions assets/js/teams/public.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ Alpine.data("TeamGraphs", () => ({
window.TEAM.id,
window.TEAM.name,
this.solves.data,
this.awards.data
)
this.awards.data,
),
);
},
}));
Expand Down
6 changes: 3 additions & 3 deletions assets/js/users/private.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Alpine.data("UserGraphs", () => ({
const data = [];
for (const property in breakdown) {
const percent = Number((breakdown[property] / categories.length) * 100).toFixed(
2
2,
);

data.push({
Expand Down Expand Up @@ -70,8 +70,8 @@ Alpine.data("UserGraphs", () => ({
CTFd.user.id,
CTFd.user.name,
this.solves.data,
this.awards.data
)
this.awards.data,
),
);
},
}));
Expand Down
6 changes: 3 additions & 3 deletions assets/js/users/public.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Alpine.data("UserGraphs", () => ({
const data = [];
for (const property in breakdown) {
const percent = Number((breakdown[property] / categories.length) * 100).toFixed(
2
2,
);
data.push({
name: property,
Expand Down Expand Up @@ -70,8 +70,8 @@ Alpine.data("UserGraphs", () => ({
window.USER.id,
window.USER.name,
this.solves.data,
this.awards.data
)
this.awards.data,
),
);
},
}));
Expand Down
2 changes: 1 addition & 1 deletion assets/js/utils/notifications/alerts.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default () => {
event => {
CTFd._functions.events.eventRead(data.id);
},
{ once: true }
{ once: true },
);
modal.show();
};
Expand Down
2 changes: 1 addition & 1 deletion assets/js/utils/notifications/toasts.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default () => {
event => {
close.removeEventListener("click", handler);
},
{ once: true }
{ once: true },
);

toast.show();
Expand Down
2 changes: 1 addition & 1 deletion assets/js/utils/tooltips.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Tooltip } from "bootstrap";

export default () => {
const tooltipList = [].slice.call(
document.querySelectorAll('[data-bs-toggle="tooltip"]')
document.querySelectorAll('[data-bs-toggle="tooltip"]'),
);
tooltipList.map(element => {
return new Tooltip(element);
Expand Down
12 changes: 9 additions & 3 deletions assets/scss/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,18 @@ select.form-control {
background-color: transparent !important;
border-color: #a3d39c;
box-shadow: 0 0 0 0.1rem #a3d39c;
transition: background-color 0.3s, border-color 0.3s;
transition:
background-color 0.3s,
border-color 0.3s;
}

.input-filled-invalid {
background-color: transparent !important;
border-color: #d46767;
box-shadow: 0 0 0 0.1rem #d46767;
transition: background-color 0.3s, border-color 0.3s;
transition:
background-color 0.3s,
border-color 0.3s;
}

.form-control {
Expand All @@ -81,5 +85,7 @@ select.form-control {
background-color: transparent;
border-color: #a3d39c;
box-shadow: 0 0 0 0.1rem #a3d39c;
transition: background-color 0.3s, border-color 0.3s;
transition:
background-color 0.3s,
border-color 0.3s;
}
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"dev": "vite build --watch",
"build": "vite build",
"format": "prettier --write assets/",
"lint": "prettier --check assets/"
"lint": "prettier --check assets/",
"verify": "vite build; git diff --quiet --exit-code"
},
"dependencies": {
"@ctfdio/ctfd-js": "^0.0.12",
Expand All @@ -24,7 +25,7 @@
},
"devDependencies": {
"@vitejs/plugin-vue": "^3.0.1",
"prettier": "2.6.1",
"prettier": "^3.2.5",
"rollup-plugin-copy": "^3.4.0",
"sass": "^1.49.7",
"vite": "^3.0.5"
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion static/assets/page.a7cd4860.js

This file was deleted.

1 change: 1 addition & 0 deletions static/assets/page.e56ddd4d.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import{C as o,m as d}from"./index.697f72c1.js";window.CTFd=o;window.Alpine=d;d.start();

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading