1
0
mirror of https://github.com/chylex/Nextcloud-News.git synced 2025-05-02 04:34:06 +02:00
Nextcloud-News/js/vue_components/IconLinkCompact.vue
Tucker McKnight 36d304ec76 Use front-end translation function
PHP is not parsing the Vue components, so use Nextcloud's
t() Javascript function instead. This commit adds t() as a
global variable on the AppController so that it can be
passed into components.

Also move vue-loader and vue-template-compiler to devDependencies
in package.json.

Signed-off-by: Tucker McKnight <tucker.mcknight@gmail.com>
2021-07-19 14:58:49 +02:00

22 lines
377 B
Vue

<template>
<li class="util only-in-compact">
<a class="external icon-link"
v-on:click="ctrl.markRead(item.id)"
target="_blank"
rel="noreferrer"
v-bind:href="item.url"
v-bind:title="t('news', 'Open website')"
news-stop-propagation>
</a>
</li>
</template>
<script>
export default {
props: ['ctrl', 'item', 't'],
};
</script>