first step
This commit is contained in:
parent
95bba1f473
commit
9ee818e47a
7 changed files with 48 additions and 2 deletions
|
@ -20,6 +20,9 @@
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/Theme.AsgardiusS3Manager"
|
android:theme="@style/Theme.AsgardiusS3Manager"
|
||||||
tools:targetApi="31">
|
tools:targetApi="31">
|
||||||
|
<activity
|
||||||
|
android:name=".Bucketacl"
|
||||||
|
android:exported="false" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".CorsConfig"
|
android:name=".CorsConfig"
|
||||||
android:configChanges="orientation|keyboardHidden|screenSize|smallestScreenSize|screenLayout|uiMode|keyboardHidden"
|
android:configChanges="orientation|keyboardHidden|screenSize|smallestScreenSize|screenLayout|uiMode|keyboardHidden"
|
||||||
|
@ -64,9 +67,9 @@
|
||||||
android:exported="false" />
|
android:exported="false" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".ImageViewer"
|
android:name=".ImageViewer"
|
||||||
android:hardwareAccelerated="false"
|
|
||||||
android:configChanges="orientation|keyboardHidden|screenSize|smallestScreenSize|screenLayout|uiMode|keyboardHidden"
|
android:configChanges="orientation|keyboardHidden|screenSize|smallestScreenSize|screenLayout|uiMode|keyboardHidden"
|
||||||
android:exported="false" />
|
android:exported="false"
|
||||||
|
android:hardwareAccelerated="false" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".TextViewer"
|
android:name=".TextViewer"
|
||||||
android:configChanges="orientation|keyboardHidden|screenSize|smallestScreenSize|screenLayout|uiMode|keyboardHidden"
|
android:configChanges="orientation|keyboardHidden|screenSize|smallestScreenSize|screenLayout|uiMode|keyboardHidden"
|
||||||
|
|
|
@ -189,6 +189,8 @@ public class BucketSelect extends AppCompatActivity {
|
||||||
copyName(Name.get(position).toString());
|
copyName(Name.get(position).toString());
|
||||||
} else if (menuItem.getTitle() == getResources().getString(R.string.cors_config)) {
|
} else if (menuItem.getTitle() == getResources().getString(R.string.cors_config)) {
|
||||||
corsConfig(Name.get(position).toString());
|
corsConfig(Name.get(position).toString());
|
||||||
|
} else if (menuItem.getTitle() == getResources().getString(R.string.acl)) {
|
||||||
|
aclConfig(Name.get(position).toString());
|
||||||
} else if (menuItem.getTitle() == getResources().getString(R.string.file_del)) {
|
} else if (menuItem.getTitle() == getResources().getString(R.string.file_del)) {
|
||||||
//Toast.makeText(BucketSelect.this, getResources().getString(R.string.pending_feature), Toast.LENGTH_SHORT).show();
|
//Toast.makeText(BucketSelect.this, getResources().getString(R.string.pending_feature), Toast.LENGTH_SHORT).show();
|
||||||
delete(prefix + Name.get(position).toString());
|
delete(prefix + Name.get(position).toString());
|
||||||
|
@ -388,6 +390,18 @@ public class BucketSelect extends AppCompatActivity {
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void aclConfig(String bucket) {
|
||||||
|
Intent intent = new Intent(this, Bucketacl.class);
|
||||||
|
intent.putExtra("endpoint", endpoint);
|
||||||
|
intent.putExtra("username", username);
|
||||||
|
intent.putExtra("password", password);
|
||||||
|
intent.putExtra("bucket", bucket);
|
||||||
|
intent.putExtra("region", location);
|
||||||
|
intent.putExtra("style", style);
|
||||||
|
intent.putExtra("pdfendpoint", pdfendpoint);
|
||||||
|
startActivity(intent);
|
||||||
|
}
|
||||||
|
|
||||||
public void copyName (String name) {
|
public void copyName (String name) {
|
||||||
ClipboardManager clipboard = (ClipboardManager) getSystemService(Context.CLIPBOARD_SERVICE);
|
ClipboardManager clipboard = (ClipboardManager) getSystemService(Context.CLIPBOARD_SERVICE);
|
||||||
ClipData clip = ClipData.newPlainText("name", name);
|
ClipData clip = ClipData.newPlainText("name", name);
|
||||||
|
|
14
app/src/main/java/asgardius/page/s3manager/Bucketacl.java
Normal file
14
app/src/main/java/asgardius/page/s3manager/Bucketacl.java
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
package asgardius.page.s3manager;
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
|
||||||
|
public class Bucketacl extends AppCompatActivity {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_bucketacl);
|
||||||
|
}
|
||||||
|
}
|
9
app/src/main/res/layout/activity_bucketacl.xml
Normal file
9
app/src/main/res/layout/activity_bucketacl.xml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".Bucketacl">
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -33,6 +33,10 @@
|
||||||
android:id="@+id/cors_config"
|
android:id="@+id/cors_config"
|
||||||
android:title="@string/cors_config" />
|
android:title="@string/cors_config" />
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:id="@+id/acl_config"
|
||||||
|
android:title="@string/acl" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/deletefolder"
|
android:id="@+id/deletefolder"
|
||||||
android:title="@string/file_del" />
|
android:title="@string/file_del" />
|
||||||
|
|
|
@ -115,4 +115,5 @@
|
||||||
<string name="save_links">Guardar enlaces en archivo</string>
|
<string name="save_links">Guardar enlaces en archivo</string>
|
||||||
<string name="copy_links">Copiar enlaces al potapapeles</string>
|
<string name="copy_links">Copiar enlaces al potapapeles</string>
|
||||||
<string name="save_ok">Archivo guardado exitosamente</string>
|
<string name="save_ok">Archivo guardado exitosamente</string>
|
||||||
|
<string name="acl">Permisos de acceso</string>
|
||||||
</resources>
|
</resources>
|
|
@ -119,4 +119,5 @@
|
||||||
<string name="save_links">Save links to file</string>
|
<string name="save_links">Save links to file</string>
|
||||||
<string name="save_ok">File saved successfully</string>
|
<string name="save_ok">File saved successfully</string>
|
||||||
<string name="copy_links">Copy links to clipboard</string>
|
<string name="copy_links">Copy links to clipboard</string>
|
||||||
|
<string name="acl">Access permissions</string>
|
||||||
</resources>
|
</resources>
|
Loading…
Reference in a new issue