This repository has been archived by the owner on Feb 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix design mismatch in
VMediaLicense
(#2025)
- Loading branch information
Showing
63 changed files
with
262 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { ref, onMounted } from '@nuxtjs/composition-api' | ||
|
||
import { useLayout } from '~/composables/use-layout' | ||
|
||
export const WithUiStore = (story) => { | ||
return { | ||
template: `<div ref="element"><story /></div>`, | ||
components: { story }, | ||
setup() { | ||
const element = ref() | ||
const { updateBreakpoint } = useLayout() | ||
onMounted(() => { | ||
updateBreakpoint() | ||
}) | ||
return { element } | ||
}, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
179 changes: 179 additions & 0 deletions
179
src/components/VMediaInfo/meta/VMediaLicense.stories.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,179 @@ | ||
import { | ||
Canvas, | ||
Story, | ||
Description, | ||
Meta, | ||
ArgsTable, | ||
} from '@storybook/addon-docs' | ||
|
||
import VMediaLicense from '~/components/VMediaInfo/VMediaLicense.vue' | ||
|
||
import { ALL_LICENSES, LICENSE_VERSIONS } from '~/constants/license' | ||
import { getLicenseUrl } from '~/utils/license' | ||
|
||
export const Template = (args) => ({ | ||
template: `<VMediaLicense v-bind="args"/>`, | ||
components: { VMediaLicense }, | ||
setup() { | ||
return { args } | ||
}, | ||
}) | ||
|
||
<Meta | ||
title="Components/VMediaLicense" | ||
component={VMediaLicense} | ||
argTypes={{ | ||
license: { | ||
defaultValue: ALL_LICENSES[0], | ||
options: ALL_LICENSES, | ||
control: 'select', | ||
}, | ||
licenseVersion: { | ||
defaultValue: LICENSE_VERSIONS[0], | ||
options: LICENSE_VERSIONS, | ||
control: 'select', | ||
}, | ||
}} | ||
/> | ||
|
||
# VMediaLicense | ||
|
||
<Description of={VMediaLicense} /> | ||
|
||
<ArgsTable of={VMediaLicense} /> | ||
|
||
<!-- A large portion of this file is copied from the story for `VLicense`. --> | ||
|
||
It can display CC licenses. | ||
|
||
| License name | Abbreviation | Slug | | ||
| --------------------------------------- | ------------ | ---------- | | ||
| Attribution | CC BY | `by` | | ||
| Attribution-ShareAlike | CC BY-SA | `by-sa` | | ||
| Attribution-NoDerivatives | CC BY-ND | `by-nd` | | ||
| Attribution-NonCommercial | CC BY-NC | `by-nc` | | ||
| Attribution-NonCommercial-ShareAlike | CC BY-NC-SA | `by-nc-sa` | | ||
| Attribution-NonCommercial-NoDerivatives | CC BY-NC-ND | `by-nc-nd` | | ||
|
||
<Canvas> | ||
<Story | ||
name="CC BY" | ||
args={{ | ||
license: 'by', | ||
licenseVersion: '4.0', | ||
licenseUrl: getLicenseUrl('by', '4.0'), | ||
}} | ||
> | ||
{Template.bind({})} | ||
</Story> | ||
<Story | ||
name="CC BY-SA" | ||
args={{ | ||
license: 'by-sa', | ||
licenseVersion: '4.0', | ||
licenseUrl: getLicenseUrl('by-sa', '4.0'), | ||
}} | ||
> | ||
{Template.bind({})} | ||
</Story> | ||
<Story | ||
name="CC BY-ND" | ||
args={{ | ||
license: 'by-nd', | ||
licenseVersion: '4.0', | ||
licenseUrl: getLicenseUrl('by-nd', '4.0'), | ||
}} | ||
> | ||
{Template.bind({})} | ||
</Story> | ||
<Story | ||
name="CC BY-NC" | ||
args={{ | ||
license: 'by-nc', | ||
licenseVersion: '4.0', | ||
licenseUrl: getLicenseUrl('by-nc', '4.0'), | ||
}} | ||
> | ||
{Template.bind({})} | ||
</Story> | ||
<Story | ||
name="CC BY-NC-SA" | ||
args={{ | ||
license: 'by-nc-sa', | ||
licenseVersion: '4.0', | ||
licenseUrl: getLicenseUrl('by-nc-sa', '4.0'), | ||
}} | ||
> | ||
{Template.bind({})} | ||
</Story> | ||
<Story | ||
name="CC BY-NC-ND" | ||
args={{ | ||
license: 'by-nc-nd', | ||
licenseVersion: '4.0', | ||
licenseUrl: getLicenseUrl('by-nc-nd', '4.0'), | ||
}} | ||
> | ||
{Template.bind({})} | ||
</Story> | ||
</Canvas> | ||
|
||
It can also display some public domain licenses. | ||
|
||
| License name | Abbreviation | Slug | | ||
| ------------------ | ------------ | ----- | | ||
| CC Zero | CC0 | `cc0` | | ||
| Public Domain Mark | - | `pdm` | | ||
|
||
<Canvas> | ||
<Story | ||
name="CC0" | ||
args={{ | ||
license: 'cc0', | ||
licenseVersion: '1.0', | ||
licenseUrl: getLicenseUrl('cc0', '1.0'), | ||
}} | ||
> | ||
{Template.bind({})} | ||
</Story> | ||
<Story | ||
name="PDM" | ||
args={{ | ||
license: 'pdm', | ||
licenseVersion: '1.0', | ||
licenseUrl: getLicenseUrl('pdm', '4.0'), | ||
}} | ||
> | ||
{Template.bind({})} | ||
</Story> | ||
</Canvas> | ||
|
||
It can also display some deprecated CC licenses. | ||
|
||
| License name | Abbreviation | Slug | | ||
| --------------------------- | --------------- | -------------- | | ||
| Sampling Plus | CC Sampling+ | `sampling+` | | ||
| NonCommercial Sampling Plus | CC NC-Sampling+ | `nc-sampling+` | | ||
|
||
<Canvas> | ||
<Story | ||
name="CC Sampling+" | ||
args={{ | ||
license: 'sampling+', | ||
licenseVersion: '', | ||
licenseUrl: getLicenseUrl('sampling+', ''), | ||
}} | ||
> | ||
{Template.bind({})} | ||
</Story> | ||
<Story | ||
name="CC NC-Sampling+" | ||
args={{ | ||
license: 'nc-sampling+', | ||
licenseVersion: '', | ||
licenseUrl: getLicenseUrl('nc-sampling+', ''), | ||
}} | ||
> | ||
{Template.bind({})} | ||
</Story> | ||
</Canvas> |
Binary file modified
BIN
-200 Bytes
(100%)
...ges-single-result.spec.ts-snapshots/audio-ltr-from-search-results-2xl-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+825 Bytes
(100%)
...ages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-lg-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-572 Bytes
(100%)
...ages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-md-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-816 Bytes
(100%)
...ages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-sm-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+136 Bytes
(100%)
...ages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-xl-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-341 Bytes
(100%)
...ages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-xs-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+20 Bytes
(100%)
...ges-single-result.spec.ts-snapshots/audio-rtl-from-search-results-2xl-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+115 Bytes
(100%)
...ages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-lg-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-565 Bytes
(100%)
...ages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-md-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-669 Bytes
(100%)
...ages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-sm-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-29 Bytes
(100%)
...ages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-xl-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-354 Bytes
(100%)
...ages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-xs-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-7 Bytes
(100%)
...ges-single-result.spec.ts-snapshots/image-ltr-from-search-results-2xl-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+397 Bytes
(100%)
...ages-single-result.spec.ts-snapshots/image-ltr-from-search-results-lg-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-126 Bytes
(100%)
...ages-single-result.spec.ts-snapshots/image-ltr-from-search-results-md-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-285 Bytes
(100%)
...ages-single-result.spec.ts-snapshots/image-ltr-from-search-results-sm-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-57 Bytes
(100%)
...ages-single-result.spec.ts-snapshots/image-ltr-from-search-results-xl-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-301 Bytes
(100%)
...ages-single-result.spec.ts-snapshots/image-ltr-from-search-results-xs-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+81 Bytes
(100%)
...ges-single-result.spec.ts-snapshots/image-rtl-from-search-results-2xl-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+78 Bytes
(100%)
...ages-single-result.spec.ts-snapshots/image-rtl-from-search-results-lg-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-187 Bytes
(100%)
...ages-single-result.spec.ts-snapshots/image-rtl-from-search-results-md-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-304 Bytes
(100%)
...ages-single-result.spec.ts-snapshots/image-rtl-from-search-results-sm-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+39 Bytes
(100%)
...ages-single-result.spec.ts-snapshots/image-rtl-from-search-results-xl-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-124 Bytes
(100%)
...ages-single-result.spec.ts-snapshots/image-rtl-from-search-results-xs-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.