-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
095bfd7
commit 97a5c59
Showing
60 changed files
with
993 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,6 @@ node_modules | |
dist | ||
content | ||
.hugo* | ||
hugo/resources | ||
hugo_stats.json | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
doc/_index.md | ||
website/docs/_index.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
<template> | ||
<BaseLayout> | ||
<template v-slot:navbar="{ sidebar, collapsed, collapse }"> | ||
<NavBar :sidebar="sidebar" :collapsed="collapsed" @collapse="collapse"> | ||
<ul class="navbar-nav mr-auto align-items-center justify-content-start"> | ||
<li class="nav-item"> | ||
<a class="nav-link" :class="{'active': $route.path.startsWith('/docs')}" href="/docs">Documentation</a> | ||
</li> | ||
<li class="nav-item" v-if="isLogged"> | ||
<a class="nav-link" :class="{'active': $route.path.startsWith('/drive')}" href="/drive">Drives</a> | ||
</li> | ||
</ul> | ||
<ul class="navbar-nav mr-auto align-items-center"> | ||
<li> | ||
<button v-if="!isLogged" class="btn btn-secondary" @click="login">Sign in</button> | ||
<button v-if="isLogged" class="btn btn-secondary" @click="logout">Logout User</button> | ||
</li> | ||
</ul> | ||
</NavBar> | ||
</template> | ||
|
||
<template v-slot:default> | ||
<div class="container"> | ||
<StaticContent /> | ||
</div> | ||
</template> | ||
</BaseLayout> | ||
</template> | ||
<script> | ||
import {markRaw} from 'vue'; | ||
import {UtilsMixin} from '../components/UtilsMixin'; | ||
import BaseLayout from '../layout/BaseLayout.vue'; | ||
import ShareModal from '../components/ShareModal.vue'; | ||
import StaticContent from '../components/StaticContent.vue'; | ||
import NavBar from '../components/NavBar.vue'; | ||
import {awaitValue} from '@swc/helpers'; | ||
export default { | ||
mixins: [ UtilsMixin ], | ||
components: { | ||
BaseLayout, StaticContent, NavBar | ||
}, | ||
data() { | ||
return { | ||
url: '', | ||
drivesShared: [], | ||
drivesNotShared: [], | ||
loading: false | ||
}; | ||
}, | ||
async created() { | ||
await this.fetch(); | ||
}, | ||
methods: { | ||
async fetch() { | ||
await this.$root.fetchUser(); | ||
if (!this.isLogged) { | ||
this.drivesShared = []; | ||
this.drivesNotShared = []; | ||
return; | ||
} | ||
this.loading = true; | ||
try { | ||
const drives = await this.DriveClientService.getDrives(); | ||
this.drivesShared = drives.filter(d => !!d.exists); | ||
this.drivesNotShared = drives.filter(d => !d.exists); | ||
} finally { | ||
this.loading = false; | ||
} | ||
}, | ||
selectDrive(driveId) { | ||
this.$router.push('/drive/' + driveId); | ||
}, | ||
goToGDrive(folderId) { | ||
window.open('https://drive.google.com/drive/u/0/folders/' + folderId); | ||
}, | ||
async submit() { | ||
try { | ||
const json = await this.authenticatedClient.fetchApi('/api/share_drive', { | ||
method: 'POST', | ||
headers: { | ||
'Accept': 'application/json', | ||
'Content-Type': 'application/json' | ||
}, | ||
body: JSON.stringify({ | ||
url: this.url | ||
}) | ||
}); | ||
if (json.driveId) { | ||
await this.$router.push({ name: 'drive', params: { driveId: json.driveId } }); | ||
} else { | ||
alert('Error sharing drive'); | ||
} | ||
} catch (err) { | ||
console.error(err); | ||
} | ||
}, | ||
share(driveId) { | ||
this.$root.$addModal({ | ||
component: markRaw(ShareModal), | ||
props: { | ||
driveId | ||
}, | ||
}); | ||
} | ||
} | ||
}; | ||
</script> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
title = "WikiGDrive" | ||
theme="wgd-bootstrap" | ||
contentDir="../website" | ||
publishDir="../dist/hugo" | ||
#uglyURLs="true" | ||
uglyURLs = false | ||
|
||
[build] | ||
writeStats = true | ||
|
||
[module] | ||
[[module.mounts]] | ||
source = './themes/wgd-bootstrap/layouts/_default/_markup' | ||
target = 'layouts/_default/_markup' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#customCSS = null # To use: uncomment and replace null with value | ||
#customJS = null # To use: uncomment and replace null with value | ||
dateFormat = ":date_long" | ||
description = "Google Drive to MarkDown synchronization" | ||
keywords = "GDrive, CLI, MarkDown, Google Docs, Wiki" | ||
math = true | ||
titleCase = true | ||
viewer = true | ||
|
||
[actionsPanel] | ||
disabled = true | ||
|
||
[post] | ||
featuredImage = true | ||
numberifyHeadings = true | ||
numberifyHeadingsSeparator = "." | ||
|
||
[sidebar] | ||
archives = false | ||
authors = false | ||
fixed = true | ||
recentPosts = false | ||
taxonomiesToggle = false | ||
|
||
[siteVerification] | ||
#baidu = null # To use: uncomment and replace null with value | ||
#baiduUnion = null # To use: uncomment and replace null with value | ||
#bing = null # To use: uncomment and replace null with value | ||
#google = null # To use: uncomment and replace null with value | ||
#shenma = null # To use: uncomment and replace null with value | ||
#so = null # To use: uncomment and replace null with value | ||
#sogou = null # To use: uncomment and replace null with value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module github.com/mieweb/wikiGDrive | ||
|
||
go 1.21.1 |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"dependencies": {}, | ||
"devDependencies": {}, | ||
"name": "wikiGDrive", | ||
"version": "0.1.0" | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{{- define "main" }} | ||
Not found | ||
{{- end -}} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.