Skip to content

Commit 42b9716

Browse files
author
GitHub Actions Bot
committed
chore: Build release
1 parent a47053c commit 42b9716

File tree

11 files changed

+31
-156
lines changed

11 files changed

+31
-156
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.

.gitignore

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

.shopware-extension.yml

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

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: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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:u}=Shopware;u.register("frosh-thumbnail-processor-info-texts",{template:a});var l=`<div>
23+
<sw-button-process
24+
:isLoading="isLoading"
25+
:processSuccess="isSuccessful"
26+
@process-finish="finish"
27+
@click="saveAndCheck"
28+
>{{ btnLabel }}</sw-button-process>
29+
</div>
30+
`;var{Component:d,Mixin:f}=Shopware;d.register("thumbnailprocessor-test",{template:l,props:["btnLabel"],inject:["thumbnailProcessorTest"],mixins:[f.getByName("notification")],data(){return{isLoading:!1,isSuccessful:!1}},computed:{pluginSalesChannelId(){let e=this.$parent;for(let t=0;t<20;t++){if(typeof e.currentSalesChannelId<"u")return e.currentSalesChannelId;e=e.$parent}throw"Can not get pluginConfigData"}},methods:{finish(){this.isSuccessful=!1},showError(e,t){this.isSuccessful=!1,t&&(e+=" sample url: "+t),this.createNotificationError({title:this.$tc("thumbnail-processor.test.title"),message:e})},saveAndCheck(){this.isLoading=!0,this.systemConfigSaveAll()},check(){let e=this;e.thumbnailProcessorTest.getUrl(this.pluginSalesChannelId).then(t=>{if(t.url){e.isSuccessful=!0;let s=document.createElement("img");s.width=200,s.height=200,s.onload=function(){s.naturalWidth!==200&&e.showError(e.$tc("thumbnail-processor.test.error.noResize"),t.url)},s.onerror=function(){e.showError(e.$tc("thumbnail-processor.test.error.general"),t.url)},s.src=t.url;let r=document.querySelector('[name="FroshPlatformThumbnailProcessor.config.test"]'),n=r.querySelector(".frosh-thumbnail-processor-testimage img");if(n)n.replaceWith(s);else{let i=document.createElement("p");i.classList.add("frosh-thumbnail-processor-testimage"),i.appendChild(s),r.appendChild(i)}}else e.showError(e.$tc("thumbnail-processor.test.error.general"));setTimeout(()=>{this.isLoading=!1},2500)})},systemConfigSaveAll(){let e=this,t=this.$parent;for(let s=0;s<30;s++){if(typeof t.$refs.systemConfig<"u")return t.$refs.systemConfig.saveAll().then(()=>{e.check()});t=t.$parent}throw"Can not get systemConfig"}}});var c=Shopware.Classes.ApiService,{Application:h}=Shopware,o=class extends c{constructor(t,s,r="thumbnail-processor-test"){super(t,s,r)}getUrl(t){let s=this.getBasicHeaders({});return this.httpClient.post(`_action/${this.getApiBasePath()}/get-sample-image`,{salesChannelId:t},{headers:s}).then(r=>c.handleResponse(r))}};h.addServiceProvider("thumbnailProcessorTest",e=>{let t=h.getContainer("init");return new o(t.httpClient,e.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.

0 commit comments

Comments
 (0)