diff --git a/src/App.vue b/src/App.vue index f17942f..04c1eb8 100644 --- a/src/App.vue +++ b/src/App.vue @@ -2,10 +2,10 @@ @@ -41,35 +47,14 @@ export default { Breadcrumb, Table, }, - data() { - return { - loading: false, - date: Date.now() + 86400000 * 3, - date2: Date.now() + 86400000 * 3 + Math.floor(Math.random() * 86400000 / 2), - show: true, - starred: false, - } - }, - methods: { - addOption(val) { - this.options.push(val) - this.select.push(val) - }, - previous(data) { - console.debug(data) - }, - next(data) { - console.debug(data) - }, - close(data) { - console.debug(data) - }, - newButtonAction(e) { - console.debug(e) - }, - log(e) { - console.debug(e) - }, + data: () => ({ + tableData: undefined, + }), + mounted() { + this.$jquery.get('https://de1.api.radio-browser.info/json/stations/topclick?limit=10') + .function((data) => { + this.tableData = data + }) }, } diff --git a/src/components/Table/Table.vue b/src/components/Table/Table.vue index ab1ea14..bfe4f40 100644 --- a/src/components/Table/Table.vue +++ b/src/components/Table/Table.vue @@ -10,22 +10,62 @@ - + + +
+ + + + {{ stationName }} + + + + + + Add to favorites + + + Details + + + + @@ -53,7 +93,7 @@ table { th.nameColumn { width: 100%; - padding-left: 35px; + padding-left: 57px; } } @@ -76,4 +116,45 @@ table td { background-repeat: no-repeat; } +tr { + height: 51px; + background-color: var(--color-background-light); + + tr:hover, tr:focus, tr.mouseOver td { + background-color: var(--color-background-hover); + } + +} + +tr td:first-child { + padding-left: 40px; + width: 32px; + padding-right: 0px; +} + +td { + border-bottom: 1px solid var(--color-border); +} + +td.filenameColumn .innernametext { + color: var(--color-main-text); +} + +.stationIcon { + width: 32px; + height: 32px; + background-repeat: no-repeat; + background-size: contain; + background-position: center; +} + +.actionColumn { + width: auto; + padding-right: 40px; +} + +.filenameColumn { + width: 100%; +} + diff --git a/src/components/TableItem/TableItem.vue b/src/components/TableItem/TableItem.vue deleted file mode 100644 index 5d4d12f..0000000 --- a/src/components/TableItem/TableItem.vue +++ /dev/null @@ -1,101 +0,0 @@ - - - - - diff --git a/src/main.js b/src/main.js index 21d9806..ad8efaf 100644 --- a/src/main.js +++ b/src/main.js @@ -24,8 +24,11 @@ import { translate, translatePlural } from '@nextcloud/l10n' import App from './App' +import jquery from 'jquery' + Vue.prototype.t = translate Vue.prototype.n = translatePlural +Vue.prototype.$jquery = jquery export default new Vue({ el: '#content',