[PLUGINS][Oomox] HTML's input[type='color'] doesn't support alpha values. Feature to apply custom shadow color removed as a result.

This commit is contained in:
Eliseu Amaro 2021-11-27 21:18:20 +00:00 committed by Diogo Peralta Cordeiro
parent 7df2783686
commit 798a5f3796
Signed by: diogo
GPG Key ID: 18D2D35001FBFAB0
4 changed files with 5 additions and 42 deletions

View File

@ -79,7 +79,6 @@ class Oomox
'colour_background_card_light' => $data['colour_background_card_light'],
'colour_border_light' => $data['colour_border_light'],
'colour_accent_light' => $data['colour_accent_light'],
'colour_shadow_light' => $data['colour_shadow_light'],
],
);
DB::merge($current_oomox_settings);
@ -119,7 +118,6 @@ class Oomox
'colour_background_card_dark' => $data['colour_background_card_dark'],
'colour_border_dark' => $data['colour_border_dark'],
'colour_accent_dark' => $data['colour_accent_dark'],
'colour_shadow_dark' => $data['colour_shadow_dark'],
],
);
DB::merge($current_oomox_settings);
@ -156,14 +154,12 @@ class Oomox
$current_background_card = $current_oomox_settings->getColourBackgroundCardLight() ?: '#f0f0f0';
$current_border = $current_oomox_settings->getColourBorderLight() ?: '#d5d5d5';
$current_accent = $current_oomox_settings->getColourAccentLight() ?: '#a22430';
$current_shadow = $current_oomox_settings->getColourShadowLight() ?: '#24243416';
} else {
$current_foreground = $current_oomox_settings->getColourForegroundDark() ?: '#f0f6f6';
$current_background_hard = $current_oomox_settings->getColourBackgroundHardDark() ?: '#141216';
$current_background_card = $current_oomox_settings->getColourBackgroundCardDark() ?: '#131217';
$current_border = $current_oomox_settings->getColourBorderDark() ?: '#201f25';
$current_accent = $current_oomox_settings->getColourAccentDark() ?: '#5ddbcf';
$current_shadow = $current_oomox_settings->getColourShadowDark() ?: '#01010166';
}
} else {
$current_foreground = $is_light ? '#09090d' : '#f0f6f6';
@ -171,7 +167,6 @@ class Oomox
$current_background_card = $is_light ? '#f0f0f0' : '#131217';
$current_border = $is_light ? '#d5d5d5' : '#201f25';
$current_accent = $is_light ? '#a22430' : '#5ddbcf';
$current_shadow = $is_light ? '#24243416' : '#01010166';
}
return Form::create([
@ -205,12 +200,6 @@ class Oomox
'label' => _m('Accent colour'),
'help' => _m('Choose the accent colour'), ],
],
[$shadow, ColorType::class, [
'html5' => true,
'data' => $current_shadow,
'label' => _m('Shadow colour'),
'help' => _m('Choose base colour of shadows'), ],
],
['hidden', HiddenType::class, []],
[$save, SubmitType::class, ['label' => _m('Submit')]],
]);

View File

