kopia lustrzana https://github.com/nolanlawson/pinafore
41 wiersze
1.2 KiB
HTML
41 wiersze
1.2 KiB
HTML
{{#await importStatusSearchResult}}
|
|
{{then StatusSearchResult}}
|
|
<ul class="search-results">
|
|
{{#each $searchResults.hashtags as hashtag}}
|
|
<HashtagSearchResult :hashtag />
|
|
{{/each}}
|
|
{{#each $searchResults.accounts as account}}
|
|
<AccountSearchResult :account />
|
|
{{/each}}
|
|
{{#each $searchResults.statuses as status, index}}
|
|
<:Component {StatusSearchResult} :status :index length="{{$searchResults.statuses.length}}"/>
|
|
{{/each}}
|
|
</ul>
|
|
{{/await}}
|
|
<style>
|
|
.search-results {
|
|
list-style: none;
|
|
box-sizing: border-box;
|
|
border: 1px solid var(--main-border);
|
|
border-radius: 2px;
|
|
}
|
|
</style>
|
|
<script>
|
|
import { store } from '../../_store/store'
|
|
import AccountSearchResult from './AccountSearchResult.html'
|
|
import HashtagSearchResult from './HashtagSearchResult.html'
|
|
import StatusSearchResult from './StatusSearchResult.html'
|
|
import { importStatusRendering } from '../../_utils/asyncModules'
|
|
|
|
export default {
|
|
store: () => store,
|
|
data: () => ({
|
|
importStatusSearchResult: importStatusRendering().then(mod => mod.StatusSearchResult)
|
|
}),
|
|
components: {
|
|
AccountSearchResult,
|
|
HashtagSearchResult,
|
|
StatusSearchResult
|
|
}
|
|
}
|
|
</script> |