mirror of
https://github.com/EnixCoda/Gitako.git
synced 2026-03-11 08:54:44 +00:00
fix: set copySnippetButton to false on github.com
This commit is contained in:
parent
430e7d7ded
commit
ab036b3c8d
1 changed files with 4 additions and 3 deletions
|
|
@ -41,13 +41,16 @@ enum configKeys {
|
|||
compactFileTree = 'compactFileTree',
|
||||
}
|
||||
|
||||
// do NOT use platform name
|
||||
const platformStorageKey = `platform_` + window.location.host.toLowerCase()
|
||||
|
||||
export const defaultConfigs: Config = {
|
||||
sideBarWidth: 260,
|
||||
shortcut: undefined,
|
||||
accessToken: '',
|
||||
compressSingletonFolder: true,
|
||||
copyFileButton: true,
|
||||
copySnippetButton: !(platformName === 'GitHub' && !platform.isEnterprise()), // false when on github.com
|
||||
copySnippetButton: platformStorageKey !== 'platform_github.com', // false when on github.com
|
||||
intelligentToggle: null,
|
||||
icons: 'rich',
|
||||
toggleButtonVerticalDistance: 124, // align with GitHub's navbar items
|
||||
|
|
@ -71,8 +74,6 @@ function applyDefaultConfigs(configs: Partial<Config>) {
|
|||
|
||||
export type VersionedConfig<SiteConfig> = Record<string, SiteConfig> & { configVersion: string }
|
||||
|
||||
// do NOT use platform name
|
||||
const platformStorageKey = `platform_` + window.location.host.toLowerCase()
|
||||
const prepareConfig = new Promise<void>(async resolve => {
|
||||
await migrateConfig()
|
||||
resolve()
|
||||
|
|
|
|||
Loading…
Reference in a new issue