Skip to content

Commit

Permalink
Merge branch 'main' into paratest
Browse files Browse the repository at this point in the history
  • Loading branch information
melroy89 authored Jan 14, 2025
2 parents 276d51c + 5a25fde commit 0ac295f
Show file tree
Hide file tree
Showing 173 changed files with 5,529 additions and 989 deletions.
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ S3_VERSION=
# Only let admins generated oauth clients
KBIN_ADMIN_ONLY_OAUTH_CLIENTS=false

# Manually approve every new user
MBIN_NEW_USERS_NEED_APPROVAL=false

# oAuth (optional)
OAUTH_AZURE_ID=
OAUTH_AZURE_SECRET=
Expand Down
3 changes: 3 additions & 0 deletions .env.example_docker
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ S3_VERSION=
# Only let admins generate oauth clients
KBIN_ADMIN_ONLY_OAUTH_CLIENTS=false

# Manually approve every new user
MBIN_NEW_USERS_NEED_APPROVAL=false

# oAuth (optional)
OAUTH_AZURE_ID=
OAUTH_AZURE_SECRET=
Expand Down
2 changes: 1 addition & 1 deletion .env.test
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ KBIN_DEFAULT_LANG=en
KBIN_DOMAIN=kbin.test
ELASTICSEARCH_ENABLED=false
KBIN_API_ITEMS_PER_PAGE=2
KBIN_FEDERATION_ENABLED=false
KBIN_FEDERATION_ENABLED=true

###> league/oauth2-server-bundle ###
OAUTH_PRIVATE_KEY=%kernel.project_dir%/config/oauth2/tests/private.pem
Expand Down
40 changes: 40 additions & 0 deletions assets/controllers/subject_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,46 @@ export default class extends Controller {
}
}

/**
* Calls the address attached to the nearest link node. Replaces the outer html of the nearest `cssclass` parameter
* with the response from the link
*/
async linkCallback(event) {
const { cssclass: cssClass, refreshlink: refreshLink, refreshselector: refreshSelector } = event.params
event.preventDefault();

const a = event.target.closest('a');

try {
this.loadingValue = true;

let response = await fetch(a.href, {
method: 'GET',
});

response = await ok(response);
response = await response.json();

event.target.closest(`.${cssClass}`).outerHTML = response.html;

const refreshElement = this.element.querySelector(refreshSelector)
console.log("linkCallback refresh stuff", refreshLink, refreshSelector, refreshElement)

if (!!refreshLink && refreshLink !== "" && !!refreshElement) {
let response = await fetch(refreshLink, {
method: 'GET',
});

response = await ok(response);
response = await response.json();
refreshElement.outerHTML = response.html;
}
} catch (e) {
} finally {
this.loadingValue = false;
}
}

