Skip to content

Commit

Permalink
Merge branch '5.2' into 5
Browse files Browse the repository at this point in the history
# Conflicts:
#	yarn.lock
  • Loading branch information
GuySartorelli committed Jun 20, 2024
2 parents 0f9936b + bf14209 commit 75ec2e0
Show file tree
Hide file tree
Showing 9 changed files with 482 additions and 864 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/add-prs-to-project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Add new PRs to github project

on:
pull_request_target:
types:
- opened
- ready_for_review

permissions: {}

jobs:
addprtoproject:
name: Add PR to GitHub Project
# Only run on the silverstripe account
if: github.repository_owner == 'silverstripe'
runs-on: ubuntu-latest
steps:
- name: Add PR to github project
uses: silverstripe/gha-add-pr-to-project@v1
with:
app_id: ${{ vars.PROJECT_PERMISSIONS_APP_ID }}
private_key: ${{ secrets.PROJECT_PERMISSIONS_APP_PRIVATE_KEY }}
2 changes: 1 addition & 1 deletion client/dist/styles/bundle.css

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion client/src/styles/bundle.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Import variables
@import "variables"; // from silverstripe/admin
@import "login-forms-variables";

@import "typography";
@import "layout";
@import "brand";
Expand Down
3 changes: 1 addition & 2 deletions client/src/styles/dark-mode.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@
--color-button-primary-hover-background: #{$dark-color-button-primary-hover-background};
--color-button-primary-text: #{$dark-color-button-primary-text};
--color-button-primary-hover-text: #{$dark-color-button-primary-hover-text};

--color-button-secondary-background: transparent;
--color-button-secondary-hover-background: #{$dark-color-button-secondary-hover-background};
--color-button-secondary-text: #{$dark-color-button-secondary-text};
--color-button-secondary-hover-text: #{$dark-color-button-secondary-hover-text};

--color-field-background: #{$dark-color-field-background};
--color-field-border: #{$dark-color-field-border};
--color-field-text: #{$dark-color-field-text};
Expand All @@ -31,6 +29,7 @@
&__logo--dark-mode {
display: none;
}

@media (prefers-color-scheme: dark) {
&__logo--light-mode {
display: none;
Expand Down
11 changes: 6 additions & 5 deletions client/src/styles/login-form.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ html {
padding: var(--spacing-form);
width: 100vw;

@media (min-width: 420px) {
@media (width >= 420px) {
border-radius: var(--border-radius-form);
padding: var(--spacing-form-desktop);
width: auto;
Expand Down Expand Up @@ -143,7 +143,7 @@ input[type="submit"] {
}
}

&:not(:disabled):not(.disabled) {
&:not(:disabled, .disabled) {
&:hover,
&:focus,
&.focus,
Expand Down Expand Up @@ -178,7 +178,7 @@ input[type="submit"] {
}
}

&:not(:disabled):not(.disabled) {
&:not(:disabled, .disabled) {
&:hover,
&:focus,
&.focus,
Expand Down Expand Up @@ -213,14 +213,15 @@ input[type="checkbox"] {

// Style the notch on the popup bottle for each possible position
$positions: top, bottom, left, right;

@each $pos in $positions {
&.bs-popover-auto[x-placement^="#{$pos}"],
&.bs-popover-#{$pos} {
& > .arrow::before {
> .arrow:before {
border-#{$pos}-color: var(--color-field-border);
}

& > .arrow::after {
> .arrow:after {
border-#{$pos}-color: var(--color-form-background);
}
}
Expand Down
5 changes: 0 additions & 5 deletions client/src/styles/login-forms-variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,10 @@ $spacing-submit-content: 10px 20px;
--color-button-secondary-hover-background: #{$color-button-secondary-hover-background};
--color-button-secondary-text: #{$link-color};
--color-button-secondary-hover-text: #{$link-color};

--color-button-primary-background: #{$color-button-primary-background};
--color-button-primary-hover-background: #{$color-button-primary-hover-background};
--color-button-primary-text: #{$color-button-primary-text};
--color-button-primary-hover-text: #{$color-button-primary-hover-text};

--color-field-background: #{$white};
--color-field-border: #{$gray-200};
--color-field-text: #{$gray-800};
Expand All @@ -70,15 +68,12 @@ $spacing-submit-content: 10px 20px;
--color-message-warning: #{$color-message-warning};
--color-page-background: #{$color-page-background};
--color-page-text: #{$gray-800};

--border-radius-form: #{$border-radius-form};
--border-radius-field: #{$border-radius-field};
--box-shadow-form: #{$box-shadow-form};

--sizing-app-brand-max-height: #{$sizing-app-brand-max-height};
--sizing-app-brand-max-width: #{$sizing-app-brand-max-width};
--sizing-content-width: #{$sizing-content-width};

--spacing-app-brand: #{$spacing-app-brand};
--spacing-field-content: #{$spacing-field-content};
--spacing-form: #{$spacing-form};
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"dev": "NODE_ENV=development webpack --progress",
"watch": "yarn && NODE_ENV=development webpack --watch --progress",
"css": "WEBPACK_CHILD=css npm run build",
"lint": "stylelint client/src/**/*.scss"
"lint": "stylelint client/src"
},
"repository": {
"type": "git",
Expand All @@ -31,7 +31,7 @@
"@babel/core": "^7.20.5",
"@babel/preset-env": "^7.20.2",
"@babel/preset-react": "^7.18.6",
"@silverstripe/eslint-config": "^1.2.1",
"@silverstripe/eslint-config": "^1.3.0",
"@silverstripe/webpack-config": "^2.1.0",
"babel-loader": "^9.1.0",
"css-loader": "^6.7.2",
Expand Down
4 changes: 2 additions & 2 deletions src/EnablerExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ public function beforeCallActionHandler()
$config = Config::inst();
$action = $this->getOwner()->getAction();
$allowedActions = $config->get(Security::class, 'allowed_actions');
$excludedActions = $config->get(self::class, 'excluded_actions');
$excludedActions = $config->get(EnablerExtension::class, 'excluded_actions');
$themeActions = array_diff($allowedActions ?? [], $excludedActions);
if (in_array($action, $themeActions ?? [])) {
SSViewer::set_themes($config->get(self::class, 'login_themes'));
SSViewer::set_themes($config->get(EnablerExtension::class, 'login_themes'));
}
$this->defaultPageClass = $config->get(Security::class, 'page_class');
Config::modify()->remove(Security::class, 'page_class');
Expand Down
Loading

0 comments on commit 75ec2e0

Please sign in to comment.