Skip to content

Commit a18a79f

Browse files
maybebotpi0
authored andcommittedOct 6, 2020
fix(manifest): do not use nuxt loading bar color as default theme_color (#344)
1 parent 494eed5 commit a18a79f

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed
 

‎docs/content/en/manifest.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ pwa: {
3232
| `start_url` <sup>\*1</sup> | `String` | `routerBase + '?standalone=true'` | It has to be relative to where the manifest is placed |
3333
| `display` <sup>\*1</sup> | `String` | `'standalone'` | |
3434
| `background_color` <sup>\*2</sup> | `String` | `'#ffffff'` | |
35-
| `theme_color` <sup>\*2</sup> | `String` | `this.options.loading.color` | Nuxt [loading color] option |
35+
| `theme_color` <sup>\*2</sup> | `String` | `pwa.meta.theme_color` | This module's meta theme-color (see the [meta module]) |
3636
| `dir` | `String` | `'ltr'` | `ltr` or `rtl`. Used with `lang` |
3737
| `lang` | `String` | `'en'` | Recommended if used `dir` |
3838
| `useWebmanifestExtension` <sup>\*3</sup> | `Boolean` | `false` | Whether to use `webmanifest` file extension (or default `json`) |
@@ -43,7 +43,8 @@ pwa: {
4343
- <sup>\*2</sup> Recommended (according [to Google](https://web.dev/add-manifest))
4444
- <sup>\*3</sup> Please see [wiki](https://github.com/nuxt-community/pwa-module/wiki/.webmanifest)
4545

46-
[icon module]: https://pwa.nuxtjs.org/icon/
46+
[icon module]: https://pwa.nuxtjs.org/icon
47+
[meta module]: https://pwa.nuxtjs.org/meta
4748
[maximum of 45 characters]: https://developer.chrome.com/apps/manifest/name
4849
[maximum of 12 characters]: https://developer.chrome.com/apps/manifest/name
4950
[loading color]: https://nuxtjs.org/api/configuration-loading/#customizing-the-progress-bar

‎docs/content/en/meta.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ These articles will help you decide an appropriate value:
7676
- Meta: `description`
7777

7878
### `theme_color`
79-
- Default: options.loading.color
79+
- Default: `undefined`
8080
- Meta: `theme-color`
8181

8282
### `lang`

‎lib/manifest/module.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ function addManifest (pwa) {
2727
start_url: routerBase + '?standalone=true',
2828
display: 'standalone',
2929
background_color: '#ffffff',
30-
theme_color: this.options.loading && this.options.loading.color,
30+
theme_color: pwa.meta.theme_color,
3131
lang: 'en',
3232
useWebmanifestExtension: false,
3333
fileName: 'manifest.[hash].[ext]'
3434
}
3535

3636
const options = { ...defaults, ...pwa.manifest }
3737

38-
// Remve extra fields from manifest
38+
// Remove extra fields from manifest
3939
const manifest = { ...options }
4040
delete manifest.src
4141
delete manifest.publicPath

‎lib/meta/module.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function generateMeta (pwa) {
2727
favicon: true,
2828
mobileAppIOS: undefined,
2929
appleStatusBarStyle: 'default',
30-
theme_color: this.options.loading && this.options.loading.color,
30+
theme_color: undefined,
3131
lang: 'en',
3232
ogType: 'website',
3333
ogSiteName: true,

0 commit comments

Comments
 (0)
Please sign in to comment.