loadingValueChanged(val) {
const submitButton = this.containerTarget.querySelector('form button[type="submit"]');

Expand Down
4 changes: 4 additions & 0 deletions assets/styles/app.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@use '@fortawesome/fontawesome-free/scss/fontawesome';
@use '@fortawesome/fontawesome-free/scss/solid';
@use '@fortawesome/fontawesome-free/scss/regular';
@use '@fortawesome/fontawesome-free/scss/brands';
@use 'simple-icons-font/font/simple-icons';
@use 'variables';
Expand All @@ -14,6 +15,7 @@
@use 'layout/alerts';
@use 'layout/forms';
@use 'layout/images';
@use 'layout/icons';
@use 'components/announcement';
@use 'components/topbar';
@use 'components/header';
Expand All @@ -28,6 +30,7 @@
@use 'components/figure_image';
@use 'components/figure_lightbox';
@use 'components/post';
@use 'components/search';
@use 'components/subject';
@use 'components/login';
@use 'components/modlog';
Expand All @@ -44,6 +47,7 @@
@use 'components/settings_row';
@use 'pages/post_single';
@use 'pages/post_front';
@use 'pages/page_bookmarks';
@use 'themes/kbin';
@use 'themes/default';
@use 'themes/solarized';
Expand Down
24 changes: 24 additions & 0 deletions assets/styles/components/_search.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.search-container {
background: var(--kbin-input-bg);
border: var(--kbin-input-border);
border-radius: var(--kbin-rounded-edges-radius) !important;

input.form-control {
border-radius: 0 !important;
border: none;
background: transparent;
margin: 0 .5em;
padding: .5rem .25rem;
}

button {
border-radius: 0 var(--kbin-rounded-edges-radius) var(--kbin-rounded-edges-radius) 0 !important;
border: 0;
padding: 1rem 0.5rem;

&:not(:hover) {
background: var(--kbin-input-bg);
color: var(--kbin-input-text-color) !important;
}
}
}
12 changes: 11 additions & 1 deletion assets/styles/layout/_forms.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@use 'breakpoints' as b;
@use '../mixins/mbin';
@use '@fortawesome/fontawesome-free/scss/fontawesome' as fa;

.btn {
font-size: .85rem;
Expand Down Expand Up @@ -125,9 +126,12 @@ input[type=radio] {
align-content: center;
cursor: pointer;

@extend %fa-icon;
@extend .fa-solid;

&::before {
font-family: var(--kbin-font-awesome-font-family);
content: "\f00c";
content: fa.fa-content(fa.$fa-var-check);
transform: scale(0);
transition: 100ms transform ease-in;
}
Expand Down Expand Up @@ -528,3 +532,9 @@ div.input-box {
border-radius: var(--kbin-rounded-edges-radius) !important;
}
}

.form-control {
display: block;
width: 100%;

}
3 changes: 3 additions & 0 deletions assets/styles/layout/_icons.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
i.active {
color: var(--kbin-color-icon-active, orange);
}
10 changes: 9 additions & 1 deletion assets/styles/layout/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,9 @@ figure {
code,
.ts-control > [data-value].item,
.image-preview-container {
border-radius: var(--kbin-rounded-edges-radius) !important;
&:not(.ignore-edges) {
border-radius: var(--kbin-rounded-edges-radius) !important;
}
}

.ts-wrapper {
Expand Down Expand Up @@ -363,6 +365,12 @@ figure {
gap: .25rem;
}

@include b.media-breakpoint-down(lg) {
.flex.mobile {
display: block;
}
}

.flex-wrap {
flex-wrap: wrap;
}
Expand Down
8 changes: 0 additions & 8 deletions assets/styles/layout/_section.scss
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,3 @@
color: var(--kbin-alert-danger-text-color);
}
}

.page-search {
.section--top {
button {
padding: 1rem 1.5rem;
}
}
}
6 changes: 6 additions & 0 deletions assets/styles/pages/page_bookmarks.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.page-bookmarks {
.entry, .entry-comment, .post, .post-comment, .comment {
margin-top: 0!important;
margin-bottom: .5em!important;
}
}
56 changes: 28 additions & 28 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,44 +65,44 @@
"scienta/doctrine-json-functions": "^6.1.0",
"stevenmaguire/oauth2-keycloak": "^5.1.0",
"symfony/amqp-messenger": "7.2.*",
"symfony/asset": "7.1.*",
"symfony/asset": "7.2.*",
"symfony/cache": "7.2.*",
"symfony/console": "7.1.*",
"symfony/css-selector": "7.1.*",
"symfony/console": "7.2.*",
"symfony/css-selector": "7.2.*",
"symfony/doctrine-messenger": "7.2.*",
"symfony/dotenv": "7.2.*",
"symfony/expression-language": "7.2.*",
"symfony/flex": "^2.4.5",
"symfony/form": "7.1.*",
"symfony/framework-bundle": "7.1.*",
"symfony/http-client": "7.1.*",
"symfony/lock": "7.1.*",
"symfony/mailer": "7.1.*",
"symfony/mailgun-mailer": "7.1.*",
"symfony/form": "7.2.*",
"symfony/framework-bundle": "7.2.*",
"symfony/http-client": "7.2.*",
"symfony/lock": "7.2.*",
"symfony/mailer": "7.2.*",
"symfony/mailgun-mailer": "7.2.*",
"symfony/mercure-bundle": "0.3.*",
"symfony/messenger": "7.1.*",
"symfony/messenger": "7.2.*",
"symfony/mime": "7.2.*",
"symfony/monolog-bundle": "^3.10.0",
"symfony/property-access": "7.1.*",
"symfony/property-info": "7.1.*",
"symfony/property-access": "7.2.*",
"symfony/property-info": "7.2.*",
"symfony/rate-limiter": "7.2.*",
"symfony/redis-messenger": "7.2.*",
"symfony/runtime": "7.1.*",
"symfony/scheduler": "7.1.*",
"symfony/runtime": "7.2.*",
"symfony/scheduler": "7.2.*",
"symfony/security-bundle": "7.2.*",
"symfony/security-csrf": "7.2.*",
"symfony/serializer": "7.1.*",
"symfony/string": "7.1.*",
"symfony/translation": "7.1.*",
"symfony/twig-bundle": "7.1.*",
"symfony/type-info": "7.1.*",
"symfony/uid": "7.1.*",
"symfony/serializer": "7.2.*",
"symfony/string": "7.2.*",
"symfony/translation": "7.2.*",
"symfony/twig-bundle": "7.2.*",
"symfony/type-info": "7.2.*",
"symfony/uid": "7.2.*",
"symfony/ux-autocomplete": "^2.18.0",
"symfony/ux-chartjs": "^2.18.0",
"symfony/ux-twig-component": "^2.18.1",
"symfony/validator": "7.1.*",
"symfony/validator": "7.2.*",
"symfony/webpack-encore-bundle": "^2.1.1",
"symfony/workflow": "7.1.*",
"symfony/workflow": "7.2.*",
"symfony/yaml": "7.2.*",
"symfonycasts/reset-password-bundle": "^1.22.0",
"symfonycasts/verify-email-bundle": "^1.17.0",
Expand All @@ -111,7 +111,7 @@
"twig/extra-bundle": "^3.10.0",
"twig/html-extra": "^3.10.0",
"twig/intl-extra": "^3.10.0",
"twig/twig": "^3.10.3",
"twig/twig": "^3.15.0",
"webmozart/assert": "^1.11.0",
"wohali/oauth2-discord-new": "^1.2.1"
},
Expand All @@ -124,11 +124,11 @@
"phpstan/phpstan": "^2.0.2",
"phpunit/phpunit": "^11.3.4",
"symfony/browser-kit": "7.2.*",
"symfony/debug-bundle": "7.1.*",
"symfony/debug-bundle": "7.2.*",
"symfony/maker-bundle": "1.61.0",
"symfony/phpunit-bridge": "7.1.*",
"symfony/stopwatch": "7.1.*",
"symfony/web-profiler-bundle": "7.1.*"
"symfony/phpunit-bridge": "7.2.*",
"symfony/stopwatch": "7.2.*",
"symfony/web-profiler-bundle": "7.2.*"
},
"replace": {
"symfony/polyfill-ctype": "*",
Expand Down Expand Up @@ -164,7 +164,7 @@
"extra": {
"symfony": {
"allow-contrib": false,
"require": "7.1.*"
"require": "7.2.*"
}
},
"scripts": {
Expand Down
Loading

0 comments on commit 0ac295f

Please sign in to comment.