Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a69ebbdd10 | ||
|
|
ddf7335894 | ||
|
|
2462cb24bd | ||
|
|
a1dd2b5a9b | ||
|
|
e9d6d4a907 | ||
|
|
6fa91e83f1 | ||
|
|
7d445bb02c |
No files matched your search
@@ -3582,7 +3582,7 @@ checksum = "2ee67f1008b1ba2321834326597b8e186293b049a023cdef258527550b9935b4"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pdfs-cli"
|
name = "pdfs-cli"
|
||||||
version = "3.8.0"
|
version = "3.8.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"clap",
|
"clap",
|
||||||
@@ -3599,7 +3599,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pdfs-core"
|
name = "pdfs-core"
|
||||||
version = "3.8.0"
|
version = "3.8.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"base64 0.23.1",
|
"base64 0.23.1",
|
||||||
@@ -3629,7 +3629,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pdfs-fuse"
|
name = "pdfs-fuse"
|
||||||
version = "3.8.0"
|
version = "3.8.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"base64 0.23.1",
|
"base64 0.23.1",
|
||||||
@@ -3653,7 +3653,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pdfs-gui"
|
name = "pdfs-gui"
|
||||||
version = "3.8.0"
|
version = "3.8.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-channel",
|
"async-channel",
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ resolver = "2"
|
|||||||
members = ["crates/pdfs-core", "crates/pdfs-fuse", "crates/pdfs-cli", "crates/pdfs-gui"]
|
members = ["crates/pdfs-core", "crates/pdfs-fuse", "crates/pdfs-cli", "crates/pdfs-gui"]
|
||||||
|
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
version = "3.8.0"
|
version = "3.8.1"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
authors = ["Nils Pukropp <contact@narl.io>"]
|
authors = ["Nils Pukropp <contact@narl.io>"]
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<div align="center">
|
<div align="center">
|
||||||
|
|
||||||
<img src="images/logo.svg" alt="" width="112" height="112">
|
<a href="images/logo.svg"><img src="images/logo.svg" alt="Proton Drive for Linux icon" width="128" height="128"></a>
|
||||||
|
|
||||||
# Proton Drive for Linux
|
# Proton Drive for Linux
|
||||||
|
|
||||||
|
|||||||
@@ -579,6 +579,7 @@ impl ContentCache {
|
|||||||
// the disk.
|
// the disk.
|
||||||
cache.reseed_totals();
|
cache.reseed_totals();
|
||||||
cache.import_legacy_pins()?;
|
cache.import_legacy_pins()?;
|
||||||
|
cache.set_budget(max_bytes);
|
||||||
Ok(cache)
|
Ok(cache)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1153,16 +1154,18 @@ impl ContentCache {
|
|||||||
};
|
};
|
||||||
let mut skipped = 0usize;
|
let mut skipped = 0usize;
|
||||||
while running > cap {
|
while running > cap {
|
||||||
// Fetch a batch past whatever we have already skipped as exempt.
|
// A whole batch can be pinned. Keep looking until the index has
|
||||||
let want = skipped + EVICT_BATCH;
|
// no entries past the ones we have skipped.
|
||||||
let Ok(batch) = self.db.cache_eviction_candidates(kind, want) else {
|
let Ok(batch) = self
|
||||||
|
.db
|
||||||
|
.cache_eviction_candidates(kind, EVICT_BATCH, skipped)
|
||||||
|
else {
|
||||||
break;
|
break;
|
||||||
};
|
};
|
||||||
if batch.len() <= skipped {
|
if batch.is_empty() {
|
||||||
break; // nothing new to consider
|
break;
|
||||||
}
|
}
|
||||||
let mut evicted_any = false;
|
for (key, size) in batch {
|
||||||
for (key, size) in batch.into_iter().skip(skipped) {
|
|
||||||
if running <= cap {
|
if running <= cap {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1170,14 +1173,18 @@ impl ContentCache {
|
|||||||
skipped += 1; // counts toward the total, never a victim
|
skipped += 1; // counts toward the total, never a victim
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
let _ = std::fs::remove_file(dir.join(&key));
|
if let Err(error) = std::fs::remove_file(dir.join(&key))
|
||||||
|
&& error.kind() != std::io::ErrorKind::NotFound
|
||||||
|
{
|
||||||
|
skipped += 1;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
let _ = std::fs::remove_file(dir.join(format!("{key}.meta")));
|
let _ = std::fs::remove_file(dir.join(format!("{key}.meta")));
|
||||||
let _ = self.db.cache_remove(&key);
|
if self.db.cache_remove(&key).is_err() {
|
||||||
|
skipped += 1;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
running = running.saturating_sub(size);
|
running = running.saturating_sub(size);
|
||||||
evicted_any = true;
|
|
||||||
}
|
|
||||||
if !evicted_any {
|
|
||||||
break; // every remaining candidate is exempt
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// The index is the truth; realign the fast path with it.
|
// The index is the truth; realign the fast path with it.
|
||||||
@@ -1405,7 +1412,7 @@ impl ContentCache {
|
|||||||
.collect();
|
.collect();
|
||||||
let content_dir = self.content_dir.clone();
|
let content_dir = self.content_dir.clone();
|
||||||
// Force pool enforcement ignoring current cap check to free disk space immediately
|
// Force pool enforcement ignoring current cap check to free disk space immediately
|
||||||
let Ok(list) = self.db.cache_eviction_candidates(KIND_BLOB, 10) else {
|
let Ok(list) = self.db.cache_eviction_candidates(KIND_BLOB, 10, 0) else {
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
for (key, bytes) in list {
|
for (key, bytes) in list {
|
||||||
@@ -1883,13 +1890,13 @@ impl ContentCache {
|
|||||||
// Pinned blobs (by cache key) are exempt from eviction. Resolves direct
|
// Pinned blobs (by cache key) are exempt from eviction. Resolves direct
|
||||||
// pins plus every descendant of a recursively-pinned folder, hashed into
|
// pins plus every descendant of a recursively-pinned folder, hashed into
|
||||||
// cache keys to match on-disk filenames.
|
// cache keys to match on-disk filenames.
|
||||||
let pinned: HashSet<String> = self
|
let pinned = match self.db.pinned_uids() {
|
||||||
.db
|
Ok(uids) => uids.iter().map(|uid| Self::key_str(uid)).collect(),
|
||||||
.pinned_uids()
|
Err(error) => {
|
||||||
.unwrap_or_default()
|
tracing::warn!(%error, "reading pins for cache eviction failed");
|
||||||
.iter()
|
return;
|
||||||
.map(|uid| Self::key_str(uid))
|
}
|
||||||
.collect();
|
};
|
||||||
let content_dir = self.content_dir.clone();
|
let content_dir = self.content_dir.clone();
|
||||||
self.enforce_pool(KIND_BLOB, &content_dir, Some(&pinned));
|
self.enforce_pool(KIND_BLOB, &content_dir, Some(&pinned));
|
||||||
}
|
}
|
||||||
@@ -2010,8 +2017,7 @@ impl ContentCache {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Retune the soft byte cap (`0` = unlimited) at runtime and immediately
|
/// Retune the soft byte cap (`0` = unlimited) at runtime and immediately
|
||||||
/// enforce it: blobs and blocks are LRU-evicted back under the new cap (a
|
/// enforce it across all three pools.
|
||||||
/// lower cap frees space now; a higher one is a no-op until the next store).
|
|
||||||
/// Called by the daemon when the Settings page changes the cache budget.
|
/// Called by the daemon when the Settings page changes the cache budget.
|
||||||
pub fn set_budget(&self, bytes: u64) {
|
pub fn set_budget(&self, bytes: u64) {
|
||||||
self.max_bytes.store(bytes, Ordering::Relaxed);
|
self.max_bytes.store(bytes, Ordering::Relaxed);
|
||||||
@@ -2245,19 +2251,50 @@ mod tests {
|
|||||||
// crash) but the same on-disk cache: reconcile repopulates from disk.
|
// crash) but the same on-disk cache: reconcile repopulates from disk.
|
||||||
let db2 = Arc::new(Db::open_in_memory().unwrap());
|
let db2 = Arc::new(Db::open_in_memory().unwrap());
|
||||||
assert!(db2.cache_entries_by_kind("blob").unwrap().is_empty());
|
assert!(db2.cache_entries_by_kind("blob").unwrap().is_empty());
|
||||||
let c = ContentCache::open(content, pins, 8, db2.clone()).unwrap();
|
let c = ContentCache::open(content, pins, 0, db2.clone()).unwrap();
|
||||||
assert_eq!(db2.cache_entries_by_kind("blob").unwrap().len(), 3);
|
assert_eq!(db2.cache_entries_by_kind("blob").unwrap().len(), 3);
|
||||||
|
|
||||||
// With the index rebuilt, a further store enforces the budget against the
|
assert_eq!(c.usage(), 12);
|
||||||
// reconciled entries instead of leaking them.
|
}
|
||||||
c.store(&uid("d"), 1, 4, b"dddd").unwrap();
|
|
||||||
let total: u64 = db2
|
#[test]
|
||||||
.cache_entries_by_kind("blob")
|
fn reopening_trims_all_cache_pools_even_when_the_oldest_batch_is_pinned() {
|
||||||
.unwrap()
|
let (c, _dir) = cache();
|
||||||
.iter()
|
for i in 0..EVICT_BATCH {
|
||||||
.map(|(_, s)| s)
|
let u = uid(&format!("pinned-{i}"));
|
||||||
.sum();
|
c.store(&u, 1, 1, b"p").unwrap();
|
||||||
assert!(total <= 8, "budget enforced after reconcile, total={total}");
|
c.add_pin(&u, Path::new("pinned"), false).unwrap();
|
||||||
|
std::fs::File::open(c.blob_path(&u))
|
||||||
|
.unwrap()
|
||||||
|
.set_modified(UNIX_EPOCH)
|
||||||
|
.unwrap();
|
||||||
|
}
|
||||||
|
|
||||||
|
let unpinned = uid("unpinned");
|
||||||
|
let payload = [0u8; 64];
|
||||||
|
let size = payload.len() as u64;
|
||||||
|
c.store(&unpinned, 1, size, &payload).unwrap();
|
||||||
|
c.store_block(&unpinned, 1, size, blk(size, 0), &payload)
|
||||||
|
.unwrap();
|
||||||
|
c.store_thumbnail(&unpinned, 1, 1, &payload).unwrap();
|
||||||
|
let recovery = c.recovery_dir.join("recovered.bin");
|
||||||
|
std::fs::write(&recovery, b"recovered write").unwrap();
|
||||||
|
|
||||||
|
let budget = (EVICT_BATCH as u64 * 100).div_ceil(SPLIT_BLOB);
|
||||||
|
let reopened = ContentCache::open(
|
||||||
|
c.content_dir.clone(),
|
||||||
|
c.pins_path.clone(),
|
||||||
|
budget,
|
||||||
|
c.db.clone(),
|
||||||
|
)
|
||||||
|
.unwrap();
|
||||||
|
|
||||||
|
assert_eq!(reopened.usage(), EVICT_BATCH as u64);
|
||||||
|
assert!(!reopened.blob_path(&unpinned).exists());
|
||||||
|
for i in 0..EVICT_BATCH {
|
||||||
|
assert!(reopened.is_cached(&uid(&format!("pinned-{i}")), 1, 1));
|
||||||
|
}
|
||||||
|
assert_eq!(std::fs::read(recovery).unwrap(), b"recovered write");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// An eviction removes the blob, then its tag. A crash in between, or a
|
/// An eviction removes the blob, then its tag. A crash in between, or a
|
||||||
|
|||||||
@@ -108,7 +108,8 @@ impl Db {
|
|||||||
Ok(total.max(0) as u64)
|
Ok(total.max(0) as u64)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The `limit` least-recently-accessed entries of `kind`, oldest first.
|
/// The `limit` least-recently-accessed entries of `kind` after `offset`,
|
||||||
|
/// oldest first.
|
||||||
///
|
///
|
||||||
/// Eviction wants a handful of victims, not the whole table. Bounded so a
|
/// Eviction wants a handful of victims, not the whole table. Bounded so a
|
||||||
/// pass over a large cache does not read every row to drop a few, and so the
|
/// pass over a large cache does not read every row to drop a few, and so the
|
||||||
@@ -118,13 +119,14 @@ impl Db {
|
|||||||
&self,
|
&self,
|
||||||
kind: &str,
|
kind: &str,
|
||||||
limit: usize,
|
limit: usize,
|
||||||
|
offset: usize,
|
||||||
) -> Result<Vec<(String, u64)>> {
|
) -> Result<Vec<(String, u64)>> {
|
||||||
let conn = self.read();
|
let conn = self.read();
|
||||||
let mut stmt = conn.prepare_cached(
|
let mut stmt = conn.prepare_cached(
|
||||||
"SELECT cache_key, size_bytes FROM cache_entries
|
"SELECT cache_key, size_bytes FROM cache_entries
|
||||||
WHERE kind = ?1 ORDER BY last_accessed ASC LIMIT ?2",
|
WHERE kind = ?1 ORDER BY last_accessed ASC LIMIT ?2 OFFSET ?3",
|
||||||
)?;
|
)?;
|
||||||
let rows = stmt.query_map(params![kind, limit as i64], |r| {
|
let rows = stmt.query_map(params![kind, limit as i64, offset as i64], |r| {
|
||||||
Ok((r.get::<_, String>(0)?, r.get::<_, i64>(1)?.max(0) as u64))
|
Ok((r.get::<_, String>(0)?, r.get::<_, i64>(1)?.max(0) as u64))
|
||||||
})?;
|
})?;
|
||||||
let mut out = Vec::new();
|
let mut out = Vec::new();
|
||||||
|
|||||||
@@ -252,9 +252,32 @@ const UID_NOW: &str = "COALESCE((SELECT uid FROM nodes WHERE lid = pending_op.li
|
|||||||
const PARENT_NOW: &str =
|
const PARENT_NOW: &str =
|
||||||
"COALESCE((SELECT uid FROM nodes WHERE lid = pending_op.parent_lid), parent_uid)";
|
"COALESCE((SELECT uid FROM nodes WHERE lid = pending_op.parent_lid), parent_uid)";
|
||||||
|
|
||||||
|
/// Whether any queued move takes a node out of the folder `source.uid`.
|
||||||
|
/// A move updates the local node tree immediately, so its original parent
|
||||||
|
/// comes from the queue, including while a worker is sending it to Drive.
|
||||||
|
const MOVES_OUT_OF_FOLDER: &str = "
|
||||||
|
COALESCE((SELECT is_dir FROM nodes WHERE uid = source.uid), 1) = 1
|
||||||
|
AND EXISTS (
|
||||||
|
WITH RECURSIVE folders(uid, lid) AS (
|
||||||
|
SELECT source.uid, (SELECT lid FROM nodes WHERE uid = source.uid)
|
||||||
|
UNION
|
||||||
|
SELECT n.uid, n.lid FROM nodes n JOIN folders f
|
||||||
|
ON n.parent_lid = f.lid OR (n.parent_lid IS NULL AND n.parent_uid = f.uid)
|
||||||
|
WHERE n.is_dir = 1
|
||||||
|
)
|
||||||
|
SELECT 1 FROM pending_op AS move
|
||||||
|
WHERE move.kind = 'rename'
|
||||||
|
AND CASE WHEN json_valid(move.meta_json)
|
||||||
|
THEN json_extract(move.meta_json, '$.original_parent_uid') END
|
||||||
|
IN (SELECT uid FROM folders)
|
||||||
|
AND move.parent_uid IS NOT NULL
|
||||||
|
AND NOT EXISTS (SELECT 1 FROM folders f
|
||||||
|
WHERE f.lid = move.parent_lid OR f.uid = move.parent_uid)
|
||||||
|
)";
|
||||||
|
|
||||||
/// The `WHERE` terms for a row a drain worker may claim once it falls due: not
|
/// The `WHERE` terms for a row a drain worker may claim once it falls due: not
|
||||||
/// claimed already, no other claimed op on the same node, and not under a
|
/// claimed already, no other claimed op on the same node, no pending creation
|
||||||
/// folder that has yet to land.
|
/// of its parent, and no moves that still need a folder we are about to trash.
|
||||||
///
|
///
|
||||||
/// One fragment for [`Db::claim_next_due_op`] and [`Db::earliest_due_at`]. A
|
/// One fragment for [`Db::claim_next_due_op`] and [`Db::earliest_due_at`]. A
|
||||||
/// row the claim skips but the wait counts is due "now" for as long as it is
|
/// row the claim skips but the wait counts is due "now" for as long as it is
|
||||||
@@ -265,7 +288,9 @@ fn claimable() -> String {
|
|||||||
AND (parent_uid IS NULL OR substr({PARENT_NOW}, 1, {n}) <> '{v}~')
|
AND (parent_uid IS NULL OR substr({PARENT_NOW}, 1, {n}) <> '{v}~')
|
||||||
AND uid NOT IN (SELECT uid FROM pending_op WHERE claimed_at <> 0)
|
AND uid NOT IN (SELECT uid FROM pending_op WHERE claimed_at <> 0)
|
||||||
AND (lid IS NULL OR lid NOT IN (
|
AND (lid IS NULL OR lid NOT IN (
|
||||||
SELECT lid FROM pending_op WHERE claimed_at <> 0 AND lid IS NOT NULL))",
|
SELECT lid FROM pending_op WHERE claimed_at <> 0 AND lid IS NOT NULL))
|
||||||
|
AND (kind <> 'trash' OR NOT EXISTS (
|
||||||
|
SELECT 1 FROM (SELECT {UID_NOW} AS uid) AS source WHERE {MOVES_OUT_OF_FOLDER}))",
|
||||||
v = LOCAL_VOLUME,
|
v = LOCAL_VOLUME,
|
||||||
n = LOCAL_VOLUME.len() + 1,
|
n = LOCAL_VOLUME.len() + 1,
|
||||||
)
|
)
|
||||||
@@ -475,19 +500,40 @@ pub struct AttachedBlob {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Db {
|
impl Db {
|
||||||
/// Whether a queued trash still holds `name` somewhere.
|
/// A folder can look empty locally while Drive still holds the queued
|
||||||
|
/// moves' source files. A trash has to go through the drain in that case.
|
||||||
|
pub fn has_pending_moves_out_of(&self, uid: &str) -> Result<bool> {
|
||||||
|
let conn = self.read();
|
||||||
|
Ok(conn
|
||||||
|
.prepare_cached(&format!(
|
||||||
|
"SELECT EXISTS (SELECT 1 FROM (SELECT ?1 AS uid) AS source
|
||||||
|
WHERE {MOVES_OUT_OF_FOLDER})"
|
||||||
|
))?
|
||||||
|
.query_row(params![uid], |row| row.get(0))?)
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Whether a queued trash still holds `name` in `parent_uid`.
|
||||||
///
|
///
|
||||||
/// A replacing rename or a delete-then-recreate queues the trash of the old
|
/// A replacing rename or a delete-then-recreate queues the trash of the old
|
||||||
/// node ahead of the op that wants its name. With several drain workers the
|
/// node ahead of the op that wants its name. With several drain workers the
|
||||||
/// later op can run first and find the name still taken; this tells it to
|
/// later op can run first and find the name still taken; this tells it to
|
||||||
/// wait for the trash rather than land under a conflict name.
|
/// wait for the trash rather than land under a conflict name. Older rows
|
||||||
pub fn has_pending_trash_named(&self, name: &str) -> Result<bool> {
|
/// whose node and parent are unknown are matched by name alone.
|
||||||
|
pub fn has_pending_trash_named(&self, name: &str, parent_uid: Option<&str>) -> Result<bool> {
|
||||||
let conn = self.read();
|
let conn = self.read();
|
||||||
conn.query_row(
|
conn.query_row(
|
||||||
"SELECT EXISTS(
|
"SELECT EXISTS(
|
||||||
SELECT 1 FROM pending_op WHERE kind = ?1 AND name = ?2
|
SELECT 1 FROM pending_op AS p
|
||||||
)",
|
WHERE p.kind = ?1 AND p.name = ?2
|
||||||
params![OP_TRASH, name],
|
AND (?3 IS NULL OR ?3 = COALESCE(
|
||||||
|
(SELECT uid FROM nodes WHERE lid = p.parent_lid),
|
||||||
|
p.parent_uid,
|
||||||
|
(SELECT COALESCE(parent.uid, n.parent_uid)
|
||||||
|
FROM nodes n LEFT JOIN nodes parent ON parent.lid = n.parent_lid
|
||||||
|
WHERE n.uid = p.uid),
|
||||||
|
?3))
|
||||||
|
)",
|
||||||
|
params![OP_TRASH, name, parent_uid],
|
||||||
|row| row.get(0),
|
|row| row.get(0),
|
||||||
)
|
)
|
||||||
.map_err(Into::into)
|
.map_err(Into::into)
|
||||||
@@ -1219,7 +1265,7 @@ impl Db {
|
|||||||
/// the claim is a column: a row is offered to exactly one worker, and the
|
/// the claim is a column: a row is offered to exactly one worker, and the
|
||||||
/// worker that took it is the only one that may retire, defer or fail it.
|
/// worker that took it is the only one that may retire, defer or fail it.
|
||||||
///
|
///
|
||||||
/// Two exclusions on top of [`next_due_op`](Self::next_due_op)'s:
|
/// The selected row must also satisfy [`claimable`]:
|
||||||
///
|
///
|
||||||
/// * `claimed_at = 0` — not already in flight somewhere else.
|
/// * `claimed_at = 0` — not already in flight somewhere else.
|
||||||
/// * no *other* claimed op shares this `uid`. Ordering only has to hold per
|
/// * no *other* claimed op shares this `uid`. Ordering only has to hold per
|
||||||
@@ -1229,6 +1275,8 @@ impl Db {
|
|||||||
/// pending entry. `ORDER BY id` plus this exclusion gives per-uid serial
|
/// pending entry. `ORDER BY id` plus this exclusion gives per-uid serial
|
||||||
/// order for free — the older op is claimed first and the newer one is
|
/// order for free — the older op is claimed first and the newer one is
|
||||||
/// invisible until it retires.
|
/// invisible until it retires.
|
||||||
|
/// * its destination folder already exists remotely.
|
||||||
|
/// * a folder trash waits for pending moves out of that folder's subtree.
|
||||||
///
|
///
|
||||||
/// Select and mark are one transaction, so two workers cannot both see the
|
/// Select and mark are one transaction, so two workers cannot both see the
|
||||||
/// row as unclaimed.
|
/// row as unclaimed.
|
||||||
|
|||||||
@@ -2740,15 +2740,34 @@ fn atomic_trash_replacement_returns_owned_blobs_after_commit() {
|
|||||||
#[test]
|
#[test]
|
||||||
fn a_queued_trash_holds_its_name_until_it_lands() {
|
fn a_queued_trash_holds_its_name_until_it_lands() {
|
||||||
let db = Db::open_in_memory().unwrap();
|
let db = Db::open_in_memory().unwrap();
|
||||||
|
db.upsert_node(&file("held-name", "root", "report.txt", 1))
|
||||||
|
.unwrap();
|
||||||
let node = uid("held-name").to_string();
|
let node = uid("held-name").to_string();
|
||||||
assert!(!db.has_pending_trash_named("report.txt").unwrap());
|
let root = uid("root").to_string();
|
||||||
|
assert!(
|
||||||
|
!db.has_pending_trash_named("report.txt", Some(&root))
|
||||||
|
.unwrap()
|
||||||
|
);
|
||||||
|
|
||||||
let (trash_id, _) = db.replace_ops_with_trash(&node, "report.txt", 1).unwrap();
|
let (trash_id, _) = db.replace_ops_with_trash(&node, "report.txt", 1).unwrap();
|
||||||
assert!(db.has_pending_trash_named("report.txt").unwrap());
|
assert!(
|
||||||
assert!(!db.has_pending_trash_named("other.txt").unwrap());
|
db.has_pending_trash_named("report.txt", Some(&root))
|
||||||
|
.unwrap()
|
||||||
|
);
|
||||||
|
assert!(
|
||||||
|
!db.has_pending_trash_named("other.txt", Some(&root))
|
||||||
|
.unwrap()
|
||||||
|
);
|
||||||
|
assert!(
|
||||||
|
!db.has_pending_trash_named("report.txt", Some(&uid("other").to_string()))
|
||||||
|
.unwrap()
|
||||||
|
);
|
||||||
|
|
||||||
db.delete_op(trash_id).unwrap();
|
db.delete_op(trash_id).unwrap();
|
||||||
assert!(!db.has_pending_trash_named("report.txt").unwrap());
|
assert!(
|
||||||
|
!db.has_pending_trash_named("report.txt", Some(&root))
|
||||||
|
.unwrap()
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A create that found its name held by a queued trash backed off. The trash
|
/// A create that found its name held by a queued trash backed off. The trash
|
||||||
@@ -6094,7 +6113,7 @@ fn cache_eviction_candidates_are_lru_ordered_and_limited() {
|
|||||||
}
|
}
|
||||||
db.cache_touch("other", "block", 100, 0).unwrap();
|
db.cache_touch("other", "block", 100, 0).unwrap();
|
||||||
|
|
||||||
let batch = db.cache_eviction_candidates("blob", 3).unwrap();
|
let batch = db.cache_eviction_candidates("blob", 3, 0).unwrap();
|
||||||
assert_eq!(batch.len(), 3, "honours the limit");
|
assert_eq!(batch.len(), 3, "honours the limit");
|
||||||
let keys: Vec<&str> = batch.iter().map(|(k, _)| k.as_str()).collect();
|
let keys: Vec<&str> = batch.iter().map(|(k, _)| k.as_str()).collect();
|
||||||
assert_eq!(keys, ["k9", "k8", "k7"], "least-recently-accessed first");
|
assert_eq!(keys, ["k9", "k8", "k7"], "least-recently-accessed first");
|
||||||
@@ -6925,6 +6944,54 @@ fn two_workers_never_share_a_node() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn trashing_a_folder_waits_for_moves_out_of_its_subtree() {
|
||||||
|
let db = Db::open_in_memory().unwrap();
|
||||||
|
db.upsert_nodes(&[
|
||||||
|
folder("root", None, "My Files"),
|
||||||
|
folder("source", Some("root"), "source"),
|
||||||
|
folder("nested", Some("source"), "nested"),
|
||||||
|
folder("destination", Some("root"), "destination"),
|
||||||
|
file("photo", "destination", "photo.jpg", 1),
|
||||||
|
])
|
||||||
|
.unwrap();
|
||||||
|
let source = uid("source").to_string();
|
||||||
|
let destination = uid("destination").to_string();
|
||||||
|
let (move_id, _) = db
|
||||||
|
.enqueue_op(&PendingOp {
|
||||||
|
kind: OP_RENAME.to_string(),
|
||||||
|
uid: uid("photo").to_string(),
|
||||||
|
parent_uid: Some(destination.clone()),
|
||||||
|
name: Some("photo.jpg".into()),
|
||||||
|
blob_path: None,
|
||||||
|
meta_json: Some(
|
||||||
|
serde_json::to_string(&RenameMeta {
|
||||||
|
original_parent_uid: uid("nested").to_string(),
|
||||||
|
original_name: Some("photo.jpg".into()),
|
||||||
|
})
|
||||||
|
.unwrap(),
|
||||||
|
),
|
||||||
|
next_attempt_at: 20,
|
||||||
|
..bulk_op(0, &destination)
|
||||||
|
})
|
||||||
|
.unwrap();
|
||||||
|
assert!(db.has_pending_moves_out_of(&source).unwrap());
|
||||||
|
assert!(!db.has_pending_moves_out_of(&destination).unwrap());
|
||||||
|
assert!(
|
||||||
|
!db.has_pending_moves_out_of(&uid("root").to_string())
|
||||||
|
.unwrap()
|
||||||
|
);
|
||||||
|
let (trash_id, _) = db.replace_ops_with_trash(&source, "source", 2).unwrap();
|
||||||
|
|
||||||
|
assert!(db.claim_next_due_op(10).unwrap().is_none());
|
||||||
|
assert_eq!(db.earliest_due_at().unwrap(), Some(20));
|
||||||
|
assert_eq!(db.claim_next_due_op(20).unwrap().unwrap().id, move_id);
|
||||||
|
assert!(db.claim_next_due_op(20).unwrap().is_none());
|
||||||
|
assert_eq!(db.earliest_due_at().unwrap(), None);
|
||||||
|
db.delete_op(move_id).unwrap();
|
||||||
|
assert_eq!(db.claim_next_due_op(20).unwrap().unwrap().id, trash_id);
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn claims_do_not_survive_the_process_that_took_them() {
|
fn claims_do_not_survive_the_process_that_took_them() {
|
||||||
let db = Db::open_in_memory().unwrap();
|
let db = Db::open_in_memory().unwrap();
|
||||||
|
|||||||
@@ -1349,7 +1349,11 @@ impl Core {
|
|||||||
parent: Option<&NodeUid>,
|
parent: Option<&NodeUid>,
|
||||||
name: &str,
|
name: &str,
|
||||||
) -> Result<bool, Box<dyn std::error::Error>> {
|
) -> Result<bool, Box<dyn std::error::Error>> {
|
||||||
if self.db.has_pending_trash_named(name)? {
|
let parent_uid = parent.map(NodeUid::to_string);
|
||||||
|
if self
|
||||||
|
.db
|
||||||
|
.has_pending_trash_named(name, parent_uid.as_deref())?
|
||||||
|
{
|
||||||
return Ok(true);
|
return Ok(true);
|
||||||
}
|
}
|
||||||
if op.attempts >= NAME_HOLD_ATTEMPTS {
|
if op.attempts >= NAME_HOLD_ATTEMPTS {
|
||||||
|
|||||||
@@ -2372,17 +2372,19 @@ impl ProtonFs {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Offline: queue it. Trashing is the one mutation a user expects to work
|
// Queue a folder trash while Drive still holds children that were moved
|
||||||
// regardless — the file is gone from their point of view the moment the
|
// out locally. The drain waits for those moves before sending it.
|
||||||
// command returns. The same when the network goes
|
|
||||||
// away under the remote call below.
|
|
||||||
let queue_it = |reply: ReplyEmpty| match self.core.queue_trash(&uid, name, open_now) {
|
let queue_it = |reply: ReplyEmpty| match self.core.queue_trash(&uid, name, open_now) {
|
||||||
Ok(()) => reply.ok(),
|
Ok(()) => reply.ok(),
|
||||||
Err(e) => reply.error(e),
|
Err(e) => reply.error(e),
|
||||||
};
|
};
|
||||||
if !self.core.sends_inline() {
|
if !self.core.sends_inline() {
|
||||||
queue_it(reply);
|
return queue_it(reply);
|
||||||
return;
|
}
|
||||||
|
match self.core.has_pending_moves_out_of(&uid) {
|
||||||
|
Ok(false) => {}
|
||||||
|
Ok(true) => return queue_it(reply),
|
||||||
|
Err(error) => return reply.error(error),
|
||||||
}
|
}
|
||||||
if let Err(e) = self.core.require_uid_writable(&uid) {
|
if let Err(e) = self.core.require_uid_writable(&uid) {
|
||||||
reply.error(e);
|
reply.error(e);
|
||||||
|
|||||||
@@ -4012,6 +4012,15 @@ impl Core {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn has_pending_moves_out_of(&self, uid: &NodeUid) -> Result<bool, Errno> {
|
||||||
|
self.db
|
||||||
|
.has_pending_moves_out_of(&uid.to_string())
|
||||||
|
.map_err(|error| {
|
||||||
|
error!(%uid, %error, "checking for moves out of a trash target failed");
|
||||||
|
Errno::EIO
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
/// Queue trashing a node the server knows about, and drop it from the tree
|
/// Queue trashing a node the server knows about, and drop it from the tree
|
||||||
/// now.
|
/// now.
|
||||||
///
|
///
|
||||||
@@ -5390,6 +5399,11 @@ impl Core {
|
|||||||
&parent_uid,
|
&parent_uid,
|
||||||
)
|
)
|
||||||
.map_err(|error| self.errno_error(error, "trash access"))?;
|
.map_err(|error| self.errno_error(error, "trash access"))?;
|
||||||
|
if self.db.has_pending_moves_out_of(&uid.to_string())? {
|
||||||
|
return Err(CoreError::conflict(
|
||||||
|
"wait for pending moves out of this folder to sync before trashing it",
|
||||||
|
));
|
||||||
|
}
|
||||||
self.rt
|
self.rt
|
||||||
.block_on(self.drive.trash_nodes(std::slice::from_ref(&uid)))
|
.block_on(self.drive.trash_nodes(std::slice::from_ref(&uid)))
|
||||||
.and_then(batch::into_unit)
|
.and_then(batch::into_unit)
|
||||||
@@ -5454,11 +5468,13 @@ impl Core {
|
|||||||
} else {
|
} else {
|
||||||
uid
|
uid
|
||||||
};
|
};
|
||||||
// Local-first or offline, or the network goes away under the call:
|
// Local-first or offline: queue the trash and the rename that follows.
|
||||||
// queue the trash. The rename that follows queues as well, behind it.
|
|
||||||
if !self.sends_inline() {
|
if !self.sends_inline() {
|
||||||
return self.queue_trash(uid, name, open);
|
return self.queue_trash(uid, name, open);
|
||||||
}
|
}
|
||||||
|
if self.has_pending_moves_out_of(uid)? {
|
||||||
|
return Err(Errno::EBUSY);
|
||||||
|
}
|
||||||
self.require_uid_writable(uid)?;
|
self.require_uid_writable(uid)?;
|
||||||
if let Err(e) = self
|
if let Err(e) = self
|
||||||
.block_on_bounded(self.drive.trash_nodes(std::slice::from_ref(uid)))
|
.block_on_bounded(self.drive.trash_nodes(std::slice::from_ref(uid)))
|
||||||
|
|||||||
@@ -419,6 +419,10 @@ impl Tray for DriveTray {
|
|||||||
self.state.phase.icon().into()
|
self.state.phase.icon().into()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn attention_icon_name(&self) -> String {
|
||||||
|
self.icon_name()
|
||||||
|
}
|
||||||
|
|
||||||
fn status(&self) -> Status {
|
fn status(&self) -> Status {
|
||||||
match self.state.phase {
|
match self.state.phase {
|
||||||
Phase::Attention | Phase::SessionExpired => Status::NeedsAttention,
|
Phase::Attention | Phase::SessionExpired => Status::NeedsAttention,
|
||||||
@@ -672,6 +676,22 @@ mod tests {
|
|||||||
assert_eq!(phase_of(false, 0, true, false), Phase::Synced);
|
assert_eq!(phase_of(false, 0, true, false), Phase::Synced);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn attention_states_supply_the_icon_the_tray_requests() {
|
||||||
|
let mut tray = DriveTray {
|
||||||
|
state: status_state(&status(""), &[], &[], Path::new("/m")),
|
||||||
|
socket: PathBuf::new(),
|
||||||
|
};
|
||||||
|
for (phase, icon) in [
|
||||||
|
(Phase::Attention, "dialog-warning-symbolic"),
|
||||||
|
(Phase::SessionExpired, "dialog-password-symbolic"),
|
||||||
|
] {
|
||||||
|
tray.state.phase = phase;
|
||||||
|
assert_eq!(tray.status(), Status::NeedsAttention);
|
||||||
|
assert_eq!(tray.attention_icon_name(), icon);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fn status(extra: &str) -> Response {
|
fn status(extra: &str) -> Response {
|
||||||
status_from(env!("CARGO_PKG_VERSION"), extra)
|
status_from(env!("CARGO_PKG_VERSION"), extra)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,16 @@ scratch (user data in `staging/` and `recovery/` is never touched by this).
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## [3.8.1] — 2026-11-19
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- **Branding** icons updated, screenshots updated
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- **Cache Eviction** fixed an issue where it didn't scan past pinned files and now also reapplies the limit at startup.
|
||||||
|
|
||||||
## [3.8.0] — 2026-11-14
|
## [3.8.0] — 2026-11-14
|
||||||
|
|
||||||
Schema: **45**. Synced folders now tell device backups apart from folders attached to My files.
|
Schema: **45**. Synced folders now tell device backups apart from folders attached to My files.
|
||||||
|
|||||||
@@ -167,6 +167,7 @@ invented account, so they never show anyone's files:
|
|||||||
```bash
|
```bash
|
||||||
scripts/screenshots.sh # all of them, into images/
|
scripts/screenshots.sh # all of them, into images/
|
||||||
scripts/screenshots.sh --only photos,files # just these
|
scripts/screenshots.sh --only photos,files # just these
|
||||||
|
scripts/screenshots.sh --debug --skip-build # reuse already-built debug binaries
|
||||||
scripts/screenshots.sh --website ../proton-drive-linux-website # and copy them to the website
|
scripts/screenshots.sh --website ../proton-drive-linux-website # and copy them to the website
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,40 @@
|
|||||||
|
# Violet / Copper vector branding
|
||||||
|
|
||||||
|
Drive, Stream, and Gallery share frontal violet–pink faces, shallow metallic copper backing, and narrow edge highlights. The icons are editable vector artwork with no embedded images or raster effects.
|
||||||
|
|
||||||
|
| App | Mark |
|
||||||
|
| --- | --- |
|
||||||
|
| Proton Drive for Linux | Open folder with lilac documents |
|
||||||
|
| Proton Stream | Rounded play prism |
|
||||||
|
| Proton Gallery | Stacked photo plates, mountains, and a copper sun |
|
||||||
|
|
||||||
|
## Master artwork
|
||||||
|
|
||||||
|
Edit `images/logo.svg`. It uses a 256-unit grid with transparent margins, a `mark` group, and reusable linear gradients. The copper backing extends six units up and right. SVG paths, rounded rectangles, circles, strokes, translation, and the photo clip are retained when exporting Android VectorDrawables. Unsupported SVG features cause generation to fail rather than silently change the artwork.
|
||||||
|
|
||||||
|
Earlier artwork is preserved in `images/branding-archive/`. The new assets replace the active branding without removing previous designs.
|
||||||
|
|
||||||
|
## Regeneration
|
||||||
|
|
||||||
|
```sh
|
||||||
|
python scripts/render-branding.py
|
||||||
|
python scripts/render-branding.py --check
|
||||||
|
```
|
||||||
|
|
||||||
|
Requires Python 3, librsvg (`rsvg-convert`), and ImageMagick (`magick`). Stream's TV banner also requires fontconfig and DejaVu Sans. Keep the generator identical across the three repositories; every checkout renders independently and requires no sibling checkout. Edit the canonical master rather than generated platform assets.
|
||||||
|
|
||||||
|
## Platform treatment
|
||||||
|
|
||||||
|
- Desktop SVGs and PNGs retain transparent margins and the exact approved geometry. The same colored artwork works on light and dark surfaces.
|
||||||
|
- Android adaptive icons use a pale lavender full-bleed background and a separate foreground containing the complete object. The 256-unit canvas maps to the central 64dp of the 108dp adaptive canvas; the painted geometry stays within the central safe circle. Android supplies the outer mask.
|
||||||
|
- Themed launcher icons and Stream's status-bar notification icon use a white silhouette without colored bevel highlights.
|
||||||
|
- iOS uses the same play prism over an opaque pale lavender square, exported at 1024px. The system supplies the corner mask.
|
||||||
|
- The Android TV banner pairs the play prism with the full Proton Stream name.
|
||||||
|
|
||||||
|
Keep full product names in launcher metadata. Application UI typography and photo-content icons are independent of this branding.
|
||||||
|
|
||||||
|
## Outputs
|
||||||
|
|
||||||
|
`packaging/io.narl.proton-drive-linux.svg` is installed by the desktop packages and embedded in the GTK resource bundle for in-app branding.
|
||||||
|
|
||||||
|
The Drive cover (`images/cover.svg` and `images/cover.png`) also embeds the canonical icon. The generator updates its `app-logo` group while preserving the surrounding cover layout.
|
||||||
|
After Width: | Height: | Size: 363 KiB |
@@ -0,0 +1,156 @@
|
|||||||
|
<svg width="1920" height="1080" viewBox="0 0 1920 1080" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="bg" x1="0" y1="0" x2="1920" y2="1080" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop offset="0" stop-color="#1A1240"/>
|
||||||
|
<stop offset="1" stop-color="#0A0618"/>
|
||||||
|
</linearGradient>
|
||||||
|
<radialGradient id="glow1" cx="1390" cy="520" r="640" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop offset="0" stop-color="#6D4AFF" stop-opacity="0.55"/>
|
||||||
|
<stop offset="0.5" stop-color="#6D4AFF" stop-opacity="0.15"/>
|
||||||
|
<stop offset="1" stop-color="#6D4AFF" stop-opacity="0"/>
|
||||||
|
</radialGradient>
|
||||||
|
<radialGradient id="glow2" cx="160" cy="1080" r="700" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop offset="0" stop-color="#A855F7" stop-opacity="0.25"/>
|
||||||
|
<stop offset="1" stop-color="#A855F7" stop-opacity="0"/>
|
||||||
|
</radialGradient>
|
||||||
|
<pattern id="dots" width="32" height="32" patternUnits="userSpaceOnUse">
|
||||||
|
<circle cx="2" cy="2" r="1.6" fill="#FFFFFF"/>
|
||||||
|
</pattern>
|
||||||
|
<radialGradient id="dotfade" cx="1390" cy="520" r="900" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop offset="0" stop-color="#FFFFFF" stop-opacity="1"/>
|
||||||
|
<stop offset="1" stop-color="#FFFFFF" stop-opacity="0"/>
|
||||||
|
</radialGradient>
|
||||||
|
<mask id="dotmask" maskUnits="userSpaceOnUse" x="0" y="0" width="1920" height="1080">
|
||||||
|
<rect width="1920" height="1080" fill="url(#dotfade)"/>
|
||||||
|
</mask>
|
||||||
|
<linearGradient id="title2" x1="140" y1="0" x2="760" y2="0" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop offset="0" stop-color="#C9BBFF"/>
|
||||||
|
<stop offset="1" stop-color="#8A6CFF"/>
|
||||||
|
</linearGradient>
|
||||||
|
|
||||||
|
<!-- app logo -->
|
||||||
|
<linearGradient id="pdl-face" x1="12" y1="12" x2="116" y2="112" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop offset="0" stop-color="#A48BFF"/>
|
||||||
|
<stop offset="0.55" stop-color="#7552FF"/>
|
||||||
|
<stop offset="1" stop-color="#5B36F2"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="pdl-cloud" x1="0" y1="34" x2="0" y2="88" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop offset="0" stop-color="#FFFFFF"/>
|
||||||
|
<stop offset="1" stop-color="#ECE6FF"/>
|
||||||
|
</linearGradient>
|
||||||
|
<mask id="pdl-cut" maskUnits="userSpaceOnUse" x="0" y="0" width="128" height="128">
|
||||||
|
<g fill="#FFFFFF">
|
||||||
|
<circle cx="66" cy="57" r="23"/>
|
||||||
|
<circle cx="42" cy="68" r="16"/>
|
||||||
|
<circle cx="88" cy="69" r="15"/>
|
||||||
|
<rect x="26" y="68" width="77" height="20" rx="10"/>
|
||||||
|
</g>
|
||||||
|
<g stroke="#000000" stroke-width="7.5" stroke-linecap="round" stroke-linejoin="round" fill="none">
|
||||||
|
<path d="M64 49v26"/>
|
||||||
|
<path d="M54.5 65.5l9.5 9.5 9.5-9.5"/>
|
||||||
|
</g>
|
||||||
|
</mask>
|
||||||
|
<filter id="logoshadow" x="-50%" y="-50%" width="200%" height="200%">
|
||||||
|
<feGaussianBlur stdDeviation="6"/>
|
||||||
|
</filter>
|
||||||
|
<filter id="chipshadow" x="-50%" y="-50%" width="200%" height="200%">
|
||||||
|
<feGaussianBlur stdDeviation="14"/>
|
||||||
|
</filter>
|
||||||
|
</defs>
|
||||||
|
|
||||||
|
<!-- background -->
|
||||||
|
<rect width="1920" height="1080" fill="url(#bg)"/>
|
||||||
|
<rect width="1920" height="1080" fill="url(#glow2)"/>
|
||||||
|
<rect width="1920" height="1080" fill="url(#glow1)"/>
|
||||||
|
<rect width="1920" height="1080" fill="url(#dots)" opacity="0.07" mask="url(#dotmask)"/>
|
||||||
|
|
||||||
|
<!-- orbit rings -->
|
||||||
|
<g fill="none" stroke="#FFFFFF">
|
||||||
|
<circle cx="1390" cy="520" r="300" stroke-opacity="0.10" stroke-width="2"/>
|
||||||
|
<circle cx="1390" cy="520" r="420" stroke-opacity="0.06" stroke-width="2" stroke-dasharray="4 14" stroke-linecap="round"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- logo, 128 -> 384 -->
|
||||||
|
<g transform="translate(1198 328) scale(3)">
|
||||||
|
<rect x="16" y="24" width="96" height="92" rx="24" fill="#2A1080" opacity="0.8" filter="url(#logoshadow)"/>
|
||||||
|
<rect x="12" y="16" width="104" height="100" rx="26" fill="#4424C0"/>
|
||||||
|
<rect x="12" y="12" width="104" height="100" rx="26" fill="url(#pdl-face)"/>
|
||||||
|
<rect x="12.5" y="12.5" width="103" height="99" rx="25.5" fill="none" stroke="#FFFFFF" stroke-opacity="0.2"/>
|
||||||
|
<rect y="3" width="128" height="128" fill="#2E1596" fill-opacity="0.3" mask="url(#pdl-cut)"/>
|
||||||
|
<rect width="128" height="128" fill="url(#pdl-cloud)" mask="url(#pdl-cut)"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- feature chips around the logo -->
|
||||||
|
<g font-family="Adwaita Sans" font-size="26" font-weight="600" fill="#FFFFFF">
|
||||||
|
<!-- folder, top left -->
|
||||||
|
<g transform="translate(1000 200)">
|
||||||
|
<rect x="0" y="10" width="236" height="76" rx="22" fill="#000000" opacity="0.35" filter="url(#chipshadow)"/>
|
||||||
|
<rect x="0" y="0" width="236" height="76" rx="22" fill="#2A2058" fill-opacity="0.85" stroke="#FFFFFF" stroke-opacity="0.14" stroke-width="1.5"/>
|
||||||
|
<g transform="translate(22 20)">
|
||||||
|
<rect width="36" height="36" rx="10" fill="#6D4AFF"/>
|
||||||
|
<path d="M8 13a2 2 0 0 1 2-2h5l2.5 2.5H26a2 2 0 0 1 2 2V25a2 2 0 0 1-2 2H10a2 2 0 0 1-2-2z" fill="#FFFFFF"/>
|
||||||
|
</g>
|
||||||
|
<text x="74" y="47">On demand</text>
|
||||||
|
</g>
|
||||||
|
<!-- sync, top right -->
|
||||||
|
<g transform="translate(1590 290)">
|
||||||
|
<rect x="0" y="10" width="164" height="76" rx="22" fill="#000000" opacity="0.35" filter="url(#chipshadow)"/>
|
||||||
|
<rect x="0" y="0" width="164" height="76" rx="22" fill="#2A2058" fill-opacity="0.85" stroke="#FFFFFF" stroke-opacity="0.14" stroke-width="1.5"/>
|
||||||
|
<g transform="translate(22 20)">
|
||||||
|
<rect width="36" height="36" rx="10" fill="#1EA885"/>
|
||||||
|
<g fill="none" stroke="#FFFFFF" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round">
|
||||||
|
<path d="M26 15a8.5 8.5 0 0 0-15-2"/>
|
||||||
|
<path d="M10 9v4.5h4.5"/>
|
||||||
|
<path d="M10 21a8.5 8.5 0 0 0 15 2"/>
|
||||||
|
<path d="M26 27v-4.5h-4.5"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<text x="74" y="47">Sync</text>
|
||||||
|
</g>
|
||||||
|
<!-- photos, bottom right -->
|
||||||
|
<g transform="translate(1560 690)">
|
||||||
|
<rect x="0" y="10" width="206" height="76" rx="22" fill="#000000" opacity="0.35" filter="url(#chipshadow)"/>
|
||||||
|
<rect x="0" y="0" width="206" height="76" rx="22" fill="#2A2058" fill-opacity="0.85" stroke="#FFFFFF" stroke-opacity="0.14" stroke-width="1.5"/>
|
||||||
|
<g transform="translate(22 20)">
|
||||||
|
<rect width="36" height="36" rx="10" fill="#E8618C"/>
|
||||||
|
<rect x="8" y="9" width="20" height="18" rx="3" fill="none" stroke="#FFFFFF" stroke-width="2.4"/>
|
||||||
|
<circle cx="14" cy="15" r="2" fill="#FFFFFF"/>
|
||||||
|
<path d="M9.5 25l6-6 4 4 3-3 4 4" fill="none" stroke="#FFFFFF" stroke-width="2.4" stroke-linejoin="round"/>
|
||||||
|
</g>
|
||||||
|
<text x="74" y="47">Photos</text>
|
||||||
|
</g>
|
||||||
|
<!-- terminal, bottom left -->
|
||||||
|
<g transform="translate(980 790)">
|
||||||
|
<rect x="0" y="10" width="206" height="76" rx="22" fill="#000000" opacity="0.35" filter="url(#chipshadow)"/>
|
||||||
|
<rect x="0" y="0" width="206" height="76" rx="22" fill="#2A2058" fill-opacity="0.85" stroke="#FFFFFF" stroke-opacity="0.14" stroke-width="1.5"/>
|
||||||
|
<g transform="translate(22 20)">
|
||||||
|
<rect width="36" height="36" rx="10" fill="#3B3F5C"/>
|
||||||
|
<path d="M9 12l6 6-6 6" fill="none" stroke="#FFFFFF" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
<path d="M18 25h9" stroke="#FFFFFF" stroke-width="2.6" stroke-linecap="round"/>
|
||||||
|
</g>
|
||||||
|
<text x="74" y="48" font-family="JetBrainsMono NF" font-size="25" font-weight="700">pdfs</text>
|
||||||
|
<text x="150" y="48" font-weight="500" fill="#B9B0D9">CLI</text>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- text block -->
|
||||||
|
<g font-family="Adwaita Sans">
|
||||||
|
<g transform="translate(140 292)">
|
||||||
|
<rect width="410" height="48" rx="24" fill="#6D4AFF" fill-opacity="0.18" stroke="#8A6CFF" stroke-opacity="0.6" stroke-width="1.5"/>
|
||||||
|
<circle cx="28" cy="24" r="6" fill="#A48BFF"/>
|
||||||
|
<text x="46" y="32" font-size="21" font-weight="700" letter-spacing="2.4" fill="#D6CCFF">UNOFFICIAL · OPEN SOURCE</text>
|
||||||
|
</g>
|
||||||
|
<text x="134" y="478" font-size="124" font-weight="800" letter-spacing="-3" fill="#FFFFFF">Proton Drive</text>
|
||||||
|
<text x="134" y="610" font-size="124" font-weight="800" letter-spacing="-3" fill="url(#title2)">for Linux</text>
|
||||||
|
<text x="140" y="702" font-size="38" font-weight="400" fill="#B9B0D9">Your Drive as a folder, and a native GTK4 app.</text>
|
||||||
|
<text x="140" y="752" font-size="38" font-weight="400" fill="#B9B0D9">No Electron.</text>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- footer -->
|
||||||
|
<g font-family="JetBrainsMono NF" font-size="24" fill="#8C83B0">
|
||||||
|
<text x="140" y="968">github.com/narrrl/proton-drive-linux</text>
|
||||||
|
</g>
|
||||||
|
<g font-family="Adwaita Sans" font-size="22" fill="#6F6894">
|
||||||
|
<text x="1780" y="968" text-anchor="end">Not affiliated with Proton AG</text>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 8.3 KiB |
@@ -0,0 +1,27 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="128" height="128" viewBox="0 0 128 128"
|
||||||
|
role="img" aria-label="Proton Drive for Linux" data-app="drive">
|
||||||
|
<title>Proton Drive for Linux</title>
|
||||||
|
<desc>A custom faceted D with an inset mount channel, in violet warming to copper.</desc>
|
||||||
|
<!-- Canonical artwork. Regenerate platform assets with scripts/render-branding.py. -->
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="face" x1="18" y1="12" x2="112" y2="116" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop stop-color="#F6F2FC"/>
|
||||||
|
<stop offset="1" stop-color="#E5DDEE"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="material" x1="31" y1="35" x2="96" y2="95" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop stop-color="#9170E2"/>
|
||||||
|
<stop offset=".38" stop-color="#6D4AFF"/>
|
||||||
|
<stop offset=".6" stop-color="#7044D1"/>
|
||||||
|
<stop offset=".82" stop-color="#A66598"/>
|
||||||
|
<stop offset="1" stop-color="#B56D51"/>
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<rect x="12" y="12" width="104" height="104" rx="27" fill="url(#face)"/>
|
||||||
|
<rect x="12.75" y="12.75" width="102.5" height="102.5" rx="26.25"
|
||||||
|
fill="none" stroke="#A18CB7" stroke-width="1.5"/>
|
||||||
|
<g id="mark">
|
||||||
|
<path d="M 43.32 33.92 H 64.94 C 73.4 33.92 80.92 36.74 86.56 42.38 L 96.9 52.72 C 103.48 59.3 103.48 68.7 96.9 75.28 L 86.56 85.62 C 80.92 91.26 73.4 94.08 64.94 94.08 H 43.32 C 38.15 94.08 33.92 89.85 33.92 84.68 V 75.28 H 47.08 V 79.04 C 47.08 80.074 47.926 80.92 48.96 80.92 H 64.94 C 69.64 80.92 73.4 79.04 77.16 75.28 L 85.62 66.82 C 87.218 65.222 87.218 62.778 85.62 61.18 L 77.16 52.72 C 73.4 48.96 69.64 47.08 64.94 47.08 H 48.96 C 47.926 47.08 47.08 47.926 47.08 48.96 V 52.72 H 33.92 V 43.32 C 33.92 38.15 38.15 33.92 43.32 33.92 Z" fill="url(#material)" fill-rule="nonzero"/>
|
||||||
|
<path d="M 29.22 58.36 H 62.12 C 65.222 58.36 67.76 60.898 67.76 64 C 67.76 67.102 65.222 69.64 62.12 69.64 H 29.22 C 26.118 69.64 23.58 67.102 23.58 64 C 23.58 60.898 26.118 58.36 29.22 58.36 Z" fill="url(#material)" fill-rule="nonzero"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 137 KiB After Width: | Height: | Size: 138 KiB |
|
Before Width: | Height: | Size: 363 KiB After Width: | Height: | Size: 407 KiB |
@@ -1,156 +1,164 @@
|
|||||||
<svg width="1920" height="1080" viewBox="0 0 1920 1080" xmlns="http://www.w3.org/2000/svg">
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<defs>
|
<!-- Generated by scripts/render-branding.py; edit images/logo.svg. -->
|
||||||
<linearGradient id="bg" x1="0" y1="0" x2="1920" y2="1080" gradientUnits="userSpaceOnUse">
|
<svg xmlns="http://www.w3.org/2000/svg" width="1920" height="1080" viewBox="0 0 1920 1080">
|
||||||
<stop offset="0" stop-color="#1A1240"/>
|
<defs>
|
||||||
<stop offset="1" stop-color="#0A0618"/>
|
<linearGradient id="bg" x1="0" y1="0" x2="1920" y2="1080" gradientUnits="userSpaceOnUse">
|
||||||
</linearGradient>
|
<stop offset="0" stop-color="#1A1240" />
|
||||||
<radialGradient id="glow1" cx="1390" cy="520" r="640" gradientUnits="userSpaceOnUse">
|
<stop offset="1" stop-color="#0A0618" />
|
||||||
<stop offset="0" stop-color="#6D4AFF" stop-opacity="0.55"/>
|
</linearGradient>
|
||||||
<stop offset="0.5" stop-color="#6D4AFF" stop-opacity="0.15"/>
|
<radialGradient id="glow1" cx="1390" cy="520" r="640" gradientUnits="userSpaceOnUse">
|
||||||
<stop offset="1" stop-color="#6D4AFF" stop-opacity="0"/>
|
<stop offset="0" stop-color="#6D4AFF" stop-opacity="0.55" />
|
||||||
</radialGradient>
|
<stop offset="0.5" stop-color="#6D4AFF" stop-opacity="0.15" />
|
||||||
<radialGradient id="glow2" cx="160" cy="1080" r="700" gradientUnits="userSpaceOnUse">
|
<stop offset="1" stop-color="#6D4AFF" stop-opacity="0" />
|
||||||
<stop offset="0" stop-color="#A855F7" stop-opacity="0.25"/>
|
</radialGradient>
|
||||||
<stop offset="1" stop-color="#A855F7" stop-opacity="0"/>
|
<radialGradient id="glow2" cx="160" cy="1080" r="700" gradientUnits="userSpaceOnUse">
|
||||||
</radialGradient>
|
<stop offset="0" stop-color="#A855F7" stop-opacity="0.25" />
|
||||||
<pattern id="dots" width="32" height="32" patternUnits="userSpaceOnUse">
|
<stop offset="1" stop-color="#A855F7" stop-opacity="0" />
|
||||||
<circle cx="2" cy="2" r="1.6" fill="#FFFFFF"/>
|
</radialGradient>
|
||||||
</pattern>
|
<pattern id="dots" width="32" height="32" patternUnits="userSpaceOnUse">
|
||||||
<radialGradient id="dotfade" cx="1390" cy="520" r="900" gradientUnits="userSpaceOnUse">
|
<circle cx="2" cy="2" r="1.6" fill="#FFFFFF" />
|
||||||
<stop offset="0" stop-color="#FFFFFF" stop-opacity="1"/>
|
</pattern>
|
||||||
<stop offset="1" stop-color="#FFFFFF" stop-opacity="0"/>
|
<radialGradient id="dotfade" cx="1390" cy="520" r="900" gradientUnits="userSpaceOnUse">
|
||||||
</radialGradient>
|
<stop offset="0" stop-color="#FFFFFF" stop-opacity="1" />
|
||||||
<mask id="dotmask" maskUnits="userSpaceOnUse" x="0" y="0" width="1920" height="1080">
|
<stop offset="1" stop-color="#FFFFFF" stop-opacity="0" />
|
||||||
<rect width="1920" height="1080" fill="url(#dotfade)"/>
|
</radialGradient>
|
||||||
</mask>
|
<mask id="dotmask" maskUnits="userSpaceOnUse" x="0" y="0" width="1920" height="1080">
|
||||||
<linearGradient id="title2" x1="140" y1="0" x2="760" y2="0" gradientUnits="userSpaceOnUse">
|
<rect width="1920" height="1080" fill="url(#dotfade)" />
|
||||||
<stop offset="0" stop-color="#C9BBFF"/>
|
</mask>
|
||||||
<stop offset="1" stop-color="#8A6CFF"/>
|
<linearGradient id="title2" x1="140" y1="0" x2="760" y2="0" gradientUnits="userSpaceOnUse">
|
||||||
</linearGradient>
|
<stop offset="0" stop-color="#C9BBFF" />
|
||||||
|
<stop offset="1" stop-color="#8A6CFF" />
|
||||||
<!-- app logo -->
|
</linearGradient>
|
||||||
<linearGradient id="pdl-face" x1="12" y1="12" x2="116" y2="112" gradientUnits="userSpaceOnUse">
|
<filter id="chipshadow" x="-50%" y="-50%" width="200%" height="200%">
|
||||||
<stop offset="0" stop-color="#A48BFF"/>
|
<feGaussianBlur stdDeviation="14" />
|
||||||
<stop offset="0.55" stop-color="#7552FF"/>
|
</filter>
|
||||||
<stop offset="1" stop-color="#5B36F2"/>
|
</defs>
|
||||||
</linearGradient>
|
<rect width="1920" height="1080" fill="url(#bg)" />
|
||||||
<linearGradient id="pdl-cloud" x1="0" y1="34" x2="0" y2="88" gradientUnits="userSpaceOnUse">
|
<rect width="1920" height="1080" fill="url(#glow2)" />
|
||||||
<stop offset="0" stop-color="#FFFFFF"/>
|
<rect width="1920" height="1080" fill="url(#glow1)" />
|
||||||
<stop offset="1" stop-color="#ECE6FF"/>
|
<rect width="1920" height="1080" fill="url(#dots)" opacity="0.07" mask="url(#dotmask)" />
|
||||||
</linearGradient>
|
<g fill="none" stroke="#FFFFFF">
|
||||||
<mask id="pdl-cut" maskUnits="userSpaceOnUse" x="0" y="0" width="128" height="128">
|
<circle cx="1390" cy="520" r="300" stroke-opacity="0.10" stroke-width="2" />
|
||||||
<g fill="#FFFFFF">
|
<circle cx="1390" cy="520" r="420" stroke-opacity="0.06" stroke-width="2" stroke-dasharray="4 14" stroke-linecap="round" />
|
||||||
<circle cx="66" cy="57" r="23"/>
|
|
||||||
<circle cx="42" cy="68" r="16"/>
|
|
||||||
<circle cx="88" cy="69" r="15"/>
|
|
||||||
<rect x="26" y="68" width="77" height="20" rx="10"/>
|
|
||||||
</g>
|
|
||||||
<g stroke="#000000" stroke-width="7.5" stroke-linecap="round" stroke-linejoin="round" fill="none">
|
|
||||||
<path d="M64 49v26"/>
|
|
||||||
<path d="M54.5 65.5l9.5 9.5 9.5-9.5"/>
|
|
||||||
</g>
|
|
||||||
</mask>
|
|
||||||
<filter id="logoshadow" x="-50%" y="-50%" width="200%" height="200%">
|
|
||||||
<feGaussianBlur stdDeviation="6"/>
|
|
||||||
</filter>
|
|
||||||
<filter id="chipshadow" x="-50%" y="-50%" width="200%" height="200%">
|
|
||||||
<feGaussianBlur stdDeviation="14"/>
|
|
||||||
</filter>
|
|
||||||
</defs>
|
|
||||||
|
|
||||||
<!-- background -->
|
|
||||||
<rect width="1920" height="1080" fill="url(#bg)"/>
|
|
||||||
<rect width="1920" height="1080" fill="url(#glow2)"/>
|
|
||||||
<rect width="1920" height="1080" fill="url(#glow1)"/>
|
|
||||||
<rect width="1920" height="1080" fill="url(#dots)" opacity="0.07" mask="url(#dotmask)"/>
|
|
||||||
|
|
||||||
<!-- orbit rings -->
|
|
||||||
<g fill="none" stroke="#FFFFFF">
|
|
||||||
<circle cx="1390" cy="520" r="300" stroke-opacity="0.10" stroke-width="2"/>
|
|
||||||
<circle cx="1390" cy="520" r="420" stroke-opacity="0.06" stroke-width="2" stroke-dasharray="4 14" stroke-linecap="round"/>
|
|
||||||
</g>
|
|
||||||
|
|
||||||
<!-- logo, 128 -> 384 -->
|
|
||||||
<g transform="translate(1198 328) scale(3)">
|
|
||||||
<rect x="16" y="24" width="96" height="92" rx="24" fill="#2A1080" opacity="0.8" filter="url(#logoshadow)"/>
|
|
||||||
<rect x="12" y="16" width="104" height="100" rx="26" fill="#4424C0"/>
|
|
||||||
<rect x="12" y="12" width="104" height="100" rx="26" fill="url(#pdl-face)"/>
|
|
||||||
<rect x="12.5" y="12.5" width="103" height="99" rx="25.5" fill="none" stroke="#FFFFFF" stroke-opacity="0.2"/>
|
|
||||||
<rect y="3" width="128" height="128" fill="#2E1596" fill-opacity="0.3" mask="url(#pdl-cut)"/>
|
|
||||||
<rect width="128" height="128" fill="url(#pdl-cloud)" mask="url(#pdl-cut)"/>
|
|
||||||
</g>
|
|
||||||
|
|
||||||
<!-- feature chips around the logo -->
|
|
||||||
<g font-family="Adwaita Sans" font-size="26" font-weight="600" fill="#FFFFFF">
|
|
||||||
<!-- folder, top left -->
|
|
||||||
<g transform="translate(1000 200)">
|
|
||||||
<rect x="0" y="10" width="236" height="76" rx="22" fill="#000000" opacity="0.35" filter="url(#chipshadow)"/>
|
|
||||||
<rect x="0" y="0" width="236" height="76" rx="22" fill="#2A2058" fill-opacity="0.85" stroke="#FFFFFF" stroke-opacity="0.14" stroke-width="1.5"/>
|
|
||||||
<g transform="translate(22 20)">
|
|
||||||
<rect width="36" height="36" rx="10" fill="#6D4AFF"/>
|
|
||||||
<path d="M8 13a2 2 0 0 1 2-2h5l2.5 2.5H26a2 2 0 0 1 2 2V25a2 2 0 0 1-2 2H10a2 2 0 0 1-2-2z" fill="#FFFFFF"/>
|
|
||||||
</g>
|
|
||||||
<text x="74" y="47">On demand</text>
|
|
||||||
</g>
|
</g>
|
||||||
<!-- sync, top right -->
|
<g id="app-logo" transform="translate(1198 328) scale(1.5)">
|
||||||
<g transform="translate(1590 290)">
|
<defs>
|
||||||
<rect x="0" y="10" width="164" height="76" rx="22" fill="#000000" opacity="0.35" filter="url(#chipshadow)"/>
|
<linearGradient id="drive-face" x1="36" y1="212" x2="220" y2="54" gradientUnits="userSpaceOnUse">
|
||||||
<rect x="0" y="0" width="164" height="76" rx="22" fill="#2A2058" fill-opacity="0.85" stroke="#FFFFFF" stroke-opacity="0.14" stroke-width="1.5"/>
|
<stop stop-color="#6240DA" />
|
||||||
<g transform="translate(22 20)">
|
<stop offset=".52" stop-color="#8056EF" />
|
||||||
<rect width="36" height="36" rx="10" fill="#1EA885"/>
|
<stop offset="1" stop-color="#D58BDF" />
|
||||||
<g fill="none" stroke="#FFFFFF" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round">
|
</linearGradient>
|
||||||
<path d="M26 15a8.5 8.5 0 0 0-15-2"/>
|
<linearGradient id="drive-rear" x1="26" y1="42" x2="218" y2="220" gradientUnits="userSpaceOnUse">
|
||||||
<path d="M10 9v4.5h4.5"/>
|
<stop stop-color="#8C68EE" />
|
||||||
<path d="M10 21a8.5 8.5 0 0 0 15 2"/>
|
<stop offset="1" stop-color="#5533B5" />
|
||||||
<path d="M26 27v-4.5h-4.5"/>
|
</linearGradient>
|
||||||
|
<linearGradient id="drive-paper" x1="60" y1="80" x2="180" y2="162" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop stop-color="#E7DFFA" />
|
||||||
|
<stop offset="1" stop-color="#BDA5EF" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="drive-copper" x1="32" y1="32" x2="232" y2="224" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop stop-color="#703E30" />
|
||||||
|
<stop offset=".16" stop-color="#B47456" />
|
||||||
|
<stop offset=".28" stop-color="#E6B296" />
|
||||||
|
<stop offset=".32" stop-color="#F8D8C3" />
|
||||||
|
<stop offset=".37" stop-color="#BB7C5A" />
|
||||||
|
<stop offset=".56" stop-color="#8A4D36" />
|
||||||
|
<stop offset=".69" stop-color="#D69B77" />
|
||||||
|
<stop offset=".75" stop-color="#F2C9AA" />
|
||||||
|
<stop offset=".81" stop-color="#B87956" />
|
||||||
|
<stop offset="1" stop-color="#713F30" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="drive-sun" x1="172" y1="82" x2="201" y2="112" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop stop-color="#8D513A" />
|
||||||
|
<stop offset=".33" stop-color="#DDA581" />
|
||||||
|
<stop offset=".47" stop-color="#F7D8B8" />
|
||||||
|
<stop offset=".53" stop-color="#D69B74" />
|
||||||
|
<stop offset="1" stop-color="#925439" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="drive-mountain" x1="44" y1="148" x2="186" y2="218" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop stop-color="#D9C9FA" />
|
||||||
|
<stop offset="1" stop-color="#A582E9" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="drive-far-mountain" x1="142" y1="152" x2="211" y2="216" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop stop-color="#E8B4EB" />
|
||||||
|
<stop offset="1" stop-color="#BB7BD7" />
|
||||||
|
</linearGradient>
|
||||||
|
<clipPath id="drive-photo-clip">
|
||||||
|
<rect x="28" y="54" width="194" height="172" rx="24" />
|
||||||
|
</clipPath>
|
||||||
|
</defs>
|
||||||
|
<g id="mark">
|
||||||
|
<path d="M48 48H91Q99 48 105 54L117 66Q123 72 132 72H208Q228 72 228 92V200Q228 220 208 220H48Q28 220 28 200V68Q28 48 48 48Z" fill="url(#drive-copper)" transform="translate(6 -6)" stroke="#7D4936" stroke-width=".8" stroke-linejoin="round" />
|
||||||
|
<path d="M48 48H91Q99 48 105 54L117 66Q123 72 132 72H208Q228 72 228 92V200Q228 220 208 220H48Q28 220 28 200V68Q28 48 48 48Z" fill="url(#drive-rear)" stroke="#5E3CBD" stroke-width=".8" />
|
||||||
|
<rect x="72" y="82" width="132" height="112" rx="10" fill="url(#drive-paper)" stroke="#EFE9FC" stroke-width="1" />
|
||||||
|
<rect x="51" y="97" width="140" height="109" rx="10" fill="url(#drive-paper)" stroke="#EFE9FC" stroke-width="1" />
|
||||||
|
<path d="M48 94H89Q97 94 103 100L115 112Q121 118 130 118H208Q228 118 228 138V206Q228 226 208 226H48Q28 226 28 206V114Q28 94 48 94Z" fill="url(#drive-copper)" transform="translate(6 -6)" stroke="#7D4936" stroke-width=".8" stroke-linejoin="round" />
|
||||||
|
<path d="M48 94H89Q97 94 103 100L115 112Q121 118 130 118H208Q228 118 228 138V206Q228 226 208 226H48Q28 226 28 206V114Q28 94 48 94Z" fill="url(#drive-face)" stroke="#5936B7" stroke-width=".9" />
|
||||||
|
<path d="M32 113Q32 98 48 98H89Q95 98 100 103L112 115Q120 122 130 122H208Q224 122 224 138" fill="none" stroke="#F3DDF9" stroke-opacity=".52" stroke-width="1.5" stroke-linecap="round" />
|
||||||
</g>
|
</g>
|
||||||
</g>
|
|
||||||
<text x="74" y="47">Sync</text>
|
|
||||||
</g>
|
</g>
|
||||||
<!-- photos, bottom right -->
|
<g font-family="Adwaita Sans" font-size="26" font-weight="600" fill="#FFFFFF">
|
||||||
<g transform="translate(1560 690)">
|
<g transform="translate(1000 200)">
|
||||||
<rect x="0" y="10" width="206" height="76" rx="22" fill="#000000" opacity="0.35" filter="url(#chipshadow)"/>
|
<rect x="0" y="10" width="236" height="76" rx="22" fill="#000000" opacity="0.35" filter="url(#chipshadow)" />
|
||||||
<rect x="0" y="0" width="206" height="76" rx="22" fill="#2A2058" fill-opacity="0.85" stroke="#FFFFFF" stroke-opacity="0.14" stroke-width="1.5"/>
|
<rect x="0" y="0" width="236" height="76" rx="22" fill="#2A2058" fill-opacity="0.85" stroke="#FFFFFF" stroke-opacity="0.14" stroke-width="1.5" />
|
||||||
<g transform="translate(22 20)">
|
<g transform="translate(22 20)">
|
||||||
<rect width="36" height="36" rx="10" fill="#E8618C"/>
|
<rect width="36" height="36" rx="10" fill="#6D4AFF" />
|
||||||
<rect x="8" y="9" width="20" height="18" rx="3" fill="none" stroke="#FFFFFF" stroke-width="2.4"/>
|
<path d="M8 13a2 2 0 0 1 2-2h5l2.5 2.5H26a2 2 0 0 1 2 2V25a2 2 0 0 1-2 2H10a2 2 0 0 1-2-2z" fill="#FFFFFF" />
|
||||||
<circle cx="14" cy="15" r="2" fill="#FFFFFF"/>
|
</g>
|
||||||
<path d="M9.5 25l6-6 4 4 3-3 4 4" fill="none" stroke="#FFFFFF" stroke-width="2.4" stroke-linejoin="round"/>
|
<text x="74" y="47">On demand</text>
|
||||||
</g>
|
</g>
|
||||||
<text x="74" y="47">Photos</text>
|
<g transform="translate(1590 290)">
|
||||||
|
<rect x="0" y="10" width="164" height="76" rx="22" fill="#000000" opacity="0.35" filter="url(#chipshadow)" />
|
||||||
|
<rect x="0" y="0" width="164" height="76" rx="22" fill="#2A2058" fill-opacity="0.85" stroke="#FFFFFF" stroke-opacity="0.14" stroke-width="1.5" />
|
||||||
|
<g transform="translate(22 20)">
|
||||||
|
<rect width="36" height="36" rx="10" fill="#1EA885" />
|
||||||
|
<g fill="none" stroke="#FFFFFF" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round">
|
||||||
|
<path d="M26 15a8.5 8.5 0 0 0-15-2" />
|
||||||
|
<path d="M10 9v4.5h4.5" />
|
||||||
|
<path d="M10 21a8.5 8.5 0 0 0 15 2" />
|
||||||
|
<path d="M26 27v-4.5h-4.5" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<text x="74" y="47">Sync</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(1560 690)">
|
||||||
|
<rect x="0" y="10" width="206" height="76" rx="22" fill="#000000" opacity="0.35" filter="url(#chipshadow)" />
|
||||||
|
<rect x="0" y="0" width="206" height="76" rx="22" fill="#2A2058" fill-opacity="0.85" stroke="#FFFFFF" stroke-opacity="0.14" stroke-width="1.5" />
|
||||||
|
<g transform="translate(22 20)">
|
||||||
|
<rect width="36" height="36" rx="10" fill="#E8618C" />
|
||||||
|
<rect x="8" y="9" width="20" height="18" rx="3" fill="none" stroke="#FFFFFF" stroke-width="2.4" />
|
||||||
|
<circle cx="14" cy="15" r="2" fill="#FFFFFF" />
|
||||||
|
<path d="M9.5 25l6-6 4 4 3-3 4 4" fill="none" stroke="#FFFFFF" stroke-width="2.4" stroke-linejoin="round" />
|
||||||
|
</g>
|
||||||
|
<text x="74" y="47">Photos</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(980 790)">
|
||||||
|
<rect x="0" y="10" width="206" height="76" rx="22" fill="#000000" opacity="0.35" filter="url(#chipshadow)" />
|
||||||
|
<rect x="0" y="0" width="206" height="76" rx="22" fill="#2A2058" fill-opacity="0.85" stroke="#FFFFFF" stroke-opacity="0.14" stroke-width="1.5" />
|
||||||
|
<g transform="translate(22 20)">
|
||||||
|
<rect width="36" height="36" rx="10" fill="#3B3F5C" />
|
||||||
|
<path d="M9 12l6 6-6 6" fill="none" stroke="#FFFFFF" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round" />
|
||||||
|
<path d="M18 25h9" stroke="#FFFFFF" stroke-width="2.6" stroke-linecap="round" />
|
||||||
|
</g>
|
||||||
|
<text x="74" y="48" font-family="JetBrainsMono NF" font-size="25" font-weight="700">pdfs</text>
|
||||||
|
<text x="150" y="48" font-weight="500" fill="#B9B0D9">CLI</text>
|
||||||
|
</g>
|
||||||
</g>
|
</g>
|
||||||
<!-- terminal, bottom left -->
|
<g font-family="Adwaita Sans">
|
||||||
<g transform="translate(980 790)">
|
<g transform="translate(140 292)">
|
||||||
<rect x="0" y="10" width="206" height="76" rx="22" fill="#000000" opacity="0.35" filter="url(#chipshadow)"/>
|
<rect width="410" height="48" rx="24" fill="#6D4AFF" fill-opacity="0.18" stroke="#8A6CFF" stroke-opacity="0.6" stroke-width="1.5" />
|
||||||
<rect x="0" y="0" width="206" height="76" rx="22" fill="#2A2058" fill-opacity="0.85" stroke="#FFFFFF" stroke-opacity="0.14" stroke-width="1.5"/>
|
<circle cx="28" cy="24" r="6" fill="#A48BFF" />
|
||||||
<g transform="translate(22 20)">
|
<text x="46" y="32" font-size="21" font-weight="700" letter-spacing="2.4" fill="#D6CCFF">UNOFFICIAL · OPEN SOURCE</text>
|
||||||
<rect width="36" height="36" rx="10" fill="#3B3F5C"/>
|
</g>
|
||||||
<path d="M9 12l6 6-6 6" fill="none" stroke="#FFFFFF" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round"/>
|
<text x="134" y="478" font-size="124" font-weight="800" letter-spacing="-3" fill="#FFFFFF">Proton Drive</text>
|
||||||
<path d="M18 25h9" stroke="#FFFFFF" stroke-width="2.6" stroke-linecap="round"/>
|
<text x="134" y="610" font-size="124" font-weight="800" letter-spacing="-3" fill="url(#title2)">for Linux</text>
|
||||||
</g>
|
<text x="140" y="702" font-size="38" font-weight="400" fill="#B9B0D9">Your Drive as a folder, and a native GTK4 app.</text>
|
||||||
<text x="74" y="48" font-family="JetBrainsMono NF" font-size="25" font-weight="700">pdfs</text>
|
<text x="140" y="752" font-size="38" font-weight="400" fill="#B9B0D9">No Electron.</text>
|
||||||
<text x="150" y="48" font-weight="500" fill="#B9B0D9">CLI</text>
|
|
||||||
</g>
|
</g>
|
||||||
</g>
|
<g font-family="JetBrainsMono NF" font-size="24" fill="#8C83B0">
|
||||||
|
<text x="140" y="968">github.com/narrrl/proton-drive-linux</text>
|
||||||
<!-- text block -->
|
</g>
|
||||||
<g font-family="Adwaita Sans">
|
<g font-family="Adwaita Sans" font-size="22" fill="#6F6894">
|
||||||
<g transform="translate(140 292)">
|
<text x="1780" y="968" text-anchor="end">Not affiliated with Proton AG</text>
|
||||||
<rect width="410" height="48" rx="24" fill="#6D4AFF" fill-opacity="0.18" stroke="#8A6CFF" stroke-opacity="0.6" stroke-width="1.5"/>
|
|
||||||
<circle cx="28" cy="24" r="6" fill="#A48BFF"/>
|
|
||||||
<text x="46" y="32" font-size="21" font-weight="700" letter-spacing="2.4" fill="#D6CCFF">UNOFFICIAL · OPEN SOURCE</text>
|
|
||||||
</g>
|
</g>
|
||||||
<text x="134" y="478" font-size="124" font-weight="800" letter-spacing="-3" fill="#FFFFFF">Proton Drive</text>
|
|
||||||
<text x="134" y="610" font-size="124" font-weight="800" letter-spacing="-3" fill="url(#title2)">for Linux</text>
|
|
||||||
<text x="140" y="702" font-size="38" font-weight="400" fill="#B9B0D9">Your Drive as a folder, and a native GTK4 app.</text>
|
|
||||||
<text x="140" y="752" font-size="38" font-weight="400" fill="#B9B0D9">No Electron.</text>
|
|
||||||
</g>
|
|
||||||
|
|
||||||
<!-- footer -->
|
|
||||||
<g font-family="JetBrainsMono NF" font-size="24" fill="#8C83B0">
|
|
||||||
<text x="140" y="968">github.com/narrrl/proton-drive-linux</text>
|
|
||||||
</g>
|
|
||||||
<g font-family="Adwaita Sans" font-size="22" fill="#6F6894">
|
|
||||||
<text x="1780" y="968" text-anchor="end">Not affiliated with Proton AG</text>
|
|
||||||
</g>
|
|
||||||
</svg>
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 115 KiB After Width: | Height: | Size: 115 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 33 KiB |
@@ -1,36 +1,44 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="256" viewBox="0 0 256 256" data-app="drive" role="img" aria-labelledby="drive-title drive-desc">
|
||||||
<svg width="128" height="128" viewBox="0 0 128 128" fill="none" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Proton Drive for Linux">
|
<title id="drive-title">Proton Drive for Linux</title>
|
||||||
<defs>
|
<desc id="drive-desc">Frontal violet and pink vector icon with shallow metallic copper backing.</desc>
|
||||||
<linearGradient id="pdl-face" x1="12" y1="12" x2="116" y2="112" gradientUnits="userSpaceOnUse">
|
<defs>
|
||||||
<stop offset="0" stop-color="#A48BFF"/>
|
<linearGradient id="drive-face" x1="36" y1="212" x2="220" y2="54" gradientUnits="userSpaceOnUse">
|
||||||
<stop offset="0.55" stop-color="#7552FF"/>
|
<stop stop-color="#6240DA"/><stop offset=".52" stop-color="#8056EF"/><stop offset="1" stop-color="#D58BDF"/>
|
||||||
<stop offset="1" stop-color="#5B36F2"/>
|
</linearGradient>
|
||||||
</linearGradient>
|
<linearGradient id="drive-rear" x1="26" y1="42" x2="218" y2="220" gradientUnits="userSpaceOnUse">
|
||||||
<linearGradient id="pdl-cloud" x1="0" y1="34" x2="0" y2="88" gradientUnits="userSpaceOnUse">
|
<stop stop-color="#8C68EE"/><stop offset="1" stop-color="#5533B5"/>
|
||||||
<stop offset="0" stop-color="#FFFFFF"/>
|
</linearGradient>
|
||||||
<stop offset="1" stop-color="#ECE6FF"/>
|
<linearGradient id="drive-paper" x1="60" y1="80" x2="180" y2="162" gradientUnits="userSpaceOnUse">
|
||||||
</linearGradient>
|
<stop stop-color="#E7DFFA"/><stop offset="1" stop-color="#BDA5EF"/>
|
||||||
<!-- the cloud, with the arrow cut out of it as negative space -->
|
</linearGradient>
|
||||||
<mask id="pdl-cut" maskUnits="userSpaceOnUse" x="0" y="0" width="128" height="128">
|
<linearGradient id="drive-copper" x1="32" y1="32" x2="232" y2="224" gradientUnits="userSpaceOnUse">
|
||||||
<g fill="#FFFFFF">
|
<stop stop-color="#703E30"/><stop offset=".16" stop-color="#B47456"/>
|
||||||
<circle cx="66" cy="57" r="23"/>
|
<stop offset=".28" stop-color="#E6B296"/><stop offset=".32" stop-color="#F8D8C3"/>
|
||||||
<circle cx="42" cy="68" r="16"/>
|
<stop offset=".37" stop-color="#BB7C5A"/><stop offset=".56" stop-color="#8A4D36"/>
|
||||||
<circle cx="88" cy="69" r="15"/>
|
<stop offset=".69" stop-color="#D69B77"/><stop offset=".75" stop-color="#F2C9AA"/>
|
||||||
<rect x="26" y="68" width="77" height="20" rx="10"/>
|
<stop offset=".81" stop-color="#B87956"/><stop offset="1" stop-color="#713F30"/>
|
||||||
</g>
|
</linearGradient>
|
||||||
<g stroke="#000000" stroke-width="7.5" stroke-linecap="round" stroke-linejoin="round">
|
<linearGradient id="drive-sun" x1="172" y1="82" x2="201" y2="112" gradientUnits="userSpaceOnUse">
|
||||||
<path d="M64 49v26"/>
|
<stop stop-color="#8D513A"/><stop offset=".33" stop-color="#DDA581"/>
|
||||||
<path d="M54.5 65.5l9.5 9.5 9.5-9.5"/>
|
<stop offset=".47" stop-color="#F7D8B8"/><stop offset=".53" stop-color="#D69B74"/>
|
||||||
</g>
|
<stop offset="1" stop-color="#925439"/>
|
||||||
</mask>
|
</linearGradient>
|
||||||
</defs>
|
<linearGradient id="drive-mountain" x1="44" y1="148" x2="186" y2="218" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop stop-color="#D9C9FA"/><stop offset="1" stop-color="#A582E9"/>
|
||||||
<!-- base: a rounded tile with a darker lower edge for depth -->
|
</linearGradient>
|
||||||
<rect x="12" y="16" width="104" height="100" rx="26" fill="#4424C0"/>
|
<linearGradient id="drive-far-mountain" x1="142" y1="152" x2="211" y2="216" gradientUnits="userSpaceOnUse">
|
||||||
<rect x="12" y="12" width="104" height="100" rx="26" fill="url(#pdl-face)"/>
|
<stop stop-color="#E8B4EB"/><stop offset="1" stop-color="#BB7BD7"/>
|
||||||
<rect x="12.5" y="12.5" width="103" height="99" rx="25.5" stroke="#FFFFFF" stroke-opacity="0.2"/>
|
</linearGradient>
|
||||||
|
<clipPath id="drive-photo-clip"><rect x="28" y="54" width="194" height="172" rx="24"/></clipPath>
|
||||||
<!-- cloud shadow, then the cloud itself -->
|
</defs>
|
||||||
<rect y="3" width="128" height="128" fill="#2E1596" fill-opacity="0.3" mask="url(#pdl-cut)"/>
|
<!-- Canonical vector artwork; regenerate platform assets with scripts/render-branding.py. -->
|
||||||
<rect width="128" height="128" fill="url(#pdl-cloud)" mask="url(#pdl-cut)"/>
|
<g id="mark">
|
||||||
|
<path d="M48 48H91Q99 48 105 54L117 66Q123 72 132 72H208Q228 72 228 92V200Q228 220 208 220H48Q28 220 28 200V68Q28 48 48 48Z" fill="url(#drive-copper)" transform="translate(6 -6)" stroke="#7D4936" stroke-width=".8" stroke-linejoin="round"/>
|
||||||
|
<path d="M48 48H91Q99 48 105 54L117 66Q123 72 132 72H208Q228 72 228 92V200Q228 220 208 220H48Q28 220 28 200V68Q28 48 48 48Z" fill="url(#drive-rear)" stroke="#5E3CBD" stroke-width=".8"/>
|
||||||
|
<rect x="72" y="82" width="132" height="112" rx="10" fill="url(#drive-paper)" stroke="#EFE9FC" stroke-width="1"/>
|
||||||
|
<rect x="51" y="97" width="140" height="109" rx="10" fill="url(#drive-paper)" stroke="#EFE9FC" stroke-width="1"/>
|
||||||
|
<path d="M48 94H89Q97 94 103 100L115 112Q121 118 130 118H208Q228 118 228 138V206Q228 226 208 226H48Q28 226 28 206V114Q28 94 48 94Z" fill="url(#drive-copper)" transform="translate(6 -6)" stroke="#7D4936" stroke-width=".8" stroke-linejoin="round"/>
|
||||||
|
<path d="M48 94H89Q97 94 103 100L115 112Q121 118 130 118H208Q228 118 228 138V206Q228 226 208 226H48Q28 226 28 206V114Q28 94 48 94Z" fill="url(#drive-face)" stroke="#5936B7" stroke-width=".9"/>
|
||||||
|
<path d="M32 113Q32 98 48 98H89Q95 98 100 103L112 115Q120 122 130 122H208Q224 122 224 138" fill="none" stroke="#F3DDF9" stroke-opacity=".52" stroke-width="1.5" stroke-linecap="round"/>
|
||||||
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 1.6 MiB After Width: | Height: | Size: 1.6 MiB |
|
Before Width: | Height: | Size: 283 KiB After Width: | Height: | Size: 283 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 96 KiB After Width: | Height: | Size: 96 KiB |
|
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 97 KiB |
@@ -9,7 +9,7 @@
|
|||||||
# Build + install: cd packaging && makepkg -fi
|
# Build + install: cd packaging && makepkg -fi
|
||||||
|
|
||||||
pkgname=proton-drive-linux
|
pkgname=proton-drive-linux
|
||||||
pkgver=3.8.0
|
pkgver=3.8.1
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="Unofficial Proton Drive client for Linux: files-on-demand FUSE mount, CLI, GTK4 app + tray"
|
pkgdesc="Unofficial Proton Drive client for Linux: files-on-demand FUSE mount, CLI, GTK4 app + tray"
|
||||||
arch=('x86_64')
|
arch=('x86_64')
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
pkgbase = proton-drive-for-linux-bin
|
pkgbase = proton-drive-for-linux-bin
|
||||||
pkgdesc = Unofficial Proton Drive client: FUSE files-on-demand mount, CLI, GTK4 app, tray (binaries)
|
pkgdesc = Unofficial Proton Drive client: FUSE files-on-demand mount, CLI, GTK4 app, tray (binaries)
|
||||||
pkgver = 3.7.0
|
pkgver = 3.8.0
|
||||||
pkgrel = 1
|
pkgrel = 1
|
||||||
url = https://proton-drive.narl.io
|
url = https://proton-drive.narl.io
|
||||||
install = proton-drive.install
|
install = proton-drive.install
|
||||||
@@ -22,15 +22,15 @@ pkgbase = proton-drive-for-linux-bin
|
|||||||
optdepends = xdg-utils: "Open folder" action in the tray menu
|
optdepends = xdg-utils: "Open folder" action in the tray menu
|
||||||
optdepends = fzf: search-as-you-type launcher (pdfs-prompt --fzf)
|
optdepends = fzf: search-as-you-type launcher (pdfs-prompt --fzf)
|
||||||
optdepends = foot: terminal that hosts pdfs-prompt --fzf when started from a keybinding
|
optdepends = foot: terminal that hosts pdfs-prompt --fzf when started from a keybinding
|
||||||
provides = proton-drive-for-linux=3.7.0
|
provides = proton-drive-for-linux=3.8.0
|
||||||
provides = proton-drive-linux=3.7.0
|
provides = proton-drive-linux=3.8.0
|
||||||
provides = pdfs
|
provides = pdfs
|
||||||
conflicts = proton-drive-linux
|
conflicts = proton-drive-linux
|
||||||
conflicts = proton-drive-for-linux
|
conflicts = proton-drive-for-linux
|
||||||
conflicts = proton-drive-for-linux-git
|
conflicts = proton-drive-for-linux-git
|
||||||
options = !strip
|
options = !strip
|
||||||
options = !debug
|
options = !debug
|
||||||
source = proton-drive-linux-3.7.0-x86_64.tar.gz::https://github.com/narrrl/proton-drive-linux/releases/download/v3.7.0/proton-drive-linux-3.7.0-x86_64.tar.gz
|
source = proton-drive-linux-3.8.0-x86_64.tar.gz::https://github.com/narrrl/proton-drive-linux/releases/download/v3.8.0/proton-drive-linux-3.8.0-x86_64.tar.gz
|
||||||
sha256sums = SKIP
|
sha256sums = 99348fbf9121624701ae43e52776e5d1c469ff5cd5e52cd216bf8cb969e0bab2
|
||||||
|
|
||||||
pkgname = proton-drive-for-linux-bin
|
pkgname = proton-drive-for-linux-bin
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
# Maintainer: Nils Pukropp <contact@narl.io>
|
# Maintainer: Nils Pukropp <contact@narl.io>
|
||||||
|
|
||||||
pkgname=proton-drive-for-linux-bin
|
pkgname=proton-drive-for-linux-bin
|
||||||
pkgver=3.7.0
|
pkgver=3.8.0
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="Unofficial Proton Drive client: FUSE files-on-demand mount, CLI, GTK4 app, tray (binaries)"
|
pkgdesc="Unofficial Proton Drive client: FUSE files-on-demand mount, CLI, GTK4 app, tray (binaries)"
|
||||||
arch=('x86_64')
|
arch=('x86_64')
|
||||||
@@ -29,7 +29,7 @@ _tag="v$pkgver"
|
|||||||
# (desktop files, icon, user service, translations, completions) in a /usr-like
|
# (desktop files, icon, user service, translations, completions) in a /usr-like
|
||||||
# tree under one directory.
|
# tree under one directory.
|
||||||
source=("proton-drive-linux-$pkgver-x86_64.tar.gz::$_repo/releases/download/$_tag/proton-drive-linux-$pkgver-x86_64.tar.gz")
|
source=("proton-drive-linux-$pkgver-x86_64.tar.gz::$_repo/releases/download/$_tag/proton-drive-linux-$pkgver-x86_64.tar.gz")
|
||||||
sha256sums=('SKIP')
|
sha256sums=('99348fbf9121624701ae43e52776e5d1c469ff5cd5e52cd216bf8cb969e0bab2')
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
cd "$srcdir/proton-drive-linux-$pkgver-x86_64"
|
cd "$srcdir/proton-drive-linux-$pkgver-x86_64"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
pkgbase = proton-drive-for-linux-git
|
pkgbase = proton-drive-for-linux-git
|
||||||
pkgdesc = Unofficial Proton Drive client: FUSE files-on-demand mount, CLI, GTK4 app, tray (git)
|
pkgdesc = Unofficial Proton Drive client: FUSE files-on-demand mount, CLI, GTK4 app, tray (git)
|
||||||
pkgver = 3.7.0.r0.g7ab14bb
|
pkgver = 3.8.0.r0.g6fa91e8
|
||||||
pkgrel = 1
|
pkgrel = 1
|
||||||
url = https://proton-drive.narl.io
|
url = https://proton-drive.narl.io
|
||||||
install = proton-drive.install
|
install = proton-drive.install
|
||||||
@@ -25,8 +25,8 @@ pkgbase = proton-drive-for-linux-git
|
|||||||
optdepends = xdg-utils: "Open folder" action in the tray menu
|
optdepends = xdg-utils: "Open folder" action in the tray menu
|
||||||
optdepends = fzf: search-as-you-type launcher (pdfs-prompt --fzf)
|
optdepends = fzf: search-as-you-type launcher (pdfs-prompt --fzf)
|
||||||
optdepends = foot: terminal that hosts pdfs-prompt --fzf when started from a keybinding
|
optdepends = foot: terminal that hosts pdfs-prompt --fzf when started from a keybinding
|
||||||
provides = proton-drive-for-linux=3.7.0.r0.g7ab14bb
|
provides = proton-drive-for-linux=3.8.0.r0.g6fa91e8
|
||||||
provides = proton-drive-linux=3.7.0.r0.g7ab14bb
|
provides = proton-drive-linux=3.8.0.r0.g6fa91e8
|
||||||
provides = pdfs
|
provides = pdfs
|
||||||
conflicts = proton-drive-linux
|
conflicts = proton-drive-linux
|
||||||
conflicts = proton-drive-for-linux
|
conflicts = proton-drive-for-linux
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# Maintainer: Nils Pukropp <contact@narl.io>
|
# Maintainer: Nils Pukropp <contact@narl.io>
|
||||||
|
|
||||||
pkgname=proton-drive-for-linux-git
|
pkgname=proton-drive-for-linux-git
|
||||||
pkgver=3.7.0.r0.g7ab14bb
|
pkgver=3.8.0.r0.g6fa91e8
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="Unofficial Proton Drive client: FUSE files-on-demand mount, CLI, GTK4 app, tray (git)"
|
pkgdesc="Unofficial Proton Drive client: FUSE files-on-demand mount, CLI, GTK4 app, tray (git)"
|
||||||
arch=('x86_64')
|
arch=('x86_64')
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
pkgbase = proton-drive-for-linux
|
pkgbase = proton-drive-for-linux
|
||||||
pkgdesc = Unofficial Proton Drive client: files-on-demand FUSE mount, CLI, GTK4 app and tray
|
pkgdesc = Unofficial Proton Drive client: files-on-demand FUSE mount, CLI, GTK4 app and tray
|
||||||
pkgver = 3.7.0
|
pkgver = 3.8.0
|
||||||
pkgrel = 1
|
pkgrel = 1
|
||||||
url = https://proton-drive.narl.io
|
url = https://proton-drive.narl.io
|
||||||
install = proton-drive.install
|
install = proton-drive.install
|
||||||
@@ -24,13 +24,13 @@ pkgbase = proton-drive-for-linux
|
|||||||
optdepends = xdg-utils: "Open folder" action in the tray menu
|
optdepends = xdg-utils: "Open folder" action in the tray menu
|
||||||
optdepends = fzf: search-as-you-type launcher (pdfs-prompt --fzf)
|
optdepends = fzf: search-as-you-type launcher (pdfs-prompt --fzf)
|
||||||
optdepends = foot: terminal that hosts pdfs-prompt --fzf when started from a keybinding
|
optdepends = foot: terminal that hosts pdfs-prompt --fzf when started from a keybinding
|
||||||
provides = proton-drive-linux=3.7.0
|
provides = proton-drive-linux=3.8.0
|
||||||
provides = pdfs
|
provides = pdfs
|
||||||
conflicts = proton-drive-linux
|
conflicts = proton-drive-linux
|
||||||
conflicts = proton-drive-for-linux-bin
|
conflicts = proton-drive-for-linux-bin
|
||||||
conflicts = proton-drive-for-linux-git
|
conflicts = proton-drive-for-linux-git
|
||||||
options = !lto
|
options = !lto
|
||||||
source = proton-drive-for-linux-3.7.0.tar.gz::https://github.com/narrrl/proton-drive-linux/archive/refs/tags/v3.7.0.tar.gz
|
source = proton-drive-for-linux-3.8.0.tar.gz::https://github.com/narrrl/proton-drive-linux/archive/refs/tags/v3.8.0.tar.gz
|
||||||
sha256sums = 542c534976e335cde6658de127e1eefffade9057d5332fd33457bc371c7a2737
|
sha256sums = 095186fa108f27ff2b175188bb13466a94cc8ecfd71088df47a41d4d9baa58c1
|
||||||
|
|
||||||
pkgname = proton-drive-for-linux
|
pkgname = proton-drive-for-linux
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
# Maintainer: Nils Pukropp <contact@narl.io>
|
# Maintainer: Nils Pukropp <contact@narl.io>
|
||||||
|
|
||||||
pkgname=proton-drive-for-linux
|
pkgname=proton-drive-for-linux
|
||||||
pkgver=3.7.0
|
pkgver=3.8.0
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="Unofficial Proton Drive client: files-on-demand FUSE mount, CLI, GTK4 app and tray"
|
pkgdesc="Unofficial Proton Drive client: files-on-demand FUSE mount, CLI, GTK4 app and tray"
|
||||||
arch=('x86_64')
|
arch=('x86_64')
|
||||||
@@ -26,7 +26,7 @@ options=('!lto')
|
|||||||
# Stops the running daemon before removal, so the mount stops mirroring deletes.
|
# Stops the running daemon before removal, so the mount stops mirroring deletes.
|
||||||
install=proton-drive.install
|
install=proton-drive.install
|
||||||
source=("$pkgname-$pkgver.tar.gz::$_repo/archive/refs/tags/v$pkgver.tar.gz")
|
source=("$pkgname-$pkgver.tar.gz::$_repo/archive/refs/tags/v$pkgver.tar.gz")
|
||||||
sha256sums=('542c534976e335cde6658de127e1eefffade9057d5332fd33457bc371c7a2737')
|
sha256sums=('095186fa108f27ff2b175188bb13466a94cc8ecfd71088df47a41d4d9baa58c1')
|
||||||
|
|
||||||
_srcname="proton-drive-linux-$pkgver"
|
_srcname="proton-drive-linux-$pkgver"
|
||||||
|
|
||||||
|
|||||||
@@ -1,36 +1,44 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="256" viewBox="0 0 256 256" data-app="drive" role="img" aria-labelledby="drive-title drive-desc">
|
||||||
<svg width="128" height="128" viewBox="0 0 128 128" fill="none" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Proton Drive for Linux">
|
<title id="drive-title">Proton Drive for Linux</title>
|
||||||
<defs>
|
<desc id="drive-desc">Frontal violet and pink vector icon with shallow metallic copper backing.</desc>
|
||||||
<linearGradient id="pdl-face" x1="12" y1="12" x2="116" y2="112" gradientUnits="userSpaceOnUse">
|
<defs>
|
||||||
<stop offset="0" stop-color="#A48BFF"/>
|
<linearGradient id="drive-face" x1="36" y1="212" x2="220" y2="54" gradientUnits="userSpaceOnUse">
|
||||||
<stop offset="0.55" stop-color="#7552FF"/>
|
<stop stop-color="#6240DA"/><stop offset=".52" stop-color="#8056EF"/><stop offset="1" stop-color="#D58BDF"/>
|
||||||
<stop offset="1" stop-color="#5B36F2"/>
|
</linearGradient>
|
||||||
</linearGradient>
|
<linearGradient id="drive-rear" x1="26" y1="42" x2="218" y2="220" gradientUnits="userSpaceOnUse">
|
||||||
<linearGradient id="pdl-cloud" x1="0" y1="34" x2="0" y2="88" gradientUnits="userSpaceOnUse">
|
<stop stop-color="#8C68EE"/><stop offset="1" stop-color="#5533B5"/>
|
||||||
<stop offset="0" stop-color="#FFFFFF"/>
|
</linearGradient>
|
||||||
<stop offset="1" stop-color="#ECE6FF"/>
|
<linearGradient id="drive-paper" x1="60" y1="80" x2="180" y2="162" gradientUnits="userSpaceOnUse">
|
||||||
</linearGradient>
|
<stop stop-color="#E7DFFA"/><stop offset="1" stop-color="#BDA5EF"/>
|
||||||
<!-- the cloud, with the arrow cut out of it as negative space -->
|
</linearGradient>
|
||||||
<mask id="pdl-cut" maskUnits="userSpaceOnUse" x="0" y="0" width="128" height="128">
|
<linearGradient id="drive-copper" x1="32" y1="32" x2="232" y2="224" gradientUnits="userSpaceOnUse">
|
||||||
<g fill="#FFFFFF">
|
<stop stop-color="#703E30"/><stop offset=".16" stop-color="#B47456"/>
|
||||||
<circle cx="66" cy="57" r="23"/>
|
<stop offset=".28" stop-color="#E6B296"/><stop offset=".32" stop-color="#F8D8C3"/>
|
||||||
<circle cx="42" cy="68" r="16"/>
|
<stop offset=".37" stop-color="#BB7C5A"/><stop offset=".56" stop-color="#8A4D36"/>
|
||||||
<circle cx="88" cy="69" r="15"/>
|
<stop offset=".69" stop-color="#D69B77"/><stop offset=".75" stop-color="#F2C9AA"/>
|
||||||
<rect x="26" y="68" width="77" height="20" rx="10"/>
|
<stop offset=".81" stop-color="#B87956"/><stop offset="1" stop-color="#713F30"/>
|
||||||
</g>
|
</linearGradient>
|
||||||
<g stroke="#000000" stroke-width="7.5" stroke-linecap="round" stroke-linejoin="round">
|
<linearGradient id="drive-sun" x1="172" y1="82" x2="201" y2="112" gradientUnits="userSpaceOnUse">
|
||||||
<path d="M64 49v26"/>
|
<stop stop-color="#8D513A"/><stop offset=".33" stop-color="#DDA581"/>
|
||||||
<path d="M54.5 65.5l9.5 9.5 9.5-9.5"/>
|
<stop offset=".47" stop-color="#F7D8B8"/><stop offset=".53" stop-color="#D69B74"/>
|
||||||
</g>
|
<stop offset="1" stop-color="#925439"/>
|
||||||
</mask>
|
</linearGradient>
|
||||||
</defs>
|
<linearGradient id="drive-mountain" x1="44" y1="148" x2="186" y2="218" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop stop-color="#D9C9FA"/><stop offset="1" stop-color="#A582E9"/>
|
||||||
<!-- base: a rounded tile with a darker lower edge for depth -->
|
</linearGradient>
|
||||||
<rect x="12" y="16" width="104" height="100" rx="26" fill="#4424C0"/>
|
<linearGradient id="drive-far-mountain" x1="142" y1="152" x2="211" y2="216" gradientUnits="userSpaceOnUse">
|
||||||
<rect x="12" y="12" width="104" height="100" rx="26" fill="url(#pdl-face)"/>
|
<stop stop-color="#E8B4EB"/><stop offset="1" stop-color="#BB7BD7"/>
|
||||||
<rect x="12.5" y="12.5" width="103" height="99" rx="25.5" stroke="#FFFFFF" stroke-opacity="0.2"/>
|
</linearGradient>
|
||||||
|
<clipPath id="drive-photo-clip"><rect x="28" y="54" width="194" height="172" rx="24"/></clipPath>
|
||||||
<!-- cloud shadow, then the cloud itself -->
|
</defs>
|
||||||
<rect y="3" width="128" height="128" fill="#2E1596" fill-opacity="0.3" mask="url(#pdl-cut)"/>
|
<!-- Canonical vector artwork; regenerate platform assets with scripts/render-branding.py. -->
|
||||||
<rect width="128" height="128" fill="url(#pdl-cloud)" mask="url(#pdl-cut)"/>
|
<g id="mark">
|
||||||
|
<path d="M48 48H91Q99 48 105 54L117 66Q123 72 132 72H208Q228 72 228 92V200Q228 220 208 220H48Q28 220 28 200V68Q28 48 48 48Z" fill="url(#drive-copper)" transform="translate(6 -6)" stroke="#7D4936" stroke-width=".8" stroke-linejoin="round"/>
|
||||||
|
<path d="M48 48H91Q99 48 105 54L117 66Q123 72 132 72H208Q228 72 228 92V200Q228 220 208 220H48Q28 220 28 200V68Q28 48 48 48Z" fill="url(#drive-rear)" stroke="#5E3CBD" stroke-width=".8"/>
|
||||||
|
<rect x="72" y="82" width="132" height="112" rx="10" fill="url(#drive-paper)" stroke="#EFE9FC" stroke-width="1"/>
|
||||||
|
<rect x="51" y="97" width="140" height="109" rx="10" fill="url(#drive-paper)" stroke="#EFE9FC" stroke-width="1"/>
|
||||||
|
<path d="M48 94H89Q97 94 103 100L115 112Q121 118 130 118H208Q228 118 228 138V206Q228 226 208 226H48Q28 226 28 206V114Q28 94 48 94Z" fill="url(#drive-copper)" transform="translate(6 -6)" stroke="#7D4936" stroke-width=".8" stroke-linejoin="round"/>
|
||||||
|
<path d="M48 94H89Q97 94 103 100L115 112Q121 118 130 118H208Q228 118 228 138V206Q228 226 208 226H48Q28 226 28 206V114Q28 94 48 94Z" fill="url(#drive-face)" stroke="#5936B7" stroke-width=".9"/>
|
||||||
|
<path d="M32 113Q32 98 48 98H89Q95 98 100 103L112 115Q120 122 130 122H208Q224 122 224 138" fill="none" stroke="#F3DDF9" stroke-opacity=".52" stroke-width="1.5" stroke-linecap="round"/>
|
||||||
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 3.6 KiB |
@@ -0,0 +1,273 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""Render the vector branding into desktop, Android, iOS and Windows assets.
|
||||||
|
|
||||||
|
Kept identical across the suite; each checkout renders independently.
|
||||||
|
"""
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
from pathlib import Path
|
||||||
|
import re
|
||||||
|
import shutil
|
||||||
|
import subprocess
|
||||||
|
import tempfile
|
||||||
|
import xml.etree.ElementTree as ET
|
||||||
|
|
||||||
|
|
||||||
|
SVG = "{http://www.w3.org/2000/svg}"
|
||||||
|
ANDROID = "{http://schemas.android.com/apk/res/android}"
|
||||||
|
AAPT = "{http://schemas.android.com/aapt}"
|
||||||
|
ET.register_namespace("", SVG[1:-1])
|
||||||
|
ET.register_namespace("android", ANDROID[1:-1])
|
||||||
|
ET.register_namespace("aapt", AAPT[1:-1])
|
||||||
|
HEADER = '<?xml version="1.0" encoding="utf-8"?>\n'
|
||||||
|
GENERATED = '<!-- Generated by scripts/render-branding.py; edit images/logo.svg. -->\n'
|
||||||
|
ROOT = Path(__file__).resolve().parent.parent
|
||||||
|
BACKGROUND = "#F4F0FA"
|
||||||
|
|
||||||
|
|
||||||
|
def run(*args, data=None):
|
||||||
|
return subprocess.run(args, input=data, stdout=subprocess.PIPE, check=True).stdout
|
||||||
|
|
||||||
|
|
||||||
|
def render(svg, size, *, opaque=False):
|
||||||
|
png = run("rsvg-convert", "-w", str(size), data=svg.encode())
|
||||||
|
options = ["-background", BACKGROUND, "-alpha", "remove", "-alpha", "off"] if opaque else []
|
||||||
|
return run("magick", "-", *options, "-strip", "PNG:-", data=png)
|
||||||
|
|
||||||
|
|
||||||
|
def shape_path(node):
|
||||||
|
"""Use the same paths on Android, including rounded rectangles and circles."""
|
||||||
|
tag = node.tag.removeprefix(SVG)
|
||||||
|
a = node.attrib
|
||||||
|
if tag == "path":
|
||||||
|
return a["d"]
|
||||||
|
if tag == "circle":
|
||||||
|
x, y, r = (float(a[k]) for k in ("cx", "cy", "r"))
|
||||||
|
return f"M{x-r:g} {y:g}a{r:g} {r:g} 0 1 0 {2*r:g} 0a{r:g} {r:g} 0 1 0 {-2*r:g} 0Z"
|
||||||
|
if tag == "rect":
|
||||||
|
x, y = float(a.get("x", 0)), float(a.get("y", 0))
|
||||||
|
w, h = float(a["width"]), float(a["height"])
|
||||||
|
rx = min(float(a.get("rx", a.get("ry", 0))), w / 2)
|
||||||
|
ry = min(float(a.get("ry", a.get("rx", 0))), h / 2)
|
||||||
|
if not rx or not ry:
|
||||||
|
return f"M{x:g} {y:g}h{w:g}v{h:g}h{-w:g}Z"
|
||||||
|
return (f"M{x+rx:g} {y:g}H{x+w-rx:g}a{rx:g} {ry:g} 0 0 1 {rx:g} {ry:g}"
|
||||||
|
f"V{y+h-ry:g}a{rx:g} {ry:g} 0 0 1 {-rx:g} {ry:g}"
|
||||||
|
f"H{x+rx:g}a{rx:g} {ry:g} 0 0 1 {-rx:g} {-ry:g}"
|
||||||
|
f"V{y+ry:g}a{rx:g} {ry:g} 0 0 1 {rx:g} {-ry:g}Z")
|
||||||
|
raise ValueError(f"Unsupported SVG shape: {tag}")
|
||||||
|
|
||||||
|
|
||||||
|
def color(value):
|
||||||
|
if value == "none":
|
||||||
|
return "#00000000"
|
||||||
|
if re.fullmatch(r"#[0-9a-fA-F]{6}", value):
|
||||||
|
return "#FF" + value[1:]
|
||||||
|
raise ValueError(f"Unsupported SVG color: {value}")
|
||||||
|
|
||||||
|
|
||||||
|
def xml(element):
|
||||||
|
ET.indent(element, space=" ")
|
||||||
|
return HEADER + GENERATED + ET.tostring(element, encoding="unicode") + "\n"
|
||||||
|
|
||||||
|
|
||||||
|
class Artwork:
|
||||||
|
def __init__(self, master):
|
||||||
|
if master.attrib.get("viewBox") != "0 0 256 256":
|
||||||
|
raise ValueError("The master must use the 256-unit vector grid")
|
||||||
|
self.defs = master.find(f"{SVG}defs")
|
||||||
|
self.mark = master.find(f"{SVG}g[@id='mark']")
|
||||||
|
if self.defs is None or self.mark is None or not list(self.mark):
|
||||||
|
raise ValueError("The master needs defs and a nonempty mark group")
|
||||||
|
self.gradients = {g.attrib["id"]: g for g in self.defs.findall(f"{SVG}linearGradient")}
|
||||||
|
self.clips = {g.attrib["id"]: g for g in self.defs.findall(f"{SVG}clipPath")}
|
||||||
|
self.svg_defs = ET.tostring(self.defs, encoding="unicode")
|
||||||
|
self.svg_mark = ET.tostring(self.mark, encoding="unicode")
|
||||||
|
|
||||||
|
def paint(self, node, name, value):
|
||||||
|
if not value.startswith("url(#"):
|
||||||
|
node.set(ANDROID + name, color(value))
|
||||||
|
return
|
||||||
|
gradient = self.gradients[value[5:-1]]
|
||||||
|
if gradient.attrib.get("gradientUnits") != "userSpaceOnUse":
|
||||||
|
raise ValueError("Android gradients must use userSpaceOnUse")
|
||||||
|
attr = ET.SubElement(node, AAPT + "attr", {"name": "android:" + name})
|
||||||
|
out = ET.SubElement(attr, "gradient", {
|
||||||
|
ANDROID + "type": "linear",
|
||||||
|
**{ANDROID + dst: gradient.attrib[src] for src, dst in
|
||||||
|
(("x1", "startX"), ("y1", "startY"), ("x2", "endX"), ("y2", "endY"))},
|
||||||
|
})
|
||||||
|
for stop in gradient:
|
||||||
|
ET.SubElement(out, "item", {
|
||||||
|
ANDROID + "offset": stop.attrib.get("offset", "0"),
|
||||||
|
ANDROID + "color": color(stop.attrib["stop-color"]),
|
||||||
|
})
|
||||||
|
|
||||||
|
def android_node(self, source, parent, monochrome):
|
||||||
|
tag = source.tag.removeprefix(SVG)
|
||||||
|
a = source.attrib
|
||||||
|
if tag not in {"g", "path", "rect", "circle"}:
|
||||||
|
raise ValueError(f"Unsupported artwork element: {tag}")
|
||||||
|
supported = {"id", "transform", "clip-path"}
|
||||||
|
if tag != "g":
|
||||||
|
supported |= {"d", "x", "y", "width", "height", "rx", "ry", "cx", "cy", "r",
|
||||||
|
"fill", "fill-rule", "fill-opacity", "opacity", "stroke", "stroke-width",
|
||||||
|
"stroke-opacity", "stroke-linecap", "stroke-linejoin"}
|
||||||
|
if set(a) - supported:
|
||||||
|
raise ValueError(f"Unsupported {tag} attributes: {set(a) - supported}")
|
||||||
|
if "transform" in a:
|
||||||
|
match = re.fullmatch(r"translate\(\s*([-\d.]+)[ ,]+([-\d.]+)\s*\)", a["transform"])
|
||||||
|
if not match:
|
||||||
|
raise ValueError("Only explicit x/y translation is supported")
|
||||||
|
parent = ET.SubElement(parent, "group", {
|
||||||
|
ANDROID + "translateX": match[1], ANDROID + "translateY": match[2],
|
||||||
|
})
|
||||||
|
if "clip-path" in a:
|
||||||
|
clip = self.clips[a["clip-path"][5:-1]]
|
||||||
|
parent = ET.SubElement(parent, "group")
|
||||||
|
ET.SubElement(parent, "clip-path", {
|
||||||
|
ANDROID + "pathData": " ".join(shape_path(s) for s in clip),
|
||||||
|
})
|
||||||
|
if tag == "g":
|
||||||
|
for child in source:
|
||||||
|
self.android_node(child, parent, monochrome)
|
||||||
|
return
|
||||||
|
fill = a.get("fill", "#000000")
|
||||||
|
if monochrome and fill == "none":
|
||||||
|
return # Bevel highlights do not belong in the themed silhouette.
|
||||||
|
node = ET.SubElement(parent, "path", {
|
||||||
|
ANDROID + "pathData": shape_path(source),
|
||||||
|
ANDROID + "fillType": "evenOdd" if a.get("fill-rule") == "evenodd" else "nonZero",
|
||||||
|
})
|
||||||
|
self.paint(node, "fillColor", "#FFFFFF" if monochrome else fill)
|
||||||
|
if monochrome:
|
||||||
|
return
|
||||||
|
opacity = float(a.get("opacity", 1))
|
||||||
|
node.set(ANDROID + "fillAlpha", f'{opacity * float(a.get("fill-opacity", 1)):g}')
|
||||||
|
if "stroke" in a:
|
||||||
|
self.paint(node, "strokeColor", a["stroke"])
|
||||||
|
node.set(ANDROID + "strokeWidth", a.get("stroke-width", "1"))
|
||||||
|
node.set(ANDROID + "strokeAlpha", f'{opacity * float(a.get("stroke-opacity", 1)):g}')
|
||||||
|
for src, dst in (("stroke-linecap", "strokeLineCap"), ("stroke-linejoin", "strokeLineJoin")):
|
||||||
|
if src in a:
|
||||||
|
node.set(ANDROID + dst, a[src])
|
||||||
|
|
||||||
|
def vector(self, size=108, scale=.25, *, monochrome=False):
|
||||||
|
# The 256-unit canvas maps to 64dp; all painted corners stay inside
|
||||||
|
# the adaptive icon's central safe circle, including the copper rim.
|
||||||
|
root = ET.Element("vector", {
|
||||||
|
ANDROID + "width": f"{size}dp", ANDROID + "height": f"{size}dp",
|
||||||
|
ANDROID + "viewportWidth": str(size), ANDROID + "viewportHeight": str(size),
|
||||||
|
})
|
||||||
|
shift = size / 2 - 128 * scale
|
||||||
|
group = ET.SubElement(root, "group", {
|
||||||
|
ANDROID + "scaleX": str(scale), ANDROID + "scaleY": str(scale),
|
||||||
|
ANDROID + "translateX": str(shift), ANDROID + "translateY": str(shift),
|
||||||
|
})
|
||||||
|
self.android_node(self.mark, group, monochrome)
|
||||||
|
return xml(root).encode()
|
||||||
|
|
||||||
|
def ios(self):
|
||||||
|
return HEADER + GENERATED + f'''<svg xmlns="http://www.w3.org/2000/svg" width="1024" height="1024" viewBox="0 0 256 256">
|
||||||
|
{self.svg_defs}
|
||||||
|
<rect width="256" height="256" fill="{BACKGROUND}"/>
|
||||||
|
{self.svg_mark}
|
||||||
|
</svg>
|
||||||
|
'''
|
||||||
|
|
||||||
|
def banner(self):
|
||||||
|
return HEADER + GENERATED + f'''<svg xmlns="http://www.w3.org/2000/svg" width="640" height="360" viewBox="0 0 320 180">
|
||||||
|
{self.svg_defs}
|
||||||
|
<rect width="320" height="180" fill="{BACKGROUND}"/>
|
||||||
|
<g transform="translate(8 24) scale(.5)">{self.svg_mark}</g>
|
||||||
|
<g fill="#35245D" font-family="DejaVu Sans">
|
||||||
|
<text x="140" y="82" font-size="22">Proton</text>
|
||||||
|
<text x="138" y="115" font-size="30" font-weight="bold">Stream</text>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
'''
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
parser = argparse.ArgumentParser(description=__doc__)
|
||||||
|
parser.add_argument("--check", action="store_true", help="Verify outputs without writing files")
|
||||||
|
args = parser.parse_args()
|
||||||
|
for command in ("rsvg-convert", "magick"):
|
||||||
|
if not shutil.which(command):
|
||||||
|
parser.error(f"{command} is required")
|
||||||
|
source = ROOT / "images/logo.svg"
|
||||||
|
master = ET.parse(source).getroot()
|
||||||
|
app = master.attrib["data-app"]
|
||||||
|
if app not in {"drive", "stream", "gallery"}:
|
||||||
|
parser.error("Unknown data-app in images/logo.svg")
|
||||||
|
art = Artwork(master)
|
||||||
|
desktop = source.read_bytes()
|
||||||
|
outputs = {}
|
||||||
|
if app in {"drive", "stream"}:
|
||||||
|
slug = "proton-drive-linux" if app == "drive" else "proton-stream"
|
||||||
|
outputs[f"packaging/io.narl.{slug}.svg"] = desktop
|
||||||
|
if app == "drive":
|
||||||
|
cover = ET.parse(ROOT / "images/cover.svg").getroot()
|
||||||
|
slot = cover.find(f"{SVG}g[@id='app-logo']")
|
||||||
|
if slot is None:
|
||||||
|
raise ValueError("The cover needs an app-logo group")
|
||||||
|
for child in list(slot):
|
||||||
|
slot.remove(child)
|
||||||
|
slot.append(ET.fromstring(art.svg_defs))
|
||||||
|
slot.append(ET.fromstring(art.svg_mark))
|
||||||
|
cover_svg = xml(cover)
|
||||||
|
outputs["images/cover.svg"] = cover_svg.encode()
|
||||||
|
outputs["images/cover.png"] = render(cover_svg, 1920)
|
||||||
|
if app in {"stream", "gallery"}:
|
||||||
|
res = "android/app/src/main/res/drawable/"
|
||||||
|
outputs[res + "ic_launcher_foreground.xml"] = art.vector()
|
||||||
|
outputs[res + "ic_launcher_monochrome.xml"] = art.vector(monochrome=True)
|
||||||
|
# A full-bleed neutral surface keeps the violet object legible under
|
||||||
|
# every launcher mask. The foreground retains its own copper depth.
|
||||||
|
background = ET.Element("vector", {
|
||||||
|
ANDROID + "width": "108dp", ANDROID + "height": "108dp",
|
||||||
|
ANDROID + "viewportWidth": "108", ANDROID + "viewportHeight": "108",
|
||||||
|
})
|
||||||
|
ET.SubElement(background, "path", {
|
||||||
|
ANDROID + "fillColor": color(BACKGROUND), ANDROID + "pathData": "M0 0H108V108H0Z",
|
||||||
|
})
|
||||||
|
outputs[res + "ic_launcher_background.xml"] = xml(background).encode()
|
||||||
|
if app == "gallery":
|
||||||
|
outputs["images/icon-512.png"] = render(desktop.decode(), 512)
|
||||||
|
outputs["android/app/src/main/res/drawable/ic_gallery.xml"] = art.vector(256, 1)
|
||||||
|
if app == "stream":
|
||||||
|
outputs["android/app/src/main/res/drawable/ic_notification_stream.xml"] = art.vector(24, 24/256, monochrome=True)
|
||||||
|
outputs["crates/pstr-app/assets/icon-256.png"] = render(desktop.decode(), 256)
|
||||||
|
ios = art.ios()
|
||||||
|
outputs["ios/ProtonStream/Resources/AppIcon.svg"] = ios.encode()
|
||||||
|
outputs["ios/ProtonStream/Resources/Assets.xcassets/AppIcon.appiconset/AppIcon-1024.png"] = render(ios, 1024, opaque=True)
|
||||||
|
with tempfile.TemporaryDirectory(prefix="proton-icons-") as temp:
|
||||||
|
files = []
|
||||||
|
for size in (16, 24, 32, 48, 64, 128, 256):
|
||||||
|
path = Path(temp) / f"{size}.png"
|
||||||
|
path.write_bytes(render(desktop.decode(), size))
|
||||||
|
files.append(str(path))
|
||||||
|
outputs["packaging/windows/proton-stream.ico"] = run("magick", *files, "-strip", "ICO:-")
|
||||||
|
if not shutil.which("fc-match"):
|
||||||
|
parser.error("fontconfig is required to render the Android TV banner")
|
||||||
|
if "DejaVu Sans" not in run("fc-match", "-f", "%{family}", "DejaVu Sans").decode():
|
||||||
|
parser.error("DejaVu Sans is required to render the Android TV banner")
|
||||||
|
outputs["android/app/src/main/res/drawable-nodpi/tv_banner.png"] = render(art.banner(), 640, opaque=True)
|
||||||
|
stale = []
|
||||||
|
for relative, data in outputs.items():
|
||||||
|
target = ROOT / relative
|
||||||
|
if target.exists() and target.read_bytes() == data:
|
||||||
|
continue
|
||||||
|
if args.check:
|
||||||
|
stale.append(relative)
|
||||||
|
else:
|
||||||
|
target.parent.mkdir(parents=True, exist_ok=True)
|
||||||
|
target.write_bytes(data)
|
||||||
|
print(f"wrote {relative}")
|
||||||
|
if stale:
|
||||||
|
parser.exit(1, "Branding assets need regeneration:\n" + "\n".join(stale) + "\n")
|
||||||
|
print(f"{'Verified' if args.check else 'Rendered'} {len(outputs)} assets from images/logo.svg")
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
@@ -22,6 +22,7 @@ Options:
|
|||||||
with its scripts/sync-screenshots.sh
|
with its scripts/sync-screenshots.sh
|
||||||
--settle SECS how long a page gets to load before its capture (default 3)
|
--settle SECS how long a page gets to load before its capture (default 3)
|
||||||
--debug use a debug build instead of a release build
|
--debug use a debug build instead of a release build
|
||||||
|
--skip-build reuse binaries from the selected profile
|
||||||
--keep keep the temporary directory, for a look at the logs
|
--keep keep the temporary directory, for a look at the logs
|
||||||
|
|
||||||
Needs cage, grim, wlr-randr, ImageMagick, dbus-run-session and
|
Needs cage, grim, wlr-randr, ImageMagick, dbus-run-session and
|
||||||
@@ -45,8 +46,19 @@ if [[ "${1:-}" == --capture ]]; then
|
|||||||
output() { wlr-randr --output "$(wlr-randr | awk 'NR==1 {print $1}')" --custom-mode "$1"; }
|
output() { wlr-randr --output "$(wlr-randr | awk 'NR==1 {print $1}')" --custom-mode "$1"; }
|
||||||
shoot() {
|
shoot() {
|
||||||
sleep "$SETTLE"
|
sleep "$SETTLE"
|
||||||
grim "$OUT/$1.png"
|
# Cold GTK/portal startup can leave the compositor black briefly.
|
||||||
echo "captured $1"
|
# Wait for actual window content rather than publishing a blank PNG.
|
||||||
|
local capture_try
|
||||||
|
for capture_try in 1 2 3 4 5; do
|
||||||
|
grim "$OUT/$1.png"
|
||||||
|
if [[ "$(magick "$OUT/$1.png" -format '%[fx:standard_deviation>0.001]' info:)" == 1 ]]; then
|
||||||
|
echo "captured $1"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
echo "no window content for $1; screenshot is blank" >&2
|
||||||
|
return 1
|
||||||
}
|
}
|
||||||
# Cut the compositor's black background off a window smaller than it.
|
# Cut the compositor's black background off a window smaller than it.
|
||||||
trim() {
|
trim() {
|
||||||
@@ -127,6 +139,7 @@ shots=$all
|
|||||||
website=
|
website=
|
||||||
settle=3
|
settle=3
|
||||||
profile=release
|
profile=release
|
||||||
|
skip_build=
|
||||||
keep=
|
keep=
|
||||||
while (($#)); do
|
while (($#)); do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
@@ -135,6 +148,7 @@ while (($#)); do
|
|||||||
--website) website=$(realpath -- "${2:?}"); shift ;;
|
--website) website=$(realpath -- "${2:?}"); shift ;;
|
||||||
--settle) settle=${2:?}; shift ;;
|
--settle) settle=${2:?}; shift ;;
|
||||||
--debug) profile=debug ;;
|
--debug) profile=debug ;;
|
||||||
|
--skip-build) skip_build=1 ;;
|
||||||
--keep) keep=1 ;;
|
--keep) keep=1 ;;
|
||||||
-h | --help) usage ;;
|
-h | --help) usage ;;
|
||||||
*) echo "unknown option: $1" >&2; usage ;;
|
*) echo "unknown option: $1" >&2; usage ;;
|
||||||
@@ -163,11 +177,17 @@ done
|
|||||||
|
|
||||||
cargo_flags=(--manifest-path "$repo/Cargo.toml" --locked)
|
cargo_flags=(--manifest-path "$repo/Cargo.toml" --locked)
|
||||||
[[ "$profile" == release ]] && cargo_flags+=(--release)
|
[[ "$profile" == release ]] && cargo_flags+=(--release)
|
||||||
cargo build "${cargo_flags[@]}" -p pdfs-gui --bin pdfs-app --bin pdfs-prompt
|
if [[ -z "$skip_build" ]]; then
|
||||||
cargo build "${cargo_flags[@]}" -p pdfs-core --example demo_daemon
|
cargo build "${cargo_flags[@]}" -p pdfs-gui --bin pdfs-app --bin pdfs-prompt
|
||||||
|
cargo build "${cargo_flags[@]}" -p pdfs-core --example demo_daemon
|
||||||
|
fi
|
||||||
target=$(cargo metadata --manifest-path "$repo/Cargo.toml" --format-version 1 --no-deps |
|
target=$(cargo metadata --manifest-path "$repo/Cargo.toml" --format-version 1 --no-deps |
|
||||||
python3 -c 'import json, sys; print(json.load(sys.stdin)["target_directory"])')
|
python3 -c 'import json, sys; print(json.load(sys.stdin)["target_directory"])')
|
||||||
bin="$(mktemp -d)"
|
bin="$(mktemp -d)"
|
||||||
|
for executable in "$target/$profile/pdfs-app" "$target/$profile/pdfs-prompt" \
|
||||||
|
"$target/$profile/examples/demo_daemon"; do
|
||||||
|
[[ -x "$executable" ]] || { echo "missing executable: $executable; run without --skip-build" >&2; exit 2; }
|
||||||
|
done
|
||||||
ln -s "$target/$profile/pdfs-app" "$target/$profile/pdfs-prompt" \
|
ln -s "$target/$profile/pdfs-app" "$target/$profile/pdfs-prompt" \
|
||||||
"$target/$profile/examples/demo_daemon" "$bin/"
|
"$target/$profile/examples/demo_daemon" "$bin/"
|
||||||
|
|
||||||
@@ -182,6 +202,9 @@ chmod 700 "$root/run"
|
|||||||
# The user's own fonts, so the shots look like the app does here.
|
# The user's own fonts, so the shots look like the app does here.
|
||||||
mkdir -p "$root/data/fonts"
|
mkdir -p "$root/data/fonts"
|
||||||
[[ -d "$HOME/.local/share/fonts" ]] && cp -rs "$HOME/.local/share/fonts/." "$root/data/fonts/"
|
[[ -d "$HOME/.local/share/fonts" ]] && cp -rs "$HOME/.local/share/fonts/." "$root/data/fonts/"
|
||||||
|
# Prefer this checkout's brand over an older icon from an installed package.
|
||||||
|
install -Dm644 "$repo/packaging/io.narl.proton-drive-linux.svg" \
|
||||||
|
"$root/data/icons/hicolor/scalable/apps/io.narl.proton-drive-linux.svg"
|
||||||
mkdir -p "$root/config/proton-drive-linux"
|
mkdir -p "$root/config/proton-drive-linux"
|
||||||
cat >"$root/config/proton-drive-linux/config.json" <<'EOF'
|
cat >"$root/config/proton-drive-linux/config.json" <<'EOF'
|
||||||
{
|
{
|
||||||
|
|||||||