Skip to content

Commit

Permalink
Feature/remove js (#10480)
Browse files Browse the repository at this point in the history
* Cleanup js

* Fix duplicate loading of backstretch

* Fix subtitle search
  • Loading branch information
p0psicles authored Apr 7, 2022
1 parent 88ca4ef commit 0c9eddd
Show file tree
Hide file tree
Showing 81 changed files with 38 additions and 5,906 deletions.
5 changes: 5 additions & 0 deletions themes-default/slim/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ import { App } from './components';
Vue.config.devtools = true;
Vue.config.performance = true;

if (document.body.getAttribute('developer') === 'True') {
Vue.config.devtools = true;
Vue.config.performance = true;
}

registerPlugins();

// @TODO: Remove this before v1.0.0
Expand Down
18 changes: 11 additions & 7 deletions themes-default/slim/src/components/backstretch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ export default {
},
data() {
return {
created: false
created: false,
wrapper: null
};
},
computed: {
Expand Down Expand Up @@ -53,21 +54,24 @@ export default {
$wrap.css('top', offset);
$wrap.css('opacity', opacity).fadeIn(500);
this.created = true;
this.wrapper = $wrap;
}
},
removeBackStretch() {
if (this.created) {
$.backstretch('destroy');
this.created = false;
}
}
},
destroyed() {
if (this.created) {
$.backstretch('destroy');
}
this.removeBackStretch();
},
activated() {
this.setBackStretch();
},
deactivated() {
if (this.created) {
$.backstretch('destroy');
}
this.removeBackStretch();
},
watch: {
opacity(newOpacity) {
Expand Down
1 change: 1 addition & 0 deletions themes-default/slim/src/components/display-show.vue
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@

<script>
import debounce from 'lodash/debounce';
import Vue from 'vue';
import { mapState, mapGetters, mapActions } from 'vuex';
import { AppLink, PlotInfo, SceneNumberInput, SceneNumberAnimeInput } from './helpers';
import { humanFileSize } from '../utils/core';
Expand Down
5 changes: 1 addition & 4 deletions themes-default/slim/src/components/schedule/calendar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,17 @@
</ul>
</div>
</div>
<backstretch :slug="general.randomShowSlug" />
</div>
</template>
<script>
import { mapGetters, mapState } from 'vuex';
import { AppLink, Asset } from '../helpers';
import Backstretch from '../backstretch.vue';
export default {
name: 'calendar',
components: {
AppLink,
Asset,
Backstretch
Asset
},
computed: {
...mapState({
Expand Down
3 changes: 2 additions & 1 deletion themes-default/slim/src/components/subtitle-search.vue
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ export default {
},
computed: {
...mapState({
general: state => state.config.general
general: state => state.config.general,
client: state => state.auth.client
}),
...mapGetters({
getLastReleaseName: 'getLastReleaseName'
Expand Down
37 changes: 0 additions & 37 deletions themes-default/slim/static/js/add-show-options.js

This file was deleted.

43 changes: 0 additions & 43 deletions themes-default/slim/static/js/blackwhite.js

This file was deleted.

157 changes: 0 additions & 157 deletions themes-default/slim/static/js/common/init.js

This file was deleted.

60 changes: 0 additions & 60 deletions themes-default/slim/static/js/config/init.js

This file was deleted.

Loading

0 comments on commit 0c9eddd

Please sign in to comment.