@ -46,13 +46,11 @@ class Oomox extends Entity
private ?string $colour_background_card_light;
private ?string $colour_border_light;
private ?string $colour_accent_light;
private ?string $colour_shadow_light;
private ?string $colour_foreground_dark;
private ?string $colour_background_hard_dark;
private ?string $colour_background_card_dark;
private ?string $colour_border_dark;
private ?string $colour_accent_dark;
private ?string $colour_shadow_dark;
private DateTimeInterface $created;
private DateTimeInterface $modified;
@ -122,17 +120,6 @@ class Oomox extends Entity
return $this->colour_accent_light;
}
public function setColourShadowLight(?string $colour_shadow_light): self
{
$this->colour_shadow_light = $colour_shadow_light;
return $this;
}
public function getColourShadowLight(): ?string
{
return $this->colour_shadow_light;
}
public function setColourForegroundDark(?string $colour_foreground_dark): self
{
$this->colour_foreground_dark = $colour_foreground_dark;
@ -188,17 +175,6 @@ class Oomox extends Entity
return $this->colour_accent_dark;
}
public function setColourShadowDark(?string $colour_shadow_dark): self
{
$this->colour_shadow_dark = $colour_shadow_dark;
return $this;
}
public function getColourShadowDark(): ?string
{
return $this->colour_shadow_dark;
}
public function setCreated(DateTimeInterface $created): self
{
$this->created = $created;
@ -234,13 +210,11 @@ class Oomox extends Entity
'colour_background_card_light' => ['type' => 'text', 'description' => 'color hex code'],
'colour_border_light' => ['type' => 'text', 'description' => 'color hex code'],
'colour_accent_light' => ['type' => 'text', 'description' => 'color hex code'],
'colour_shadow_light' => ['type' => 'text', 'description' => 'color hex code'],
'colour_foreground_dark' => ['type' => 'text', 'description' => 'color hex code'],
'colour_background_hard_dark' => ['type' => 'text', 'description' => 'color hex code'],
'colour_background_card_dark' => ['type' => 'text', 'description' => 'color hex code'],
'colour_border_dark' => ['type' => 'text', 'description' => 'color hex code'],
'colour_accent_dark' => ['type' => 'text', 'description' => 'color hex code'],
'colour_shadow_dark' => ['type' => 'text', 'description' => 'color hex code'],
'created' => ['type' => 'datetime', 'not null' => true, 'description' => 'date this record was created', 'default' => 'CURRENT_TIMESTAMP'],
'modified' => ['type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified', 'default' => 'CURRENT_TIMESTAMP'],
],

View File

@ -13,7 +13,7 @@
--background-card: {{ oomox.getColourBackgroundCardDark() | default('#131217') | raw }};
--border: {{ oomox.getColourBorderDark() | default('#201f25') | raw }};
--accent: {{ oomox.getColourAccentDark() | default('#5ddbcf') | raw }};
--shadow: 0 0 12px 0 {{ oomox.getColourShadowDark() | default('#01010166') | raw }};
--shadow: 0px 25px 42px -10px rgba(0,0,0,0.09) !important;
--shadow-inset-accent: inset 0 0 0 2px var(--accent);
--background-checkerboard: repeating-conic-gradient(#ffffff66 0 90deg,#ffffff33 0 180deg) 0 0/40px 40px round;
@ -29,7 +29,7 @@
--background-card: {{ oomox.getColourBackgroundCardLight() | default('#f0f0f0') | raw }};
--border: {{ oomox.getColourBorderLight() | default('#d5d5d5') | raw }};
--accent: {{ oomox.getColourAccentLight() | default('#a22430') | raw }};
--shadow: 0 0 12px 0 {{ oomox.getColourShadowLight() | default('#24243416') | raw }};
--shadow: 0px 25px 42px -10px rgba(1,1,1,0.09) !important;
--shadow-inset-accent: inset 0 0 0 2px var(--accent);
--background-checkerboard: repeating-conic-gradient(#ffffff66 0 90deg,#ffffff33 0 180deg) 0 0/40px 40px round;

View File

@ -13,8 +13,8 @@
--background-card: #131217;
--border: #201f25;
--accent: #5ddbcf;
--shadow: 0 0 12px 0 #01010166;
--shadow-inset-accent: inset 0 0 0 2px var(--accent);
--shadow: 0px 0px 199px -76px #01010166;
--shadow: 0px 25px 42px -10px rgba(0,0,0,0.09) !important;
--background-checkerboard: repeating-conic-gradient(#ffffff66 0 90deg,#ffffff33 0 180deg) 0 0/40px 40px round;
--gradient: linear-gradient(10deg,var(--border) 0,transparent 90%) !important;
--gradient-backwards: linear-gradient(290deg,var(--border) 0,var(--background-card) 100%) !important;
@ -28,7 +28,7 @@
--background-card: #f0f0f0;
--border: #d5d5d5;
--accent: #a22430;
--shadow: 0 0 12px 0 #24243416;
--shadow: 0px 25px 42px -10px rgba(0,0,0,0.09) !important;
--shadow-inset-accent: inset 0 0 0 2px var(--accent);
--background-checkerboard: repeating-conic-gradient(#ffffff66 0 90deg,#ffffff33 0 180deg) 0 0/40px 40px round;
--gradient: linear-gradient(10deg,var(--background-hard) 0,transparent 60%) !important;