Skip to content

Commit

Permalink
chore: set icon for vmimi relay tl
Browse files Browse the repository at this point in the history
  • Loading branch information
anatawa12 committed Apr 11, 2024
1 parent 9f607cb commit aecac19
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions packages/frontend/src/pages/timeline.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const rootEl = shallowRef<HTMLElement>();

const queue = ref(0);
const srcWhenNotSignin = ref<'local' | 'global'>(isLocalTimelineAvailable ? 'local' : 'global');
const src = computed<'home' | 'local' | 'social' | 'global' | `list:${string}`>({
const src = computed<'home' | 'local' | 'social' | 'global' | 'vmimi-relay' | `list:${string}`>({
get: () => ($i ? defaultStore.reactiveState.tl.value.src : srcWhenNotSignin.value),
set: (x) => saveSrc(x),
});
Expand Down Expand Up @@ -199,7 +199,7 @@ async function chooseChannel(ev: MouseEvent): Promise<void> {
os.popupMenu(items, ev.currentTarget ?? ev.target);
}

function saveSrc(newSrc: 'home' | 'local' | 'social' | 'global' | `list:${string}`): void {
function saveSrc(newSrc: 'home' | 'local' | 'social' | 'global' | 'vmimi-relay' | `list:${string}`): void {
const out = deepMerge({ src: newSrc }, defaultStore.state.tl);

if (newSrc.startsWith('userList:')) {
Expand Down Expand Up @@ -307,8 +307,8 @@ const headerTabs = computed(() => [...(defaultStore.reactiveState.pinnedUserList
iconOnly: true,
}, {
key: 'vmimi-relay',
title: i18n.ts._timelines.relay,
icon: 'ti ti-whirl', // TODO: update icon
title: i18n.ts._timelines.vmimiRelay,
icon: 'ti ti-circles-relation',
iconOnly: true,
}] : []), {
icon: 'ti ti-list',
Expand Down Expand Up @@ -344,7 +344,7 @@ const headerTabsWhenNotLogin = computed(() => [

definePageMetadata(() => ({
title: i18n.ts.timeline,
icon: src.value === 'local' ? 'ti ti-planet' : src.value === 'social' ? 'ti ti-universe' : src.value === 'global' ? 'ti ti-whirl' : 'ti ti-home',
icon: src.value === 'local' ? 'ti ti-planet' : src.value === 'social' ? 'ti ti-universe' : src.value === 'global' ? 'ti ti-whirl' : src.value === 'vmimi-relay' ? 'ti ti-circles-relation' : 'ti ti-home',
}));
</script>

Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ export const defaultStore = markRaw(new Storage('base', {
tl: {
where: 'deviceAccount',
default: {
src: 'home' as 'home' | 'local' | 'social' | 'global' | `list:${string}`,
src: 'home' as 'home' | 'local' | 'social' | 'global' | 'vmimi-relay' | `list:${string}`,
userList: null as Misskey.entities.UserList | null,
filter: {
withReplies: true,
Expand Down
4 changes: 2 additions & 2 deletions packages/frontend/src/ui/deck/tl-column.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<i v-else-if="column.tl === 'local'" class="ti ti-planet"></i>
<i v-else-if="column.tl === 'social'" class="ti ti-universe"></i>
<i v-else-if="column.tl === 'global'" class="ti ti-whirl"></i>
<i v-else-if="column.tl === 'vmimi-relay'" class="ti ti-whirl"></i><!-- TODO: change icon -->
<i v-else-if="column.tl === 'vmimi-relay'" class="ti ti-circles-relation"></i>
<span style="margin-left: 8px;">{{ column.name }}</span>
</template>

Expand Down Expand Up @@ -107,7 +107,7 @@ async function setType() {
return;
}
updateColumn(props.column.id, {
tl: src,
tl: src ?? undefined,
});
}

Expand Down

0 comments on commit aecac19

Please sign in to comment.