Skip to content

Commit cd18cf1

Browse files
committed
feat: make 6.7 compatible
# Conflicts: # src/Resources/app/administration/src/module/frosh-tools/page/index/index.js
1 parent b5454eb commit cd18cf1

File tree

6 files changed

+57
-70
lines changed

6 files changed

+57
-70
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@
3535
}
3636
},
3737
"require": {
38-
"shopware/core": "~6.6.0"
38+
"shopware/core": "~6.6.0 || ~6.7.0"
3939
},
4040
"require-dev": {
41-
"shopware/elasticsearch": "~6.6.0"
41+
"shopware/elasticsearch": "~6.6.0 || ~6.7.0"
4242
},
4343
"config": {
4444
"allow-plugins": {

src/Controller/ShopwareFilesController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ public function listShopwareFiles(): JsonResponse
6464
$data = $this->httpClient->request('GET', $url)->getContent(false);
6565
$data = trim((string) $data);
6666

67-
if (empty($data)) {
67+
// Cloudflare fallbacks to index.html for 404 pages...
68+
if (empty($data) || str_contains($data, '<!DOCTYPE html>')) {
6869
return new JsonResponse(['error' => 'No file information for this Shopware version']);
6970
}
7071

src/Resources/app/administration/src/module/frosh-tools/component/frosh-tools-tab-index/template.twig

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
:columns="columns"
3232
>
3333
<template #column-current="{ item }">
34-
<template>
34+
<div>
3535
<sw-label
3636
variant="warning"
3737
appearance="pill"
@@ -53,11 +53,8 @@
5353
>
5454
{{ $t('frosh-tools.info') }}
5555
</sw-label>
56-
</template>
57-
58-
<template>
59-
{{ item.current }}
60-
</template>
56+
</div>
57+
{{ item.current }}
6158
</template>
6259

6360
<template #column-name="{ item }">
@@ -92,7 +89,7 @@
9289
:columns="columns"
9390
>
9491
<template #column-current="{ item }">
95-
<template>
92+
<div>
9693
<sw-label
9794
variant="warning"
9895
appearance="pill"
@@ -114,11 +111,8 @@
114111
>
115112
{{ $t('frosh-tools.info') }}
116113
</sw-label>
117-
</template>
118-
119-
<template>
120114
{{ item.current }}
121-
</template>
115+
</div>
122116
</template>
123117

124118
<template #column-name="{ item }">

src/Resources/app/administration/src/module/frosh-tools/component/frosh-tools-tab-queue/template.twig

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@
1616
name="regular-undo"
1717
></sw-icon>
1818
</sw-button>
19-
<sw-button
20-
variant="danger"
21-
@click="showResetModal = true"
22-
>
19+
<sw-button @click="showResetModal = true">
2320
{{ $t('frosh-tools.resetQueue') }}
2421
</sw-button>
2522
</template>
@@ -43,8 +40,8 @@
4340
{{ $t('global.default.cancel') }}
4441
</sw-button>
4542
<sw-button
46-
variant="danger"
4743
@click="resetQueue"
44+
variant="primary"
4845
>
4946
{{ $t('frosh-tools.tabs.queue.reset.modal.reset') }}
5047
</sw-button>

src/Resources/app/administration/src/module/frosh-tools/page/index/index.js

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,17 @@ Component.register('frosh-tools-index', {
88

99
computed: {
1010
elasticsearchAvailable() {
11-
return (
12-
Shopware.State.get('context').app.config.settings
13-
?.elasticsearchEnabled || false
14-
);
11+
if (Shopware.Store && Shopware.Store.get('context')) {
12+
return (
13+
Shopware.Store.get('context').app.config.settings
14+
?.elasticsearchEnabled || false
15+
);
16+
} else {
17+
return (
18+
Shopware.State.get('context').app.config.settings
19+
?.elasticsearchEnabled || false
20+
);
21+
}
1522
},
1623
},
1724
});
Lines changed: 35 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,41 @@
11
<sw-page class="frosh-tools">
22
<template #content>
3-
<sw-container>
4-
<sw-tabs
5-
:small="false"
6-
positionIdentifier="frosh-tools-tabs"
3+
<sw-tabs
4+
:small="false"
5+
positionIdentifier="frosh-tools-tabs"
6+
>
7+
<sw-tabs-item :route="{ name: 'frosh.tools.index.index' }">
8+
{{ $t('frosh-tools.tabs.index.title') }}
9+
</sw-tabs-item>
10+
<sw-tabs-item :route="{ name: 'frosh.tools.index.cache' }">
11+
{{ $t('frosh-tools.tabs.cache.title') }}
12+
</sw-tabs-item>
13+
<sw-tabs-item
14+
:route="{ name: 'frosh.tools.index.scheduled' }"
715
>
8-
<sw-tabs-item
9-
:route="{ name: 'frosh.tools.index.index' }"
10-
>
11-
{{ $t('frosh-tools.tabs.index.title') }}
12-
</sw-tabs-item>
13-
<sw-tabs-item
14-
:route="{ name: 'frosh.tools.index.cache' }"
15-
>
16-
{{ $t('frosh-tools.tabs.cache.title') }}
17-
</sw-tabs-item>
18-
<sw-tabs-item
19-
:route="{ name: 'frosh.tools.index.scheduled' }"
20-
>
21-
{{ $t('frosh-tools.tabs.scheduledTaskOverview.title') }}
22-
</sw-tabs-item>
23-
<sw-tabs-item
24-
:route="{ name: 'frosh.tools.index.queue' }"
25-
>
26-
{{ $t('frosh-tools.tabs.queue.title') }}
27-
</sw-tabs-item>
28-
<sw-tabs-item
29-
:route="{ name: 'frosh.tools.index.logs' }"
30-
>
31-
{{ $t('frosh-tools.tabs.logs.title') }}
32-
</sw-tabs-item>
33-
<sw-tabs-item
34-
:route="{ name: 'frosh.tools.index.elasticsearch' }"
35-
v-if="elasticsearchAvailable"
36-
>
37-
{{ $t('frosh-tools.tabs.elasticsearch.title') }}
38-
</sw-tabs-item>
39-
<sw-tabs-item
40-
:route="{ name: 'frosh.tools.index.files' }"
41-
>
42-
{{ $t('frosh-tools.tabs.files.title') }}
43-
</sw-tabs-item>
44-
<sw-tabs-item
45-
:route="{ name: 'frosh.tools.index.statemachines' }"
46-
>
47-
{{ $t('frosh-tools.tabs.state-machines.title') }}
48-
</sw-tabs-item>
49-
</sw-tabs>
50-
</sw-container>
16+
{{ $t('frosh-tools.tabs.scheduledTaskOverview.title') }}
17+
</sw-tabs-item>
18+
<sw-tabs-item :route="{ name: 'frosh.tools.index.queue' }">
19+
{{ $t('frosh-tools.tabs.queue.title') }}
20+
</sw-tabs-item>
21+
<sw-tabs-item :route="{ name: 'frosh.tools.index.logs' }">
22+
{{ $t('frosh-tools.tabs.logs.title') }}
23+
</sw-tabs-item>
24+
<sw-tabs-item
25+
:route="{ name: 'frosh.tools.index.elasticsearch' }"
26+
v-if="elasticsearchAvailable"
27+
>
28+
{{ $t('frosh-tools.tabs.elasticsearch.title') }}
29+
</sw-tabs-item>
30+
<sw-tabs-item :route="{ name: 'frosh.tools.index.files' }">
31+
{{ $t('frosh-tools.tabs.files.title') }}
32+
</sw-tabs-item>
33+
<sw-tabs-item
34+
:route="{ name: 'frosh.tools.index.statemachines' }"
35+
>
36+
{{ $t('frosh-tools.tabs.state-machines.title') }}
37+
</sw-tabs-item>
38+
</sw-tabs>
5139
<router-view></router-view>
5240
</template>
5341
</sw-page>

0 commit comments

Comments
 (0)