Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ body:
- Linkwarden
- WebDAV
- Google Drive
- Dropbox
- Git
validations:
required: true
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ jobs:
- git-html
- google-drive
- google-drive-encrypted
- dropbox
- dropbox-encrypted
- linkwarden
- karakeep
test-name:
Expand Down Expand Up @@ -272,6 +274,7 @@ jobs:
FLOCCUS_TEST_SEED: ${{ github.sha }}
GIST_TOKEN: ${{ secrets.GIST_TOKEN }}
GOOGLE_API_REFRESH_TOKEN: ${{ secrets.GOOGLE_API_REFRESH_TOKEN }}
DROPBOX_API_REFRESH_TOKEN: ${{ secrets.DROPBOX_API_REFRESH_TOKEN }}
LINKWARDEN_TOKEN: ${{ secrets.LINKWARDEN_TOKEN }}
APP_VERSION: ${{ matrix.app-version }}
KARAKEEP_TEST_HOST: 172.17.0.1:3000
Expand Down
33 changes: 33 additions & 0 deletions _locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,18 @@
"Error044": {
"message": "E044: Git push operation failed: {0}"
},
"Error045": {
"message": "E044: Could not authenticate with Dropbox. Please connect floccus with your Dropbox account again."
},
"Error046": {
"message": "E046: OAuth error. Token validation error. Please reconnect your Dropbox Account."
},
"Error047": {
"message": "E047: Could not search for your file name in your Dropbox"
},
"Error048": {
"message": "E048: Could not get template for Dropbox"
},
"LabelWebdavurl": {
"message": "WebDAV URL"
},
Expand All @@ -154,6 +166,9 @@
},
"DescriptionBookmarksfilegoogle": {
"message": "the file name of the bookmarks file that will reside in your Google Drive. Do not enter the full file path, only the file name. Make sure this name is unique in your Drive. e.g. mybookmarks.xbel"
},
"DescriptionBookmarksfiledropbox": {
"message": "the file name of the bookmarks file that will reside in your Dropbox. Do not enter the full file path, only the file name. Make sure this name is unique in your Drive. e.g. mybookmarks.xbel"
},
"DescriptionBookmarksfilegit": {
"message": "a path to the bookmarks file relative to your Git repository root (all folders in the path must already exist). e.g. personal_stuff/bookmarks.xbel"
Expand Down Expand Up @@ -549,6 +564,21 @@
"DescriptionLoggedingoogle": {
"message": "You have connected your Google account to store the bookmark sync file in your Google Drive."
},
"LabelAdapterdropbox": {
"message": "Dropbox"
},
"DescriptionAdapterdropbox": {
"message": "Sync bookmarks via an (optionally encrypted) file that is stored in your Dropbox. It can sync http, ftp, data, file and javascript bookmarks. You can choose to use end-to-end encryption when using this option."
},
"LabelLogindropbox": {
"message": "Login with Dropbox"
},
"DescriptionLogindropbox": {
"message": "Connect your Dropbox account to store the bookmark sync file in your Dropbox."
},
"DescriptionLoggedindropbox": {
"message": "You have connected your Dropbox account to store the bookmark sync file in your Dropbox."
},
"LabelPassphrase": {
"message": "Passphrase"
},
Expand Down Expand Up @@ -681,6 +711,9 @@
"LabelGoogledrivesetup": {
"message": "Login to Google Drive"
},
"LabelDropboxsetup": {
"message": "Login to Dropbox"
},
"LabelSyncfoldersetup": {
"message": "Which Folders do you want to sync?"
},
Expand Down
28 changes: 28 additions & 0 deletions dropbox-api.credentials.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"web": {
"client_id": "nmykfhd3jjmc67j",
"project_id": "nmykfhd3jjmc67j",
"auth_uri": "https://www.dropbox.com/oauth2/authorize",
"token_uri": "https://www.dropbox.com/oauth2/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_secret": "1rgc9mzsxilh22s",
"redirect_uris": [
"https://mbepccofdnoepgicagpchfmafecckdam.chromiumapp.org/",
"https://76a380c4950986998208e7bb9dbd8fea94c91504.extensions.allizom.org/"
]
},
"android": {
"client_id": "305459871054-05e7kf9q9kkbeovaf380ldsb248psc2d.apps.googleusercontent.com",
"project_id": "floccus-1613668481464",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"redirect_uris": [
"urn:ietf:wg:oauth:2.0:oob",
"http://localhost"
]
},
"ios": {
"client_id": "305459871054-ovvunbhc8jf8g467gtpsbnap5el302gq.apps.googleusercontent.com"
}
}
2 changes: 1 addition & 1 deletion fastlane/metadata/android/en-US/full_description.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Manage and synchronize your bookmarks via Nextcloud, or any WebDAV service, or any Git service, or Google Drive, end-to-end encrypted, if you want.
Manage and synchronize your bookmarks via Nextcloud, or any WebDAV service, or any Git service, or Google Drive, or Dropbox, end-to-end encrypted, if you want.

