Merge pull request #306 from samuelthomas2774/keytar-4.4.1

macOS + Linux keytar + node-sass bindings
This commit is contained in:
Alexei Stukov 2019-03-10 15:30:36 +02:00 committed by GitHub
commit a170a97688
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 49 additions and 61 deletions

View File

@ -1,13 +1,13 @@
// sass-lint:disable-all
body:not(.bd-hideButton) {
[class*='guildsWrapper-'] {
[class*='layer-'] > * > [class*='wrapper-'] {
padding-top: 49px !important;
}
.platform-osx [class*='guildsWrapper-'] {
.platform-osx [class*='layer-'] > * > [class*='wrapper-'] {
margin-top: 26px;
}
[class*='guildsWrapper-'] + [class*='flex'] {
[class*='layer-'] > * > [class*='wrapper-'] + [class*='flex'] {
border-radius: 0 0 0 5px;
}

View File

@ -22,12 +22,12 @@
> .bd-scroller {
overflow-y: scroll;
}
}
.bd-settings & {
.platform-darwin & { // sass-lint:disable-line class-name-format
padding-top: 22px;
}
}
.bd-settings & {
.platform-darwin & { // sass-lint:disable-line class-name-format
padding-top: 22px;
}
}

View File

@ -20,7 +20,6 @@
<SidebarItem :item="{text, type: 'header'}" />
<SidebarItem v-for="i in category" :key="i.id" :item="i" :active="item && i.id === item.id" @click="itemOnClick(i.id)" />
</template>
<SidebarItem v-if="superSecretMenu" :item="{ _type: 'button', text: 'Super Secret' }" :active="superSecretMenuActive" @click="itemOnClick('superSecretMenu')"/>
</Sidebar>
<div slot="sidebarfooter" class="bd-info">
@ -38,8 +37,7 @@
<ContentColumn slot="content">
<transition name="bd-contentcolumn" @before-enter="animating++" @after-enter="animating--" @enter-cancelled="animating--" @before-leave="animating++" @after-leave="animating--" @leave-cancelled="animating--">
<SuperSecretView v-if="superSecretMenuActive"/>
<div v-else-if="item" :key="item.id">
<div v-if="item" :key="item.id">
<template v-if="item.component">
<component :is="item.component" :SettingsWrapper="SettingsWrapper" />
</template>
@ -80,15 +78,13 @@
items: BdMenuItems.items,
Settings,
SettingsWrapper,
openMenuHandler: null,
superSecretMenu: false,
superSecretMenuActive: false
openMenuHandler: null
};
},
props: ['active'],
components: {
SidebarView, Sidebar, SidebarItem, ContentColumn,
SettingsWrapper, SettingsPanel, CssEditorView, PluginsView, ThemesView, UpdaterView, ConnectivityView, SuperSecretView,
SettingsWrapper, SettingsPanel, CssEditorView, PluginsView, ThemesView, UpdaterView, ConnectivityView,
MiGithubCircle, MiWeb, MiClose, MiTwitterCircle
},
computed: {
@ -107,12 +103,6 @@
},
methods: {
itemOnClick(id) {
if (id === 'superSecretMenu') {
this.item = 'supersecretmenu';
this.superSecretMenuActive = true;
return;
}
this.superSecretMenuActive = false;
this.item = this.items.find(item => item.id === id);
},
closeContent() {
@ -136,9 +126,12 @@
},
created() {
Events.on('bd-open-menu', this.openMenuHandler = item => item && this.itemOnClick(this.items.find(i => i === item || i.id === item || i.contentid === item || i.set === item).id));
try {
const currentUser = Reflection.module.byName('UserStore').getCurrentUser();
this.superSecretMenu = ['81388395867156480', '98003542823944192', '249746236008169473', '284056145272766465', '478559353516064769'].includes(currentUser.id)
if (['81388395867156480', '98003542823944192', '249746236008169473', '284056145272766465', '478559353516064769'].includes(currentUser.id)) {
BdMenuItems.addVueComponent('BD Devs', 'Super Secret', SuperSecretView);
}
} catch (err) {}
},
destroyed() {

View File

@ -50,7 +50,6 @@ import keytar from 'keytar';
import { FileUtils, BDIpc, Config, WindowUtils, Updater, Editor, Database } from './modules';
const packageJson = require(path.resolve(__dirname, 'package.json'));
const sparkplug = path.resolve(__dirname, 'sparkplug.js');
let configProxy;
@ -221,7 +220,6 @@ export class BetterDiscord {
this.parseClientPackage();
this.parseEditorPackage();
this.parseCorePackage();
this.database.init();
configProxy = () => this.config;
const autoInitComms = this.comms;

View File

@ -1,6 +1,3 @@
### node-keytar bindings
Copy this directory to `node_modules/keytar/build/Release/keytar.node` to use.
keytar-4.3.0/linux-x64-64.node - poweredge-t30.fancy.org.uk
All others - https://github.com/atom/node-keytar/releases

View File

@ -1,4 +1,3 @@
const keytar_version = require('keytar/package').version;
// module.exports = require('./keytar-' + process.platform + '-' + process.versions.modules + '-' + process.arch + '.node');
module.exports = require(`./keytar-${keytar_version}/${process.platform}-${process.arch}-${process.versions.modules}.node`);

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -22,7 +22,7 @@
"csp-parse": "github:macropodhq/csp-parse",
"deepmerge": "^3.2.0",
"fs-extra": "^7.0.1",
"keytar": "^4.4.1",
"keytar": "4.4.1",
"nedb": "^1.8.0",
"node-sass": "^4.11.0",
"original-fs": "^1.0.0",

12
scripts/build-keytar-darwin.sh Normal file → Executable file
View File

@ -3,12 +3,12 @@
PLATFORM="darwin"
ARCH="x64"
NODE_API_VERSION="53"
ELECTRON_VERSION="1.6.15"
scripts/build-keytar.sh $PLATFORM $ARCH $NODE_API_VERSION $ELECTRON_VERSION
NODE_API_VERSION="64"
ELECTRON_VERSION="4.0.0-beta.7"
ELECTRON_VERSION="4.0.0-beta.11"
scripts/build-keytar.sh $PLATFORM $ARCH $NODE_API_VERSION $ELECTRON_VERSION
NODE_API_VERSION="69"
ELECTRON_VERSION="4.0.8"
scripts/build-keytar.sh $PLATFORM $ARCH $NODE_API_VERSION $ELECTRON_VERSION

View File

@ -3,12 +3,12 @@
PLATFORM="linux"
ARCH="x64"
NODE_API_VERSION="53"
ELECTRON_VERSION="1.6.15"
scripts/build-keytar.sh $PLATFORM $ARCH $NODE_API_VERSION $ELECTRON_VERSION
NODE_API_VERSION="64"
ELECTRON_VERSION="4.0.0-beta.7"
ELECTRON_VERSION="4.0.0-beta.11"
scripts/build-keytar.sh $PLATFORM $ARCH $NODE_API_VERSION $ELECTRON_VERSION
NODE_API_VERSION="69"
ELECTRON_VERSION="4.0.8"
scripts/build-keytar.sh $PLATFORM $ARCH $NODE_API_VERSION $ELECTRON_VERSION

View File

@ -4,9 +4,10 @@ PLATFORM="$1"
ARCH="$2"
NODE_API_VERSION="$3"
ELECTRON_VERSION="$4"
KEYTAR_VERSION="`node -p 'require("keytar/package").version'`"
ELECTRON_URL="https://atom.io/download/electron"
DIRECTORY="release-tmp/keytar.node/keytar-4.3.0"
DIRECTORY="release-tmp/keytar.node/keytar-$KEYTAR_VERSION"
FILENAME="$PLATFORM-$ARCH-$NODE_API_VERSION.node"
if [ `node -p 'process.platform'` != "$PLATFORM" ]; then

View File

@ -3,12 +3,12 @@
PLATFORM="darwin"
ARCH="x64"
NODE_API_VERSION="53"
ELECTRON_VERSION="1.6.15"
scripts/build-node-sass.sh $PLATFORM $ARCH $NODE_API_VERSION $ELECTRON_VERSION
NODE_API_VERSION="64"
ELECTRON_VERSION="4.0.0-beta.7"
ELECTRON_VERSION="4.0.0-beta.11"
scripts/build-node-sass.sh $PLATFORM $ARCH $NODE_API_VERSION $ELECTRON_VERSION
NODE_API_VERSION="69"
ELECTRON_VERSION="4.0.8"
scripts/build-node-sass.sh $PLATFORM $ARCH $NODE_API_VERSION $ELECTRON_VERSION

View File

@ -3,12 +3,12 @@
PLATFORM="linux"
ARCH="x64"
NODE_API_VERSION="53"
ELECTRON_VERSION="1.6.15"
scripts/build-node-sass.sh $PLATFORM $ARCH $NODE_API_VERSION $ELECTRON_VERSION
NODE_API_VERSION="64"
ELECTRON_VERSION="4.0.0-beta.7"
ELECTRON_VERSION="4.0.0-beta.11"
scripts/build-node-sass.sh $PLATFORM $ARCH $NODE_API_VERSION $ELECTRON_VERSION
NODE_API_VERSION="69"
ELECTRON_VERSION="4.0.8"
scripts/build-node-sass.sh $PLATFORM $ARCH $NODE_API_VERSION $ELECTRON_VERSION

View File

@ -1,13 +1,13 @@
set "PLATFORM=win32"
set "NODE_API_VERSION=53"
set "ELECTRON_VERSION=1.6.15"
call ./scripts/build-node-sass.bat %PLATFORM% ia32 %NODE_API_VERSION% %ELECTRON_VERSION%
call ./scripts/build-node-sass.bat %PLATFORM% x64 %NODE_API_VERSION% %ELECTRON_VERSION%
set "NODE_API_VERSION=64"
set "ELECTRON_VERSION=4.0.0-beta.7"
set "ELECTRON_VERSION=4.0.0-beta.11"
call ./scripts/build-node-sass.bat %PLATFORM% ia32 %NODE_API_VERSION% %ELECTRON_VERSION%
call ./scripts/build-node-sass.bat %PLATFORM% x64 %NODE_API_VERSION% %ELECTRON_VERSION%
set "NODE_API_VERSION=69"
set "ELECTRON_VERSION=4.0.8"
call ./scripts/build-node-sass.bat %PLATFORM% ia32 %NODE_API_VERSION% %ELECTRON_VERSION%
call ./scripts/build-node-sass.bat %PLATFORM% x64 %NODE_API_VERSION% %ELECTRON_VERSION%