Skip to content

Commit

Permalink
タイムラインのヘッダータブ関連の修正 (#332)
Browse files Browse the repository at this point in the history
* タイムラインのヘッダータブを設定するときにタブの数を0個に設定できないように

* 削除ボタンが無効になっているときのスタイルを調整

* クライアント設定の「全般」からリストのピン留めの設定を削除

* timelineTabsがクライアント設定のバックアップに含まれるように
  • Loading branch information
adzukimame authored Dec 2, 2024
1 parent 6dc7088 commit 52edf55
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
11 changes: 0 additions & 11 deletions packages/frontend/src/pages/settings/general.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,6 @@ SPDX-License-Identifier: AGPL-3.0-only
<option value="desktop"><i class="ti ti-device-desktop"/> {{ i18n.ts.desktop }}</option>
</MkRadios>

<FormSection>
<div class="_gaps_s">
<MkFolder>
<template #label>{{ i18n.ts.pinnedList }}</template>
<!-- 複数ピン止め管理できるようにしたいけどめんどいので一旦ひとつのみ -->
<MkButton v-if="defaultStore.reactiveState.pinnedUserLists.value.length === 0" @click="setPinnedList()">{{ i18n.ts.add }}</MkButton>
<MkButton v-else danger @click="removePinnedList()"><i class="ti ti-trash"></i> {{ i18n.ts.remove }}</MkButton>
</MkFolder>
</div>
</FormSection>

<FormSection>
<template #label>{{ i18n.ts.displayOfNote }}</template>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ const defaultStoreSaveKeys: (keyof typeof defaultStore['state'])[] = [
'widgets',
'tl',
'pinnedUserLists',
'timelineTabs',
'overridedDeviceKind',
'serverDisconnectedBehavior',
'nsfw',
Expand Down
7 changes: 6 additions & 1 deletion packages/frontend/src/pages/settings/timeline.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<template #item="{element, index}">
<div :class="$style.tlTabsDragItem">
<button v-if="!tlTabsEditMode" class="_button" :class="$style.dragItemHandle" tabindex="-1"><i class="ti ti-menu"></i></button>
<button v-if="tlTabsEditMode" class="_button" :class="$style.dragItemRemove" @click="deleteTlTab(index)"><i class="ti ti-x"></i></button>
<button v-if="tlTabsEditMode" :disabled="tlTabs.length < 2" class="_button" :class="$style.dragItemRemove" @click="deleteTlTab(index)"><i class="ti ti-x"></i></button>
<div :class="$style.tlTabsDragItemTlIcon">
<i :class="element.icon"></i>
</div>
Expand Down Expand Up @@ -215,6 +215,11 @@ definePageMetadata(() => ({
&:active {
cursor: pointer;
}

&[disabled] {
cursor: not-allowed;
opacity: .7;
}
}

.dragItemForm {
Expand Down

0 comments on commit 52edf55

Please sign in to comment.