Skip to content

Commit

Permalink
Refactor plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
staniel359 committed Nov 30, 2021
1 parent 0b98a23 commit 15ab1b1
Show file tree
Hide file tree
Showing 108 changed files with 125 additions and 122 deletions.
2 changes: 1 addition & 1 deletion src/components/layout/TheBrowserTabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<script>
import { mapState } from 'vuex'
import { ipcRenderer } from 'electron'
import local from '#/plugins/local'
import local from '&/local'
import BrowserTab from './TheBrowserTabs/BrowserTab.vue'
import BaseButton from '@/BaseButton.vue'
import { generateKey } from '#/utils'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</template>

<script>
import local from '#/plugins/local'
import local from '&/local'
import BaseButton from '@/BaseButton.vue'
export default {
Expand Down
4 changes: 2 additions & 2 deletions src/components/layout/observers/TheLocalObserver.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<script>
import { mapActions } from 'vuex'
import { ipcRenderer } from 'electron'
import i18n from '*/i18n'
import local from '#/plugins/local'
import i18n from '&/i18n'
import local from '&/local'
export default {
name: 'TheLocalObserver',
Expand Down
2 changes: 1 addition & 1 deletion src/components/layout/observers/TheStoreObserver.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<script>
import { mapActions } from 'vuex'
import { ipcRenderer } from 'electron'
import i18n from '*/i18n'
import i18n from '&/i18n'
export default {
name: 'TheStoreObserver',
Expand Down
2 changes: 1 addition & 1 deletion src/components/layout/savers/TheLocalSaver.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<script>
import { ipcRenderer } from 'electron'
import local from '#/plugins/local'
import local from '&/local'
export default {
name: 'TheLocalSaver',
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/actions.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ipcRenderer } from 'electron'
import store from '*/store'
import store from '&/store'

export const updateStore = data => {
return ipcRenderer.invoke(
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/actions/api/album/fetchData.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import axios from 'axios'
import store from '*/store'
import store from '&/store'
import formatRequestUrl from './formatters/requestUrl'

export default function ({
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/actions/api/artist/fetchData.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import axios from 'axios'
import store from '*/store'
import store from '&/store'
import formatRequestUrl from './formatters/requestUrl'

export default function ({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import axios from 'axios'
import store from '*/store'
import store from '&/store'
import { updateStore } from '#/actions'

export default function ({ token }) {
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/actions/api/lastfm/scrobbler/play/postData.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import axios from 'axios'
import store from '*/store'
import store from '&/store'

export default function ({ title, artistName, albumTitle, duration }) {
const profileId =
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/actions/api/lastfm/scrobbler/save/postData.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import axios from 'axios'
import store from '*/store'
import store from '&/store'

export default function ({ title, artistName, albumTitle, duration }) {
const profileId =
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/actions/api/lastfm/user/fetchData.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import axios from 'axios'
import store from '*/store'
import store from '&/store'

export default function () {
this.error = null
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/actions/api/player/search/fetchData.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import axios from 'axios'
import store from '*/store'
import store from '&/store'
import { collection as formatCollection } from '#/formatters'
import { updateStore } from '#/actions'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import axios from 'axios'
import store from '*/store'
import store from '&/store'

export default function ({ albumTitle, artistName, imageUrl }) {
this.isLoading = true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import axios from 'axios'
import store from '*/store'
import store from '&/store'

export default function ({ artistName }) {
this.isLoading = true
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/actions/api/profile/bookmarks/fetchData.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import axios from 'axios'
import store from '*/store'
import store from '&/store'

export default function ({ scope = '', page, limit }) {
this.isLoading = true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import axios from 'axios'
import store from '*/store'
import store from '&/store'

export default function ({ model, bookmarkId }) {
this.isLoading = true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import axios from 'axios'
import store from '*/store'
import store from '&/store'

export default function ({ trackTitle, artistName, albumTitle, imageUrl }) {
this.isLoading = true
Expand Down
4 changes: 2 additions & 2 deletions src/helpers/actions/api/profile/edit/fetchData.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import axios from 'axios'
import { camelCase } from 'camel-case'
import store from '*/store'
import i18n from '*/i18n'
import store from '&/store'
import i18n from '&/i18n'
import { updateStore } from '#/actions'
import { addFormFieldError } from '#/actions/plugins/semantic'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import axios from 'axios'
import store from '*/store'
import store from '&/store'

export default function ({ albumTitle, artistName, imageUrl }) {
this.isLoading = true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import axios from 'axios'
import store from '*/store'
import store from '&/store'

export default function ({ artistName }) {
this.isLoading = true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import axios from 'axios'
import store from '*/store'
import store from '&/store'

export default function ({ model, favoriteId }) {
this.isLoading = true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import axios from 'axios'
import store from '*/store'
import store from '&/store'

export default function ({ trackTitle, artistName, albumTitle, imageUrl }) {
this.isLoading = true
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/actions/api/profile/library/albums/postData.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import axios from 'axios'
import store from '*/store'
import store from '&/store'

export default function ({ albumTitle, artistName, albumTracks, imageUrl }) {
this.isLoading = true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import axios from 'axios'
import store from '*/store'
import store from '&/store'

export default function ({ artistName }) {
this.isLoading = true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import axios from 'axios'
import store from '*/store'
import store from '&/store'

export default function ({ model, modelId }) {
this.isLoading = true
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/actions/api/profile/library/tracks/postData.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import axios from 'axios'
import store from '*/store'
import store from '&/store'

export default function ({
trackTitle,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import axios from 'axios'
import store from '*/store'
import store from '&/store'

export default function ({ albumTitle, artistName, imageUrl }) {
this.isLoading = true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import axios from 'axios'
import store from '*/store'
import store from '&/store'

export default function ({ artistName }) {
this.isLoading = true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import axios from 'axios'
import store from '*/store'
import store from '&/store'

export default function ({ model, listenedId }) {
this.isLoading = true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import axios from 'axios'
import store from '*/store'
import store from '&/store'

export default function ({ trackTitle, artistName }) {
this.isLoading = true
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/actions/api/profile/login/fetchData.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import axios from 'axios'
import i18n from '*/i18n'
import i18n from '&/i18n'
import { updateStore } from '#/actions'
import { addFormFieldError } from '#/actions/plugins/semantic'
import fetchProfileData from '../fetchData'
Expand Down
4 changes: 2 additions & 2 deletions src/helpers/actions/api/profile/playlists/create/fetchData.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import axios from 'axios'
import { camelCase } from 'camel-case'
import i18n from '*/i18n'
import store from '*/store'
import i18n from '&/i18n'
import store from '&/store'
import { addFormFieldError } from '#/actions/plugins/semantic'

export default function ({ title, image }) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import axios from 'axios'
import store from '*/store'
import store from '&/store'

export default function ({ playlistId }) {
this.isLoading = true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import axios from 'axios'
import { camelCase } from 'camel-case'
import i18n from '*/i18n'
import store from '*/store'
import i18n from '&/i18n'
import store from '&/store'
import { addFormFieldError } from '#/actions/plugins/semantic'

export default function ({ playlistId, title, image }) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import axios from 'axios'
import store from '*/store'
import store from '&/store'

export default function ({ playlistId, playlistTrackId }) {
this.isLoading = true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import axios from 'axios'
import store from '*/store'
import store from '&/store'

export default function ({
playlistId,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import axios from 'axios'
import store from '*/store'
import store from '&/store'

export default function ({
playlistId,
Expand Down
4 changes: 2 additions & 2 deletions src/helpers/actions/api/profile/signup/fetchData.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import axios from 'axios'
import { camelCase } from 'camel-case'
import i18n from '*/i18n'
import local from '#/plugins/local'
import i18n from '&/i18n'
import local from '&/local'
import { addFormFieldError } from '#/actions/plugins/semantic'
import fetchProfileData from '../fetchData'

Expand Down
2 changes: 1 addition & 1 deletion src/helpers/actions/api/recommendation/deleteData.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import axios from 'axios'
import store from '*/store'
import store from '&/store'

export default function ({ recommendationId }) {
this.isLoading = true
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/actions/api/recommendation/fetchData.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import axios from 'axios'
import store from '*/store'
import store from '&/store'

export default function ({
recommendationId,
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/actions/api/recommendations/fetchData.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import axios from 'axios'
import store from '*/store'
import store from '&/store'

export default function ({ page, limit, filter, filterValue }) {
this.isLoading = true
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/actions/api/search/fetchData.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import axios from 'axios'
import store from '*/store'
import store from '&/store'

export default function ({
sourceId = 'lastfm',
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/actions/api/tag/fetchData.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import axios from 'axios'
import store from '*/store'
import store from '&/store'

export default function ({ tagName, scope = '', page, limit }) {
this.isLoading = true
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/actions/api/top/fetchData.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import axios from 'axios'
import store from '*/store'
import store from '&/store'

export default function ({ scope, page, limit }) {
this.isLoading = true
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/actions/api/track/fetchData.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import axios from 'axios'
import store from '*/store'
import store from '&/store'
import formatRequestUrl from './formatters/requestUrl'

export default function ({
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/actions/audio/track/fetchData.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import store from '*/store'
import store from '&/store'
import fetchSearchData from '#/actions/api/player/search/fetchData'
import fetchVariantData from '#/actions/audio/variant/fetchData'
import fetchAudioData from '#/actions/api/audio/fetchData'
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/actions/audio/variant/fetchData.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import store from '*/store'
import store from '&/store'
import fetchBandcampIdData from './id/bandcamp/fetchData'
import fetchAudioData from '#/actions/api/audio/fetchData'
import { updateStore } from '#/actions'
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/actions/layout.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import store from '*/store'
import store from '&/store'
import {
setDimmer,
toggleDimmer,
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/actions/plugins/local/history.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import local from '#/plugins/local'
import local from '&/local'
import { getDistinctArray } from '#/utils'

export const get = (key, { isDistinct }) => {
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/actions/plugins/semantic.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import store from '*/store'
import store from '&/store'

// Dimmer

Expand Down
2 changes: 1 addition & 1 deletion src/helpers/actions/queue/track/fetchData.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import store from '*/store'
import store from '&/store'
import fetchTrackAudioData from '#/actions/audio/track/fetchData'
import { updateStore } from '#/actions'

Expand Down
2 changes: 1 addition & 1 deletion src/helpers/data/errors.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import i18n from '*/i18n'
import i18n from '&/i18n'

const redCloseCornerIcon =
'red bottom right corner close'
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/helpers/data/plugins/semantic.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import store from '*/store'
import i18n from '*/i18n'
import store from '&/store'
import i18n from '&/i18n'

export const mainModalOptions = ({ onShow, onVisible } = {}) => {
return {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 15ab1b1

Please sign in to comment.