pull/972/head
Zef Hemel 2024-07-23 16:49:27 +02:00
parent b188750e03
commit 234a17c608
3 changed files with 15 additions and 6 deletions

View File

@ -13,19 +13,25 @@ import {
export type BuiltinSettings = { export type BuiltinSettings = {
indexPage: string; indexPage: string;
customStyles?: string | string[];
plugOverrides?: Record<string, Partial<Manifest>>;
shortcuts?: Shortcut[]; shortcuts?: Shortcut[];
hideSyncButton?: boolean;
hideEditButton?: boolean;
useSmartQuotes?: boolean; useSmartQuotes?: boolean;
maximumAttachmentSize?: number; maximumAttachmentSize?: number;
defaultLinkStyle?: string; // Open the last page that was open when the app was closed
pwaOpenLastPage?: boolean;
// UI visuals
hideEditButton?: boolean;
hideSyncButton?: boolean;
actionButtons: ActionButton[]; actionButtons: ActionButton[];
pageDecorations?: PageDecoration[]; pageDecorations?: PageDecoration[];
// Format: compatible with docker ignore // Format: compatible with docker ignore
spaceIgnore?: string; spaceIgnore?: string;
emoji?: EmojiConfig; emoji?: EmojiConfig;
// DEPRECATED: Use space styles instead
customStyles?: string | string[];
// DEPRECATED: Use shortcuts instead
plugOverrides?: Record<string, Partial<Manifest>>;
// NOTE: Bit niche, maybe delete at some point?
defaultLinkStyle?: string;
}; };
export type PanelConfig = { export type PanelConfig = {

View File

@ -451,7 +451,7 @@ export class Client {
); );
}); });
if (location.hash === "#boot") { if (location.hash === "#boot" && this.settings.pwaOpenLastPage !== false) {
(async () => { (async () => {
// Cold start PWA load // Cold start PWA load
const lastPage = await this.stateDataStore.get([ const lastPage = await this.stateDataStore.get([

View File

@ -19,6 +19,9 @@ hideSyncButton: false
# Hide the edit button (available on mobile only) # Hide the edit button (available on mobile only)
hideEditButton: true # defaults to 'false' hideEditButton: true # defaults to 'false'
# In PWA mode, SilverBullet automatically reopens the last opened page on boot, this can be disabled
pwaOpenLastPage: true
# Configure the shown action buttons (top right bar) # Configure the shown action buttons (top right bar)
actionButtons: actionButtons:
- icon: home # Use any icon from https://feathericons.com - icon: home # Use any icon from https://feathericons.com