141 lines
6.5 KiB
Vue
141 lines
6.5 KiB
Vue
<template>
|
|
<b-tab :title="langTabTitle" active>
|
|
<b-form-group>
|
|
<div class="form-row mb-3">
|
|
<b-wrapped-form-group class="col-md-6" id="edit_form_name" :field="form.name">
|
|
<template #label>
|
|
{{ $gettext('Mount Point URL') }}
|
|
</template>
|
|
<template #description>
|
|
{{
|
|
$gettext('This name should always begin with a slash (/), and must be a valid URL, such as /autodj.mp3')
|
|
}}
|
|
</template>
|
|
</b-wrapped-form-group>
|
|
|
|
<b-wrapped-form-group class="col-md-6" id="edit_form_display_name" :field="form.display_name">
|
|
<template #label>
|
|
{{ $gettext('Display Name') }}
|
|
</template>
|
|
<template #description>
|
|
{{
|
|
$gettext('The display name assigned to this mount point when viewing it on administrative or public pages. Leave blank to automatically generate one.')
|
|
}}
|
|
</template>
|
|
</b-wrapped-form-group>
|
|
|
|
<b-wrapped-form-checkbox class="col-md-6" id="edit_form_is_visible_on_public_pages"
|
|
:field="form.is_visible_on_public_pages">
|
|
<template #label>
|
|
{{ $gettext('Show on Public Pages') }}
|
|
</template>
|
|
<template #description>
|
|
{{
|
|
$gettext('Enable to allow listeners to select this mount point on this station\'s public pages.')
|
|
}}
|
|
</template>
|
|
</b-wrapped-form-checkbox>
|
|
|
|
<b-wrapped-form-checkbox class="col-md-6" id="edit_form_is_default" :field="form.is_default">
|
|
<template #label>
|
|
{{ $gettext('Set as Default Mount Point') }}
|
|
</template>
|
|
<template #description>
|
|
{{
|
|
$gettext('If this mount is the default, it will be played on the radio preview and the public radio page in this system.')
|
|
}}
|
|
</template>
|
|
</b-wrapped-form-checkbox>
|
|
|
|
<b-wrapped-form-group class="col-md-6" id="edit_form_relay_url" :field="form.relay_url">
|
|
<template #label>
|
|
{{ $gettext('Relay Stream URL') }}
|
|
</template>
|
|
<template #description>
|
|
{{
|
|
$gettext('Enter the full URL of another stream to relay its broadcast through this mount point.')
|
|
}}
|
|
</template>
|
|
</b-wrapped-form-group>
|
|
|
|
<b-wrapped-form-checkbox class="col-md-6" id="edit_form_is_public" :field="form.is_public">
|
|
<template #label>
|
|
{{ $gettext('Publish to "Yellow Pages" Directories') }}
|
|
</template>
|
|
<template #description>
|
|
{{
|
|
$gettext('Enable to advertise this mount point on "Yellow Pages" public radio directories.')
|
|
}}
|
|
</template>
|
|
</b-wrapped-form-checkbox>
|
|
|
|
<b-wrapped-form-group class="col-md-6" id="edit_form_max_listener_duration"
|
|
:field="form.max_listener_duration" input-type="number"
|
|
:input-attrs="{min: '0', max: '2147483647'}">
|
|
<template #label>
|
|
{{ $gettext('Max Listener Duration') }}
|
|
</template>
|
|
<template #description>
|
|
{{
|
|
$gettext('Set the length of time (seconds) a listener will stay connected to the stream. If set to 0, listeners can stay connected infinitely.')
|
|
}}
|
|
</template>
|
|
</b-wrapped-form-group>
|
|
|
|
<template v-if="isShoutcast">
|
|
<b-wrapped-form-group class="col-md-6" id="edit_form_authhash" :field="form.authhash">
|
|
<template #label>
|
|
{{ $gettext('YP Directory Authorization Hash') }}
|
|
</template>
|
|
<template #description><span v-html="langAuthhashDesc"></span></template>
|
|
</b-wrapped-form-group>
|
|
</template>
|
|
<template v-if="isIcecast">
|
|
<b-wrapped-form-group class="col-md-6" id="edit_form_fallback_mount" :field="form.fallback_mount">
|
|
<template #label>
|
|
{{ $gettext('Fallback Mount') }}
|
|
</template>
|
|
<template #description>
|
|
{{
|
|
$gettext('If this mount point is not playing audio, listeners will automatically be redirected to this mount point. The default is /error.mp3, a repeating error message.')
|
|
}}
|
|
</template>
|
|
</b-wrapped-form-group>
|
|
</template>
|
|
</div>
|
|
</b-form-group>
|
|
</b-tab>
|
|
</template>
|
|
|
|
<script>
|
|
import {FRONTEND_ICECAST, FRONTEND_SHOUTCAST} from '~/components/Entity/RadioAdapters';
|
|
import BWrappedFormGroup from "~/components/Form/BWrappedFormGroup";
|
|
import BWrappedFormCheckbox from "~/components/Form/BWrappedFormCheckbox";
|
|
|
|
export default {
|
|
name: 'MountFormBasicInfo',
|
|
components: {BWrappedFormCheckbox, BWrappedFormGroup},
|
|
props: {
|
|
form: Object,
|
|
stationFrontendType: String
|
|
},
|
|
computed: {
|
|
langTabTitle() {
|
|
return this.$gettext('Basic Info');
|
|
},
|
|
langAuthhashDesc() {
|
|
let text = 'If your stream is set to advertise to YP directories above, you must specify an authorization hash. You can manage authhashes <a href="%{ url }" target="_blank">on the Shoutcast web site</a>.';
|
|
let url = 'https://radiomanager.shoutcast.com/';
|
|
|
|
return this.$gettextInterpolate(this.$gettext(text), {url: url});
|
|
},
|
|
isIcecast () {
|
|
return FRONTEND_ICECAST === this.stationFrontendType;
|
|
},
|
|
isShoutcast () {
|
|
return FRONTEND_SHOUTCAST === this.stationFrontendType;
|
|
}
|
|
}
|
|
};
|
|
</script>
|