This is the standalone bookmarks manager android app variant of floccus. You can also install floccus on your Desktop browsers to sync bookmarks with them. This App, due to technical reasons, cannot access bookmarks in your mobile browser apps directly, which is why you can only view them in the app or import and export them as a html file.

Expand Down
21 changes: 7 additions & 14 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,16 @@ var rename = require('gulp-rename')
var path = require('path')

// Provide a dummy credential file for third-party builders
try {
fs.accessSync('./dropbox-api.credentials.json')
} catch (e) {
console.log(`error loading dropbox api credentials: ${e.message}`)
}

try {
fs.accessSync('./google-api.credentials.json')
} catch (e) {
fs.writeFileSync('./google-api.credentials.json', JSON.stringify({
'web': {
'client_id': 'yourappidhere.apps.googleusercontent.com',
'project_id': 'YOUR PROJECT ID HERE',
'auth_uri': 'https://accounts.google.com/o/oauth2/auth',
'token_uri': 'https://oauth2.googleapis.com/token',
'auth_provider_x509_cert_url': 'https://www.googleapis.com/oauth2/v1/certs',
'client_secret': 'YOUR CLIENT SECRET HERE',
'redirect_uris': [
'https://yourappidhere.chromiumapp.org/',
'https://yourappidhere.extensions.allizom.org/'
]
}
}))
console.log(`error loading google api credentials: ${e.message}`)
}

// eslint-disable-next-line @typescript-eslint/no-var-requires
Expand Down
1 change: 0 additions & 1 deletion manifest.firefox.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@

"browser_action": {
"browser_style": false,
"chrome_style": false,
"default_icon": {
"48": "icons/logo.png"
},
Expand Down
36 changes: 34 additions & 2 deletions src/errors/Error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,11 +267,11 @@ export class GoogleDriveAuthenticationError extends FloccusError {
}
}

export class OAuthTokenError extends FloccusError {
export class GoogleOAuthTokenError extends FloccusError {
constructor() {
super('E032: OAuth error. Token validation error. Please reconnect your Google Account.')
this.code = 32
Object.setPrototypeOf(this, OAuthTokenError.prototype)
Object.setPrototypeOf(this, GoogleOAuthTokenError.prototype)
}
}

Expand Down Expand Up @@ -379,4 +379,36 @@ export class GitPushError extends FloccusError {
this.errorMessage = errorMessage
Object.setPrototypeOf(this, GitPushError.prototype)
}
}

export class DropboxAuthenticationError extends FloccusError {
constructor() {
super('E045: Could not authenticate with Dropbox. Please connect floccus with your Dropbox account again.')
this.code = 45
Object.setPrototypeOf(this, DropboxAuthenticationError.prototype)
}
}

export class DropboxOAuthTokenError extends FloccusError {
constructor() {
super('E046: OAuth error. Token validation error. Please reconnect your Dropbox Account.')
this.code = 46
Object.setPrototypeOf(this, DropboxOAuthTokenError.prototype)
}
}

export class DropboxSearchError extends FloccusError {
constructor() {
super('E047: Could not search for your file name in your Dropbox')
this.code = 47
Object.setPrototypeOf(this, DropboxSearchError.prototype)
}
}

export class DropboxTemplateError extends FloccusError {
constructor() {
super('E048: Could not get template for Dropbox')
this.code = 48
Object.setPrototypeOf(this, DropboxTemplateError.prototype)
}
}
1 change: 1 addition & 0 deletions src/lib/Account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ AdapterFactory.register('nextcloud-bookmarks', async() => (await import('./adapt
AdapterFactory.register('webdav', async() => (await import('./adapters/WebDav')).default)
AdapterFactory.register('git', async() => (await import('./adapters/Git')).default)
AdapterFactory.register('google-drive', async() => (await import('./adapters/GoogleDrive')).default)
AdapterFactory.register('dropbox', async() => (await import('./adapters/Dropbox')).default)
AdapterFactory.register('fake', async() => (await import('./adapters/Fake')).default)

// 2h
Expand Down
Loading