1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-11-28 06:48:36 +09:00
This commit is contained in:
NoriDev 2023-10-13 18:54:44 +09:00
parent 5c7edebd8b
commit 2a39529b66

View File

@ -97,19 +97,22 @@ const withRenotes = $ref(true);
const withReplies = $ref(false);
const onlyFiles = $ref(false);
const onlyCats = $ref(false);
const friendlyEnableNotifications = computed(defaultStore.makeGetterSetter('friendlyEnableNotifications'));
const friendlyEnableWidgets = computed(defaultStore.makeGetterSetter('friendlyEnableWidgets'));
const friendlyEnableNotifications = $ref(defaultStore.state.friendlyEnableNotifications);
const friendlyEnableWidgets = $ref(defaultStore.state.friendlyEnableWidgets);
watch($$(src), () => {
queue = 0;
queueUpdated(queue);
});
watch([
friendlyEnableNotifications,
friendlyEnableWidgets,
], async () => {
await reloadAsk();
watch($$(friendlyEnableNotifications), (x) => {
defaultStore.set('friendlyEnableNotifications', x);
reloadAsk();
});
watch($$(friendlyEnableWidgets), (x) => {
defaultStore.set('friendlyEnableWidgets', x);
reloadAsk();
});
onMounted(() => {
@ -206,17 +209,11 @@ const headerActions = $computed(() => [{
os.popupMenu([{
type: 'switch',
text: i18n.ts.friendlyEnableNotifications,
ref: friendlyEnableNotifications,
action: () => {
friendlyEnableNotifications.value = !friendlyEnableNotifications.value;
},
ref: $$(friendlyEnableNotifications),
}, {
type: 'switch',
text: i18n.ts.friendlyEnableWidgets,
ref: friendlyEnableWidgets,
action: () => {
friendlyEnableWidgets.value = !friendlyEnableWidgets.value;
},
ref: $$(friendlyEnableWidgets),
}, {
type: 'switch',
text: i18n.ts.showRenotes,
@ -305,9 +302,6 @@ definePageMetadata(computed(() => ({
.transition_new_leaveActive {
transform: translateY(-64px);
}
.transition_new_enterFrom,
.transition_new_leaveTo {
}
.new {
position: sticky;