[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [Git][tpo/applications/fenix][tor-browser-82.1.1-10.0-1] 2 commits: Bug 40098 - Add EOY home screen



Title: GitLab

Matthew Finkel pushed to branch tor-browser-82.1.1-10.0-1 at The Tor Project / Applications / fenix

Commits:

10 changed files:

Changes:

  • LICENSE
    ... ... @@ -371,3 +371,120 @@ Exhibit B - "Incompatible With Secondary Licenses" Notice
    371 371
     
    
    372 372
       This Source Code Form is "Incompatible With Secondary Licenses", as
    
    373 373
       defined by the Mozilla Public License, v. 2.0.
    
    374
    +
    
    375
    +===============================================================================
    
    376
    +
    
    377
    +"White On Black" font embedded in chrome/skin/aboutTorFonts.css is licensed under:
    
    378
    +
    
    379
    +Non Exclusive License Agreement
    
    380
    +
    
    381
    +Object: Imagex font called « White on Black »
    
    382
    +Owner: Daniel Hochard
    
    383
    +
    
    384
    +1. Allowed uses
    
    385
    +The user may use this font on any surface such as logo, paper, web sites,
    
    386
    +textile, Online medias, except TV, cinéma and advertising campaign.
    
    387
    +2. Number of users : 5
    
    388
    +All users must belong to the same company or household purchasing the font.
    
    389
    +3. Modifications
    
    390
    +The user can modify this font itself without written consent of the owner.
    
    391
    +4. This font belongs to Daniel Hochard. The user may not sell it as a font (in a
    
    392
    +font bank or a commercial fonts web site, for example).
    
    393
    +The fee for this font was paid on paypal the 29 september 2020
    
    394
    +
    
    395
    +===============================================================================
    
    396
    +
    
    397
    +"Terminal Grotesque Open" font embedded in chrome/skin/aboutTorFonts.css is licensed
    
    398
    +under the SIL Open Font License, Version 1.1.
    
    399
    +This license is copied below, and is also available with a FAQ at:
    
    400
    +http://scripts.sil.org/OFL
    
    401
    +
    
    402
    +===============================================================================
    
    403
    +
    
    404
    +SIL OPEN FONT LICENSE
    
    405
    +
    
    406
    +Version 1.1 - 26 February 2007
    
    407
    +
    
    408
    +PREAMBLE
    
    409
    +
    
    410
    +The goals of the Open Font License (OFL) are to stimulate worldwide
    
    411
    +development of collaborative font projects, to support the font creation
    
    412
    +efforts of academic and linguistic communities, and to provide a free and
    
    413
    +open framework in which fonts may be shared and improved in partnership
    
    414
    +with others.
    
    415
    +
    
    416
    +The OFL allows the licensed fonts to be used, studied, modified and
    
    417
    +redistributed freely as long as they are not sold by themselves. The
    
    418
    +fonts, including any derivative works, can be bundled, embedded,
    
    419
    +redistributed and/or sold with any software provided that any reserved
    
    420
    +names are not used by derivative works. The fonts and derivatives,
    
    421
    +however, cannot be released under any other type of license. The
    
    422
    +requirement for fonts to remain under this license does not apply
    
    423
    +to any document created using the fonts or their derivatives.
    
    424
    +DEFINITIONS
    
    425
    +
    
    426
    +"Font Software" refers to the set of files released by the Copyright
    
    427
    +Holder(s) under this license and clearly marked as such. This may
    
    428
    +include source files, build scripts and documentation.
    
    429
    +
    
    430
    +"Reserved Font Name" refers to any names specified as such after the
    
    431
    +copyright statement(s).
    
    432
    +
    
    433
    +"Original Version" refers to the collection of Font Software components as
    
    434
    +distributed by the Copyright Holder(s).
    
    435
    +
    
    436
    +"Modified Version" refers to any derivative made by adding to, deleting,
    
    437
    +or substituting — in part or in whole — any of the components of the
    
    438
    +Original Version, by changing formats or by porting the Font Software to a
    
    439
    +new environment.
    
    440
    +
    
    441
    +"Author" refers to any designer, engineer, programmer, technical
    
    442
    +writer or other person who contributed to the Font Software.
    
    443
    +PERMISSION & CONDITIONS
    
    444
    +
    
    445
    +Permission is hereby granted, free of charge, to any person obtaining
    
    446
    +a copy of the Font Software, to use, study, copy, merge, embed, modify,
    
    447
    +redistribute, and sell modified and unmodified copies of the Font
    
    448
    +Software, subject to the following conditions:
    
    449
    +
    
    450
    +1) Neither the Font Software nor any of its individual components,
    
    451
    +in Original or Modified Versions, may be sold by itself.
    
    452
    +
    
    453
    +2) Original or Modified Versions of the Font Software may be bundled,
    
    454
    +redistributed and/or sold with any software, provided that each copy
    
    455
    +contains the above copyright notice and this license. These can be
    
    456
    +included either as stand-alone text files, human-readable headers or
    
    457
    +in the appropriate machine-readable metadata fields within text or
    
    458
    +binary files as long as those fields can be easily viewed by the user.
    
    459
    +
    
    460
    +3) No Modified Version of the Font Software may use the Reserved Font
    
    461
    +Name(s) unless explicit written permission is granted by the corresponding
    
    462
    +Copyright Holder. This restriction only applies to the primary font name as
    
    463
    +presented to the users.
    
    464
    +
    
    465
    +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
    
    466
    +Software shall not be used to promote, endorse or advertise any
    
    467
    +Modified Version, except to acknowledge the contribution(s) of the
    
    468
    +Copyright Holder(s) and the Author(s) or with their explicit written
    
    469
    +permission.
    
    470
    +
    
    471
    +5) The Font Software, modified or unmodified, in part or in whole,
    
    472
    +must be distributed entirely under this license, and must not be
    
    473
    +distributed under any other license. The requirement for fonts to
    
    474
    +remain under this license does not apply to any document created
    
    475
    +using the Font Software.
    
    476
    +TERMINATION
    
    477
    +
    
    478
    +This license becomes null and void if any of the above conditions are
    
    479
    +not met.
    
    480
    +DISCLAIMER
    
    481
    +
    
    482
    +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
    
    483
    +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
    
    484
    +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
    
    485
    +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
    
    486
    +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
    
    487
    +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
    
    488
    +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    
    489
    +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
    
    490
    +OTHER DEALINGS IN THE FONT SOFTWARE.

  • app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt
    ... ... @@ -74,6 +74,7 @@ import mozilla.components.feature.top.sites.TopSitesFeature
    74 74
     import mozilla.components.lib.state.ext.consumeFrom
    
    75 75
     import mozilla.components.support.base.feature.ViewBoundFeatureWrapper
    
    76 76
     import mozilla.components.support.ktx.android.content.res.resolveAttribute
    
    77
    +import mozilla.components.support.locale.LocaleManager
    
    77 78
     import org.mozilla.fenix.BrowserDirection
    
    78 79
     import org.mozilla.fenix.BuildConfig
    
    79 80
     import org.mozilla.fenix.FeatureFlags
    
    ... ... @@ -105,6 +106,7 @@ import org.mozilla.fenix.home.sessioncontrol.viewholders.CollectionViewHolder
    105 106
     import org.mozilla.fenix.home.sessioncontrol.viewholders.topsites.DefaultTopSitesView
    
    106 107
     import org.mozilla.fenix.onboarding.FenixOnboarding
    
    107 108
     import org.mozilla.fenix.settings.SupportUtils
    
    109
    +import org.mozilla.fenix.settings.advanced.getSelectedLocale
    
    108 110
     import org.mozilla.fenix.settings.deletebrowsingdata.deleteAndQuit
    
    109 111
     import org.mozilla.fenix.tor.bootstrap.TorQuickStart
    
    110 112
     import org.mozilla.fenix.theme.ThemeManager
    
    ... ... @@ -270,6 +272,20 @@ class HomeFragment : Fragment() {
    270 272
             adjustHomeFragmentView(currentMode.getCurrentMode(), view)
    
    271 273
             showSessionControlView(view)
    
    272 274
     
    
    275
    +        view.donate_now_button.setOnClickListener {
    
    276
    +            val country = LocaleManager.getSelectedLocale(requireContext()).country
    
    277
    +            var locale = LocaleManager.getSelectedLocale(requireContext()).language
    
    278
    +            if (country != "") {
    
    279
    +                locale = "${locale}-${country}"
    
    280
    +            }
    
    281
    +            val localeUrl = "https://www.torproject.org/donate/donate-usetor-mobile-${locale}"
    
    282
    +            activity.openToBrowserAndLoad(
    
    283
    +                searchTermOrURL = localeUrl,
    
    284
    +                newTab = true,
    
    285
    +                from = BrowserDirection.FromHome
    
    286
    +            )
    
    287
    +        }
    
    288
    +
    
    273 289
             return view
    
    274 290
         }
    
    275 291
     
    
    ... ... @@ -401,6 +417,14 @@ class HomeFragment : Fragment() {
    401 417
                                     toolbarLayoutHeight - SESSION_CONTROL_VIEW_PADDING
    
    402 418
                                 )
    
    403 419
                             }
    
    420
    +                        view.donate_now_button?.apply {
    
    421
    +                            (layoutParams as ViewGroup.MarginLayoutParams).setMargins(
    
    422
    +                                0,
    
    423
    +                                0,
    
    424
    +                                0,
    
    425
    +                                toolbarLayoutHeight - SESSION_CONTROL_VIEW_PADDING
    
    426
    +                            )
    
    427
    +                        }
    
    404 428
                         }
    
    405 429
                     } else {
    
    406 430
                         view.sessionControlRecyclerView?.apply {
    
    ... ... @@ -411,6 +435,38 @@ class HomeFragment : Fragment() {
    411 435
                                 height - SESSION_CONTROL_VIEW_PADDING
    
    412 436
                             )
    
    413 437
                         }
    
    438
    +                    view.donate_now_button?.apply {
    
    439
    +                        (layoutParams as ViewGroup.MarginLayoutParams).setMargins(
    
    440
    +                            0,
    
    441
    +                            0,
    
    442
    +                            0,
    
    443
    +                            height - SESSION_CONTROL_VIEW_PADDING
    
    444
    +                        )
    
    445
    +                    }
    
    446
    +                }
    
    447
    +            }
    
    448
    +
    
    449
    +            // Hide the EOY image during Onboarding, too.
    
    450
    +            view?.illo_image?.apply {
    
    451
    +                visibility = if (onboarding.userHasBeenOnboarded()) {
    
    452
    +                    View.VISIBLE
    
    453
    +                } else {
    
    454
    +                    View.GONE
    
    455
    +                }
    
    456
    +            }
    
    457
    +            // Hide the EOY donate button during Onboarding, too.
    
    458
    +            view?.donate_now_button?.apply {
    
    459
    +                visibility = if (onboarding.userHasBeenOnboarded()) {
    
    460
    +                    View.VISIBLE
    
    461
    +                } else {
    
    462
    +                    View.GONE
    
    463
    +                }
    
    464
    +            }
    
    465
    +            view?.resistsurveillance?.apply {
    
    466
    +                visibility = if (onboarding.userHasBeenOnboarded()) {
    
    467
    +                    View.VISIBLE
    
    468
    +                } else {
    
    469
    +                    View.GONE
    
    414 470
                     }
    
    415 471
                 }
    
    416 472
                 // Hide the onion pattern during Onboarding, too.
    

  • app/src/main/java/org/mozilla/fenix/theme/ThemeManager.kt
    ... ... @@ -32,7 +32,7 @@ abstract class ThemeManager {
    32 32
         @get:StyleRes
    
    33 33
         val currentThemeResource get() = when (currentTheme) {
    
    34 34
             BrowsingMode.Normal -> R.style.NormalTheme
    
    35
    -        BrowsingMode.Private -> R.style.PrivateTheme
    
    35
    +        BrowsingMode.Private -> R.style.PrivateEOYTheme
    
    36 36
         }
    
    37 37
     
    
    38 38
         /**
    

  • app/src/main/res/drawable/ic_illo.png
    No preview for this file type
  • app/src/main/res/drawable/ic_tape.png
    No preview for this file type
  • app/src/main/res/font/terminal_grotesque.otf
    No preview for this file type
  • app/src/main/res/font/white_on_black.ttf
    No preview for this file type
  • app/src/main/res/layout/fragment_home.xml
    ... ... @@ -53,6 +53,7 @@
    53 53
                     android:clickable="false"
    
    54 54
                     android:contentDescription="@string/app_name"
    
    55 55
                     android:focusable="false"
    
    56
    +                android:visibility="gone"
    
    56 57
                     android:importantForAccessibility="no"
    
    57 58
                     app:srcCompat="@mipmap/ic_launcher"
    
    58 59
                     app:layout_collapseMode="parallax"
    
    ... ... @@ -69,6 +70,7 @@
    69 70
                     android:height="60dp"
    
    70 71
                     android:clickable="false"
    
    71 72
                     android:focusable="false"
    
    73
    +                android:visibility="gone"
    
    72 74
                     android:importantForAccessibility="no"
    
    73 75
                     android:lines="2"
    
    74 76
                     android:text="@string/app_name"
    
    ... ... @@ -83,19 +85,79 @@
    83 85
                 android:id="@+id/exploreprivately"
    
    84 86
                 android:layout_width="wrap_content"
    
    85 87
                 android:layout_height="wrap_content"
    
    86
    -            android:layout_gravity="center|center_vertical"
    
    87
    -            android:gravity="center_horizontal"
    
    88
    +            android:layout_gravity="center_vertical"
    
    89
    +            android:layout_marginStart="30dp"
    
    90
    +            android:layout_marginEnd="30dp"
    
    88 91
                 android:clickable="false"
    
    89 92
                 android:ellipsize="end"
    
    90 93
                 android:focusable="false"
    
    91 94
                 android:importantForAccessibility="no"
    
    92
    -            android:text="@string/tor_explore_privately"
    
    93
    -            android:fontFamily="Roboto-Medium"
    
    94
    -            android:textColor="#DEFFFFFF"
    
    95
    +            android:text="@string/tor_useamask_usetor"
    
    96
    +            android:fontFamily="@font/white_on_black"
    
    97
    +            android:textColor="#FFFFFFFF"
    
    95 98
                 android:textSize="40sp"
    
    99
    +            android:paddingTop="20dp"
    
    96 100
                 android:lineSpacingMultiplier="1.1"
    
    97 101
                 app:layout_scrollFlags="scroll" />
    
    98 102
     
    
    103
    +        <LinearLayout
    
    104
    +            android:layout_width="match_parent"
    
    105
    +            android:layout_height="wrap_content">
    
    106
    +
    
    107
    +            <LinearLayout
    
    108
    +                android:layout_width="match_parent"
    
    109
    +                android:layout_height="wrap_content"
    
    110
    +                android:layout_weight="1"
    
    111
    +                android:orientation="vertical">
    
    112
    +
    
    113
    +                <TextView
    
    114
    +                    android:id="@+id/resistsurveillance"
    
    115
    +                    android:layout_width="wrap_content"
    
    116
    +                    android:layout_height="wrap_content"
    
    117
    +                    android:layout_marginStart="40dp"
    
    118
    +                    android:layout_gravity="center_vertical"
    
    119
    +                    android:clickable="false"
    
    120
    +                    android:focusable="false"
    
    121
    +                    android:gravity="start"
    
    122
    +                    android:fontFamily="@font/terminal_grotesque"
    
    123
    +                    android:importantForAccessibility="no"
    
    124
    +                    android:lineSpacingMultiplier="1.1"
    
    125
    +                    android:text="@string/tor_resistsurveillance"
    
    126
    +                    android:textColor="#FFFFFFFF"
    
    127
    +                    android:textSize="25sp"
    
    128
    +                    android:visibility="visible"
    
    129
    +                    app:layout_scrollFlags="scroll" />
    
    130
    +
    
    131
    +                <Button
    
    132
    +                    android:id="@+id/donate_now_button"
    
    133
    +                    android:layout_width="wrap_content"
    
    134
    +                    android:layout_height="wrap_content"
    
    135
    +                    android:layout_marginStart="30dp"
    
    136
    +                    android:background="">"@drawable/ic_tape"
    
    137
    +                    android:gravity="center|start"
    
    138
    +                    android:fontFamily="@font/terminal_grotesque"
    
    139
    +                    android:paddingStart="15dp"
    
    140
    +                    android:paddingEnd="20dp"
    
    141
    +                    android:text="@string/tor_onboarding_donate_button"
    
    142
    +                    android:textColor="#FF000000"
    
    143
    +                    android:textSize="25sp"
    
    144
    +                    android:textAllCaps="false"
    
    145
    +                    android:textStyle="bold"
    
    146
    +                    android:visibility="visible"
    
    147
    +                    tools:ignore="ButtonStyleXmlDetector" />
    
    148
    +            </LinearLayout>
    
    149
    +
    
    150
    +            <ImageView
    
    151
    +                android:id="@+id/illo_image"
    
    152
    +                android:layout_width="match_parent"
    
    153
    +                android:layout_height="wrap_content"
    
    154
    +                android:layout_weight="1"
    
    155
    +                app:srcCompat="@drawable/ic_illo"
    
    156
    +                tools:ignore="ContentDescription"
    
    157
    +                app:layout_scrollFlags="scroll" />
    
    158
    +
    
    159
    +        </LinearLayout>
    
    160
    +
    
    99 161
         </com.google.android.material.appbar.AppBarLayout>
    
    100 162
     
    
    101 163
         <androidx.recyclerview.widget.RecyclerView
    

  • app/src/main/res/values/styles.xml
    ... ... @@ -269,6 +269,10 @@
    269 269
     
    
    270 270
         <style name="PrivateTheme" parent="PrivateThemeBase" />
    
    271 271
     
    
    272
    +    <style name="PrivateEOYTheme" parent="PrivateThemeBase" >
    
    273
    +        <item name="homeBackground">@android:color/black</item>
    
    274
    +    </style>
    
    275
    +
    
    272 276
         <!-- Fade animation for theme switching -->
    
    273 277
         <style name="WindowAnimationTransition">
    
    274 278
             <item name="android:windowEnterAnimation">@anim/fade_in</item>
    

  • app/src/main/res/values/torbrowser_strings.xml
    ... ... @@ -72,4 +72,7 @@
    72 72
     
    
    73 73
         <!-- Spoof locale to English -->
    
    74 74
         <string name="tor_spoof_english">Request English versions of web pages for enhanced privacy</string>
    
    75
    +
    
    76
    +    <string name="tor_useamask_usetor">Use a mask. Use Tor.</string>
    
    77
    +    <string name="tor_resistsurveillance">Resist the surveillance pandemic.</string>
    
    75 78
     </resources>

  • _______________________________________________
    tor-commits mailing list
    tor-commits@xxxxxxxxxxxxxxxxxxxx
    https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits