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

Allow users to set a license for each track separately #1197

Open
wants to merge 24 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
8e24cbe
Add license_code column to assets.
Manfred Apr 11, 2022
75dd5b6
Update schema.
Manfred Apr 11, 2022
8e30a4a
Add a model to handle license codes.
Manfred Apr 11, 2022
f64bd5f
Add a validator for license codes.
Manfred Apr 11, 2022
d93e05d
Localize license and license code related text.
Manfred Apr 11, 2022
72748c1
Validate Asset license code and return license.
Manfred Apr 11, 2022
17f2201
Allow users to select and update license code for asset.
Manfred Apr 11, 2022
7fff817
Show asset license icons with track.
Manfred Apr 11, 2022
f014ea1
Expand license options when toggle is activated.
Manfred Apr 11, 2022
7379d05
Style license icons and license options.
Manfred Apr 11, 2022
64d58a3
Add title to asset license link.
Manfred Apr 11, 2022
27bee16
Start 2022 changes to assets#show
ofsound May 3, 2022
f0dea7d
Round two of changes to the new track content view
ofsound May 11, 2022
f7e8a4e
Start in on and make a mess of track_edit
ofsound May 11, 2022
229af0c
Another round on track_edit
ofsound May 11, 2022
4dd0b38
Start the SVG replacement for the radio inputs
ofsound May 12, 2022
bc3036d
Refactor the CSS
ofsound May 12, 2022
90d18c8
Details and clean-up on edit and post
ofsound May 12, 2022
004c944
Some alignment adjusments
ofsound May 12, 2022
74ac46e
Hit some color theming, button adjustment
ofsound May 17, 2022
3de855b
Add the "BY-NC" labels throughout
ofsound May 17, 2022
c9480cd
Make some mobile adjustments
ofsound May 17, 2022
a0adf90
Couple more responsive overflow styles
ofsound May 17, 2022
9730ead
Fix typo
ofsound May 17, 2022
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
95 changes: 80 additions & 15 deletions app/assets/stylesheets/components/forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -106,20 +106,8 @@ form {
outline: none;
font-family: $medium-sans-font;
}
}

// This is to override default form styles in the thredded appp
// seems silly to being rewriting same properties as the style above
form.thredded--form input[type="text"], form.thredded--form textarea {
background-color: $forms-background!important;
border: 1px solid $forms-border!important;
color: $forms-input-text;
font-family: $medium-sans-font;
padding: 9px 10px 6px 10px;
font-size: 14px;
box-shadow: none;
&:focus {
border: 1px solid $accent!important;
textarea {
line-height: 1.5;
}
}

Expand Down Expand Up @@ -149,7 +137,7 @@ form.thredded--form input[type="text"], form.thredded--form textarea {
}
}

/*PLACEHOLDER TEXT COLOR */
/* PLACEHOLDER TEXT COLOR */

::placeholder {
color: $forms-placeholder-text;
Expand Down Expand Up @@ -238,6 +226,83 @@ form.thredded--form input[type="text"], form.thredded--form textarea {
display: block;
}

/* CUSTOM SVG RADIO REPLACEMENT */

[type="radio"]:not(:checked),
[type="radio"]:checked {
position: absolute;
left: -9999px;
}

[type="radio"]:not(:checked) + label,
[type="radio"]:checked + label {
position: relative;
padding-left: 1.95em;
cursor: pointer;
> span {
position: relative;
top: 3px;
}
}

[type="radio"]:not(:checked) + label:hover:before {
border: 1px solid $checkbox-not-checked-border !important;
}

[type="radio"]:not(:checked) + label:active:before,
[type="radio"]:checked + label:active:before {
border: 1px solid #d46a00 !important;
background-color: $accent !important;
}

[type="radio"]:not(:checked) + label:active:after {
position: absolute;
top: 1px;
left: 5px;
content: image-url("svg/icon_checkmark.svg");
display: block;
}

[type="radio"]:not(:checked) + label:before {
position: absolute;
top: 0;
left: 0;
width: 18px;
height: 18px;
content: "";
border: 1px solid $checkbox-not-checked-border;
border-radius: 2.5px;
background-color: $checkbox-not-checked-background !important;
}

[type="radio"]:checked + label:before {
position: absolute;
top: 0;
left: 0;
width: 18px;
height: 18px;
content: "";
border: 1px solid $checkbox-checked-border;
border-radius: 2.5px;
background-color: $checkbox-checked-background;
}

[type="radio"]:not(:checked) + label:after {
position: absolute;
top: 1px;
left: 5px;
content: image-url("svg/icon_checkmark.svg");
display: none;
}

[type="radio"]:checked + label:after {
position: absolute;
top: 1px;
left: 5px;
content: image-url("svg/icon_checkmark.svg");
display: block;
}

#error_explanation {
background-color: #ffeadf;
padding-left: $baseline * 1.5;
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/components/shared.scss
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ body {
color: $back-to-text;
display: inline-flex;
margin-bottom: 32px;
@include shadow1();
// @include shadow1();
&:hover {
text-decoration: none;
}
Expand Down
Loading