Merge branch 'feat/customize_friendly_instance_button' into 'dev'

allow to customize the button to friendly instances, set new default value to 'friendly instances'

See merge request les/gancio!19
This commit is contained in:
les 2022-11-25 09:00:05 +00:00
commit 4c9fda3415
15 changed files with 43 additions and 2 deletions

View file

@ -11,7 +11,7 @@ v-footer(aria-label='Footer')
v-menu(v-if='settings.enable_trusted_instances && settings.trusted_instances && settings.trusted_instances.length'
offset-y bottom open-on-hover transition="slide-y-transition")
template(v-slot:activator="{ on, attrs }")
v-btn.ml-1(v-bind='attrs' v-on='on' color='primary' text) {{$t('common.places')}}
v-btn.ml-1(v-bind='attrs' v-on='on' color='primary' text) {{ settings.trusted_instances_label || $t('admin.trusted_instances_label_default')}}
v-list(subheaders two-lines)
v-list-item(v-for='instance in settings.trusted_instances'
:key='instance.name'

View file

@ -40,6 +40,13 @@ v-container
@blur='save("instance_place", instance_place)'
)
v-text-field.mt-4(v-model='trusted_instances_label'
:label="$t('admin.trusted_instances_label')"
persistent-hint inset
:hint="$t('admin.trusted_instances_label_help')"
@blur='save("trusted_instances_label", trusted_instances_label)'
)
v-dialog(v-model='dialogAddInstance' width='500px' :fullscreen='$vuetify.breakpoint.xsOnly')
v-card
v-card-title {{$t('admin.add_trusted_instance')}}
@ -82,6 +89,7 @@ export default {
instance_url: '',
instance_name: $store.state.settings.instance_name,
instance_place: $store.state.settings.instance_place,
trusted_instances_label: $store.state.settings.trusted_instances_label,
url2host: $options.filters.url2host,
dialogAddInstance: false,
loading: false,

View file

@ -222,6 +222,9 @@
"instance_name_help": "Nom del compte ActivityPub per a seguir",
"enable_trusted_instances": "Mostra les instàncies amigues",
"trusted_instances_help": "Les instàncies amigues apareixen en la capçalera, a la barra de navegació superior",
"trusted_instances_label": "Etiqueta de navegació a instàncies amigues",
"trusted_instances_label_default": "Instàncies amigables",
"trusted_instances_label_help": "L'etiqueta per defecte és 'Instàncies amigables'",
"add_trusted_instance": "Afegeix una instància amiga",
"instance_place_help": "L'etiqueta per mostrar al menú de les altres instàncies amigues",
"delete_trusted_instance_confirm": "Segur que vols eliminar aquest element del menú d'instàncies amigues?",

View file

@ -126,6 +126,9 @@
"place_description": "Falls ein Ort falsch ist oder sich die Adresse ändert, kannst du ihn ändern.<br/>Bitte beachte, dass alle Veranstaltungen, die mit diesem Ort verbunden sind, die Adresse ändern (auch zurückliegende).",
"enable_admin_user_confirm": "Achte darauf, dass du der nutzenden Person {user} Admin-Rechte hinzufügst",
"trusted_instances_help": "Befreundete Instanzen werden in der Navigationsleiste oben auf der Seite angezeigt",
"trusted_instances_label": "Navigationsbezeichnung zu Friend-Instanzen",
"trusted_instances_label_default": "Freundliche Instanzen",
"trusted_instances_label_help": "Die Standardbezeichnung ist 'Freundliche Instanzen'",
"delete_announcement_confirm": "Möchtest du diesen Hinweis entfernen?",
"instance_timezone_description": "Gancio wurde dazu entwickelt, um die Veranstaltungen eines bestimmten Ortes, z. B. einer Stadt, zu erfassen. Wenn du die Zeitzone dieses Ortes eingibst und auswählst, werden alle Zeiten angezeigt und wie ausgewählt eingegeben.",
"instance_locale_description": "Die Sprache, in der die Seiten angezeigt werden, ist die von der nutzenden Person bevorzugte Sprache. In einigen Fällen ist es jedoch erforderlich, die Meldungen für alle auf dieselbe Weise anzuzeigen (z. B. bei der Veröffentlichung über ActivityPub oder beim Versand bestimmter E-Mails). In diesen Fällen wird die oben gewählte Sprache verwendet.",

View file

@ -229,6 +229,9 @@
"instance_name_help": "ActivityPub's account to follow",
"enable_trusted_instances": "Turn on friendly instances",
"trusted_instances_help": "The list of friendly instances will be shown in the header",
"trusted_instances_label": "Navigation label to friendly instances",
"trusted_instances_label_default": "Friendly instances",
"trusted_instances_label_help": "The default label is 'Friendly instances'",
"add_trusted_instance": "Add a friendly instance",
"instance_place_help": "The label to show in instances of others",
"delete_trusted_instance_confirm": "Do you really want to delete this item from the friend instance menu?",

View file

@ -217,6 +217,9 @@
"instance_name_help": "Nombre de la cuenta de ActivityPub a seguir",
"enable_trusted_instances": "Habilitar las solicitudes amistosas",
"trusted_instances_help": "Las instancias amistosas aparecerán en la barra de navegación en la parte superior de la página",
"trusted_instances_label": "Etichetta di navigazione alle istanze amiche",
"trusted_instances_label_default": "Instancias amigables",
"trusted_instances_label_help": "La etiqueta predeterminada es 'Instancias amigables'",
"add_trusted_instance": "Añade una instancia de amigo",
"instance_place_help": "Esta cadena se mostrará en el menú de las otras instancias amigas",
"delete_trusted_instance_confirm": "¿Realmente quieres borrar este elemento del menú de instancias amistosas?",

View file

@ -215,6 +215,9 @@
"instance_name_help": "Jarraitu beharreko ActivityPub kontua",
"enable_trusted_instances": "Gaitu instantzia adiskidetsuak",
"trusted_instances_help": "Kideak diren instantzien zerrenda goiburuan erakutsiko da",
"trusted_instances_label": "Nabigazio etiketa lagunarteko instantzietarako",
"trusted_instances_label_default": "Instantzia atseginak",
"trusted_instances_label_help": "Etiketa lehenetsia 'Instantzia atseginak' da",
"add_trusted_instance": "Gehitu kide den instantzia bat",
"instance_place_help": "Beste instantzietan agertuko den izena",
"delete_trusted_instance_confirm": "Ziur al zaude instantzia hau menuko zerrendatik kendu nahi duzula?",

View file

@ -174,6 +174,9 @@
"instance_place_help": "Le nom à afficher dans les autres instances",
"add_trusted_instance": "Ajouter une instance associée",
"trusted_instances_help": "La liste des instances associées seront affichées dans l'entête",
"trusted_instances_label": "Étiquette de navigation vers les instances amies",
"trusted_instances_label_default": "Instances amies",
"trusted_instances_label_help": "L'étiquette par défaut est 'Instances amies'",
"enable_trusted_instances": "Activer les instances associées",
"instance_name_help": "Compte ActivityPub à suivre",
"instance_place": "Lieu indicatif de cette instance",

View file

@ -221,6 +221,9 @@
"instance_locale_description": "Idioma preferido para as páxinas. A veces as mensaxes teñen que mostrarse no mesmo idioma para tódalas persoas (por exemplo cando publicas vía ActivityPub ou cando envías os emails). Nestos casos usarase o idioma elexido aquí arriba.",
"enable_trusted_instances": "Activar instancias amigas",
"trusted_instances_help": "A lista das instancias amigas será mostrada na cabeceira",
"trusted_instances_label": "Etiqueta de navegação para instâncias de amigos",
"trusted_instances_label_default": "Casos amigáveis",
"trusted_instances_label_help": "A etiqueta padrão é 'Instâncias amigáveis'",
"delete_trusted_instance_confirm": "Tes a certeza de querer eliminar este elemento do menú de instancias amigas?",
"instance_place_help": "A etiqueta a mostrar nas instancias de outras",
"add_link": "Engadir ligazón",

View file

@ -227,6 +227,9 @@
"instance_name_help": "Nome dell'account ActivityPub da seguire",
"enable_trusted_instances": "Abilita istanze amiche",
"trusted_instances_help": "Le istanze amiche compariranno nella barra di navigazione in cima alla pagina",
"trusted_instances_label": "Etichetta di navigazione alle istanze amiche",
"trusted_instances_label_default": "Istanze amiche",
"trusted_instances_label_help": "L'etichetta di default è 'Istanze amiche'",
"add_trusted_instance": "Aggiungi un'istanza amica",
"instance_place_help": "Verrà mostrata questa stringa nel menù delle altre istanze amiche",
"delete_trusted_instance_confirm": "Vuoi davvero eliminare questa voce dal menù delle istanze amiche?",

View file

@ -61,6 +61,9 @@
"instance_place_help": "Etikett å vise i andres instanser",
"add_trusted_instance": "Legg til en vennlig instans",
"trusted_instances_help": "Liste over vennlige instanser vises i toppteksten",
"trusted_instances_label": "Navigasjonsetikett til venneforekomster",
"trusted_instances_label_default": "Vennlige tilfeller",
"trusted_instances_label_help": "Standardetiketten er 'Vennlige tilfeller'",
"enable_trusted_instances": "Skru på vennlige instanser",
"instance_name_help": "ActivityPub-konto å følge",
"instance_place": "Indiker sted for denne instansen",

View file

@ -127,6 +127,9 @@
"instance_name_help": "Conta ActivityPub para seguir",
"enable_trusted_instances": "Habilitar instâncias amigáveis",
"trusted_instances_help": "A lista de instâncias amigáveis que serão exibidas no cabeçalho",
"trusted_instances_label": "Etiqueta de navegação para instâncias amigas",
"trusted_instances_label_default": "Instâncias amigas",
"trusted_instances_label_help": "A etiqueta padrão é 'Instâncias amigas'",
"add_trusted_instance": "Adicione uma instância amigável",
"footer_links": "Links de rodapé",
"delete_footer_link_confirm": "Está certo que quer remover este link?",

View file

@ -37,6 +37,7 @@ const defaultSettings = {
trusted_instances: [],
'theme.is_dark': true,
'theme.primary': '#FF4500',
trusted_instances_label: '',
hide_thumbs: false,
hide_calendar: false,
footerLinks: [

View file

@ -86,6 +86,7 @@ module.exports = {
hide_boosts: settings.hide_boosts,
enable_trusted_instances: settings.enable_trusted_instances,
trusted_instances: settings.trusted_instances,
trusted_instances_label: settings.trusted_instances_label,
'theme.is_dark': settings['theme.is_dark'],
'theme.primary': settings['theme.primary'],
hide_thumbs: settings.hide_thumbs,
@ -125,7 +126,7 @@ module.exports = {
router.use('/headerimage.png', (req, res, next) => {
const headerImagePath = settingsController.settings.header_image || './static/noimg.svg'
return express.static(headerImagePath)(req, res, next)
})
})
router.use('/logo.png', (req, res, next) => {
const logoPath = settingsController.settings.logo || './static/gancio'

View file

@ -15,6 +15,7 @@ export const state = () => ({
hide_boosts: true,
enable_trusted_instances: true,
trusted_instances: [],
trusted_instances_label: '',
footerLinks: []
},
announcements: [],