Skip to content

Commit 245f9f9

Browse files
authored
Merge pull request #1 from xPand4B/design-overhaul
Updated design
2 parents cec1691 + 00ef442 commit 245f9f9

File tree

16 files changed

+324
-106
lines changed

16 files changed

+324
-106
lines changed
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Bug report
2+
description: Create a report to help us improve
3+
title: '[Bug]: '
4+
labels: bug
5+
assignees: 'xPand4B'
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: |
10+
Thanks for taking the time to fill out this bug report!
11+
- type: checkboxes
12+
attributes:
13+
label: Is there an existing issue for this?
14+
description: Please search to see if an issue already exists for the bug you encountered.
15+
options:
16+
- label: I have searched the existing issues
17+
validations:
18+
required: true
19+
- type: textarea
20+
id: description
21+
attributes:
22+
label: Description
23+
description: Describe the bug.
24+
placeholder: A clear and concise description of what the bug is.
25+
validations:
26+
required: true
27+
- type: textarea
28+
id: stepsToReproduce
29+
attributes:
30+
label: To Reproduce
31+
description: Steps to reproduce the behavior.
32+
placeholder: |
33+
1. In this environment...
34+
2. With this config...
35+
3. Run '...'
36+
4. See error...
37+
validations:
38+
required: true
39+
- type: textarea
40+
id: expectedBehaviour
41+
attributes:
42+
label: Expected behavior
43+
description: Expected behavior
44+
placeholder: A clear and concise description of what you expected to happen.
45+
validations:
46+
required: true
47+
- type: textarea
48+
id: logs
49+
attributes:
50+
label: Relevant log output
51+
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
52+
render: shell
53+
- type: textarea
54+
id: anythingElse
55+
attributes:
56+
label: Anything else?
57+
description: |
58+
Links? References? Anything that will give us more context about the issue you are encountering!
59+
60+
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
61+
validations:
62+
required: false
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Feature request
2+
description: Suggest an idea for this project
3+
title: '[Feature]: '
4+
labels: enhancement
5+
assignees: 'xPand4B'
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: |
10+
Thanks for taking the time to fill out this feature request!
11+
- type: textarea
12+
id: description
13+
attributes:
14+
label: Description
15+
description: Is your feature request related to a problem? Please describe.
16+
placeholder: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
17+
validations:
18+
required: true
19+
- type: textarea
20+
id: solution
21+
attributes:
22+
label: Describe the solution you'd like
23+
description: A clear and concise description of what you want to happen.
24+
validations:
25+
required: true
26+
- type: textarea
27+
id: alternatives
28+
attributes:
29+
label: Describe alternatives you've considered
30+
description: A clear and concise description of any alternative solutions or features you've considered.
31+
validations:
32+
required: true
33+
- type: textarea
34+
id: anythingElse
35+
attributes:
36+
label: Anything else?
37+
description: |
38+
Links? References? Anything that will give us more context about the feature you are requesting!
39+
40+
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
41+
validations:
42+
required: false

app/Providers/ViewServiceProvider.php

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ class ViewServiceProvider extends ServiceProvider
1616
'valet',
1717
];
1818

