Skip to content

Commit 2e8b285

Browse files
author
GitHub Actions Bot
committed
chore: Build release
1 parent 944630c commit 2e8b285

26 files changed

+58
-2106
lines changed

.gitattributes

Lines changed: 0 additions & 3 deletions
This file was deleted.

.github/workflows/pack-plugin.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 0 additions & 60 deletions
This file was deleted.

.gitignore

Lines changed: 0 additions & 6 deletions
This file was deleted.

.shopware-extension.yml

Lines changed: 0 additions & 59 deletions
This file was deleted.

src/DependencyInjection/FileSaver.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
declare (strict_types=1);
4+
5+
namespace Frosh\ThumbnailProcessor\DependencyInjection;
6+
7+
class FileSaver extends \Shopware\Core\Content\Media\File\FileSaver
8+
{
9+
}
10+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
declare (strict_types=1);
4+
5+
namespace Frosh\ThumbnailProcessor\DependencyInjection;
6+
7+
class ThumbnailService extends \Shopware\Core\Content\Media\Thumbnail\ThumbnailService
8+
{
9+
}
10+

src/Resources/public/administration/css/frosh-platform-thumbnail-processor.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
(()=>{var a=`{% block frosh_thumbnail_processor_info_texts %}
2+
<div class="frosh-thumbnail-processor-info-texts">
3+
<p>
4+
Hint: You can set the configuration per SalesChannel and you don't need to use all variables.
5+
</p>
6+
7+
<p>
8+
Available variables for the ThumbnailPattern:<br>
9+
<b>{mediaUrl}</b>: e.g. https://cdn.test.de/<br>
10+
<b>{mediaPath}</b>: e.g. media/image/5b/6d/16/tea.png<br>
11+
<b>{width}</b>: e.g. 800
12+
</p>
13+
14+
<p>
15+
Find patterns in the discussion category 'Patterns' of the GitHub repository:<br>
16+
<a href="https://github.com/FriendsOfShopware/FroshPlatformThumbnailProcessor/discussions/categories/patterns" target="_blank">
17+
GitHub Category 'Patterns'
18+
</a>
19+
</p>
20+
</div>
21+
{% endblock %}
22+
`;var{Component:p}=Shopware;p.register("frosh-thumbnail-processor-info-texts",{template:a});var c=`<sw-card class="sub-card frosh-thumbnail-processor">
23+
<sw-button-process
24+
class="frosh-thumbnail-processor--test-button"
25+
:isLoading="isLoading"
26+
:processSuccess="isSuccessful"
27+
@process-finish="finish"
28+
@click="systemConfigSaveAll">
29+
{{ btnLabel }}
30+
</sw-button-process>
31+
32+
<div class="testdata-container">
33+
<p id="test-result"></p>
34+
<div id="testimage-container"></div>
35+
</div>
36+
</sw-card>
37+
`;var{Component:f,Mixin:d}=Shopware;f.register("thumbnailprocessor-test",{template:c,props:["btnLabel"],inject:["thumbnailProcessorTest"],mixins:[d.getByName("notification")],data(){return{isLoading:!1,isSuccessful:!1}},computed:{pluginSalesChannelId(){let t=this.getParentComponent();if(!t)throw"Can not get pluginConfigData";return t.currentSalesChannelId}},methods:{finish(){this.isSuccessful=!1},showError(t,s,e){this.isSuccessful=!1,s&&(t+=" sample url: "+s),e.innerText=t,e.scrollIntoView(),this.createNotificationError({title:this.$tc("thumbnail-processor.test.title"),message:t})},check(){this.isLoading=!0,this.thumbnailProcessorTest.getUrl(this.pluginSalesChannelId).then(t=>{if(t.url){this.isSuccessful=!0;let s=this,e=document.createElement("img"),r=document.querySelector("#testimage-container"),i=r.querySelector("img"),n=document.querySelector("#test-result");if(e.src=t.url,e.width=200,e.height=200,e.onload=function(){e.naturalWidth!==200&&s.showError(s.$tc("thumbnail-processor.test.error.noResize"),t.url,n)},e.onerror=function(){i.height=0,i.width=0,s.showError(s.$tc("thumbnail-processor.test.error.general"),t.url,n)},i){i.replaceWith(e);return}r.appendChild(e)}else this.showError(this.$tc("thumbnail-processor.test.error.general"));setTimeout(()=>{this.isLoading=!1},2500)})},systemConfigSaveAll(){this.isLoading=!0;let t=this.getParentComponent();if(!t)throw this.isLoading=!1,"Can not get systemConfig";t.saveAll().then(()=>{this.check(),this.isLoading=!1})},getParentComponent(t=this){return typeof t.actualConfigData<"u"?t:t.$parent?this.getParentComponent(t.$parent):null}}});var l=Shopware.Classes.ApiService,{Application:h}=Shopware,o=class extends l{constructor(s,e,r="thumbnail-processor-test"){super(s,e,r)}getUrl(s){let e=this.getBasicHeaders({});return this.httpClient.post(`_action/${this.getApiBasePath()}/get-sample-image`,{salesChannelId:s},{headers:e}).then(r=>l.handleResponse(r))}};h.addServiceProvider("thumbnailProcessorTest",t=>{let s=h.getContainer("init");return new o(s.httpClient,t.loginService)});})();

src/Resources/store/de.md

Lines changed: 0 additions & 38 deletions
This file was deleted.

src/Resources/store/en.md

Lines changed: 0 additions & 36 deletions
This file was deleted.

src/Resources/store/icon.png

-9.91 KB
Binary file not shown.

src/Resources/store/images/0.jpg

-34.5 KB
Binary file not shown.

src/Resources/store/images/1.jpg

-73.4 KB
Binary file not shown.

tests/TestBootstraper.php

Lines changed: 0 additions & 46 deletions
This file was deleted.

0 commit comments

Comments
 (0)