forked from FoundKeyGang/FoundKey
wip
This commit is contained in:
parent
80cfa0f95d
commit
0616d29fd5
4 changed files with 21 additions and 8 deletions
|
@ -88,6 +88,7 @@ export default class MiOS extends EventEmitter {
|
||||||
propsData: props
|
propsData: props
|
||||||
}).$mount();
|
}).$mount();
|
||||||
document.body.appendChild(w.$el);
|
document.body.appendChild(w.$el);
|
||||||
|
return w;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -4,18 +4,20 @@
|
||||||
<span :data-is-active="src == 'home'" @click="src = 'home'">%fa:home% ホーム</span>
|
<span :data-is-active="src == 'home'" @click="src = 'home'">%fa:home% ホーム</span>
|
||||||
<span :data-is-active="src == 'local'" @click="src = 'local'">%fa:R comments% ローカル</span>
|
<span :data-is-active="src == 'local'" @click="src = 'local'">%fa:R comments% ローカル</span>
|
||||||
<span :data-is-active="src == 'global'" @click="src = 'global'">%fa:globe% グローバル</span>
|
<span :data-is-active="src == 'global'" @click="src = 'global'">%fa:globe% グローバル</span>
|
||||||
|
<span :data-is-active="src == 'list'" @click="src = 'list'" v-if="list">%fa:list% {{ list.title }}</span>
|
||||||
<button @click="list" title="リスト">%fa:list%</button>
|
<button @click="chooseList" title="リスト">%fa:list%</button>
|
||||||
</header>
|
</header>
|
||||||
<x-core v-if="src == 'home'" ref="tl" key="home" src="home"/>
|
<x-core v-if="src == 'home'" ref="tl" key="home" src="home"/>
|
||||||
<x-core v-if="src == 'local'" ref="tl" key="local" src="local"/>
|
<x-core v-if="src == 'local'" ref="tl" key="local" src="local"/>
|
||||||
<x-core v-if="src == 'global'" ref="tl" key="global" src="global"/>
|
<x-core v-if="src == 'global'" ref="tl" key="global" src="global"/>
|
||||||
|
<mk-user-list-timeline v-if="src == 'list'" ref="tl" key="list" :list="list"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import XCore from './timeline.core.vue';
|
import XCore from './timeline.core.vue';
|
||||||
|
import MkUserListsWindow from './user-lists-window.vue';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
components: {
|
components: {
|
||||||
|
@ -24,7 +26,8 @@ export default Vue.extend({
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
src: 'home'
|
src: 'home',
|
||||||
|
list: null
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -39,8 +42,11 @@ export default Vue.extend({
|
||||||
(this.$refs.tl as any).warp(date);
|
(this.$refs.tl as any).warp(date);
|
||||||
},
|
},
|
||||||
|
|
||||||
list() {
|
chooseList() {
|
||||||
|
const w = (this as any).os.new(MkUserListsWindow);
|
||||||
|
w.$once('choosen', list => {
|
||||||
|
this.list = list;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -86,7 +86,10 @@ export default Vue.extend({
|
||||||
},
|
},
|
||||||
list() {
|
list() {
|
||||||
this.close();
|
this.close();
|
||||||
(this as any).os.new(MkUserListsWindow);
|
const w = (this as any).os.new(MkUserListsWindow);
|
||||||
|
w.$once('choosen', list => {
|
||||||
|
this.$router.push(`i/lists/${ list.id }`);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
settings() {
|
settings() {
|
||||||
this.close();
|
this.close();
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<span slot="header">%fa:list% リスト</span>
|
<span slot="header">%fa:list% リスト</span>
|
||||||
|
|
||||||
<button class="ui" @click="add">リストを作成</button>
|
<button class="ui" @click="add">リストを作成</button>
|
||||||
<router-link v-for="list in lists" :key="list.id" :to="`/i/lists/${list.id}`">{{ list.title }}</router-link>
|
<a v-for="list in lists" :key="list.id" @click="choice(list)">{{ list.title }}</a>
|
||||||
</mk-window>
|
</mk-window>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -31,9 +31,12 @@ export default Vue.extend({
|
||||||
title
|
title
|
||||||
});
|
});
|
||||||
|
|
||||||
this.$router.push(`i/lists/${ list.id }`);
|
this.$emit('choosen', list);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
choice(list) {
|
||||||
|
this.$emit('choosen', list);
|
||||||
|
},
|
||||||
close() {
|
close() {
|
||||||
(this as any).$refs.window.close();
|
(this as any).$refs.window.close();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue