8000 Add Audio Resource Views by daniel-sellarix · Pull Request #585 · awcodes/filament-curator · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add Audio Resource Views #585

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

Open
wants to merge 4 commits into
base: 3.x
Choose a base branch
from

Conversation

daniel-sellarix
Copy link

The current views are missing audio representation to match the standard file uploader.

  1. Add audio controls to preview, edit
  2. Add SVG icons to file types.

@@ -28,6 +28,8 @@ class="overflow-hidden h-full w-auto border border-gray-300 rounded dark:border-
/>
@elseif (str($file['type'])->contains('video'))
<video controls src="{{ $file['url'] }}"></video>
@elseif (str($record->type)->contains('audio'))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be $file['type'] instead of $record->type

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it

Comment on lines +102 to +104
'relative block w-full overflow-hidden border border-gray-300 rounded-lg shadow-sm dark:bg-gray-800 dark:border-gray-700 dark:text-white flex justify-center checkered' => ! str($item['type'])->contains('audio'),
'relative block w-full border p-4 border-gray-300 rounded-lg shadow-sm dark:bg-gray-800 dark:border-gray-700 dark:text-white h-32 checkered' =>str($item['type'])->contains('audio'),
'h-64' => ! str($item['type'])->contains('video') && !str($item['type'])->contains('audio'),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please pull duplicated classes out so as to not repeat them.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙂

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not quite what I meant. :)

  'relative block w-full border border-gray-300 rounded-lg shadow-sm checkered dark:bg-gray-800 dark:border-gray-700 dark:text-white',
  'flex justify-center overflow-hidden'  => ! str($item['type'])->contains('audio'),
  'h-32 p-4' => str($item['type'])->contains('audio'),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0