* origin/develop: (475 commits) Apply 1 suggestion(s) to 1 file(s) Update dependency @ungap/event-target to v0.2.3 Update package.json fix broken icons after FA upgrade Update Font Awesome Update dependency webpack-dev-middleware to v3.7.3 Update dependency vuelidate to v0.7.7 Pin dependency @kazvmoe-infra/pinch-zoom-element to 1.2.0 lint Make media modal buttons larger Add English translation for hide tooltip Add hide button to media modal Lint Prevent hiding media viewer if swiped over SwipeClick Fix webkit image blurs Fix video in media modal not displaying properly Add changelog for https://git.pleroma.social/pleroma/pleroma-fe/-/merge_requests/1403 Remove image box-shadow in media modal Clean up debug code for image pinch zoom Bump @kazvmoe-infra/pinch-zoom-element to 1.2.0 on npm ...
69 lines
1.5 KiB
Vue
69 lines
1.5 KiB
Vue
<template>
|
|
<div
|
|
class="font-control style-control"
|
|
:class="{ custom: isCustom }"
|
|
>
|
|
<label
|
|
:for="preset === 'custom' ? name : name + '-font-switcher'"
|
|
class="label"
|
|
>
|
|
{{ label }}
|
|
</label>
|
|
<input
|
|
v-if="typeof fallback !== 'undefined'"
|
|
:id="name + '-o'"
|
|
class="opt exlcude-disabled"
|
|
type="checkbox"
|
|
:checked="present"
|
|
@input="$emit('update:modelValue', typeof value === 'undefined' ? fallback : undefined)"
|
|
>
|
|
<label
|
|
v-if="typeof fallback !== 'undefined'"
|
|
class="opt-l"
|
|
:for="name + '-o'"
|
|
/>
|
|
<Select
|
|
:id="name + '-font-switcher'"
|
|
v-model="preset"
|
|
:disabled="!present"
|
|
class="font-switcher"
|
|
>
|
|
<option
|
|
v-for="option in availableOptions"
|
|
:key="option"
|
|
:value="option"
|
|
>
|
|
{{ option === 'custom' ? $t('settings.style.fonts.custom') : option }}
|
|
</option>
|
|
</Select>
|
|
<input
|
|
v-if="isCustom"
|
|
:id="name"
|
|
v-model="family"
|
|
class="custom-font"
|
|
type="text"
|
|
>
|
|
</div>
|
|
</template>
|
|
|
|
<script src="./font_control.js" ></script>
|
|
|
|
<style lang="scss">
|
|
@import '../../_variables.scss';
|
|
.font-control {
|
|
input.custom-font {
|
|
min-width: 10em;
|
|
}
|
|
&.custom {
|
|
/* TODO Should make proper joiners... */
|
|
.font-switcher {
|
|
border-top-right-radius: 0;
|
|
border-bottom-right-radius: 0;
|
|
}
|
|
.custom-font {
|
|
border-top-left-radius: 0;
|
|
border-bottom-left-radius: 0;
|
|
}
|
|
}
|
|
}
|
|
</style>
|