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: Badge Generator #2915

Merged
merged 9 commits into from May 31, 2023
Merged

Feat: Badge Generator #2915

merged 9 commits into from May 31, 2023

Conversation

kiznick
Copy link
Contributor

@kiznick kiznick commented Mar 10, 2023

⚠️⚠️⚠️ Since we do not accept all types of pull requests and do not want to waste your time. Please be sure that you have read pull request rules:
https://github.com/louislam/uptime-kuma/blob/master/CONTRIBUTING.md#can-i-create-a-pull-request-for-uptime-kuma

Tick the checkbox if you understand [x]:

  • I have read and understand the pull request rules.

Description

In PR: #1119 Badges have been added but there's no telling if this feature exists and there's no way to use it other than reading the PR, I'd like to make a Badge Generator to make it easier to use.

Type of change

Please delete any options that are not relevant.

  • User interface (UI)
  • New feature (non-breaking change which adds functionality)

Checklist

  • My code follows the style guidelines of this project
  • I ran ESLint and other linters for modified files
  • I have performed a self-review of my own code and tested it
  • I have commented my code, particularly in hard-to-understand areas
    (including JSDoc for methods)
  • My changes generate no new warnings
  • My code needed automated testing. I have added them (this is optional task)

Screenshots (if any)

image
image

@kiznick kiznick changed the title Create badge-list.md Feat: Badge Generator Mar 10, 2023
@kiznick kiznick marked this pull request as ready for review March 10, 2023 14:01
@Zaid-maker
Copy link
Contributor

That's pretty amazing that someone added that functionality ❤️

Copy link
Collaborator

@chakflying chakflying left a comment

Choose a reason for hiding this comment

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

Fix lint.

src/components/BadgeGeneratorDialog.vue Outdated Show resolved Hide resolved
src/components/BadgeGeneratorDialog.vue Outdated Show resolved Hide resolved
src/components/BadgeGeneratorDialog.vue Outdated Show resolved Hide resolved
src/components/BadgeGeneratorDialog.vue Outdated Show resolved Hide resolved
Co-authored-by: Nelson Chan <3271800+chakflying@users.noreply.github.com>
Copy link
Contributor Author

@kiznick kiznick left a comment

Choose a reason for hiding this comment

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

Thanks for fix it!

Copy link
Collaborator

@chakflying chakflying left a comment

Choose a reason for hiding this comment

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

I'm not a fan of the original icon-only toggle for the public link, it's not easy to understand. But at least this is in line with the current UI.

@Tokynet
Copy link

Tokynet commented Apr 26, 2023

What is holding up this PR?

@louislam louislam added this to the 1.22.0 milestone May 13, 2023
src/components/BadgeGeneratorDialog.vue Outdated Show resolved Hide resolved
</select>
</div>

<div v-if=" (parameters[badge.type || 'null'] || [] ).includes('duration') " class="mb-3">
Copy link
Collaborator

Choose a reason for hiding this comment

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

This v-if statement seems very ugly (and used more than once).
Have you considered a computed property for this usecase?

Co-authored-by: Frank Elsinga <frank@elsinga.de>
@CommanderStorm CommanderStorm mentioned this pull request May 20, 2023
6 tasks
@louislam
Copy link
Owner

I'm not a fan of the original icon-only toggle for the public link, it's not easy to understand. But at least this is in line with the current UI.

Tested this pr, it is working. I agree with @chakflying. The icons in the list is a bit strange. I am thinking maybe we can make them into a 3dot button.

@kiznick
Copy link
Contributor Author

kiznick commented May 29, 2023

I'm not a fan of the original icon-only toggle for the public link, it's not easy to understand. But at least this is in line with the current UI.

Tested this pr, it is working. I agree with @chakflying. The icons in the list is a bit strange. I am thinking maybe we can make them into a 3dot button.

What if we create another modal and merge 2 current buttons to this modal like this?
I think it will be useful if there will be more functions later.
image
image

@louislam
Copy link
Owner

Yes, it would be better.

@louislam
Copy link
Owner

The behaviour of the model is a little bit strange. When I incidentally drag it or try to highlight some text inside, it will disappear.

@kiznick
Copy link
Contributor Author

kiznick commented May 30, 2023

The behaviour of the model is a little bit strange. When I incidentally drag it or try to highlight some text inside, it will disappear.

already fix

@louislam louislam merged commit 039fdb0 into louislam:master May 31, 2023
16 checks passed
@chakflying
Copy link
Collaborator

I think we need to add the clickable link strings to en.json to be able to translate it.

@kiznick
Copy link
Contributor Author

kiznick commented May 31, 2023

I think we need to add the clickable link strings to en.json to be able to translate it.

I can add in /src/lang/en.json right?

@chakflying
Copy link
Collaborator

Yes.

louislam added a commit that referenced this pull request May 31, 2023
Add i18n variable for Badge Generator #2915
@mbh-dev
Copy link

mbh-dev commented Jun 12, 2023

Apologies if I'm being dumb, but how do you access this option within Uptime Kuma? I've successfully upgraded to Version: 1.22.0-beta.0 but cannot find this awesome feature anywhere.

Thanks

@louislam
Copy link
Owner

I'm not a fan of the original icon-only toggle for the public link, it's not easy to understand. But at least this is in line with the current UI.

Tested this pr, it is working. I agree with @chakflying. The icons in the list is a bit strange. I am thinking maybe we can make them into a 3dot button.

What if we create another modal and merge 2 current buttons to this modal like this? I think it will be useful if there will be more functions later. image image

@mbh-dev See these images.

@RobertCSternberg
Copy link
Sponsor

RobertCSternberg commented Jun 26, 2023

Edit:
Read here first if you recently updated and need more information on the badge feature #1119

A couple of questions that I believe would be helpful for many after the recent update. In the next release, some examples would be great or an instruction page on Github could be helpful also.

Have not figured out the answer to this yet. Edit: HEX code
image

I think this might be based on the interval of the monitor. Edit: After testing this looks like hours rather than based on the interval of the monitor.
image

@joebailey26
Copy link

Apologies if I'm being dumb, but how do you access this option within Uptime Kuma? I've successfully upgraded to Version: 1.22.0-beta.0 but cannot find this awesome feature anywhere.

Thanks

I too can't see this feature on any page after upgrading to 1.22.0

@CommanderStorm
Copy link
Collaborator

I too can't see this feature on any page after upgrading to 1.22.0

The Badge generator can be found on the status page

@joebailey26
Copy link

I too can't see this feature on any page after upgrading to 1.22.0

The Badge generator can be found on the status page

Screenshot 2023-06-28 at 5 15 21 pm

@chakflying
Copy link
Collaborator

Did you try clicking "Edit Status Page"?

@joebailey26
Copy link

Did you try clicking "Edit Status Page"?

image

@chakflying
Copy link
Collaborator

The "Open Badge Generator" button can be seen by clicking the Gear icon to the right of your monitor "Galexia BOS".

@joebailey26
Copy link

The "Open Badge Generator" button can be seen by clicking the Gear icon to the right of your monitor "Galexia BOS".

Brilliant thank you! I've got it now. That's very tucked away.

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.

None yet

9 participants