2019-04-23 04:46:17 +09:00
|
|
|
<template>
|
|
|
|
<div>
|
2019-04-23 23:42:07 +09:00
|
|
|
<div v-if="showInput">
|
|
|
|
<input type="text" placeholder="e.g:mstdn.jp" v-model="instance">
|
|
|
|
<BaseButton
|
|
|
|
@click.native="addTL"
|
|
|
|
class="primary fill"
|
|
|
|
style="font-size:.8em;"
|
|
|
|
>Add Column</BaseButton>
|
|
|
|
</div>
|
|
|
|
<div id="timelines">
|
|
|
|
<div v-for="(value, key, index) in pubTL" :key="index" class="tl">
|
|
|
|
{{value}}
|
|
|
|
</div>
|
|
|
|
</div>
|
2019-04-23 04:46:17 +09:00
|
|
|
<BaseButton
|
2019-04-23 23:42:07 +09:00
|
|
|
v-if="!showInput"
|
|
|
|
@click.native="showInput = true"
|
|
|
|
class="primary fill"
|
|
|
|
style="font-size:.8em;"
|
|
|
|
>Show Menu</BaseButton>
|
2019-04-23 04:46:17 +09:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import { ipcRenderer } from 'electron'
|
|
|
|
import { Component, Vue } from 'vue-property-decorator'
|
|
|
|
|
|
|
|
type Status = 'welcome' | 'login' | 'public_timeline'
|
2019-04-23 23:42:07 +09:00
|
|
|
type Instance = String
|
|
|
|
type showInput = boolean
|
|
|
|
type Timelines = String[]
|
2019-04-23 04:46:17 +09:00
|
|
|
@Component
|
|
|
|
export default class AddColumn extends Vue {
|
|
|
|
public status: Status = 'welcome'
|
2019-04-23 23:42:07 +09:00
|
|
|
public instance: Instance = ''
|
|
|
|
public showInput : showInput = true
|
|
|
|
public pubTL : Timelines = []
|
|
|
|
|
|
|
|
public addTL() {
|
|
|
|
this.showInput = false
|
|
|
|
this.pubTL.push(this.instance)
|
2019-04-24 01:07:20 +09:00
|
|
|
this.timeline()
|
|
|
|
}
|
|
|
|
|
|
|
|
public timeline(){
|
|
|
|
this.pubTL.forEach(function( value ) {
|
|
|
|
ipcRenderer.send('no-auth-streaming', value);
|
|
|
|
});
|
2019-04-23 23:42:07 +09:00
|
|
|
}
|
2019-04-23 04:46:17 +09:00
|
|
|
}
|
|
|
|
</script>=
|
|
|
|
|
|
|
|
<style scoped lang="postcss">
|
|
|
|
input {
|
|
|
|
color: var(--color);
|
|
|
|
background-color: transparent;
|
|
|
|
font-size: var(--font-size);
|
|
|
|
border: none;
|
|
|
|
border-bottom: 1px solid #9e9e9e;
|
|
|
|
border-radius: 0;
|
|
|
|
line-height: 3em;
|
|
|
|
width: 80%;
|
|
|
|
outline: none;
|
|
|
|
margin: 1em;
|
|
|
|
|
|
|
|
transition-duration: 0.5s;
|
|
|
|
|
|
|
|
&:focus {
|
|
|
|
border-color: #26d69a;
|
|
|
|
}
|
|
|
|
}
|
2019-04-23 23:42:07 +09:00
|
|
|
#timelines{
|
|
|
|
display:flex;
|
|
|
|
width:100%;
|
|
|
|
}
|
|
|
|
.tl{
|
|
|
|
height:100%;
|
|
|
|
flex-grow: 4;
|
|
|
|
}
|
2019-04-23 04:46:17 +09:00
|
|
|
</style>
|