Skip to content

Commit 5570eb8

Browse files
authored
Merge pull request #116 from buggregator/feature/fixes-styles
Optimize styles for various screen sizes
2 parents a1a44a6 + 71726ed commit 5570eb8

File tree

21 files changed

+249
-135
lines changed

21 files changed

+249
-135
lines changed

assets/mixins.scss

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@
77
}
88

99
@mixin layout-head {
10-
@apply left-10 h-12 right-0 justify-between border-b border-gray-200 dark:border-gray-700 px-4 bg-white dark:bg-gray-800 z-50;
11-
@apply absolute left-0 right-0;
10+
@apply justify-between bg-white dark:bg-gray-800;
11+
@apply absolute left-0 right-0 z-50;
12+
@apply h-9 sm:h-10 md:h-14;
13+
@apply border-b border-gray-200 dark:border-gray-700;
14+
@apply px-2 md:px-4;
1215

1316
html.navbar-fixed & {
1417
@apply fixed left-10 md:left-14 lg:left-16 right-0;
@@ -31,6 +34,17 @@
3134
@apply text-2xs sm:text-xs md:text-sm lg:text-base;
3235
}
3336

37+
@mixin button {
38+
@apply px-1 sm:px-3 py-0.5 sm:py-1;
39+
@apply text-white text-2xs sm:text-xs;
40+
@apply transition-all duration-300;
41+
@apply rounded-sm;
42+
43+
&[disabled] {
44+
@apply bg-gray-400 dark:bg-gray-700 opacity-40 text-gray-400 cursor-not-allowed;
45+
}
46+
}
47+
3448
@mixin loading {
3549
position: absolute;
3650
display: inline-block;

pages/index.vue

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -147,24 +147,8 @@ export default defineComponent({
147147
148148
.events-page__welcome {
149149
@include layout-body;
150-
@apply flex-1 flex flex-col justify-center items-center bg-gray-50 dark:bg-gray-800 min-h-screen;
151-
}
152-
153-
.events-page__btn-stop-events {
154-
@apply mr-3 text-xs text-gray-800 dark:text-white rounded-sm hover:opacity-100 transition-all duration-300 opacity-40 relative;
155-
156-
&[disabled] {
157-
@apply hover:opacity-40;
158-
}
159-
}
160-
161-
.events-page__btn-stop-events--active {
162-
@apply opacity-100 text-blue-500 dark:text-blue-500;
163-
}
164-
165-
.events-page__btn-stop-events-count {
166-
@apply absolute right-0 bottom-0 bg-red-600 text-white w-4 h-4 rounded-full flex justify-center;
167-
168-
transform: translate(60%, -60%);
150+
@apply min-h-screen;
151+
@apply flex-1 flex flex-col justify-center items-center;
152+
@apply bg-gray-50 dark:bg-gray-800;
169153
}
170154
</style>

src/entities/http-dump/ui/preview-card/preview-card.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ const uri = decodeURI(props.event.payload.request.uri);
2828
@import "assets/mixins";
2929
3030
.preview-card {
31-
@apply flex flex-col;
31+
@apply flex flex-col text-2xs md:text-xs;
3232
}
3333
3434
.preview-card__link {
35-
@apply cursor-pointer flex-grow p-3 bg-gray-200 dark:bg-gray-800;
35+
@apply cursor-pointer flex-grow p-2 md:p-3 bg-gray-200 dark:bg-gray-800;
3636
}
3737
3838
.preview-card__method {

src/entities/inspector/ui/inspector-stat-board/inspector-stat-board.vue

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,21 @@ const processResult = computed(() =>
4242

4343
<style lang="scss" scoped>
4444
.inspector-stat-board {
45-
@apply bg-gray-200 dark:bg-gray-800 pt-5 pb-4 px-4 md:px-5 flex flex-col sm:flex-row justify-between items-start divide-y sm:divide-y-0 sm:divide-x divide-gray-300 dark:divide-gray-500;
45+
@apply flex flex-col sm:flex-row justify-between items-start;
46+
@apply bg-gray-200 dark:bg-gray-800;
47+
@apply divide-y sm:divide-y-0 sm:divide-x divide-gray-300 dark:divide-gray-500;
48+
@apply p-0 sm:p-4 lg:p-6;
4649
}
4750
4851
.inspector-stat-board__item {
49-
@apply flex-auto pb-5 sm:pb-0 sm:px-10 pt-5 sm:pt-0;
50-
51-
&:first-child {
52-
@apply sm:px-0;
53-
}
52+
@apply flex-auto flex flex-row justify-between sm:flex-col sm:justify-start;
53+
@apply w-full sm:w-auto;
54+
@apply py-2 px-2 sm:py-5 sm:px-5;
5455
}
5556
5657
.inspector-stat-board__item-name {
57-
@apply text-gray-600 dark:text-gray-300 font-bold text-2xs mb-1 uppercase truncate;
58+
@apply text-gray-600 dark:text-gray-300 font-bold text-2xs uppercase truncate;
59+
@apply mb-0 sm:mb-1;
5860
}
5961
6062
.inspector-stat-board__item-value {

src/entities/ray/mocks/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ import raySizeMock from './ray-size.json';
1818
import rayTableMock from './ray-table.json';
1919
import rayTextMock from './ray-text.json';
2020
import rayTraceMock from './ray-trace.json';
21+
import rayBooleanTrueMock from './ray-boolean-true.json';
22+
import rayBooleanFalseMock from './ray-boolean-false.json';
2123

2224
export {
2325
rayCallerMock,
@@ -40,4 +42,6 @@ export {
4042
rayTableMock,
4143
rayTextMock,
4244
rayTraceMock,
45+
rayBooleanTrueMock,
46+
rayBooleanFalseMock
4347
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"uuid": "da076402-6f98-4ada-bae2-d77d405cf427",
3+
"type": "ray",
4+
"payload": {
5+
"uuid": "f6edef68-5bbb-4882-b0aa-98c883078cfd",
6+
"payloads": [
7+
{
8+
"type": "custom",
9+
"content": {
10+
"content": false,
11+
"label": "Boolean"
12+
},
13+
"origin": {
14+
"file": "/app/Modules/Ray/RayCommon.php",
15+
"line_number": 229,
16+
"hostname": "ButschsterLpp"
17+
}
18+
}
19+
],
20+
"meta": {
21+
"php_version": "8.2.5",
22+
"php_version_id": 80205,
23+
"project_name": "",
24+
"laravel_version": "9.52.4",
25+
"laravel_ray_package_version": "1.32.2.0",
26+
"ray_package_version": "1.36.2.0"
27+
}
28+
},
29+
"timestamp": 1673266869,
30+
"project_id": null
31+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"uuid": "da076402-6f98-4ada-bae2-d77d405cf427",
3+
"type": "ray",
4+
"payload": {
5+
"uuid": "f6edef68-5bbb-4882-b0aa-98c883078cfd",
6+
"payloads": [
7+
{
8+
"type": "custom",
9+
"content": {
10+
"content": true,
11+
"label": "Boolean"
12+
},
13+
"origin": {
14+
"file": "/app/Modules/Ray/RayCommon.php",
15+
"line_number": 229,
16+
"hostname": "ButschsterLpp"
17+
}
18+
}
19+
],
20+
"meta": {
21+
"php_version": "8.2.5",
22+
"php_version_id": 80205,
23+
"project_name": "",
24+
"laravel_version": "9.52.4",
25+
"laravel_ray_package_version": "1.32.2.0",
26+
"ray_package_version": "1.36.2.0"
27+
}
28+
},
29+
"timestamp": 1673266869,
30+
"project_id": null
31+
}

src/entities/ray/ui/preview-card/preview-card.stories.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ import {
2020
rayTextMock,
2121
rayTraceMock,
2222
rayLockMock,
23+
rayBooleanTrueMock,
24+
rayBooleanFalseMock
2325
} from '../../mocks';
2426
import {
2527
rayLaravelEloquentMock, rayLaravelEventsMock, rayLaravelJobsMock,
@@ -35,6 +37,14 @@ export default {
3537
component: PreviewCard
3638
} as Meta<typeof PreviewCard>;
3739

40+
export const BooleanTrue: StoryObj<typeof PreviewCard> = {
41+
args: { event: normalizeRayEvent(rayBooleanTrueMock), }
42+
};
43+
44+
export const BooleanFalse: StoryObj<typeof PreviewCard> = {
45+
args: { event: normalizeRayEvent(rayBooleanFalseMock), }
46+
};
47+
3848
export const Text: StoryObj<typeof PreviewCard> = {
3949
args: { event: normalizeRayEvent(rayTextMock), }
4050
};

src/entities/ray/ui/ray-custom/ray-custom.vue

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,6 @@ defineProps<Props>();
1111

1212
<template>
1313
<div class="ray-custom">
14-
<ValueDump v-if="content.content" :value="content.content" />
14+
<ValueDump :value="content.content" />
1515
</div>
1616
</template>
17-
18-
<style lang="scss" scoped>
19-
.ray-custom {
20-
@apply py-3;
21-
}
22-
</style>

src/entities/ray/ui/ray-exception/ray-exception.vue

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,24 @@ defineProps<Props>();
3232
</template>
3333

3434
<style lang="scss" scoped>
35+
@import "assets/mixins";
3536
.ray-exception {
36-
display: block;
37+
@apply block;
3738
}
3839
3940
.ray-exception__texts {
40-
display: block;
41+
@apply block;
4142
}
4243
43-
.ray-exception__texts-in {
44-
@apply mb-1;
45-
}
4644
.ray-exception__texts-code {
47-
@apply font-semibold;
45+
@apply block mb-2;
46+
@apply text-xs sm:text-sm md:text-base font-semibold;
4847
}
4948
5049
.ray-exception__text {
51-
display: block;
50+
@include code-example();
51+
@apply mb-2;
52+
@apply text-xs break-words whitespace-pre-wrap overflow-auto text-opacity-60;
5253
}
54+
5355
</style>

0 commit comments

Comments
 (0)