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

[TAS-798] ✨ Add more license options #420

Merged
merged 1 commit into from
Nov 24, 2023
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
10 changes: 9 additions & 1 deletion components/IscnRegisterForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@
class="h-[40px] w-[320px] mb-[8px]"
:options="licenseOptions"
:placeholder="license"
direction="top"
@input="setLicense"
/>
<TextField
Expand Down Expand Up @@ -776,8 +777,15 @@ export default class IscnRegisterForm extends Vue {

licenseMap: { [key: string]: string | null }= {
'Copyright. All rights reserved.': 'All Rights Reserved',
'CC BY 4.0': 'https://creativecommons.org/licenses/by/4.0/',
'CC BY-NC-ND': 'https://creativecommons.org/licenses/by-nc-nd/4.0/',
'CC BY-NC-SA': 'https://creativecommons.org/licenses/by-nc-sa/4.0/',
'CC BY-NC': 'https://creativecommons.org/licenses/by-nc/4.0/',
'CC BY-ND': 'https://creativecommons.org/licenses/by-nd/4.0/',
'CC BY-SA': 'https://creativecommons.org/licenses/by-sa/4.0/',
'CC BY': 'https://creativecommons.org/licenses/by/4.0/',
'CC0 (Public Domain)': 'https://creativecommons.org/publicdomain/zero/1.0/',
'Other': null,
'Not Specified': '',
}

author: Author = {
Expand Down
22 changes: 12 additions & 10 deletions components/Selector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@
</div>
<div
v-if="isOpenOptions && options.length"
class="
absolute
bg-white
border-shade-gray border-[1px]
rounded-[24px]
text-dark-gray text-left
mt-[8px]
p-[12px]
z-50
"
:class="[
'absolute',
'bg-white',
'border-shade-gray border-[1px]',
'rounded-[24px]',
'text-dark-gray text-left',
'p-[12px]',
'z-50',
direction === 'top' ? 'bottom-full mb-[8px]' : 'mt-[8px]',
]"
>
<div
v-for="(option, i) of options"
Expand Down Expand Up @@ -51,6 +51,8 @@ export default class Selector extends Vue {

@Prop(String) readonly placeholder: string | undefined

@Prop({ default: 'bottom' }) readonly direction!: string

@Prop([
String,
Array,
Expand Down
Loading