[connect] puuuuuuuuuussssssssshhhhhhhhhhhhhh penis parker 2.0
This commit is contained in:
parent
7b1d9e6849
commit
39e952c15b
3 changed files with 60 additions and 4 deletions
|
@ -1203,6 +1203,13 @@ export class BrowserWindow {
|
||||||
ipcMain.on('cc-auth', (_event) => {
|
ipcMain.on('cc-auth', (_event) => {
|
||||||
shell.openExternal(String(utils.getStoreValue('cc_authURL')));
|
shell.openExternal(String(utils.getStoreValue('cc_authURL')));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
ipcMain.on('cc-logout', (_event) => {
|
||||||
|
utils.setStoreValue('connectUser', {
|
||||||
|
auth: null
|
||||||
|
});
|
||||||
|
utils.getWindow().reload();
|
||||||
|
});
|
||||||
/* *********************************************************************************************
|
/* *********************************************************************************************
|
||||||
* Window Events
|
* Window Events
|
||||||
* **********************************************************************************************/
|
* **********************************************************************************************/
|
||||||
|
|
1
src/renderer/assets/check.svg
Normal file
1
src/renderer/assets/check.svg
Normal file
|
@ -0,0 +1 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-check"><polyline points="20 6 9 17 4 12"></polyline></svg>
|
After Width: | Height: | Size: 262 B |
|
@ -1038,14 +1038,15 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</b-tab>
|
</b-tab>
|
||||||
|
<!-- Connect Settings -->
|
||||||
<b-tab :title="$root.getLz('settings.header.connect')">
|
<b-tab :title="$root.getLz('settings.header.connect')">
|
||||||
<div class="md-option-container">
|
<div class="md-option-container">
|
||||||
<!-- Cider Connect / Linking Settings -->
|
<!-- Cider Connect / Linking Settings -->
|
||||||
<div class="md-option-header">
|
<div class="md-option-header">
|
||||||
<span>{{$root.getLz('settings.header.connect')}}</span>
|
<span>{{$root.getLz('settings.header.connect')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="settings-option-body-webview">
|
<div class="settings-option-body">
|
||||||
<div class="md-option-line update-check" v-if="app.cfg.connectUser == null">
|
<div class="md-option-line update-check" v-if="app.cfg.connectUser.auth == null">
|
||||||
<div class="md-option-segment">
|
<div class="md-option-segment">
|
||||||
{{$root.getLz('settings.option.connect.link_account')}}
|
{{$root.getLz('settings.option.connect.link_account')}}
|
||||||
<small>{{$root.getLz('settings.option.connect.link_account.description')}}</small>
|
<small>{{$root.getLz('settings.option.connect.link_account.description')}}</small>
|
||||||
|
@ -1058,8 +1059,52 @@
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="app.cfg.connectUser != null" style="display:inline-flex; width:100%;height: 100%">
|
<div v-if="app.cfg.connectUser.auth != null">
|
||||||
<iframe :src="`https://connect.cidercollective.dev/setSession/` + encodeURI(JSON.stringify(app.cfg.connectUser))" sandbox="allow-scripts allow-top-navigation allow-same-origin" width="100%" height="100%" frameborder="0"></iframe>
|
<div class="md-option-line">
|
||||||
|
<div class="md-option-segment">
|
||||||
|
{{$root.getLz('settings.option.connect.link_account')}}
|
||||||
|
<small>{{$root.getLz('settings.option.connect.link_account.description')}}</small>
|
||||||
|
<br>
|
||||||
|
</div>
|
||||||
|
<div class="md-option-segment md-option-segment_auto">
|
||||||
|
<button class="md-btn" id='settings.option.general.updateCider.check' @click="logoutCC()" style="display: flex;align-items: center;gap: 0.4em;">
|
||||||
|
<%- include("../svg/check.svg") %>
|
||||||
|
<div v>Connected</div>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="md-option-header" style="margin-left: -0.55em;">
|
||||||
|
<span>{{app.cfg.connectUser.username}}</span>
|
||||||
|
<img :src="'https://cdn.discordapp.com/avatars/' + app.cfg.connectUser.id + '/' + app.cfg.connectUser.avatar + '.png?size=32'"></img>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="md-option-line">
|
||||||
|
<div class="md-option-segment">
|
||||||
|
Sync Settings
|
||||||
|
</div>
|
||||||
|
<div class="md-option-segment md-option-segment_auto">
|
||||||
|
<input type="checkbox" disabled a-v-model="app.cfg.connectUser.sync.settings" @click="app.cfg.connectUser.sync.settings = !app.cfg.connectUser.sync.settings" switch/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="md-option-line">
|
||||||
|
<div class="md-option-segment">
|
||||||
|
Sync Themes
|
||||||
|
</div>
|
||||||
|
<div class="md-option-segment md-option-segment_auto">
|
||||||
|
<input type="checkbox" disabled a-v-model="app.cfg.connectUser.sync.themes" @click="app.cfg.connectUser.sync.themes = !app.cfg.connectUser.sync.themes" switch/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="md-option-line">
|
||||||
|
<div class="md-option-segment">
|
||||||
|
Sync Plugins
|
||||||
|
</div>
|
||||||
|
<div class="md-option-segment md-option-segment_auto">
|
||||||
|
<input type="checkbox" disabled a-v-model="app.cfg.connectUser.sync.plugins" @click="app.cfg.connectUser.sync.plugins = !app.cfg.connectUser.sync.plugins" switch/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1310,6 +1355,9 @@
|
||||||
authCC() {
|
authCC() {
|
||||||
ipcRenderer.send('cc-auth')
|
ipcRenderer.send('cc-auth')
|
||||||
},
|
},
|
||||||
|
logoutCC() {
|
||||||
|
ipcRenderer.send('cc-logout')
|
||||||
|
},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
Loading…
Add table
Add a link
Reference in a new issue