2019-04-27 06:33:15 +09:00
|
|
|
<template>
|
|
|
|
<div>
|
|
|
|
<form @submit.prevent="addTL">
|
|
|
|
<label
|
|
|
|
v-for="(types,name) in userTimelineTypes"
|
|
|
|
:key="name"
|
|
|
|
:class="{selected: name === timelineType}"
|
|
|
|
>
|
|
|
|
<input type="radio" :value="name" v-model="timelineType">
|
|
|
|
{{ types }}
|
|
|
|
</label>
|
|
|
|
<BaseButton
|
|
|
|
type="submit"
|
|
|
|
class="primary fill"
|
|
|
|
style="--font-size:.8em;margin-top:1em;"
|
|
|
|
>Add Column</BaseButton>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import { Component, Prop, Vue } from "vue-property-decorator"
|
|
|
|
|
|
|
|
@Component
|
|
|
|
export default class UserTimeline extends Vue {
|
2019-04-27 06:45:45 +09:00
|
|
|
@Prop() public username!: string
|
|
|
|
|
2019-04-27 06:33:15 +09:00
|
|
|
public timelineType: string = 'home'
|
|
|
|
public userTimelineTypes: {
|
|
|
|
[key: string]: string
|
|
|
|
} = {
|
|
|
|
home: 'Home Timeline',
|
|
|
|
notify: 'Notifications',
|
|
|
|
dm: 'Direct Messages',
|
|
|
|
local: 'Local Timeline',
|
|
|
|
fediverse: 'Fediverse Timeline',
|
|
|
|
integrated: 'Integrated Timeline (Home + Local)',
|
|
|
|
localPlus: 'Integrated Timeline (Local + Boost + Reply)',
|
|
|
|
}
|
|
|
|
|
|
|
|
public addTL() {
|
|
|
|
console.log(this.timelineType)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped lang="postcss">
|
|
|
|
label {
|
|
|
|
display: block;
|
|
|
|
line-height: 2em;
|
|
|
|
margin: 0em;
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
background-color: gray;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.selected {
|
|
|
|
background-color: maroon;
|
|
|
|
}
|
|
|
|
|
|
|
|
& > input[type="radio"] {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|