feat(front): Update instance switcher buttons

This commit is contained in:
Ciarán Ainsworth 2023-11-12 17:31:33 +01:00
parent 1cca30a775
commit d0e1cb7c4a
No known key found for this signature in database
1 changed files with 10 additions and 6 deletions

View File

@ -9,6 +9,8 @@ import axios from 'axios'
import SemanticModal from '~/components/semantic/Modal.vue' import SemanticModal from '~/components/semantic/Modal.vue'
import { FwButton } from '@funkwhale/ui'
interface Events { interface Events {
(e: 'update:show', show: boolean): void (e: 'update:show', show: boolean): void
} }
@ -122,12 +124,13 @@ const checkAndSwitch = async (url: string) => {
type="text" type="text"
placeholder="https://funkwhale.server" placeholder="https://funkwhale.server"
> >
<button <fw-button
color="secondary"
type="submit" type="submit"
:class="['ui', 'icon', {loading: isLoading}, 'button']" :is-loading="isLoading"
> >
{{ $t('components.SetInstanceModal.button.submit') }} {{ $t('components.SetInstanceModal.button.submit') }}
</button> </fw-button>
</div> </div>
</div> </div>
</form> </form>
@ -140,14 +143,15 @@ const checkAndSwitch = async (url: string) => {
<h4> <h4>
{{ $t('components.SetInstanceModal.header.suggestions') }} {{ $t('components.SetInstanceModal.header.suggestions') }}
</h4> </h4>
<button <fw-button
v-for="(url, key) in suggestedInstances" v-for="(url, key) in suggestedInstances"
:key="key" :key="key"
class="ui basic button" outline
color="secondary"
@click="checkAndSwitch(url)" @click="checkAndSwitch(url)"
> >
{{ url }} {{ url }}
</button> </fw-button>
</div> </div>
</form> </form>
</div> </div>