Kaynağa Gözat

Move landing media buttons to their own component.

The media buttons can either open a link or perform an action.
TODO: Convert CSS from px to rem.
Daniel Scalzi 5 yıl önce
ebeveyn
işleme
6a04ef0f62

+ 6 - 5
src/renderer/components/Application.tsx

@@ -288,6 +288,7 @@ class Application extends React.Component<InternalApplicationProps, ApplicationS
 
             // Pick a background id.
             this.bkid = Math.floor((Math.random() * (await readdir(join(__static, 'images', 'backgrounds'))).length))
+            this.bkid = 3 // TEMP
 
             const endLoad = () => {
                 // TODO determine correct view
@@ -310,11 +311,11 @@ class Application extends React.Component<InternalApplicationProps, ApplicationS
                     //         console.log(serverStatus)
                     //     }
                     // })
-                    this.props.pushGenericOverlay({
-                        title: 'Test Title 2',
-                        description: 'Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.',
-                        dismissible: true
-                    })
+                    // this.props.pushGenericOverlay({
+                    //     title: 'Test Title 2',
+                    //     description: 'Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.',
+                    //     dismissible: true
+                    // })
                     // this.props.pushGenericOverlay({
                     //     title: 'Test Title IMPORTANT',
                     //     description: 'Test Description',

+ 0 - 124
src/renderer/components/landing/Landing.css

@@ -297,14 +297,6 @@
     flex-direction: column;
 }
 
-/* Container object which wraps an icon to ensure fluid transitions. */
-.mediaContainer {
-    display: flex;
-    justify-content: center;
-    align-items: center;
-    height: 27px;
-}
-
 /* Divider bar between the external and internal icons. */
 .mediaDivider {
     height: 1px;
@@ -313,122 +305,6 @@
     margin: 10px 0;
 }
 
