-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* move all services data to `services.data` file * support `X` & `WhatsApp` * improve loading cover * update `CHANGELOG.md` * `CHANGELOG.md` updated
- Loading branch information
Showing
12 changed files
with
181 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
.loader-layout { | ||
display: inline-block; | ||
position: relative; | ||
width: 100px; | ||
height: 100px; | ||
|
||
.loading-circle { | ||
@apply bg-primary absolute; | ||
width: 16px; | ||
height: 16px; | ||
border-radius: 50%; | ||
animation: loader-animation 1s linear infinite; | ||
|
||
&:nth-child(1) { | ||
animation-delay: 0s; | ||
transform: rotate(320deg); | ||
opacity: 0.2222222222222222; | ||
top: 75%; | ||
left: 44%; | ||
} | ||
|
||
&:nth-child(2) { | ||
animation-delay: -0.1122334455667789s; | ||
transform: rotate(280); | ||
opacity: 0.3333333333333333; | ||
top: 67.98133329356934%; | ||
left: 63.28362829059617%; | ||
} | ||
|
||
&:nth-child(3) { | ||
transform: rotate(239.99999999999997deg); | ||
animation-delay: -0.2244668911335578s; | ||
opacity: 0.4444444444444444; | ||
top: 50.20944533000791%; | ||
left: 73.54423259036625%; | ||
} | ||
&:nth-child(4) { | ||
animation-delay: -0.3367003367003367s; | ||
transform: rotate(200deg); | ||
opacity: 0.5555555555555556; | ||
top: 30.00000000000001%; | ||
left: 69.98076211353316%; | ||
} | ||
&:nth-child(5) { | ||
animation-delay: -0.4489337822671156s; | ||
transform: rotate(160deg); | ||
opacity: 0.6666666666666666; | ||
top: 16.80922137642275%; | ||
left: 54.260604299770065%; | ||
} | ||
&:nth-child(6) { | ||
animation-delay: -0.5611672278338945s; | ||
transform: rotate(119.99999999999999deg); | ||
opacity: 0.7777777777777778; | ||
top: 16.809221376422748%; | ||
left: 33.73939570022994%; | ||
} | ||
&:nth-child(7) { | ||
animation-delay: -0.6734006734006734s; | ||
transform: rotate(80deg); | ||
opacity: 0.7777777777777778; | ||
top: 29.999999999999986%; | ||
left: 18.019237886466847%; | ||
} | ||
&:nth-child(8) { | ||
animation-delay: -0.7856341189674523s; | ||
transform: rotate(40deg); | ||
opacity: 0.8888888888888888; | ||
top: 50.20944533000789%; | ||
left: 14.455767409633758%; | ||
} | ||
&:nth-child(9) { | ||
animation-delay: -0.8978675645342312s; | ||
transform: rotate(0deg); | ||
opacity: 1; | ||
top: 67.98133329356934%; | ||
left: 24.716371709403813%; | ||
} | ||
} | ||
} | ||
@keyframes loader-animation { | ||
0% { | ||
opacity: 1; | ||
} | ||
100% { | ||
opacity: 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import './index.scss'; | ||
|
||
const Loader = () => { | ||
return ( | ||
<div className={'loader-layout'}> | ||
{[...Array(9)].map((_, index) => ( | ||
<div key={index} className='loading-circle' /> | ||
))} | ||
</div> | ||
); | ||
}; | ||
|
||
export default Loader; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import Email from '@assets/icons/services/email.svg'; | ||
import Gmail from '@assets/icons/services/gmail.svg'; | ||
import Telegram from '@assets/icons/services/telegram.svg'; | ||
import Whatsapp from '@assets/icons/services/whatsapp.svg'; | ||
import X from '@assets/icons/services/x.svg'; | ||
|
||
export const services_url = (url: string, subject?: string): { [key: string]: string } => { | ||
return { | ||
email: `mailto:?subject=${subject}&body=${url}`, | ||
gmail: `https://mail.google.com/mail/u/0/?ui=2&fs=1&tf=cm&su=${subject}&body=${url}`, | ||
telegram: `https://telegram.me/share/url?url=${url}&text=${subject}`, | ||
x: `https://x.com/intent/post?url=${url}&text=${subject}`, | ||
whatsapp: `https://api.whatsapp.com/send?text=${subject}%20${url}`, | ||
}; | ||
}; | ||
|
||
export const Services = [ | ||
{ | ||
title: 'email', | ||
icon: Email, | ||
iconUrl: 'https://github.com/openscilab/mybutton/raw/main/src/Assets/icons/services/email.svg', | ||
bg: '#888990', | ||
}, | ||
{ | ||
title: 'gmail', | ||
icon: Gmail, | ||
iconUrl: 'https://github.com/openscilab/mybutton/raw/main/src/Assets/icons/services/gmail.svg', | ||
bg: '#EA4335', | ||
}, | ||
{ | ||
title: 'telegram', | ||
icon: Telegram, | ||
iconUrl: 'https://github.com/openscilab/mybutton/raw/main/src/Assets/icons/services/telegram.svg', | ||
bg: '#2CA5E0', | ||
}, | ||
{ | ||
title: 'x', | ||
icon: X, | ||
iconUrl: 'https://github.com/openscilab/mybutton/raw/main/src/Assets/icons/services/x.svg', | ||
bg: '#1A1A1A', | ||
}, | ||
{ | ||
title: 'whatsapp', | ||
icon: Whatsapp, | ||
iconUrl: 'https://github.com/openscilab/mybutton/raw/main/src/Assets/icons/services/whatsapp.svg', | ||
bg: '#12AF0A', | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.