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

feat: icon to notification item #1539

Merged
merged 4 commits into from
Feb 15, 2025
Merged

Conversation

TheForwardDev
Copy link
Contributor

@TheForwardDev TheForwardDev commented Feb 12, 2025

What was changed

MoonShineNotification::send(..., icon: 'users');

Why?

I want more icons 🌚

Checklist

  • Issue #
  • Tested
    • Tested manually
  • Documentation

MoonShineNotification::send(..., icon: 'users');
@lee-to lee-to added this to the 3.6.0 milestone Feb 12, 2025
@lee-to
Copy link
Member

lee-to commented Feb 12, 2025

А какой смысл прокидывать иконку как компонент? думаю в этом случае через чур давать возможность такой кастомизации, достаточно строки

@TheForwardDev
Copy link
Contributor Author

Полностью согласен

@lee-to
Copy link
Member

lee-to commented Feb 13, 2025

В meta-storm.xml сможешь прокинуть иконку для MoonShineNotification ?

@TheForwardDev
Copy link
Contributor Author

В meta-storm.xml сможешь прокинуть иконку для MoonShineNotification ?

Как-то так?)

...
 <classMethod
            class="\MoonShine\Laravel\Notifications\MoonShineNotification"
            method="send"
            argument="3"
        >
            <files extension="blade.php" xpath="$project/vendor/moonshine/moonshine/src/UI/resources/views/icons"/>
            <stopCompletion />
        </classMethod>
...        

@lee-to
Copy link
Member

lee-to commented Feb 13, 2025

В meta-storm.xml сможешь прокинуть иконку для MoonShineNotification ?

Как-то так?)

...
 <classMethod
            class="\MoonShine\Laravel\Notifications\MoonShineNotification"
            method="send"
            argument="3"
        >
            <files extension="blade.php" xpath="$project/vendor/moonshine/moonshine/src/UI/resources/views/icons"/>
            <stopCompletion />
        </classMethod>
...        

Да но вроде 4 аргумент, от 0 идут

icon autocomplete
icon autocomplete
@lee-to
Copy link
Member

lee-to commented Feb 13, 2025

Вроде норм, пр я смержу перед релизом 3.6. уже можно сделать пр в доку с пометкой 3.6

@TheForwardDev
Copy link
Contributor Author

В meta-storm.xml сможешь прокинуть иконку для MoonShineNotification ?

Как-то так?)

...
 <classMethod
            class="\MoonShine\Laravel\Notifications\MoonShineNotification"
            method="send"
            argument="3"
        >
            <files extension="blade.php" xpath="$project/vendor/moonshine/moonshine/src/UI/resources/views/icons"/>
            <stopCompletion />
        </classMethod>
...        

Да но вроде 4 аргумент, от 0 идут

У меня была ситуация когда, color не указан

MoonShineNotification::send(
            message: 'Created #' . $item->id,
            button: new NotificationButton(...),
            ids: $userIds,
            icon: 'users'
        );

c аргументом 3 работало при таком кейсе... Можно как-то чтобы по названию аргумента также учитывало?

@lee-to lee-to changed the title added: icon to notification item feat: icon to notification item Feb 13, 2025
@lee-to lee-to merged commit c18fcfe into moonshine-software:3.x Feb 15, 2025
9 checks passed
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.

2 participants