-/* Social media icon shared styles. */
-.mediaSVG {
-    fill: #ffffff;
-    height: 12px;
-    transition: 0.25s ease;
-    cursor: pointer;
-    height: 12px;
-    width: 25px;
-}
-.mediaSVG:hover,
-.mediaURL:focus .mediaSVG,
-.mediaSVG:active {
-    height: 20px;
-}
-
-/* Social media URL shared styles. */
-.mediaURL {
-    outline: none;
-}
-
-/* Internal media button shared styles. */
-.mediaButton {
-    background: none;
-    border: none;
-    padding: 0;
-    display: flex;
-    align-items: center;
-    outline: none;
-}
-
-#settingsMediaContainer {
-    position: relative;
-}
-
-/* Settings icon colors. */
-#settingsSVG {
-    stroke: #ffffff;
-    height: 15px;
-}
-.mediaButton:hover #settingsSVG,
-.mediaButton:focus #settingsSVG,
-.mediaButton:active #settingsSVG {
-    height: 23px;
-}
-
-/* Settings tooltip styles. */
-#settingsTooltip {
-    visibility: hidden;
-    opacity: 0;
-    width: 75px;
-    height: 20px;
-    background-color: rgba(0, 0, 0, 0.75);
-    text-align: center;
-    border-radius: 4px;
-    position: absolute;
-    z-index: 1;
-    right: 130%;
-    font-size: 12px;
-    line-height: 20px;
-    transition: visibility 0s linear 0.25s, opacity 0.25s ease;
-}
-#settingsTooltip::after {
-    content: " ";
-    position: absolute;
-    top: 50%;
-    left: 100%;
-    margin-top: -5px;
-    border-width: 5px;
-    border-style: solid;
-    border-color: transparent transparent transparent rgba(0, 0, 0, 0.75);
-}
-.mediaButton:hover #settingsTooltip,
-.mediaButton:focus #settingsTooltip,
-.mediaButton:active #settingsTooltip {
-    visibility: visible;
-    opacity: 1;
-    transition-delay:0s;
-}
-
-/* Twitter icon colors. */
-#twitterSVG:hover,
-#twitterURL:focus #twitterSVG {
-    fill: #1da1f2;
-}
-#twitterSVG:active {
-    fill: #1b8dd4;
-}
-
-/* Instagram icon colors. */
-#instagramSVG:hover,
-#instagramURL:focus #instagramSVG {
-    fill: url('#instaFill')
-    /*fill: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); */
-}
-#instagramSVG:active {
-    fill: url('#instaFill')
-}
-
-/* Youtube icon colors. */
-#youtubeSVG:hover,
-#youtubeURL:focus #youtubeSVG {
-    fill: #f00;
-}
-#youtubeSVG:active {
-    fill: #ea0202;
-}
-
-/* Discord icon colors. */
-#discordSVG:hover,
-#discordURL:focus #discordSVG {
-    fill: #7288d9;
-}
-#discordSVG:active {
-    fill: #657ac4;
-}
-
 /*******************************************************************************
  *                                                                             *
  * Landing View (Bottom Styles)                                                *

Dosya farkı çok büyük olduğundan ihmal edildi
+ 50 - 3
src/renderer/components/landing/Landing.tsx


+ 131 - 0
src/renderer/components/landing/mediabutton/MediaButton.css

@@ -0,0 +1,131 @@
+/* Container object which wraps an icon to ensure fluid transitions. */
+.mediaContainer {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    height: 27px;
+    position: relative;
+}
+
+/* Social media icon shared styles. */
+.mediaSVG {
+    fill: #ffffff;
+    height: 12px;
+    transition: 0.25s ease;
+    cursor: pointer;
+    height: 12px;
+    width: 25px;
+}
+.mediaSVG:hover,
+.mediaURL:focus .mediaSVG,
+.mediaSVG:active {
+    height: 20px;
+}
+
+/* Social media URL shared styles. */
+.mediaURL {
+    outline: none;
+    display: flex;
+    align-items: center;
+}
+
+/* Internal media button shared styles. */
+.mediaButton {
+    background: none;
+    border: none;
+    padding: 0;
+    display: flex;
+    align-items: center;
+    outline: none;
+}
+
+/* Twitter icon colors. */
+.twitterSVG:hover,
+.twitterURL:focus .twitterSVG {
+    fill: #1da1f2;
+}
+.twitterSVG:active {
+    fill: #1b8dd4;
+}
+
+/* Instagram icon colors. */
+.instagramSVG:hover,
+.instagramURL:focus .instagramSVG {
+    fill: url('#instaFill')
+    /*fill: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); */
+}
+.instagramSVG:active {
+    fill: url('#instaFill')
+}
+
+/* Youtube icon colors. */
+.youtubeSVG:hover,
+.youtubeURL:focus .youtubeSVG {
+    fill: #f00;
+}
+.youtubeSVG:active {
+    fill: #ea0202;
+}
+
+/* Discord icon colors. */
+.discordSVG:hover,
+.discordURL:focus .discordSVG {
+    fill: #7288d9;
+}
+.discordSVG:active {
+    fill: #657ac4;
+}
+
+/* Settings icon colors. */
+.settingsSVG {
+    stroke: #ffffff;
+    height: 15px;
+}
+.mediaButton:hover .settingsSVG,
+.mediaButton:focus .settingsSVG,
+.mediaButton:active .settingsSVG {
+    height: 23px;
+}
+
+.mediaTooltip {
+    visibility: hidden;
+    opacity: 0;
+    width: 75px;
+    height: 20px;
+    background-color: rgba(0, 0, 0, 0.75);
+    text-align: center;
+    border-radius: 4px;
+    position: absolute;
+    z-index: 1;
+    right: 130%;
+    font-size: 12px;
+    line-height: 20px;
+    transition: visibility 0s linear 0.25s, opacity 0.25s ease;
+    color: #fff;
+}
+.mediaTooltip::after {
+    content: " ";
+    position: absolute;
+    top: 50%;
+    left: 100%;
+    margin-top: -5px;
+    border-width: 5px;
+    border-style: solid;
+    border-color: transparent transparent transparent rgba(0, 0, 0, 0.75);
+}
+
+.mediaURL:hover .mediaTooltip,
+.mediaURL:focus .mediaTooltip,
+.mediaURL:active .mediaTooltip {
+    visibility: visible;
+    opacity: 1;
+    transition-delay:0s;
+}
+
+.mediaButton:hover .mediaTooltip,
+.mediaButton:focus .mediaTooltip,
+.mediaButton:active .mediaTooltip {
+    visibility: visible;
+    opacity: 1;
+    transition-delay:0s;
+}

Dosya farkı çok büyük olduğundan ihmal edildi
+ 91 - 0
src/renderer/components/landing/mediabutton/MediaButton.tsx


Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor