Skip to content

Commit

Permalink
Available on Microsoft Store #174
Browse files Browse the repository at this point in the history
  • Loading branch information
Levminer committed Jan 8, 2022
1 parent b02203c commit 7e6d20a
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 6 deletions.
11 changes: 9 additions & 2 deletions app/application/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,18 +95,25 @@ <h5 class="mx-3 flex flex-row m-0 font-bold build-content text-center">You are r

<p class="mx-3 flex flex-row relative top-3">
Enjoying Authme?
<button type="button" onclick="rateAuthme()" class="mr-2 ml-3 py-1 px-3 relative -top-2.5 bg-white hover:bg-transparent text-black border-2 border-white hover:text-white cursor-pointer transition ease-in duration-200 text-center text-base font-bold rounded-full">
<button type="button" onclick="rateAuthme()" class="ml-3 py-1 px-3 relative -top-2.5 bg-white hover:bg-transparent text-black border-2 border-white hover:text-white cursor-pointer transition ease-in duration-200 text-center text-base font-bold rounded-full">
<svg xmlns="http://www.w3.org/2000/svg" class="relative top-1" height="20" width="20" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z" />
</svg>
Rate on Microsoft Store
</button>

<button type="button" onclick="starAuthme()" class="mr-2 ml-3 py-1 px-3 relative -top-2.5 bg-white hover:bg-transparent text-black border-2 border-white hover:text-white cursor-pointer transition ease-in duration-200 text-center text-base font-bold rounded-full">
<svg xmlns="http://www.w3.org/2000/svg" class="relative top-1" height="20" width="20" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 3v4M3 5h4M6 17v4m-2-2h4m5-16l2.286 6.857L21 12l-5.714 2.143L13 21l-2.286-6.857L5 12l5.714-2.143L13 3z" />
</svg>
Star on GitHub
</button>

<button type="button" onclick="provideFeedback()" class="py-1 px-3 relative -top-2.5 bg-white hover:bg-transparent text-black border-2 border-white hover:text-white cursor-pointer transition ease-in duration-200 text-center text-base font-bold rounded-full">
<svg xmlns="http://www.w3.org/2000/svg" class="relative top-1" height="20" width="20" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 8h2a2 2 0 012 2v6a2 2 0 01-2 2h-2v4l-4-4H9a1.994 1.994 0 01-1.414-.586m0 0L11 14h4a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2v4l.586-.586z" />
</svg>
Provide feedback on GitHub
Provide feedback
</button>
</p>
</div>
Expand Down
4 changes: 4 additions & 0 deletions app/application/src/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,10 @@ const rateAuthme = () => {
ipc.send("rateAuthme")
}

const starAuthme = () => {
ipc.send("starAuthme")
}

const provideFeedback = () => {
ipc.send("provideFeedback")
}
Expand Down
11 changes: 9 additions & 2 deletions app/settings/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -155,18 +155,25 @@ <h5 class="mx-3 flex flex-row m-0 font-bold build-content text-center">You are r

<p class="mx-3 flex flex-row relative top-3">
Enjoying Authme?
<button type="button" onclick="rateAuthme()" class="mr-2 ml-3 py-1 px-3 relative -top-2.5 bg-white hover:bg-transparent text-black border-2 border-white hover:text-white cursor-pointer transition ease-in duration-200 text-center text-base font-bold rounded-full">
<button type="button" onclick="rateAuthme()" class="ml-3 py-1 px-3 relative -top-2.5 bg-white hover:bg-transparent text-black border-2 border-white hover:text-white cursor-pointer transition ease-in duration-200 text-center text-base font-bold rounded-full">
<svg xmlns="http://www.w3.org/2000/svg" class="relative top-1" height="20" width="20" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z" />
</svg>
Rate on Microsoft Store
</button>

<button type="button" onclick="starAuthme()" class="mr-2 ml-3 py-1 px-3 relative -top-2.5 bg-white hover:bg-transparent text-black border-2 border-white hover:text-white cursor-pointer transition ease-in duration-200 text-center text-base font-bold rounded-full">
<svg xmlns="http://www.w3.org/2000/svg" class="relative top-1" height="20" width="20" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 3v4M3 5h4M6 17v4m-2-2h4m5-16l2.286 6.857L21 12l-5.714 2.143L13 21l-2.286-6.857L5 12l5.714-2.143L13 3z" />
</svg>
Star on GitHub
</button>

<button type="button" onclick="provideFeedback()" class="py-1 px-3 relative -top-2.5 bg-white hover:bg-transparent text-black border-2 border-white hover:text-white cursor-pointer transition ease-in duration-200 text-center text-base font-bold rounded-full">
<svg xmlns="http://www.w3.org/2000/svg" class="relative top-1" height="20" width="20" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 8h2a2 2 0 012 2v6a2 2 0 01-2 2h-2v4l-4-4H9a1.994 1.994 0 01-1.414-.586m0 0L11 14h4a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2v4l.586-.586z" />
</svg>
Provide feedback on GitHub
Provide feedback
</button>
</p>
</div>
Expand Down
6 changes: 5 additions & 1 deletion app/settings/src/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -593,12 +593,16 @@ const save = () => {
}

/**
* Rate Authme
* Feedback buttons
*/
const rateAuthme = () => {
ipc.send("rateAuthme")
}

const starAuthme = () => {
ipc.send("starAuthme")
}

/**
* Send feedback
*/
Expand Down
13 changes: 12 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1415,9 +1415,20 @@ ipc.on("support", () => {
})

/**
* Show rate Authme dialog
* Open Microsoft Store link
*/
ipc.on("rateAuthme", () => {
shell.openExternal("ms-windows-store://pdp/?productid=XP9M33RJSVD6JR")

settings.statistics.rated = true

saveSettings()
})

/**
* Open GitHub link
*/
ipc.on("starAuthme", () => {
shell.openExternal("https://github.com/Levminer/authme/")

settings.statistics.rated = true
Expand Down

0 comments on commit 7e6d20a

Please sign in to comment.