diff options
Diffstat (limited to 'ui/src/main/res/values')
-rw-r--r-- | ui/src/main/res/values/attrs.xml | 7 | ||||
-rw-r--r-- | ui/src/main/res/values/colors.xml | 89 | ||||
-rw-r--r-- | ui/src/main/res/values/dimens.xml | 2 | ||||
-rw-r--r-- | ui/src/main/res/values/logviewer_colors.xml | 6 | ||||
-rw-r--r-- | ui/src/main/res/values/strings.xml | 24 | ||||
-rw-r--r-- | ui/src/main/res/values/styles.xml | 70 | ||||
-rw-r--r-- | ui/src/main/res/values/themes.xml | 31 | ||||
-rw-r--r-- | ui/src/main/res/values/tv_colors.xml | 6 | ||||
-rw-r--r-- | ui/src/main/res/values/tv_styles.xml | 31 |
9 files changed, 143 insertions, 123 deletions
diff --git a/ui/src/main/res/values/attrs.xml b/ui/src/main/res/values/attrs.xml index b5b614e9..b91ac60e 100644 --- a/ui/src/main/res/values/attrs.xml +++ b/ui/src/main/res/values/attrs.xml @@ -2,10 +2,9 @@ <resources> <declare-styleable name="Multiselected"> <attr name="state_multiselected" format="boolean" /> - <attr name="colorMultiselectActiveBackground" format="reference|color" /> </declare-styleable> - - <declare-styleable name="custom_color"> - <attr name="colorBackground" format="reference|color" /> + <declare-styleable name="TvCardView"> + <attr name="state_isUp" format="boolean" /> + <attr name="state_isDeleting" format="boolean" /> </declare-styleable> </resources> diff --git a/ui/src/main/res/values/colors.xml b/ui/src/main/res/values/colors.xml index 989c6fc1..65e82389 100644 --- a/ui/src/main/res/values/colors.xml +++ b/ui/src/main/res/values/colors.xml @@ -1,28 +1,63 @@ -<?xml version="1.0" encoding="utf-8"?> -<resources xmlns:tools="http://schemas.android.com/tools"> - <!-- Base palette --> - <color name="primary_color">#ffffffff</color> - <color name="primary_light_color">#ffffffff</color> - <color name="primary_dark_color">#ffcccccc</color> - <color name="secondary_color">#ff1a73e8</color> - <color name="secondary_light_color">#ff1a73e8</color> - <color name="secondary_dark_color">#ff1a73e8</color> - <color name="primary_text_color">#ff000000</color> - <color name="secondary_text_color">#ffffffff</color> - - <!-- Theme variables --> - <color name="color_control_normal">@color/primary_text_color</color> - <color name="status_bar_color">@color/primary_color</color> - <color name="navigation_bar_color">#aaffffff</color> - <color name="list_multiselect_background">#ffeeeeee</color> - <color name="mtrl_textinput_default_box_stroke_color" tools:override="true"> - @color/secondary_color - </color> - <color name="white">#ffffffff</color> - - <!-- Log viewer tag colors --> - <color name="debug_tag_color">#444444</color> - <color name="error_tag_color">#aa0000</color> - <color name="info_tag_color">#00aa00</color> - <color name="warning_tag_color">#aaaa00</color> +<resources> + <color name="seed">#1a73e8</color> + <color name="md_theme_light_primary">#005BC0</color> + <color name="md_theme_light_onPrimary">#FFFFFF</color> + <color name="md_theme_light_primaryContainer">#D8E2FF</color> + <color name="md_theme_light_onPrimaryContainer">#001A41</color> + <color name="md_theme_light_secondary">#565E71</color> + <color name="md_theme_light_onSecondary">#FFFFFF</color> + <color name="md_theme_light_secondaryContainer">#DBE2F9</color> + <color name="md_theme_light_onSecondaryContainer">#131B2C</color> + <color name="md_theme_light_tertiary">#715574</color> + <color name="md_theme_light_onTertiary">#FFFFFF</color> + <color name="md_theme_light_tertiaryContainer">#FBD7FC</color> + <color name="md_theme_light_onTertiaryContainer">#29132D</color> + <color name="md_theme_light_error">#BA1A1A</color> + <color name="md_theme_light_errorContainer">#FFDAD6</color> + <color name="md_theme_light_onError">#FFFFFF</color> + <color name="md_theme_light_onErrorContainer">#410002</color> + <color name="md_theme_light_background">#FEFBFF</color> + <color name="md_theme_light_onBackground">#1B1B1F</color> + <color name="md_theme_light_surface">#FEFBFF</color> + <color name="md_theme_light_onSurface">#1B1B1F</color> + <color name="md_theme_light_surfaceVariant">#E1E2EC</color> + <color name="md_theme_light_onSurfaceVariant">#44474F</color> + <color name="md_theme_light_outline">#74777F</color> + <color name="md_theme_light_inverseOnSurface">#F2F0F4</color> + <color name="md_theme_light_inverseSurface">#303033</color> + <color name="md_theme_light_inversePrimary">#ADC7FF</color> + <color name="md_theme_light_shadow">#000000</color> + <color name="md_theme_light_surfaceTint">#005BC0</color> + <color name="md_theme_light_outlineVariant">#C4C6D0</color> + <color name="md_theme_light_scrim">#000000</color> + <color name="md_theme_dark_primary">#ADC7FF</color> + <color name="md_theme_dark_onPrimary">#002E68</color> + <color name="md_theme_dark_primaryContainer">#004493</color> + <color name="md_theme_dark_onPrimaryContainer">#D8E2FF</color> + <color name="md_theme_dark_secondary">#BFC6DC</color> + <color name="md_theme_dark_onSecondary">#283041</color> + <color name="md_theme_dark_secondaryContainer">#3F4759</color> + <color name="md_theme_dark_onSecondaryContainer">#DBE2F9</color> + <color name="md_theme_dark_tertiary">#DEBCDF</color> + <color name="md_theme_dark_onTertiary">#402843</color> + <color name="md_theme_dark_tertiaryContainer">#583E5B</color> + <color name="md_theme_dark_onTertiaryContainer">#FBD7FC</color> + <color name="md_theme_dark_error">#FFB4AB</color> + <color name="md_theme_dark_errorContainer">#93000A</color> + <color name="md_theme_dark_onError">#690005</color> + <color name="md_theme_dark_onErrorContainer">#FFDAD6</color> + <color name="md_theme_dark_background">#1B1B1F</color> + <color name="md_theme_dark_onBackground">#E3E2E6</color> + <color name="md_theme_dark_surface">#1B1B1F</color> + <color name="md_theme_dark_onSurface">#E3E2E6</color> + <color name="md_theme_dark_surfaceVariant">#44474F</color> + <color name="md_theme_dark_onSurfaceVariant">#C4C6D0</color> + <color name="md_theme_dark_outline">#8E9099</color> + <color name="md_theme_dark_inverseOnSurface">#1B1B1F</color> + <color name="md_theme_dark_inverseSurface">#E3E2E6</color> + <color name="md_theme_dark_inversePrimary">#005BC0</color> + <color name="md_theme_dark_shadow">#000000</color> + <color name="md_theme_dark_surfaceTint">#ADC7FF</color> + <color name="md_theme_dark_outlineVariant">#44474F</color> + <color name="md_theme_dark_scrim">#000000</color> </resources> diff --git a/ui/src/main/res/values/dimens.xml b/ui/src/main/res/values/dimens.xml index c6abf8eb..8ea07dfb 100644 --- a/ui/src/main/res/values/dimens.xml +++ b/ui/src/main/res/values/dimens.xml @@ -1,9 +1,9 @@ <?xml version="1.0" encoding="utf-8"?> <resources> <dimen name="fab_margin">16dp</dimen> - <dimen name="extra_margin">12dp</dimen> <dimen name="bottom_sheet_item_height">56dp</dimen> <dimen name="normal_margin">8dp</dimen> <dimen name="bottom_sheet_top_padding">8dp</dimen> <dimen name="bottom_sheet_icon_padding">16dp</dimen> + <dimen name="tunnel_list_placeholder_margin">16dp</dimen> </resources> diff --git a/ui/src/main/res/values/logviewer_colors.xml b/ui/src/main/res/values/logviewer_colors.xml new file mode 100644 index 00000000..0d4b1a0d --- /dev/null +++ b/ui/src/main/res/values/logviewer_colors.xml @@ -0,0 +1,6 @@ +<resources> + <color name="debug_tag_color">#444444</color> + <color name="error_tag_color">#aa0000</color> + <color name="info_tag_color">#00aa00</color> + <color name="warning_tag_color">#aaaa00</color> +</resources> diff --git a/ui/src/main/res/values/strings.xml b/ui/src/main/res/values/strings.xml index 2754c632..df3d3340 100644 --- a/ui/src/main/res/values/strings.xml +++ b/ui/src/main/res/values/strings.xml @@ -80,6 +80,8 @@ <string name="bad_config_reason_unknown_section">Unknown section</string> <string name="bad_config_reason_value_out_of_range">Value out of range</string> <string name="bad_extension_error">File must be .conf or .zip</string> + <string name="error_no_qr_found">QR code not found in image</string> + <string name="error_qr_checksum">QR code checksum verification failed</string> <string name="cancel">Cancel</string> <string name="config_delete_error">Cannot delete configuration file %s</string> <string name="config_exists_error">Configuration for “%s” already exists</string> @@ -106,6 +108,9 @@ <string name="tv_select_a_storage_drive">Select a storage drive</string> <string name="tv_no_file_picker">Please install a file management utility to browse files</string> <string name="tv_add_tunnel_get_started">Add a tunnel to get started</string> + <string name="donate_title">♥ Donate to the WireGuard Project</string> + <string name="donate_summary">Every contribution helps</string> + <string name="donate_google_play_disappointment">Thank you for supporting the WireGuard Project!\n\nUnfortunately, due to Google\'s policies, we\'re not allowed to link to the part of the project webpage where you can make a donation. Hopefully you can figure this out!\n\nThanks again for your contribution.</string> <string name="disable_config_export_title">Disable config exporting</string> <string name="disable_config_export_description">Disabling config exporting makes private keys less accessible</string> <string name="dns_servers">DNS servers</string> @@ -115,6 +120,7 @@ <string name="error_down">Error bringing down tunnel: %s</string> <string name="error_fetching_apps">Error fetching apps list: %s</string> <string name="error_root">Please obtain root access and try again</string> + <string name="error_prepare">Error preparing tunnel: %s</string> <string name="error_up">Error bringing up tunnel: %s</string> <string name="exclude_private_ips">Exclude private IPs</string> <string name="generate_new_private_key">Generate new private key</string> @@ -134,6 +140,8 @@ <string name="key_length_explanation_base64">: WireGuard base64 keys must be 44 characters (32 bytes)</string> <string name="key_length_explanation_binary">: WireGuard keys must be 32 bytes</string> <string name="key_length_explanation_hex">: WireGuard hex keys must be 64 characters (32 bytes)</string> + <string name="latest_handshake">Latest handshake</string> + <string name="latest_handshake_ago">%s ago</string> <string name="listen_port">Listen port</string> <string name="log_export_error">Unable to export log: %s</string> <string name="log_export_subject">WireGuard Android Log File</string> @@ -177,6 +185,10 @@ <string name="private_key">Private key</string> <string name="public_key">Public key</string> <string name="qr_code_hint">Tip: generate with `qrencode -t ansiutf8 < tunnel.conf`.</string> + <string name="quick_settings_tile_add_title">Add tile to quick settings panel</string> + <string name="quick_settings_tile_add_summary">The shortcut tile toggles the most recent tunnel</string> + <string name="quick_settings_tile_add_failure">Unable to add shortcut tile: error %d</string> + <string name="quick_settings_tile_action">Toggle tunnel</string> <string name="restore_on_boot_summary_off">Will not bring up enabled tunnels at boot</string> <string name="restore_on_boot_summary_on">Will bring up enabled tunnels at boot</string> <string name="restore_on_boot_title">Restore on boot</string> @@ -212,7 +224,7 @@ <string name="tunnel_create_success">Successfully created tunnel “%s”</string> <string name="tunnel_error_already_exists">Tunnel “%s” already exists</string> <string name="tunnel_error_invalid_name">Invalid name</string> - <string name="tunnel_list_placeholder">Add a tunnel using the blue button</string> + <string name="tunnel_list_placeholder">Add a tunnel using the button below</string> <string name="tunnel_name">Tunnel Name</string> <string name="tunnel_on_error">Unable to turn tunnel on (wgTurnOn returned %d)</string> <string name="tunnel_dns_failure">Unable to resolve DNS hostname: “%s”</string> @@ -221,6 +233,16 @@ <string name="type_name_go_userspace">Go userspace</string> <string name="type_name_kernel_module">Kernel module</string> <string name="unknown_error">Unknown error</string> + <string name="updater_avalable">An application update is available. Please update now.</string> + <string name="updater_action">Download & Update</string> + <string name="updater_rechecking">Fetching update metadata…</string> + <string name="updater_download_progress">Downloading update: %1$s / %2$s (%3$.2f%%)</string> + <string name="updater_download_progress_nototal">Downloading update: %s</string> + <string name="updater_installing">Installing update…</string> + <string name="updater_failure">Update failure: %s. Will retry momentarily…</string> + <string name="updater_corrupt_title">Application Corrupt</string> + <string name="updater_corrupt_message">This application is corrupt. Please re-download the APK from the website linked below. After, uninstall this application, and reinstall it from the downloaded APK.</string> + <string name="updater_corrupt_navigate">Open Website</string> <string name="version_summary">%1$s backend %2$s</string> <string name="version_summary_checking">Checking %s backend version</string> <string name="version_summary_unknown">Unknown %s version</string> diff --git a/ui/src/main/res/values/styles.xml b/ui/src/main/res/values/styles.xml index b90f111f..39c38247 100644 --- a/ui/src/main/res/values/styles.xml +++ b/ui/src/main/res/values/styles.xml @@ -1,53 +1,28 @@ <?xml version="1.0" encoding="utf-8"?> <resources xmlns:android="http://schemas.android.com/apk/res/android"> - <style name="WireGuardTheme" parent="Theme.MaterialComponents.DayNight"> - <item name="colorPrimary">@color/primary_color</item> - <item name="colorOnPrimary">@color/color_control_normal</item> - <item name="colorPrimaryDark">@color/primary_color</item> - <item name="colorPrimaryVariant">@color/primary_light_color</item> - <item name="colorSecondary">@color/secondary_color</item> - <item name="colorOnSecondary">@color/secondary_text_color</item> - <item name="colorSurface">@color/primary_color</item> - <item name="colorOnSurface">@color/color_control_normal</item> - <item name="colorBackground">@color/primary_color</item> - <item name="colorMultiselectActiveBackground">@color/list_multiselect_background</item> - <item name="colorControlNormal">@color/color_control_normal</item> - <item name="elevationOverlayColor">@color/primary_light_color</item> - <item name="elevationOverlayEnabled">true</item> - <item name="android:statusBarColor">@color/status_bar_color</item> - <item name="android:windowBackground">@color/primary_color</item> - <item name="alertDialogTheme">@style/AppTheme.Dialog</item> - <item name="materialAlertDialogTheme">@style/AppTheme.Dialog</item> - <item name="textInputStyle">@style/TextInputLayoutBase</item> - <item name="materialCardViewStyle">@style/AppTheme.MaterialCardView</item> + <style name="WireGuardTheme.Toolbar" parent="Widget.Material3.Toolbar"> + <item name="android:background">?attr/colorSurface</item> </style> - <style name="AppTheme" parent="WireGuardTheme" /> + <style name="AppThemeBase" parent="WireGuardTheme"> + <item name="materialCardViewStyle">@style/WireGuardTheme.MaterialCardView</item> + <item name="toolbarStyle">@style/WireGuardTheme.Toolbar</item> + <item name="bottomSheetDialogTheme">@style/WireGuardTheme.BottomSheetDialog</item> + <item name="android:statusBarColor">@null</item> + </style> + + <!-- Various additional API-specific features in values-v*/styles.xml --> + <style name="AppTheme" parent="AppThemeBase" /> - <style name="AppTheme.MaterialCardView" parent="Widget.MaterialComponents.CardView"> + <style name="WireGuardTheme.MaterialCardView" parent="Widget.Material3.CardView.Elevated"> <item name="cornerRadius">4dp</item> - <item name="cardElevation">4dp</item> <item name="contentPadding">8dp</item> - <item name="cardBackgroundColor">?attr/elevationOverlayColor</item> </style> - <style name="AppTheme.Dialog" parent="Theme.MaterialComponents.DayNight.Dialog.Alert"> - <item name="colorPrimary">@color/secondary_color</item> - <item name="colorSecondary">@color/secondary_color</item> - <item name="android:windowBackground">?attr/colorBackground</item> - </style> - - <style name="BottomSheetDialogTheme" parent="ThemeOverlay.MaterialComponents.BottomSheetDialog"> + <style name="WireGuardTheme.BottomSheetDialog" parent="ThemeOverlay.Material3.BottomSheetDialog"> <item name="android:windowIsFloating">false</item> - <item name="android:navigationBarColor">?attr/colorBackground</item> - <item name="android:statusBarColor">@android:color/transparent</item> - <item name="android:windowTranslucentNavigation">false</item> - <item name="android:windowIsTranslucent">false</item> - <item name="android:backgroundDimEnabled">true</item> - <item name="android:backgroundDimAmount">0.5</item> - <item name="android:windowTranslucentStatus">false</item> - <item name="android:colorBackground">@android:color/transparent</item> + <item name="android:navigationBarColor">@android:color/transparent</item> </style> <style name="NoBackgroundTheme" parent="AppTheme"> @@ -63,19 +38,8 @@ <item name="android:windowExitAnimation">@android:anim/fade_out</item> </style> - <style name="DetailText" parent="TextAppearance.MaterialComponents.Body1" /> - - <style name="SectionText" parent="TextAppearance.MaterialComponents.Subtitle1" /> - - <style name="ThemeOverlay.AppTheme.TextInputEditText.OutlinedBox" parent="ThemeOverlay.MaterialComponents.TextInputEditText.OutlinedBox"> - <item name="colorControlActivated">@color/color_control_normal</item> - </style> - - <style name="TextInputLayoutBase" parent="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"> - <item name="boxStrokeColor">?attr/colorSecondary</item> - <item name="hintTextColor">?attr/colorOnPrimary</item> - <item name="materialThemeOverlay"> - @style/ThemeOverlay.AppTheme.TextInputEditText.OutlinedBox - </item> + <style name="TvTheme" parent="AppTheme"> + <item name="windowActionBar">false</item> + <item name="windowNoTitle">true</item> </style> </resources> diff --git a/ui/src/main/res/values/themes.xml b/ui/src/main/res/values/themes.xml new file mode 100644 index 00000000..0153d346 --- /dev/null +++ b/ui/src/main/res/values/themes.xml @@ -0,0 +1,31 @@ +<resources> + + <style name="WireGuardTheme" parent="Theme.Material3.Light"> + <item name="colorPrimary">@color/md_theme_light_primary</item> + <item name="colorOnPrimary">@color/md_theme_light_onPrimary</item> + <item name="colorPrimaryContainer">@color/md_theme_light_primaryContainer</item> + <item name="colorOnPrimaryContainer">@color/md_theme_light_onPrimaryContainer</item> + <item name="colorSecondary">@color/md_theme_light_secondary</item> + <item name="colorOnSecondary">@color/md_theme_light_onSecondary</item> + <item name="colorSecondaryContainer">@color/md_theme_light_secondaryContainer</item> + <item name="colorOnSecondaryContainer">@color/md_theme_light_onSecondaryContainer</item> + <item name="colorTertiary">@color/md_theme_light_tertiary</item> + <item name="colorOnTertiary">@color/md_theme_light_onTertiary</item> + <item name="colorTertiaryContainer">@color/md_theme_light_tertiaryContainer</item> + <item name="colorOnTertiaryContainer">@color/md_theme_light_onTertiaryContainer</item> + <item name="colorError">@color/md_theme_light_error</item> + <item name="colorErrorContainer">@color/md_theme_light_errorContainer</item> + <item name="colorOnError">@color/md_theme_light_onError</item> + <item name="colorOnErrorContainer">@color/md_theme_light_onErrorContainer</item> + <item name="android:colorBackground">@color/md_theme_light_background</item> + <item name="colorOnBackground">@color/md_theme_light_onBackground</item> + <item name="colorSurface">@color/md_theme_light_surface</item> + <item name="colorOnSurface">@color/md_theme_light_onSurface</item> + <item name="colorSurfaceVariant">@color/md_theme_light_surfaceVariant</item> + <item name="colorOnSurfaceVariant">@color/md_theme_light_onSurfaceVariant</item> + <item name="colorOutline">@color/md_theme_light_outline</item> + <item name="colorOnSurfaceInverse">@color/md_theme_light_inverseOnSurface</item> + <item name="colorSurfaceInverse">@color/md_theme_light_inverseSurface</item> + <item name="colorPrimaryInverse">@color/md_theme_light_inversePrimary</item> + </style> +</resources> diff --git a/ui/src/main/res/values/tv_colors.xml b/ui/src/main/res/values/tv_colors.xml deleted file mode 100644 index f330bedc..00000000 --- a/ui/src/main/res/values/tv_colors.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<resources> - <color name="tv_primary_color">#ff212121</color> - <color name="tv_card_background">@color/tv_primary_color</color> - <color name="tv_card_delete_background">#b00020</color> -</resources> diff --git a/ui/src/main/res/values/tv_styles.xml b/ui/src/main/res/values/tv_styles.xml deleted file mode 100644 index c5477f6a..00000000 --- a/ui/src/main/res/values/tv_styles.xml +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<resources xmlns:android="http://schemas.android.com/apk/res/android"> - - <style name="TvTheme" parent="Theme.MaterialComponents.NoActionBar"> - <item name="colorPrimary">@color/tv_primary_color</item> - <item name="colorOnPrimary">#fffafafa</item> - <item name="colorPrimaryDark">@color/tv_primary_color</item> - <item name="colorPrimaryVariant">#ff484848</item> - <item name="colorSecondary">#ff4285f4</item> - <item name="colorOnSecondary">#ff0059c1</item> - <item name="colorSurface">@color/tv_primary_color</item> - <item name="colorOnSurface">#fffafafa</item> - <item name="colorBackground">@color/tv_primary_color</item> - <item name="colorMultiselectActiveBackground">@color/list_multiselect_background</item> - <item name="colorControlNormal">#fffafafa</item> - <item name="elevationOverlayEnabled">false</item> - <item name="android:statusBarColor">@color/tv_primary_color</item> - <item name="android:windowBackground">@color/tv_primary_color</item> - <item name="alertDialogTheme">@style/AppTheme.Dialog</item> - <item name="materialAlertDialogTheme">@style/AppTheme.Dialog</item> - <item name="textInputStyle">@style/TextInputLayoutBase</item> - <item name="materialCardViewStyle">@style/TvTheme.MaterialCardView</item> - </style> - - <style name="TvTheme.MaterialCardView" parent="Widget.MaterialComponents.CardView"> - <item name="cornerRadius">4dp</item> - <item name="cardElevation">8dp</item> - <item name="contentPadding">8dp</item> - <item name="cardBackgroundColor">?attr/elevationOverlayColor</item> - </style> -</resources> |