diff --git a/database/migrations/2020_05_26_092649_create_user_settings_table.php b/database/migrations/2020_05_26_092649_create_user_settings_table.php index 9888422d..d35f3538 100644 --- a/database/migrations/2020_05_26_092649_create_user_settings_table.php +++ b/database/migrations/2020_05_26_092649_create_user_settings_table.php @@ -28,6 +28,7 @@ class CreateUserSettingsTable extends Migration $table->text('phone_number')->nullable(); $table->decimal('timezone', 10, 1)->nullable(); $table->text('emoji_type')->default('twemoji'); + $table->text('theme_mode')->default('system'); $table->charset = 'utf8mb4'; $table->collation = 'utf8mb4_unicode_ci'; }); diff --git a/public/assets/setup/applemoji-preview-dark.jpg b/public/assets/setup/applemoji-preview-dark.jpg new file mode 100644 index 00000000..761f271c Binary files /dev/null and b/public/assets/setup/applemoji-preview-dark.jpg differ diff --git a/public/assets/setup/applemoji-preview.jpg b/public/assets/setup/applemoji-preview.jpg new file mode 100644 index 00000000..49119e2c Binary files /dev/null and b/public/assets/setup/applemoji-preview.jpg differ diff --git a/public/assets/setup/dark-mode.jpg b/public/assets/setup/dark-mode.jpg new file mode 100644 index 00000000..3cf6c929 Binary files /dev/null and b/public/assets/setup/dark-mode.jpg differ diff --git a/public/assets/setup/light-mode.jpg b/public/assets/setup/light-mode.jpg new file mode 100644 index 00000000..39403699 Binary files /dev/null and b/public/assets/setup/light-mode.jpg differ diff --git a/public/assets/setup/system-mode.jpg b/public/assets/setup/system-mode.jpg new file mode 100644 index 00000000..b0dc9926 Binary files /dev/null and b/public/assets/setup/system-mode.jpg differ diff --git a/public/assets/setup/twemoji-preview-dark.jpg b/public/assets/setup/twemoji-preview-dark.jpg new file mode 100644 index 00000000..5212579e Binary files /dev/null and b/public/assets/setup/twemoji-preview-dark.jpg differ diff --git a/public/assets/setup/twemoji-preview.jpg b/public/assets/setup/twemoji-preview.jpg new file mode 100644 index 00000000..610e0350 Binary files /dev/null and b/public/assets/setup/twemoji-preview.jpg differ diff --git a/public/mix-manifest.json b/public/mix-manifest.json index f61a4be9..317a4b7c 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -13,12 +13,12 @@ "/chunks/admin~chunks/files~chunks/my-shared-items~chunks/platform~chunks/recent-uploads~chunks/settin~97130d1f.js": "/chunks/admin~chunks/files~chunks/my-shared-items~chunks/platform~chunks/recent-uploads~chunks/settin~97130d1f.js?id=270183e1780d96dc77d6", "/chunks/admin~chunks/files~chunks/my-shared-items~chunks/platform~chunks/recent-uploads~chunks/shared~1bec6fe4.js": "/chunks/admin~chunks/files~chunks/my-shared-items~chunks/platform~chunks/recent-uploads~chunks/shared~1bec6fe4.js?id=510e6c1b1017a73a40a6", "/chunks/admin~chunks/platform.js": "/chunks/admin~chunks/platform.js?id=354c892546e5c369a749", - "/chunks/admin~chunks/platform~chunks/settings.js": "/chunks/admin~chunks/platform~chunks/settings.js?id=7c1f56dddcaa83704a70", - "/chunks/admin~chunks/platform~chunks/settings~chunks/shared.js": "/chunks/admin~chunks/platform~chunks/settings~chunks/shared.js?id=c0aba5adcb5fc83094c9", + "/chunks/admin~chunks/platform~chunks/settings.js": "/chunks/admin~chunks/platform~chunks/settings.js?id=7fa6b818b9e646d8766d", + "/chunks/admin~chunks/platform~chunks/settings~chunks/shared.js": "/chunks/admin~chunks/platform~chunks/settings~chunks/shared.js?id=780f3575fa6ae934027c", "/chunks/admin~chunks/platform~chunks/shared.js": "/chunks/admin~chunks/platform~chunks/shared.js?id=afeba4ebd13af7e995be", "/chunks/app-appearance.js": "/chunks/app-appearance.js?id=1d5319a48a28f62bb131", "/chunks/app-appearance~chunks/app-email~chunks/app-index~chunks/app-others~chunks/payments/billings~c~45d16af9.js": "/chunks/app-appearance~chunks/app-email~chunks/app-index~chunks/app-others~chunks/payments/billings~c~45d16af9.js?id=a4b9a9a416c656f4d95d", - "/chunks/app-appearance~chunks/app-email~chunks/app-index~chunks/app-others~chunks/payments/billings~c~fdb7bddc.js": "/chunks/app-appearance~chunks/app-email~chunks/app-index~chunks/app-others~chunks/payments/billings~c~fdb7bddc.js?id=c5ac05de67d02437f154", + "/chunks/app-appearance~chunks/app-email~chunks/app-index~chunks/app-others~chunks/payments/billings~c~fdb7bddc.js": "/chunks/app-appearance~chunks/app-email~chunks/app-index~chunks/app-others~chunks/payments/billings~c~fdb7bddc.js?id=56a2e6e086d9b4c1ec2e", "/chunks/app-email.js": "/chunks/app-email.js?id=3b8d81b3f01fd4d10e0c", "/chunks/app-index.js": "/chunks/app-index.js?id=fb1f81d6571b2dd12e3c", "/chunks/app-language.js": "/chunks/app-language.js?id=ee7cf0a7210cb7ec2b51", @@ -67,7 +67,7 @@ "/chunks/platform.js": "/chunks/platform.js?id=f16ebede38a3f225f480", "/chunks/platform~chunks/shared.js": "/chunks/platform~chunks/shared.js?id=6660d58dcc0bb5030e3d", "/chunks/platform~chunks/shared~chunks/shared-with-me~chunks/team-folders.js": "/chunks/platform~chunks/shared~chunks/shared-with-me~chunks/team-folders.js?id=ca9ca67afd5839597647", - "/chunks/profile.js": "/chunks/profile.js?id=9b2d8aef181505f9b684", + "/chunks/profile.js": "/chunks/profile.js?id=b3ef20adb950a9e88952", "/chunks/profile~chunks/settings-password.js": "/chunks/profile~chunks/settings-password.js?id=a81388efd770d51f8a9c", "/chunks/purchase-code.js": "/chunks/purchase-code.js?id=d9af0efad2af2679954b", "/chunks/recent-uploads.js": "/chunks/recent-uploads.js?id=8577d4c771602671b38a", @@ -525,5 +525,231 @@ "/chunks/profile.1d0fe88071466d1d684b.hot-update.js": "/chunks/profile.1d0fe88071466d1d684b.hot-update.js", "/chunks/profile.550727cd8a714439e35b.hot-update.js": "/chunks/profile.550727cd8a714439e35b.hot-update.js", "/chunks/profile.efdfda2c514b898e4626.hot-update.js": "/chunks/profile.efdfda2c514b898e4626.hot-update.js", - "/chunks/profile.834b3b4cc71b24445672.hot-update.js": "/chunks/profile.834b3b4cc71b24445672.hot-update.js" + "/chunks/profile.834b3b4cc71b24445672.hot-update.js": "/chunks/profile.834b3b4cc71b24445672.hot-update.js", + "/chunks/profile.00fadaeafb1054e1e40f.hot-update.js": "/chunks/profile.00fadaeafb1054e1e40f.hot-update.js", + "/chunks/profile.5fbf42ede8b0be31d095.hot-update.js": "/chunks/profile.5fbf42ede8b0be31d095.hot-update.js", + "/chunks/profile.dbf78fec12462db1a251.hot-update.js": "/chunks/profile.dbf78fec12462db1a251.hot-update.js", + "/chunks/profile.572ba6496da52761ca21.hot-update.js": "/chunks/profile.572ba6496da52761ca21.hot-update.js", + "/chunks/profile.9c0225b8d1610723ddd2.hot-update.js": "/chunks/profile.9c0225b8d1610723ddd2.hot-update.js", + "/chunks/profile.d6400dfc44877429f69d.hot-update.js": "/chunks/profile.d6400dfc44877429f69d.hot-update.js", + "/chunks/profile.5d6023caf492244513b7.hot-update.js": "/chunks/profile.5d6023caf492244513b7.hot-update.js", + "/chunks/profile.41a9c1233426aea2b8b3.hot-update.js": "/chunks/profile.41a9c1233426aea2b8b3.hot-update.js", + "/chunks/profile.106003d25c7c77a41eb6.hot-update.js": "/chunks/profile.106003d25c7c77a41eb6.hot-update.js", + "/chunks/profile.52779e50811effaf4ecc.hot-update.js": "/chunks/profile.52779e50811effaf4ecc.hot-update.js", + "/chunks/profile.efb02991b216e69bfc88.hot-update.js": "/chunks/profile.efb02991b216e69bfc88.hot-update.js", + "/chunks/profile.b293fb148af53f709615.hot-update.js": "/chunks/profile.b293fb148af53f709615.hot-update.js", + "/chunks/profile.3e35015bdfdfe1af1088.hot-update.js": "/chunks/profile.3e35015bdfdfe1af1088.hot-update.js", + "/chunks/profile.258b312d4a60ccd79429.hot-update.js": "/chunks/profile.258b312d4a60ccd79429.hot-update.js", + "/chunks/profile.99d8e60d0368a2c38c86.hot-update.js": "/chunks/profile.99d8e60d0368a2c38c86.hot-update.js", + "/chunks/profile.93d3b9e0131ccf5864ef.hot-update.js": "/chunks/profile.93d3b9e0131ccf5864ef.hot-update.js", + "/chunks/profile.acddc52b583f3825b068.hot-update.js": "/chunks/profile.acddc52b583f3825b068.hot-update.js", + "/chunks/profile.53a9d12a92bd6f22dd24.hot-update.js": "/chunks/profile.53a9d12a92bd6f22dd24.hot-update.js", + "/chunks/profile.d1180feaae229a784dbd.hot-update.js": "/chunks/profile.d1180feaae229a784dbd.hot-update.js", + "/chunks/profile.3bb5f93e3cf001baf811.hot-update.js": "/chunks/profile.3bb5f93e3cf001baf811.hot-update.js", + "/chunks/profile.7d26526c940f837fad40.hot-update.js": "/chunks/profile.7d26526c940f837fad40.hot-update.js", + "/chunks/profile.a41312d667ad7210306c.hot-update.js": "/chunks/profile.a41312d667ad7210306c.hot-update.js", + "/chunks/profile.6e050b058df3530bc8a5.hot-update.js": "/chunks/profile.6e050b058df3530bc8a5.hot-update.js", + "/chunks/profile.6c3a64856332c966257f.hot-update.js": "/chunks/profile.6c3a64856332c966257f.hot-update.js", + "/chunks/profile.a1df69e2a394cdb7005d.hot-update.js": "/chunks/profile.a1df69e2a394cdb7005d.hot-update.js", + "/chunks/profile.7bf9a4da6077215d0ee2.hot-update.js": "/chunks/profile.7bf9a4da6077215d0ee2.hot-update.js", + "/chunks/profile.cceb122b7910712da7a2.hot-update.js": "/chunks/profile.cceb122b7910712da7a2.hot-update.js", + "/chunks/profile.42cf76929d80a0a23462.hot-update.js": "/chunks/profile.42cf76929d80a0a23462.hot-update.js", + "/chunks/profile.07868515356f665a2e16.hot-update.js": "/chunks/profile.07868515356f665a2e16.hot-update.js", + "/chunks/profile.7859be31b4179f1bf2ee.hot-update.js": "/chunks/profile.7859be31b4179f1bf2ee.hot-update.js", + "/chunks/profile.282278136fa384782836.hot-update.js": "/chunks/profile.282278136fa384782836.hot-update.js", + "/chunks/profile.415ebbc5b97871f662bc.hot-update.js": "/chunks/profile.415ebbc5b97871f662bc.hot-update.js", + "/chunks/profile.48a55ce2e36895e2e650.hot-update.js": "/chunks/profile.48a55ce2e36895e2e650.hot-update.js", + "/chunks/profile.86924af813be647fddc4.hot-update.js": "/chunks/profile.86924af813be647fddc4.hot-update.js", + "/chunks/profile.a7e6f284ffa4caf8e51e.hot-update.js": "/chunks/profile.a7e6f284ffa4caf8e51e.hot-update.js", + "/chunks/profile.acfc7f97d212a899506a.hot-update.js": "/chunks/profile.acfc7f97d212a899506a.hot-update.js", + "/chunks/profile.1d2e477073b23fbf4b7e.hot-update.js": "/chunks/profile.1d2e477073b23fbf4b7e.hot-update.js", + "/chunks/profile.eb6c8a6a323974628118.hot-update.js": "/chunks/profile.eb6c8a6a323974628118.hot-update.js", + "/chunks/profile.195ebe1bc00a495be306.hot-update.js": "/chunks/profile.195ebe1bc00a495be306.hot-update.js", + "/chunks/profile.56833264fea6e2d27fba.hot-update.js": "/chunks/profile.56833264fea6e2d27fba.hot-update.js", + "/chunks/profile.a63e8529eb662a5f45e9.hot-update.js": "/chunks/profile.a63e8529eb662a5f45e9.hot-update.js", + "/chunks/profile.a9405adfb3f5714216af.hot-update.js": "/chunks/profile.a9405adfb3f5714216af.hot-update.js", + "/chunks/profile.29706f2105b21bd31016.hot-update.js": "/chunks/profile.29706f2105b21bd31016.hot-update.js", + "/chunks/profile.bcf1eebaf106592a1184.hot-update.js": "/chunks/profile.bcf1eebaf106592a1184.hot-update.js", + "/chunks/profile.d376001c89066c8db412.hot-update.js": "/chunks/profile.d376001c89066c8db412.hot-update.js", + "/chunks/profile.4256312a3f4bf47d25c5.hot-update.js": "/chunks/profile.4256312a3f4bf47d25c5.hot-update.js", + "/chunks/profile.2a4c340a187ccb9a22e0.hot-update.js": "/chunks/profile.2a4c340a187ccb9a22e0.hot-update.js", + "/chunks/profile.9e4141df628b8f8ecabe.hot-update.js": "/chunks/profile.9e4141df628b8f8ecabe.hot-update.js", + "/chunks/profile.eadb18c7f4901b78e031.hot-update.js": "/chunks/profile.eadb18c7f4901b78e031.hot-update.js", + "/chunks/profile.c529424b4e05b7ea03b4.hot-update.js": "/chunks/profile.c529424b4e05b7ea03b4.hot-update.js", + "/chunks/profile.edfa0618c13f4e641797.hot-update.js": "/chunks/profile.edfa0618c13f4e641797.hot-update.js", + "/js/main.43b823d22528311cae26.hot-update.js": "/js/main.43b823d22528311cae26.hot-update.js", + "/chunks/profile.e785e5dd4c3ede6b42c3.hot-update.js": "/chunks/profile.e785e5dd4c3ede6b42c3.hot-update.js", + "/chunks/profile.f255ad7d984fbe3406c9.hot-update.js": "/chunks/profile.f255ad7d984fbe3406c9.hot-update.js", + "/chunks/profile.dfeb477bbe155ce82935.hot-update.js": "/chunks/profile.dfeb477bbe155ce82935.hot-update.js", + "/chunks/profile.6f20da129765a0900fa8.hot-update.js": "/chunks/profile.6f20da129765a0900fa8.hot-update.js", + "/chunks/profile.8211d610342753786e83.hot-update.js": "/chunks/profile.8211d610342753786e83.hot-update.js", + "/chunks/profile.c16450006fe291f15c04.hot-update.js": "/chunks/profile.c16450006fe291f15c04.hot-update.js", + "/chunks/profile.04e3b25ee9662f6d0731.hot-update.js": "/chunks/profile.04e3b25ee9662f6d0731.hot-update.js", + "/chunks/profile.a8a2d9bb88305fbb50ea.hot-update.js": "/chunks/profile.a8a2d9bb88305fbb50ea.hot-update.js", + "/chunks/profile.b20df6539423d713835b.hot-update.js": "/chunks/profile.b20df6539423d713835b.hot-update.js", + "/chunks/profile.911c90f64fe6df505313.hot-update.js": "/chunks/profile.911c90f64fe6df505313.hot-update.js", + "/chunks/profile.723078b534c757c85b08.hot-update.js": "/chunks/profile.723078b534c757c85b08.hot-update.js", + "/chunks/profile.08b6d13b6950c4e47e03.hot-update.js": "/chunks/profile.08b6d13b6950c4e47e03.hot-update.js", + "/chunks/profile.54044b61860c1dba625f.hot-update.js": "/chunks/profile.54044b61860c1dba625f.hot-update.js", + "/chunks/profile.b5c8cbebdba7933f9e67.hot-update.js": "/chunks/profile.b5c8cbebdba7933f9e67.hot-update.js", + "/chunks/profile.d337ec2fcd2fdeb3e30e.hot-update.js": "/chunks/profile.d337ec2fcd2fdeb3e30e.hot-update.js", + "/chunks/profile.4dbc4b13f0ee5057ad2f.hot-update.js": "/chunks/profile.4dbc4b13f0ee5057ad2f.hot-update.js", + "/chunks/profile.3d2374c45bfed29a02c3.hot-update.js": "/chunks/profile.3d2374c45bfed29a02c3.hot-update.js", + "/chunks/profile.1ff4de63dbd8cc37f2e4.hot-update.js": "/chunks/profile.1ff4de63dbd8cc37f2e4.hot-update.js", + "/chunks/profile.0ad0052482aa1ff875d1.hot-update.js": "/chunks/profile.0ad0052482aa1ff875d1.hot-update.js", + "/js/main.8029cf7e83f5498cdd62.hot-update.js": "/js/main.8029cf7e83f5498cdd62.hot-update.js", + "/js/main.59193e5e1c077d88207f.hot-update.js": "/js/main.59193e5e1c077d88207f.hot-update.js", + "/js/main.d72fe694a6bdd085a7ea.hot-update.js": "/js/main.d72fe694a6bdd085a7ea.hot-update.js", + "/js/main.4deef37caa518186241d.hot-update.js": "/js/main.4deef37caa518186241d.hot-update.js", + "/chunks/admin~chunks/platform~chunks/settings.4deef37caa518186241d.hot-update.js": "/chunks/admin~chunks/platform~chunks/settings.4deef37caa518186241d.hot-update.js", + "/chunks/admin~chunks/platform~chunks/settings~chunks/shared.4deef37caa518186241d.hot-update.js": "/chunks/admin~chunks/platform~chunks/settings~chunks/shared.4deef37caa518186241d.hot-update.js", + "/chunks/profile.4deef37caa518186241d.hot-update.js": "/chunks/profile.4deef37caa518186241d.hot-update.js", + "/js/main.d93e7c0b6a3b958b6d11.hot-update.js": "/js/main.d93e7c0b6a3b958b6d11.hot-update.js", + "/chunks/profile.71895e5fbb5e2c97a3cf.hot-update.js": "/chunks/profile.71895e5fbb5e2c97a3cf.hot-update.js", + "/chunks/profile.9a4cae2539dcf7239f03.hot-update.js": "/chunks/profile.9a4cae2539dcf7239f03.hot-update.js", + "/js/main.02f7ecdaa453f5a3a6c6.hot-update.js": "/js/main.02f7ecdaa453f5a3a6c6.hot-update.js", + "/js/main.ace661f9c871d3c2953b.hot-update.js": "/js/main.ace661f9c871d3c2953b.hot-update.js", + "/chunks/profile.ace661f9c871d3c2953b.hot-update.js": "/chunks/profile.ace661f9c871d3c2953b.hot-update.js", + "/js/main.e990b2baf52220bce587.hot-update.js": "/js/main.e990b2baf52220bce587.hot-update.js", + "/js/main.a941110ba0da8fa1317e.hot-update.js": "/js/main.a941110ba0da8fa1317e.hot-update.js", + "/js/main.0321b9d2cac537f84e8e.hot-update.js": "/js/main.0321b9d2cac537f84e8e.hot-update.js", + "/js/main.22311dfd741b99de02eb.hot-update.js": "/js/main.22311dfd741b99de02eb.hot-update.js", + "/js/main.b27bc8e8d946058de2b0.hot-update.js": "/js/main.b27bc8e8d946058de2b0.hot-update.js", + "/js/main.edd011bddd9ea980728c.hot-update.js": "/js/main.edd011bddd9ea980728c.hot-update.js", + "/js/main.f7797c56a1c53ea75807.hot-update.js": "/js/main.f7797c56a1c53ea75807.hot-update.js", + "/js/main.36368f0eb59fdde72d51.hot-update.js": "/js/main.36368f0eb59fdde72d51.hot-update.js", + "/chunks/profile.6da417fc609091368333.hot-update.js": "/chunks/profile.6da417fc609091368333.hot-update.js", + "/js/main.ee7d24272e09866b23f6.hot-update.js": "/js/main.ee7d24272e09866b23f6.hot-update.js", + "/js/main.39ec72ca7838a5ae7b0e.hot-update.js": "/js/main.39ec72ca7838a5ae7b0e.hot-update.js", + "/js/main.9bd12c13f0a8a856d582.hot-update.js": "/js/main.9bd12c13f0a8a856d582.hot-update.js", + "/js/main.31e41814492e9a0178c9.hot-update.js": "/js/main.31e41814492e9a0178c9.hot-update.js", + "/js/main.ee6fbee042a5f7575e7b.hot-update.js": "/js/main.ee6fbee042a5f7575e7b.hot-update.js", + "/js/main.575c881d54ef2bb2941b.hot-update.js": "/js/main.575c881d54ef2bb2941b.hot-update.js", + "/chunks/admin~chunks/platform~chunks/settings~chunks/shared.ac75522853ce1c73715f.hot-update.js": "/chunks/admin~chunks/platform~chunks/settings~chunks/shared.ac75522853ce1c73715f.hot-update.js", + "/chunks/admin~chunks/platform~chunks/settings.0c00725befca1021fae5.hot-update.js": "/chunks/admin~chunks/platform~chunks/settings.0c00725befca1021fae5.hot-update.js", + "/chunks/admin~chunks/platform~chunks/settings.3210fe6c294860e09d58.hot-update.js": "/chunks/admin~chunks/platform~chunks/settings.3210fe6c294860e09d58.hot-update.js", + "/chunks/admin~chunks/platform~chunks/settings.a95707f2d8315998feae.hot-update.js": "/chunks/admin~chunks/platform~chunks/settings.a95707f2d8315998feae.hot-update.js", + "/js/main.b2e4b141d5723d7f02f2.hot-update.js": "/js/main.b2e4b141d5723d7f02f2.hot-update.js", + "/js/main.f55699f2d3ec940956cd.hot-update.js": "/js/main.f55699f2d3ec940956cd.hot-update.js", + "/js/main.ac6239a37387ada82b96.hot-update.js": "/js/main.ac6239a37387ada82b96.hot-update.js", + "/js/main.62378f8652eccde80977.hot-update.js": "/js/main.62378f8652eccde80977.hot-update.js", + "/js/main.3c709880acf4ea41e426.hot-update.js": "/js/main.3c709880acf4ea41e426.hot-update.js", + "/js/main.9ee2300fe5a93029fda3.hot-update.js": "/js/main.9ee2300fe5a93029fda3.hot-update.js", + "/js/main.5716dbb7b0815f5e1517.hot-update.js": "/js/main.5716dbb7b0815f5e1517.hot-update.js", + "/js/main.593d0091cd4d2ce1b7f0.hot-update.js": "/js/main.593d0091cd4d2ce1b7f0.hot-update.js", + "/js/main.e4a0ce7f40ab56ebf55d.hot-update.js": "/js/main.e4a0ce7f40ab56ebf55d.hot-update.js", + "/js/main.0b322566fe3f1080d2df.hot-update.js": "/js/main.0b322566fe3f1080d2df.hot-update.js", + "/js/main.ac125690bc97ec8be7c0.hot-update.js": "/js/main.ac125690bc97ec8be7c0.hot-update.js", + "/js/main.ff31a8237124fb5b8c19.hot-update.js": "/js/main.ff31a8237124fb5b8c19.hot-update.js", + "/js/main.f8d3ca6b1e8985ac514b.hot-update.js": "/js/main.f8d3ca6b1e8985ac514b.hot-update.js", + "/js/main.621baea7d5d54b7b7554.hot-update.js": "/js/main.621baea7d5d54b7b7554.hot-update.js", + "/js/main.a85a004b78bc7ba55382.hot-update.js": "/js/main.a85a004b78bc7ba55382.hot-update.js", + "/chunks/profile.88f948e3637e05d2b6f1.hot-update.js": "/chunks/profile.88f948e3637e05d2b6f1.hot-update.js", + "/chunks/profile.5af92050006d8c83f084.hot-update.js": "/chunks/profile.5af92050006d8c83f084.hot-update.js", + "/chunks/profile.f2839750e32e7d2d71c0.hot-update.js": "/chunks/profile.f2839750e32e7d2d71c0.hot-update.js", + "/chunks/admin~chunks/platform~chunks/settings.09ecca2b290678ce7f41.hot-update.js": "/chunks/admin~chunks/platform~chunks/settings.09ecca2b290678ce7f41.hot-update.js", + "/chunks/admin~chunks/platform~chunks/settings.8c61c1b6786a363cd99d.hot-update.js": "/chunks/admin~chunks/platform~chunks/settings.8c61c1b6786a363cd99d.hot-update.js", + "/chunks/admin~chunks/platform~chunks/settings.4fa642b0729c5404b5a4.hot-update.js": "/chunks/admin~chunks/platform~chunks/settings.4fa642b0729c5404b5a4.hot-update.js", + "/chunks/admin~chunks/platform~chunks/settings.c21c99f7cc09162e2444.hot-update.js": "/chunks/admin~chunks/platform~chunks/settings.c21c99f7cc09162e2444.hot-update.js", + "/chunks/admin~chunks/platform~chunks/settings.44383b08995ee50abef4.hot-update.js": "/chunks/admin~chunks/platform~chunks/settings.44383b08995ee50abef4.hot-update.js", + "/chunks/admin~chunks/platform~chunks/settings.a5147c7ce7022ea93dc8.hot-update.js": "/chunks/admin~chunks/platform~chunks/settings.a5147c7ce7022ea93dc8.hot-update.js", + "/chunks/admin~chunks/platform~chunks/settings.e39b58df1c25ad642b2c.hot-update.js": "/chunks/admin~chunks/platform~chunks/settings.e39b58df1c25ad642b2c.hot-update.js", + "/chunks/admin~chunks/platform~chunks/settings.03a99fe7cd487467c8c9.hot-update.js": "/chunks/admin~chunks/platform~chunks/settings.03a99fe7cd487467c8c9.hot-update.js", + "/chunks/admin~chunks/platform~chunks/settings.050ed2e7409932435ca9.hot-update.js": "/chunks/admin~chunks/platform~chunks/settings.050ed2e7409932435ca9.hot-update.js", + "/chunks/admin~chunks/platform~chunks/settings.453f70e0e2d50a8ae667.hot-update.js": "/chunks/admin~chunks/platform~chunks/settings.453f70e0e2d50a8ae667.hot-update.js", + "/chunks/admin~chunks/platform~chunks/settings.959d9c0fa881e4999b30.hot-update.js": "/chunks/admin~chunks/platform~chunks/settings.959d9c0fa881e4999b30.hot-update.js", + "/chunks/admin~chunks/platform~chunks/settings.693cae9a6bee36937200.hot-update.js": "/chunks/admin~chunks/platform~chunks/settings.693cae9a6bee36937200.hot-update.js", + "/chunks/admin~chunks/platform~chunks/settings.312b387cf15b06f3475c.hot-update.js": "/chunks/admin~chunks/platform~chunks/settings.312b387cf15b06f3475c.hot-update.js", + "/chunks/admin~chunks/platform~chunks/settings.2783279723e7c1791111.hot-update.js": "/chunks/admin~chunks/platform~chunks/settings.2783279723e7c1791111.hot-update.js", + "/chunks/admin~chunks/platform~chunks/settings.aff03c33a0ea915edf11.hot-update.js": "/chunks/admin~chunks/platform~chunks/settings.aff03c33a0ea915edf11.hot-update.js", + "/chunks/admin~chunks/platform~chunks/settings.e5d31e112093458ba0ed.hot-update.js": "/chunks/admin~chunks/platform~chunks/settings.e5d31e112093458ba0ed.hot-update.js", + "/chunks/admin~chunks/platform~chunks/settings.95df8109f1f6e71b79f7.hot-update.js": "/chunks/admin~chunks/platform~chunks/settings.95df8109f1f6e71b79f7.hot-update.js", + "/chunks/admin~chunks/platform~chunks/settings.3f8a4a3645e9ba3bd364.hot-update.js": "/chunks/admin~chunks/platform~chunks/settings.3f8a4a3645e9ba3bd364.hot-update.js", + "/js/main.5cf6ee86527dd56e5924.hot-update.js": "/js/main.5cf6ee86527dd56e5924.hot-update.js", + "/js/main.54976076db2a00830a61.hot-update.js": "/js/main.54976076db2a00830a61.hot-update.js", + "/js/main.bcc763cd0d73d115d56a.hot-update.js": "/js/main.bcc763cd0d73d115d56a.hot-update.js", + "/chunks/profile.7f1a1bb261a0729531c9.hot-update.js": "/chunks/profile.7f1a1bb261a0729531c9.hot-update.js", + "/chunks/profile.ca3f4abea951036db722.hot-update.js": "/chunks/profile.ca3f4abea951036db722.hot-update.js", + "/js/main.c5f5783c4294b5812106.hot-update.js": "/js/main.c5f5783c4294b5812106.hot-update.js", + "/js/main.6c090a73f1abbd9b6e5e.hot-update.js": "/js/main.6c090a73f1abbd9b6e5e.hot-update.js", + "/js/main.36a1d81e354aab1229d9.hot-update.js": "/js/main.36a1d81e354aab1229d9.hot-update.js", + "/js/main.7285d7d98328d7e083d8.hot-update.js": "/js/main.7285d7d98328d7e083d8.hot-update.js", + "/js/main.bb4f28dd37adb7822438.hot-update.js": "/js/main.bb4f28dd37adb7822438.hot-update.js", + "/js/main.b7c3d9778cd72e6b2ae8.hot-update.js": "/js/main.b7c3d9778cd72e6b2ae8.hot-update.js", + "/js/main.e9f029fd33fa5c947d46.hot-update.js": "/js/main.e9f029fd33fa5c947d46.hot-update.js", + "/js/main.d5670343baae886466a7.hot-update.js": "/js/main.d5670343baae886466a7.hot-update.js", + "/js/main.fa4d0d90e3e5df3529cb.hot-update.js": "/js/main.fa4d0d90e3e5df3529cb.hot-update.js", + "/js/main.a3d86957c97f94308c30.hot-update.js": "/js/main.a3d86957c97f94308c30.hot-update.js", + "/js/main.7522b06ff24379526763.hot-update.js": "/js/main.7522b06ff24379526763.hot-update.js", + "/js/main.d02e8c6ddaf42a759b4c.hot-update.js": "/js/main.d02e8c6ddaf42a759b4c.hot-update.js", + "/chunks/admin~chunks/platform~chunks/settings~chunks/shared.d02e8c6ddaf42a759b4c.hot-update.js": "/chunks/admin~chunks/platform~chunks/settings~chunks/shared.d02e8c6ddaf42a759b4c.hot-update.js", + "/chunks/billing.d02e8c6ddaf42a759b4c.hot-update.js": "/chunks/billing.d02e8c6ddaf42a759b4c.hot-update.js", + "/js/main.f00464107c0040d56421.hot-update.js": "/js/main.f00464107c0040d56421.hot-update.js", + "/js/main.c7c0f98484257ab5da06.hot-update.js": "/js/main.c7c0f98484257ab5da06.hot-update.js", + "/js/main.8d780b2caa7c7ea9677d.hot-update.js": "/js/main.8d780b2caa7c7ea9677d.hot-update.js", + "/js/main.d4f0d150b63d633ed1b1.hot-update.js": "/js/main.d4f0d150b63d633ed1b1.hot-update.js", + "/js/main.a17cea8a70baa9f6ceca.hot-update.js": "/js/main.a17cea8a70baa9f6ceca.hot-update.js", + "/chunks/app-appearance.a17cea8a70baa9f6ceca.hot-update.js": "/chunks/app-appearance.a17cea8a70baa9f6ceca.hot-update.js", + "/chunks/app-appearance~chunks/app-email~chunks/app-index~chunks/app-others~chunks/billing~chunks/paym~15786716.js": "/chunks/app-appearance~chunks/app-email~chunks/app-index~chunks/app-others~chunks/billing~chunks/paym~15786716.js?id=6af59868950a19c86cc8", + "/chunks/app-appearance~chunks/app-email~chunks/app-index~chunks/app-others~chunks/payments/billings~c~e50006d2.a17cea8a70baa9f6ceca.hot-update.js": "/chunks/app-appearance~chunks/app-email~chunks/app-index~chunks/app-others~chunks/payments/billings~c~e50006d2.a17cea8a70baa9f6ceca.hot-update.js", + "/chunks/app-email.a17cea8a70baa9f6ceca.hot-update.js": "/chunks/app-email.a17cea8a70baa9f6ceca.hot-update.js", + "/chunks/app-index.a17cea8a70baa9f6ceca.hot-update.js": "/chunks/app-index.a17cea8a70baa9f6ceca.hot-update.js", + "/chunks/app-others~chunks/payments/settings.a17cea8a70baa9f6ceca.hot-update.js": "/chunks/app-others~chunks/payments/settings.a17cea8a70baa9f6ceca.hot-update.js", + "/chunks/billing.a17cea8a70baa9f6ceca.hot-update.js": "/chunks/billing.a17cea8a70baa9f6ceca.hot-update.js", + "/chunks/payments/billings.a17cea8a70baa9f6ceca.hot-update.js": "/chunks/payments/billings.a17cea8a70baa9f6ceca.hot-update.js", + "/chunks/settings-storage.a17cea8a70baa9f6ceca.hot-update.js": "/chunks/settings-storage.a17cea8a70baa9f6ceca.hot-update.js", + "/chunks/user-delete.a17cea8a70baa9f6ceca.hot-update.js": "/chunks/user-delete.a17cea8a70baa9f6ceca.hot-update.js", + "/chunks/user-detail.a17cea8a70baa9f6ceca.hot-update.js": "/chunks/user-detail.a17cea8a70baa9f6ceca.hot-update.js", + "/chunks/user-password.a17cea8a70baa9f6ceca.hot-update.js": "/chunks/user-password.a17cea8a70baa9f6ceca.hot-update.js", + "/chunks/user-storage.a17cea8a70baa9f6ceca.hot-update.js": "/chunks/user-storage.a17cea8a70baa9f6ceca.hot-update.js", + "/chunks/user-subscription.a17cea8a70baa9f6ceca.hot-update.js": "/chunks/user-subscription.a17cea8a70baa9f6ceca.hot-update.js", + "/vendors~chunks/admin~chunks/admin-account~chunks/app-appearance~chunks/app-email~chunks/app-index~ch~f078ad52.js": "/vendors~chunks/admin~chunks/admin-account~chunks/app-appearance~chunks/app-email~chunks/app-index~ch~f078ad52.js?id=ecb6e7175276cccc67c0", + "/js/main.7662dd9b590329979bd6.hot-update.js": "/js/main.7662dd9b590329979bd6.hot-update.js", + "/js/main.d6ea93ed3d53d36514bf.hot-update.js": "/js/main.d6ea93ed3d53d36514bf.hot-update.js", + "/chunks/admin~chunks/files~chunks/my-shared-items~chunks/platform~chunks/recent-uploads~chunks/settin~97130d1f.d6ea93ed3d53d36514bf.hot-update.js": "/chunks/admin~chunks/files~chunks/my-shared-items~chunks/platform~chunks/recent-uploads~chunks/settin~97130d1f.d6ea93ed3d53d36514bf.hot-update.js", + "/chunks/admin~chunks/platform~chunks/settings~chunks/shared.d6ea93ed3d53d36514bf.hot-update.js": "/chunks/admin~chunks/platform~chunks/settings~chunks/shared.d6ea93ed3d53d36514bf.hot-update.js", + "/chunks/app-language.d6ea93ed3d53d36514bf.hot-update.js": "/chunks/app-language.d6ea93ed3d53d36514bf.hot-update.js", + "/chunks/billing.d6ea93ed3d53d36514bf.hot-update.js": "/chunks/billing.d6ea93ed3d53d36514bf.hot-update.js", + "/chunks/dashboard.d6ea93ed3d53d36514bf.hot-update.js": "/chunks/dashboard.d6ea93ed3d53d36514bf.hot-update.js", + "/chunks/email-verified.d6ea93ed3d53d36514bf.hot-update.js": "/chunks/email-verified.d6ea93ed3d53d36514bf.hot-update.js", + "/chunks/homepage.d6ea93ed3d53d36514bf.hot-update.js": "/chunks/homepage.d6ea93ed3d53d36514bf.hot-update.js", + "/chunks/installation-disclaimer.d6ea93ed3d53d36514bf.hot-update.js": "/chunks/installation-disclaimer.d6ea93ed3d53d36514bf.hot-update.js", + "/chunks/invitation.d6ea93ed3d53d36514bf.hot-update.js": "/chunks/invitation.d6ea93ed3d53d36514bf.hot-update.js", + "/chunks/page-edit.d6ea93ed3d53d36514bf.hot-update.js": "/chunks/page-edit.d6ea93ed3d53d36514bf.hot-update.js", + "/chunks/pages.d6ea93ed3d53d36514bf.hot-update.js": "/chunks/pages.d6ea93ed3d53d36514bf.hot-update.js", + "/chunks/plan.d6ea93ed3d53d36514bf.hot-update.js": "/chunks/plan.d6ea93ed3d53d36514bf.hot-update.js", + "/chunks/plan-create/fixed.d6ea93ed3d53d36514bf.hot-update.js": "/chunks/plan-create/fixed.d6ea93ed3d53d36514bf.hot-update.js", + "/chunks/plan-create/metered.d6ea93ed3d53d36514bf.hot-update.js": "/chunks/plan-create/metered.d6ea93ed3d53d36514bf.hot-update.js", + "/chunks/plan-delete.d6ea93ed3d53d36514bf.hot-update.js": "/chunks/plan-delete.d6ea93ed3d53d36514bf.hot-update.js", + "/chunks/plans.d6ea93ed3d53d36514bf.hot-update.js": "/chunks/plans.d6ea93ed3d53d36514bf.hot-update.js", + "/chunks/settings-password.d6ea93ed3d53d36514bf.hot-update.js": "/chunks/settings-password.d6ea93ed3d53d36514bf.hot-update.js", + "/chunks/shared.d6ea93ed3d53d36514bf.hot-update.js": "/chunks/shared.d6ea93ed3d53d36514bf.hot-update.js", + "/chunks/shared-with-me~chunks/team-folders.d6ea93ed3d53d36514bf.hot-update.js": "/chunks/shared-with-me~chunks/team-folders.d6ea93ed3d53d36514bf.hot-update.js", + "/chunks/shared/single-file.d6ea93ed3d53d36514bf.hot-update.js": "/chunks/shared/single-file.d6ea93ed3d53d36514bf.hot-update.js", + "/chunks/sign-in.d6ea93ed3d53d36514bf.hot-update.js": "/chunks/sign-in.d6ea93ed3d53d36514bf.hot-update.js", + "/chunks/subscription-plans.d6ea93ed3d53d36514bf.hot-update.js": "/chunks/subscription-plans.d6ea93ed3d53d36514bf.hot-update.js", + "/chunks/user.d6ea93ed3d53d36514bf.hot-update.js": "/chunks/user.d6ea93ed3d53d36514bf.hot-update.js", + "/chunks/user-create.d6ea93ed3d53d36514bf.hot-update.js": "/chunks/user-create.d6ea93ed3d53d36514bf.hot-update.js", + "/chunks/user-subscription.d6ea93ed3d53d36514bf.hot-update.js": "/chunks/user-subscription.d6ea93ed3d53d36514bf.hot-update.js", + "/chunks/users.d6ea93ed3d53d36514bf.hot-update.js": "/chunks/users.d6ea93ed3d53d36514bf.hot-update.js", + "/js/main.528c2290d99f074bec1d.hot-update.js": "/js/main.528c2290d99f074bec1d.hot-update.js", + "/js/main.49a523ef0efeed4397e6.hot-update.js": "/js/main.49a523ef0efeed4397e6.hot-update.js", + "/chunks/profile.022e92c50ef133c8e269.hot-update.js": "/chunks/profile.022e92c50ef133c8e269.hot-update.js", + "/chunks/profile.3fac9e926fca06e7b155.hot-update.js": "/chunks/profile.3fac9e926fca06e7b155.hot-update.js", + "/chunks/billing.046f32ed1b862562dac7.hot-update.js": "/chunks/billing.046f32ed1b862562dac7.hot-update.js", + "/chunks/admin~chunks/platform~chunks/settings.21112b634143b655aa95.hot-update.js": "/chunks/admin~chunks/platform~chunks/settings.21112b634143b655aa95.hot-update.js", + "/chunks/admin~chunks/platform~chunks/settings.9135838870515cd57353.hot-update.js": "/chunks/admin~chunks/platform~chunks/settings.9135838870515cd57353.hot-update.js", + "/chunks/admin~chunks/platform~chunks/settings.a2b66bb07e5270747f98.hot-update.js": "/chunks/admin~chunks/platform~chunks/settings.a2b66bb07e5270747f98.hot-update.js", + "/chunks/profile.191d811339f830de6366.hot-update.js": "/chunks/profile.191d811339f830de6366.hot-update.js", + "/chunks/profile.10dc14c4440eb4baf8bd.hot-update.js": "/chunks/profile.10dc14c4440eb4baf8bd.hot-update.js", + "/chunks/profile.98764ea179fd2907191e.hot-update.js": "/chunks/profile.98764ea179fd2907191e.hot-update.js", + "/chunks/profile.1db7ef04a210971371ad.hot-update.js": "/chunks/profile.1db7ef04a210971371ad.hot-update.js", + "/chunks/profile.fdae94c4ceb5fb9f085c.hot-update.js": "/chunks/profile.fdae94c4ceb5fb9f085c.hot-update.js", + "/chunks/profile.8d0a537ca927feb73a19.hot-update.js": "/chunks/profile.8d0a537ca927feb73a19.hot-update.js", + "/chunks/profile.3df9d4fefa2a1cd9a563.hot-update.js": "/chunks/profile.3df9d4fefa2a1cd9a563.hot-update.js", + "/chunks/profile.5644ca2816287334f7ab.hot-update.js": "/chunks/profile.5644ca2816287334f7ab.hot-update.js", + "/chunks/profile.20f30fd47c07fc9cdd7f.hot-update.js": "/chunks/profile.20f30fd47c07fc9cdd7f.hot-update.js", + "/chunks/profile.e703ff8bfc8cd1195402.hot-update.js": "/chunks/profile.e703ff8bfc8cd1195402.hot-update.js", + "/chunks/profile.c09e61fa1d64c5882478.hot-update.js": "/chunks/profile.c09e61fa1d64c5882478.hot-update.js", + "/chunks/profile.96526d9239968c4b4cb2.hot-update.js": "/chunks/profile.96526d9239968c4b4cb2.hot-update.js" } diff --git a/resources/js/App.vue b/resources/js/App.vue index 87b9711a..c00868d0 100644 --- a/resources/js/App.vue +++ b/resources/js/App.vue @@ -6,21 +6,21 @@ - - + + - +
{{ $t('Your functionality is restricted. Please review your billing settings.') }}
- + - - + + @@ -34,93 +34,101 @@ import {mapGetters} from 'vuex' import {events} from './bus' export default { - name: 'app', - components: { - CookieDisclaimer, - ToasterWrapper, - Vignette, - Spinner, - Alert - }, - data() { - return { - isLoaded: false - } - }, + name: 'app', + components: { + CookieDisclaimer, + ToasterWrapper, + Vignette, + Spinner, + Alert + }, + data() { + return { + isLoaded: false + } + }, computed: { ...mapGetters([ 'isLimitedUser', - 'isDarkMode', + 'config', 'user', ]), }, watch: { - isDarkMode() { - this.toggleDarkMode() + 'config.defaultThemeMode': function () { + this.handleDarkMode() } }, - methods: { - toggleDarkMode() { - const webApp = document.getElementsByTagName("html")[0]; - - webApp.classList.toggle("dark"); - }, + methods: { spotlightListener(e) { if (e.key === 'k' && e.metaKey) { events.$emit('spotlight:show'); } }, - }, - beforeMount() { - - // Set dark/light mode by user settings - if (localStorage.hasOwnProperty('is_dark_mode')) { - if (this.isDarkMode) this.toggleDarkMode() - } - - // Proceed dark/light mode by system settings - if (! localStorage.hasOwnProperty('is_dark_mode')) { + handleDarkMode() { + const app = document.getElementsByTagName("html")[0]; const prefersDarkScheme = window.matchMedia('(prefers-color-scheme: dark)'); - // Set up initial dark/light mode on app loading - if (prefersDarkScheme.matches) this.toggleDarkMode() + if (this.config.defaultThemeMode === 'dark') { - // Watch for dark/light mode changes on os system layer - prefersDarkScheme.addEventListener('change', () => this.toggleDarkMode()); + app.classList.add("dark") + this.$store.commit('UPDATE_DARK_MODE_STATUS', true) + + } else if (this.config.defaultThemeMode === 'light') { + + app.classList.remove("dark") + this.$store.commit('UPDATE_DARK_MODE_STATUS', false) + + } else if (this.config.defaultThemeMode === 'system' && prefersDarkScheme.matches) { + + app.classList.add("dark") + this.$store.commit('UPDATE_DARK_MODE_STATUS', true) + + } else if (this.config.defaultThemeMode === 'system' && !prefersDarkScheme.matches) { + + app.classList.remove("dark") + this.$store.commit('UPDATE_DARK_MODE_STATUS', false) + } } + }, + beforeMount() { + window.matchMedia('(prefers-color-scheme: dark)') + .addEventListener('change', () => { + this.handleDarkMode() + }); - // Get installation state - let installation = this.$root.$data.config.installation + // Get installation state + let installation = this.$root.$data.config.installation - if (['setup-disclaimer', 'setup-database'].includes(installation)) - this.isLoaded = true + if (['setup-disclaimer', 'setup-database'].includes(installation)) + this.isLoaded = true - // Redirect to database verify code - if (installation === 'setup-database') - this.$router.push({name: 'StatusCheck'}) + // Redirect to database verify code + if (installation === 'setup-database') + this.$router.push({name: 'StatusCheck'}) - // Redirect to starting installation process - if (installation === 'setup-disclaimer') - this.$router.push({name: 'InstallationDisclaimer'}) + // Redirect to starting installation process + if (installation === 'setup-disclaimer') + this.$router.push({name: 'InstallationDisclaimer'}) - if (installation === 'setup-done') - this.$store.dispatch('getLanguageTranslations', this.$root.$data.config.locale) - .then(() => { - this.isLoaded = true + if (installation === 'setup-done') + this.$store.dispatch('getLanguageTranslations', this.$root.$data.config.locale) + .then(() => { + this.isLoaded = true - // Store config to vuex - this.$store.commit('INIT', { - config: this.$root.$data.config, - rootDirectory: { - name: this.$t('locations.home'), - location: 'base', - id: undefined - } - }) - }) - }, - mounted() { - if (this.$isWindows()) { + // Store config to vuex + this.$store.commit('INIT', { + config: this.$root.$data.config, + rootDirectory: { + name: this.$t('locations.home'), + location: 'base', + id: undefined + } + }) + }) + }, + mounted() { + if (this.$isWindows()) { document.body.classList.add('windows') } @@ -155,21 +163,21 @@ export default { [v-cloak], [v-cloak] > * { - display: none + display: none } * { - outline: 0; - margin: 0; - padding: 0; - font-family: 'Nunito', sans-serif; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - box-sizing: border-box; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); - font-size: 16px; - text-decoration: none; - color: $text; + outline: 0; + margin: 0; + padding: 0; + font-family: 'Nunito', sans-serif; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + box-sizing: border-box; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + font-size: 16px; + text-decoration: none; + color: $text; } .vue-feather { @@ -179,24 +187,24 @@ export default { } #auth { - width: 100%; - height: 100%; + width: 100%; + height: 100%; } // Dark mode support .dark { - * { - color: $dark_mode_text_primary; - } + * { + color: $dark_mode_text_primary; + } - body, html { - background: $dark_mode_background; - color: $dark_mode_text_primary; + body, html { + background: $dark_mode_background; + color: $dark_mode_text_primary; - img { - opacity: .95; - } - } + img { + opacity: .95; + } + } } diff --git a/resources/js/components/Sidebar/SidebarNavigation.vue b/resources/js/components/Sidebar/SidebarNavigation.vue index 93892a8c..c5a64671 100644 --- a/resources/js/components/Sidebar/SidebarNavigation.vue +++ b/resources/js/components/Sidebar/SidebarNavigation.vue @@ -39,7 +39,7 @@ -
+
@@ -91,7 +91,6 @@ 'user', ]), navigation() { - if (this.user.data.attributes.role === 'admin') { return [ { @@ -132,9 +131,6 @@ } }, methods: { - toggleDarkMode() { - this.$store.dispatch('toggleDarkMode', !this.isDarkMode) - }, isSection(section) { return this.$route.matched[0].name === section } diff --git a/resources/js/components/Spotlight/Spotlight.vue b/resources/js/components/Spotlight/Spotlight.vue index 2c3abdc0..51ae251c 100644 --- a/resources/js/components/Spotlight/Spotlight.vue +++ b/resources/js/components/Spotlight/Spotlight.vue @@ -245,7 +245,6 @@ export default { }, computed: { ...mapGetters([ - 'isDarkMode', 'config', 'user', ]), @@ -588,7 +587,7 @@ export default { } if (arg.action.value === 'dark-mode') { - this.$store.dispatch('toggleDarkMode', !this.isDarkMode) + this.$store.dispatch('toggleThemeMode') } if (arg.action.value === 'full-screen-mode') { diff --git a/resources/js/store/modules/app.js b/resources/js/store/modules/app.js index decec8d3..f35edada 100644 --- a/resources/js/store/modules/app.js +++ b/resources/js/store/modules/app.js @@ -4,7 +4,7 @@ import Vue from "vue" const defaultState = { isVisibleNavigationBars: localStorage.getItem('is_navigation_bars') !== 'false', - darkMode: localStorage.getItem('is_dark_mode') === 'true' || false, + isDarkMode: false, isVisibleSidebar: localStorage.getItem('file_info_visibility') === 'true' || false, itemViewType: localStorage.getItem('preview_type') || 'list', config: undefined, @@ -17,13 +17,20 @@ const defaultState = { }, } const actions = { - toggleDarkMode: ({commit}, visibility) => { + toggleThemeMode: ({commit}, mode = undefined) => { + const app = document.getElementsByTagName("html")[0]; - // Store dark mode into localStorage - localStorage.setItem('is_dark_mode', visibility) + if (! mode) { + mode = app.classList.contains('dark') ? 'light' : 'dark' + } - // Change preview - commit('TOGGLE_DARK_MODE', visibility) + commit('REPLACE_CONFIG_VALUE', { + key: 'defaultThemeMode', + value: mode, + }) + + // Update user settings + Vue.prototype.$updateText('/user/settings', 'theme_mode', mode) }, toggleNavigationBars: ({commit, state}) => { @@ -43,10 +50,9 @@ const actions = { // Change preview commit('CHANGE_PREVIEW', previewType) }, - toggleEmojiType: ({commit, getters}) => { - let newType = getters.config.defaultEmoji === 'twemoji' - ? 'applemoji' - : 'twemoji' + toggleEmojiType: ({commit, getters}, type = undefined) => { + + let newType = type ? type : getters.config.defaultEmoji === 'twemoji' ? 'applemoji' : 'twemoji' // Update config commit('REPLACE_CONFIG_VALUE', { @@ -111,9 +117,6 @@ const mutations = { CHANGE_PREVIEW(state, type) { state.itemViewType = type }, - TOGGLE_DARK_MODE(state, visibility) { - state.darkMode = visibility - }, TOGGLE_NAVIGATION_BARS(state) { state.isVisibleNavigationBars = ! state.isVisibleNavigationBars }, @@ -151,6 +154,10 @@ const mutations = { state.config.paypal_client_id = data.key state.config.isPayPal = true }, + UPDATE_DARK_MODE_STATUS(state, val) { + console.log(val); + state.isDarkMode = val + }, } const getters = { @@ -162,7 +169,7 @@ const getters = { config: state => state.config, emojis: state => state.emojis, index: state => state.index, - isDarkMode: state => state.darkMode, + isDarkMode: state => state.isDarkMode, sorting: (state) => { return {sorting: state.sorting, URI: '?sort=' + state.sorting.field + '&direction=' + state.sorting.sort} }, diff --git a/resources/js/views/User/Settings.vue b/resources/js/views/User/Settings.vue index dcda8538..33269bb0 100644 --- a/resources/js/views/User/Settings.vue +++ b/resources/js/views/User/Settings.vue @@ -1,5 +1,42 @@