fix(ui): [WIP] replace buttons
This commit is contained in:
parent
316908fe61
commit
f3a7be03ed
|
@ -72,14 +72,14 @@ const move = (idx: number, increment: number) => {
|
||||||
:class="[{active: !isPreviewing}, 'item']"
|
:class="[{active: !isPreviewing}, 'item']"
|
||||||
@click.stop.prevent="isPreviewing = false"
|
@click.stop.prevent="isPreviewing = false"
|
||||||
>
|
>
|
||||||
{{ t('components.admin.SignupFormBuilder.Button.edit') }}
|
{{ t('components.admin.SignupFormBuilder.button.edit') }}
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
color="primary"
|
color="primary"
|
||||||
:class="[{active: isPreviewing}, 'item']"
|
:class="[{active: isPreviewing}, 'item']"
|
||||||
@click.stop.prevent="isPreviewing = true"
|
@click.stop.prevent="isPreviewing = true"
|
||||||
>
|
>
|
||||||
{{ t('components.admin.SignupFormBuilder.Button.preview') }}
|
{{ t('components.admin.SignupFormBuilder.button.preview') }}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
|
|
|
@ -7,6 +7,8 @@ import { computedEager } from '@vueuse/core'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
import { uniq } from 'lodash-es'
|
import { uniq } from 'lodash-es'
|
||||||
|
|
||||||
|
import Button from '~/components/ui/Button.vue'
|
||||||
|
|
||||||
import useScopes from '~/composables/auth/useScopes'
|
import useScopes from '~/composables/auth/useScopes'
|
||||||
|
|
||||||
interface Events {
|
interface Events {
|
||||||
|
@ -198,8 +200,8 @@ const allScopes = computed(() => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button
|
<Button
|
||||||
:class="['ui', {'loading': isLoading}, 'success', 'button']"
|
:is-loading="isLoading"
|
||||||
type="submit"
|
type="submit"
|
||||||
>
|
>
|
||||||
<span v-if="app !== null">
|
<span v-if="app !== null">
|
||||||
|
@ -208,6 +210,6 @@ const allScopes = computed(() => {
|
||||||
<span v-else>
|
<span v-else>
|
||||||
{{ t('components.auth.ApplicationForm.button.create') }}
|
{{ t('components.auth.ApplicationForm.button.create') }}
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</Button>
|
||||||
</form>
|
</form>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -16,6 +16,7 @@ import useLogger from '~/composables/useLogger'
|
||||||
import SubsonicTokenForm from '~/components/auth/SubsonicTokenForm.vue'
|
import SubsonicTokenForm from '~/components/auth/SubsonicTokenForm.vue'
|
||||||
import AttachmentInput from '~/components/common/AttachmentInput.vue'
|
import AttachmentInput from '~/components/common/AttachmentInput.vue'
|
||||||
import PasswordInput from '~/components/forms/PasswordInput.vue'
|
import PasswordInput from '~/components/forms/PasswordInput.vue'
|
||||||
|
import Button from '~/components/ui/Button.vue'
|
||||||
|
|
||||||
const SETTINGS_ORDER: FieldId[] = ['summary', 'privacy_level']
|
const SETTINGS_ORDER: FieldId[] = ['summary', 'privacy_level']
|
||||||
|
|
||||||
|
@ -336,12 +337,12 @@ fetchOwnedApps()
|
||||||
:field-id="f.id"
|
:field-id="f.id"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<button
|
<Button
|
||||||
:class="['ui', { loading: isLoading }, 'button']"
|
is-loading="true"
|
||||||
type="submit"
|
type="submit"
|
||||||
>
|
>
|
||||||
{{ t('components.auth.Settings.button.updateSettings') }}
|
{{ t('components.auth.Settings.button.updateSettings') }}
|
||||||
</button>
|
</Button>
|
||||||
</form>
|
</form>
|
||||||
</section>
|
</section>
|
||||||
<section class="ui text container">
|
<section class="ui text container">
|
||||||
|
@ -471,13 +472,12 @@ fetchOwnedApps()
|
||||||
{{ t('components.auth.Settings.description.contentFilters') }}
|
{{ t('components.auth.Settings.description.contentFilters') }}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<button
|
<Button
|
||||||
class="ui icon button"
|
icon="bi-arrow-clockwise"
|
||||||
@click="store.dispatch('moderation/fetchContentFilters')"
|
@click="store.dispatch('moderation/fetchContentFilters')"
|
||||||
>
|
>
|
||||||
<i class="refresh icon" />
|
|
||||||
{{ t('components.auth.Settings.button.refresh') }}
|
{{ t('components.auth.Settings.button.refresh') }}
|
||||||
</button>
|
</Button>
|
||||||
<h3 class="ui header">
|
<h3 class="ui header">
|
||||||
{{ t('components.auth.Settings.header.hiddenArtists') }}
|
{{ t('components.auth.Settings.header.hiddenArtists') }}
|
||||||
</h3>
|
</h3>
|
||||||
|
@ -507,12 +507,11 @@ fetchOwnedApps()
|
||||||
<human-date :date="filter.creation_date" />
|
<human-date :date="filter.creation_date" />
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<button
|
<Button
|
||||||
class="ui basic tiny button"
|
|
||||||
@click="store.dispatch('moderation/deleteContentFilter', filter.uuid)"
|
@click="store.dispatch('moderation/deleteContentFilter', filter.uuid)"
|
||||||
>
|
>
|
||||||
{{ t('components.auth.Settings.button.delete') }}
|
{{ t('components.auth.Settings.button.delete') }}
|
||||||
</button>
|
</Button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -532,13 +531,13 @@ fetchOwnedApps()
|
||||||
<p>
|
<p>
|
||||||
{{ t('components.auth.Settings.description.authorizedApps') }}
|
{{ t('components.auth.Settings.description.authorizedApps') }}
|
||||||
</p>
|
</p>
|
||||||
<button
|
<Button
|
||||||
:class="['ui', 'icon', { loading: isLoadingApps }, 'button']"
|
icon="bi-arrow-clockwise"
|
||||||
|
:is-loading="isLoadingApps"
|
||||||
@click="fetchApps()"
|
@click="fetchApps()"
|
||||||
>
|
>
|
||||||
<i class="refresh icon" />
|
|
||||||
{{ t('components.auth.Settings.button.refresh') }}
|
{{ t('components.auth.Settings.button.refresh') }}
|
||||||
</button>
|
</Button>
|
||||||
<table
|
<table
|
||||||
v-if="apps.length > 0"
|
v-if="apps.length > 0"
|
||||||
class="ui compact very basic unstackable table"
|
class="ui compact very basic unstackable table"
|
||||||
|
@ -659,8 +658,10 @@ fetchOwnedApps()
|
||||||
>
|
>
|
||||||
{{ t('components.auth.Settings.button.edit') }}
|
{{ t('components.auth.Settings.button.edit') }}
|
||||||
</router-link>
|
</router-link>
|
||||||
<dangerous-button
|
<Button
|
||||||
:class="['ui', 'tiny', 'danger', { loading: isDeleting.has(app.client_id) }, 'button']"
|
color="destructive"
|
||||||
|
:is-loading="isDeleting.has(app.client_id)"
|
||||||
|
class="tiny"
|
||||||
@confirm="deleteApp(app.client_id)"
|
@confirm="deleteApp(app.client_id)"
|
||||||
>
|
>
|
||||||
{{ t('components.auth.Settings.button.remove') }}
|
{{ t('components.auth.Settings.button.remove') }}
|
||||||
|
@ -679,7 +680,7 @@ fetchOwnedApps()
|
||||||
{{ t('components.auth.Settings.button.removeApp') }}
|
{{ t('components.auth.Settings.button.removeApp') }}
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</dangerous-button>
|
</Button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -765,12 +766,11 @@ fetchOwnedApps()
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<button
|
<Button
|
||||||
type="submit"
|
type="submit"
|
||||||
class="ui button"
|
|
||||||
>
|
>
|
||||||
{{ t('components.auth.Settings.button.update') }}
|
{{ t('components.auth.Settings.button.update') }}
|
||||||
</button>
|
</Button>
|
||||||
</form>
|
</form>
|
||||||
</section>
|
</section>
|
||||||
<section class="ui text container">
|
<section class="ui text container">
|
||||||
|
|
|
@ -7,6 +7,7 @@ import { useStore } from '~/store'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
|
|
||||||
import PasswordInput from '~/components/forms/PasswordInput.vue'
|
import PasswordInput from '~/components/forms/PasswordInput.vue'
|
||||||
|
import Button from '~/components/ui/Button.vue'
|
||||||
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
const store = useStore()
|
const store = useStore()
|
||||||
|
@ -147,9 +148,10 @@ fetchToken()
|
||||||
:default-show="showToken"
|
:default-show="showToken"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<dangerous-button
|
<Button
|
||||||
v-if="token"
|
v-if="token"
|
||||||
:class="['ui', {'loading': isLoading}, 'button']"
|
color="destructive"
|
||||||
|
:is-loading="isLoading"
|
||||||
:action="requestNewToken"
|
:action="requestNewToken"
|
||||||
>
|
>
|
||||||
{{ t('components.auth.SubsonicTokenForm.button.newPassword') }}
|
{{ t('components.auth.SubsonicTokenForm.button.newPassword') }}
|
||||||
|
@ -168,18 +170,18 @@ fetchToken()
|
||||||
{{ t('components.auth.SubsonicTokenForm.button.confirmNewPassword') }}
|
{{ t('components.auth.SubsonicTokenForm.button.confirmNewPassword') }}
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</dangerous-button>
|
</Button>
|
||||||
<button
|
<Button
|
||||||
v-else
|
v-else
|
||||||
color=""
|
:is-loading="isLoading"
|
||||||
:class="['ui', {'loading': isLoading}, 'button']"
|
|
||||||
@click="requestNewToken"
|
@click="requestNewToken"
|
||||||
>
|
>
|
||||||
{{ t('components.auth.SubsonicTokenForm.button.confirmNewPassword') }}
|
{{ t('components.auth.SubsonicTokenForm.button.confirmNewPassword') }}
|
||||||
</button>
|
</Button>
|
||||||
<dangerous-button
|
<Button
|
||||||
v-if="token"
|
v-if="token"
|
||||||
:class="['ui', {'loading': isLoading}, 'warning', 'button']"
|
:is-loading="isLoading"
|
||||||
|
color="destructive"
|
||||||
:action="disable"
|
:action="disable"
|
||||||
>
|
>
|
||||||
{{ t('components.auth.SubsonicTokenForm.button.disable') }}
|
{{ t('components.auth.SubsonicTokenForm.button.disable') }}
|
||||||
|
@ -198,7 +200,7 @@ fetchToken()
|
||||||
{{ t('components.auth.SubsonicTokenForm.button.confirmDisable') }}
|
{{ t('components.auth.SubsonicTokenForm.button.confirmDisable') }}
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</dangerous-button>
|
</Button>
|
||||||
</template>
|
</template>
|
||||||
</form>
|
</form>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
import type { Channel } from '~/types'
|
import type { Channel } from '~/types'
|
||||||
import SemanticModal from '~/components/semantic/Modal.vue'
|
import SemanticModal from '~/components/semantic/Modal.vue'
|
||||||
import ChannelAlbumForm from '~/components/channels/AlbumForm.vue'
|
import ChannelAlbumForm from '~/components/channels/AlbumForm.vue'
|
||||||
|
import Button from '~/components/ui/Button.vue'
|
||||||
|
|
||||||
import { watch, ref } from 'vue'
|
import { watch, ref } from 'vue'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
|
|
||||||
|
@ -56,16 +58,16 @@ defineExpose({
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
<button class="ui basic cancel button">
|
<Button color="secondary">
|
||||||
{{ t('components.channels.AlbumModal.button.cancel') }}
|
{{ t('components.channels.AlbumModal.button.cancel') }}
|
||||||
</button>
|
</Button>
|
||||||
<button
|
<Button
|
||||||
:class="['ui', 'primary', {loading: isLoading}, 'button']"
|
:is-loading="isLoading"
|
||||||
:disabled="!submittable"
|
:disabled="!submittable"
|
||||||
@click.stop.prevent="albumForm.submit()"
|
@click.stop.prevent="albumForm.submit()"
|
||||||
>
|
>
|
||||||
{{ t('components.channels.AlbumModal.button.create') }}
|
{{ t('components.channels.AlbumModal.button.create') }}
|
||||||
</button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</semantic-modal>
|
</semantic-modal>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -12,6 +12,7 @@ import axios from 'axios'
|
||||||
import LibraryWidget from '~/components/federation/LibraryWidget.vue'
|
import LibraryWidget from '~/components/federation/LibraryWidget.vue'
|
||||||
import TrackTable from '~/components/audio/track/Table.vue'
|
import TrackTable from '~/components/audio/track/Table.vue'
|
||||||
import AlbumCard from '~/components/album/Card.vue'
|
import AlbumCard from '~/components/album/Card.vue'
|
||||||
|
import Button from '~/components/ui/Button.vue'
|
||||||
|
|
||||||
import useErrorHandler from '~/composables/useErrorHandler'
|
import useErrorHandler from '~/composables/useErrorHandler'
|
||||||
|
|
||||||
|
@ -77,12 +78,12 @@ const loadMoreAlbums = async () => {
|
||||||
>
|
>
|
||||||
{{ t('components.library.ArtistDetail.link.filter') }}
|
{{ t('components.library.ArtistDetail.link.filter') }}
|
||||||
</router-link>
|
</router-link>
|
||||||
<button
|
<Button
|
||||||
class="ui basic tiny button"
|
class="tiny"
|
||||||
@click="store.dispatch('moderation/deleteContentFilter', contentFilter.uuid)"
|
@click="store.dispatch('moderation/deleteContentFilter', contentFilter.uuid)"
|
||||||
>
|
>
|
||||||
{{ t('components.library.ArtistDetail.button.filter') }}
|
{{ t('components.library.ArtistDetail.button.filter') }}
|
||||||
</button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<section
|
<section
|
||||||
|
@ -106,13 +107,13 @@ const loadMoreAlbums = async () => {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui hidden divider" />
|
<div class="ui hidden divider" />
|
||||||
<button
|
<Button
|
||||||
v-if="loadMoreAlbumsUrl !== null"
|
v-if="loadMoreAlbumsUrl !== null"
|
||||||
:class="['ui', {loading: isLoadingMoreAlbums}, 'button']"
|
:is-loading="isLoadingMoreAlbums"
|
||||||
@click="loadMoreAlbums()"
|
@click="loadMoreAlbums()"
|
||||||
>
|
>
|
||||||
{{ t('components.library.ArtistDetail.button.more') }}
|
{{ t('components.library.ArtistDetail.button.more') }}
|
||||||
</button>
|
</Button>
|
||||||
</section>
|
</section>
|
||||||
<section
|
<section
|
||||||
v-if="tracks.length > 0"
|
v-if="tracks.length > 0"
|
||||||
|
|
Loading…
Reference in New Issue