Coder Social home page Coder Social logo

mikebarlow / megaphone Goto Github PK

View Code? Open in Web Editor NEW
254.0 6.0 17.0 491 KB

Livewire UI for Laravel based user notifications

License: MIT License

PHP 60.64% CSS 14.14% SCSS 0.14% Blade 24.36% JavaScript 0.71%
announcements bell laravel livewire notifications

megaphone's People

Contributors

gregorysouzasilva avatar hpacleb avatar mikebarlow avatar pjkellar avatar rickmills avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

megaphone's Issues

Use wireui/heroicons for a more consistent looking iconset?

Checkout this package:

https://github.com/wireui/heroicons

It's an icon set library (decoupled from it's parent package, WireUI), I am thinking maybe we can replace all the icons in the repo with it so that it would require much less code, be easier to manipulate and be more consistent all round.

Eg:

<button role="button" aria-label="close modal" class="focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-gray-500 rounded-md cursor-pointer" @click="open = false">
    <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
        <path d="M18 6L6 18" stroke="#4B5563" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round" />
        <path d="M6 6L18 18" stroke="#4B5563" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round" />
    </svg>
</button>

To:
<button class="right-0"><x-icon name="x" class="w-6 h-6 text-gray-500" /></button>

I want to make a pull request to do so btw.

@mikebarlow

Fix readme line for megaphone css

<link rel="stylesheet" href="{{ asset('vendor/megaphone/css/announcements.css') }}">

Should actually be

<link rel="stylesheet" href="{{ asset('vendor/megaphone/css/megaphone.css') }}">

Admin component needs to merge in types

Used in a few sections, drop down, rules etc...

It simply loads from 'megaphone.types' rather than merging in correctly with custom types.

Reuse tested function within HasMegaphone trait

UI modifications.

I added a few UI modifications for my project, so I was wondering if you liked them so I could make a PR for them. (I also added a dark theme):

Light theme:

image
image
image

Dark theme:
image
image

Livewire 3

Hello,
any plans to update to livewire 3? or does it have a fork with the new version?

Tks

Multiple Notifiable models

Hello,

thank you for this great package, I'm having a lot of fun in my project using it.

My project has teams and users belonging to teams. Both the Team model and User model can be Notifiable.
I'd like to know if there is a way to display at the same time notifications for the current user and for the team the current user belongs to.
I've seen that a notifiableId parameter can be passed to the megaphone component but it's either the user or the team. Plus that would need to adjust the model property in the config file.

What would be the strategy to achieve the described behavior? Thank you for your input on this matter!

Route

Hey, I'm trying to make an entire page where people can see their notifications, not just from a popout, how do I implement this?

Improve the mark as read UX

To mark a notification as read it currently uses a "mouseenter" event on the notification within the popout.

This sometimes causes a problem when you open the popout and the mouse is already then hovering the notification and it instantly marks it as read.

Need to add some kind of debounce to prevent the notification from becoming instantly read.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.