19+
/**
20+
* @var int
21+
*/
22+
private $totalSites;
23+
1924
/**
2025
* Bootstrap any application services.
2126
*
@@ -48,7 +53,8 @@ private function shareValetInfos(): void
4853
$valetInfos = [
4954
'tld' => $tld,
5055
'port' => self::VALET_PORT,
51-
'paths' => $this->getSitesFromPaths($valetConfig->paths, $tld)
56+
'paths' => $this->getSitesFromPaths($valetConfig->paths, $tld),
57+
'total' => $this->totalSites
5258
];
5359

5460
view()->share('valet', $valetInfos);
@@ -72,6 +78,11 @@ private function getValetConfigFileContent(string $homePath)
7278
);
7379
}
7480

81+
private function getValetTld($valetConfig): string
82+
{
83+
return $valetConfig->tld ?? $valetConfig->domain;
84+
}
85+
7586
private function getSitesFromPaths(array $paths, string $tld): array
7687
{
7788
$result = [];
@@ -81,6 +92,7 @@ private function getSitesFromPaths(array $paths, string $tld): array
8192
$result[$trimmedPath] = [];
8293

8394
foreach (scandir($path) as $key => $site) {
95+
// Skip self
8496
if (mb_strtolower($site) === 'valetdashboard') {
8597
continue;
8698
}
@@ -90,39 +102,26 @@ private function getSitesFromPaths(array $paths, string $tld): array
90102
if (!(is_dir("$path/$site") || is_link("$path/$site"))) {
91103
continue;
92104
}
105+
// Skip . directories
93106
if ($site[0] === '.') {
94107
continue;
95108
}
109+
// Skip ignored directories
96110
if (in_array($site, self::IGNORED_DIRECTORIES)) {
97111
continue;
98112
}
99113

100-
if ($site === 'cloud.shopware') {
101-
$tld .= '/admin';
102-
}
114+
$this->totalSites++;
103115

104116
$url = 'http://' . $site . '.' . $tld . self::VALET_PORT;
117+
$isShopware = strpos(strtolower($site), 'shopware') !== false;
105118

106-
if ($site === 'cloud.shopware') {
107-
$tld = str_replace('/admin', '', $tld);
108-
}
109-
110-
111-
// if ($site === 'swDashboard') {
112-
// $url = 'http://shopware.dashboard';
113-
// }
114-
115-
$result[$trimmedPath][$site] = $url;
119+
$result[$trimmedPath][$site] = compact('url', 'isShopware');
116120
}
117121

118122
array_multisort($result[$trimmedPath]);
119123
}
120124

121125
return $result;
122126
}
123-
124-
private function getValetTld($valetConfig): string
125-
{
126-
return $valetConfig->tld ?? $valetConfig->domain;
127-
}
128127
}

composer.json

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "xpand4b/valet-dashboard",
33
"description": "A simple dashboard for Laravel Valet.",
4-
"version": "1.0.0",
4+
"version": "1.1.0",
55
"type": "project",
66
"keywords": [
77
"framework",
@@ -15,7 +15,7 @@
1515
{
1616
"name": "Eric Heinzl",
1717
"email": "xpand.4beatz@gmail.com",
18-
"homepage": "https://xpand4b.de",
18+
"homepage": "https://github.com/xPand4B/ValetDashboard",
1919
"role": "Developer"
2020
}
2121
],
@@ -36,10 +36,5 @@
3636
"optimize-autoloader": true
3737
},
3838
"minimum-stability": "dev",
39-
"prefer-stable": true,
40-
"scripts": {
41-
"post-root-package-install": [
42-
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
43-
]
44-
}
39+
"prefer-stable": true
4540
}

public/css/app.css

Lines changed: 60 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,72 @@
1+
.sticky {
2+
position: fixed;
3+
top: 0;
4+
width: 100%
5+
}
6+
7+
/**
8+
* ---------------------------------
9+
* Backgrounds
10+
* ---------------------------------
11+
*/
12+
.bg-discord-primary {
13+
background-color: #36393f;
14+
}
15+
16+
.bg-discord-secondary {
17+
background-color: #2f3136;
18+
}
19+
20+
.bg-discord-tertiary {
21+
background-color: #202225;
22+
}
23+
24+
.bg-fab-default {
25+
background-color: #36393f;
26+
fill: hsl(139,calc(1*47.3%),43.9%);;
27+
}
28+
.bg-fab-default:hover {
29+
background-color: hsl(139,calc(1*47.3%),43.9%);
30+
fill: white;
31+
}
32+
133
/**
234
* ---------------------------------
3-
* Sources
35+
* Components
436
* ---------------------------------
5-
*
6-
* https://webgradients.com/
7-
*
837
*/
9-
.bg-gradient-dark {
10-
/* 045 Loon Crest */
11-
background: linear-gradient(to bottom, rgba(255,255,255,0.15) 0%, rgba(0,0,0,0.15) 100%), radial-gradient(at top center, rgba(255,255,255,0.40) 0%, rgba(0,0,0,0.40) 120%) #989898;
12-
background-blend-mode: multiply,multiply;
38+
.card-discord {
39+
background-color: #2f3136;
40+
border-left: 4px solid #43A7FF;
41+
}
42+
43+
.item-discord {
44+
background-color: #4f545c;
45+
color: #f6f6f7;
1346
}
14-
.bg-gradient-gray {
15-
/* 071 Above Clouds */
16-
background-image: linear-gradient(to left, #BDBBBE 0%, #9D9EA3 100%), radial-gradient(88% 271%, rgba(255, 255, 255, 0.25) 0%, rgba(254, 254, 254, 0.25) 1%, rgba(0, 0, 0, 0.25) 100%), radial-gradient(50% 100%, rgba(255, 255, 255, 0.30) 0%, rgba(0, 0, 0, 0.30) 100%);
17-
background-blend-mode: normal, lighten, soft-light;
47+
.item-discord:hover {
48+
background-color: #72767d;
49+
cursor: pointer;
1850
}
1951

20-
.bg-gradient-gray-light {
21-
/* 074 Sharp Glass */
22-
background: #C9CCD3 linear-gradient(-180deg, rgba(255, 255, 255, 0.50) 0%, rgba(0, 0, 0, 0.50) 100%);
23-
background-blend-mode: lighten;
52+
.item-shopware-admin {
53+
background-color: #253758;
54+
color: #bcc9dc;
55+
}
56+
.item-shopware-admin:hover {
57+
background-color: #2A3F65;
58+
cursor: pointer;
2459
}
2560

26-
.bg-gradient-blue {
27-
background-image: linear-gradient(to top, #1e3c72 0%, #1e3c72 1%, #2a5298 100%);
61+
/**
62+
* ---------------------------------
63+
* Text
64+
* ---------------------------------
65+
*/
66+
.text-discord-header-secondary {
67+
color: #b9bbbe;
2868
}
2969

30-
.item:hover {
31-
/* 071 */
32-
background-image: linear-gradient(to left, #BDBBBE 0%, #9D9EA3 100%), radial-gradient(88% 271%, rgba(255, 255, 255, 0.25) 0%, rgba(254, 254, 254, 0.25) 1%, rgba(0, 0, 0, 0.25) 100%), radial-gradient(50% 100%, rgba(255, 255, 255, 0.30) 0%, rgba(0, 0, 0, 0.30) 100%);
33-
background-blend-mode: normal, lighten, soft-light;
70+
.text-discord {
71+
color: #bcc9dc;
3472
}

public/css/tailwind.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
973 Bytes
Loading
1.84 KB
Loading

public/svg/laravel.svg

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)